Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable unsafe code refactoring creates unnecessarily complex projects #44301

Closed
sharwell opened this issue May 15, 2020 · 1 comment
Closed

Comments

@sharwell
Copy link
Member

sharwell commented May 15, 2020

Version Used: 16.6 Preview 4

Steps to Reproduce:

  1. Create a CPS project
  2. Write code with the unsafe modifier
  3. Apply the code fix to enable unsafe code in the project

Expected Behavior:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

</Project>

Actual Behavior:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

</Project>

⚠️ Make sure to enable the CPSProject_GeneralPropertyGroupUpdated integration test as part of resolving this issue.

@sharwell
Copy link
Member Author

@jmarolf is this a project system bug?

@sharwell sharwell modified the milestones: 16.8, Backlog Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants