Skip to content

Visual Studio modifies csproj file when adding xaml #3639

@vsfeedback

Description

@vsfeedback

I am trying to get the new 2017 csproj-Format working with our WPF and WinForms projects. The problem is that Visual Studio modifies the csproj-File after adding a new file.

Steps-to-reproduce:

  • Open the attached project
  • Add a new xaml-file

Expected behavior:

  • Visual Studio does not touch the csproj-File (as there is already a rule for xaml files)

Actual behavior:

  • Visual Studio adds two new ItemGroups:
    <ItemGroup>
    <None Remove="UserControl1.xaml" />
    </ItemGroup>
    <ItemGroup>
    <UpToDateCheckInput Remove="UserControl1.xaml" />
    </ItemGroup>
  • Therefore the xaml is not displayed correctly in the Solution Explorer. After restoring the unmodified csproj everything looks good again

_This issue has been moved from https://developercommunity.visualstudio.com/content/problem/238439/visual-studio-modifies-csproj-file-when-adding-xam.html

WpfNewCsProj.zip

Metadata

Metadata

Labels

Feature-Up-to-dateBuild up-to-date check that avoids shelling out to MSBuild unless necessary.Resolution-No-ReproWe cannot reproduce the bug. We need more information, clearer repro steps or a sample project.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions