question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why does VS2017 RC write Compile elements into the .csproj file

See original GitHub issue

Steps to reproduce

Use VSCode and cli tools to create a class library csproj targetting net461 that happens to include a class that inherits from a windows form control. This builds happily with dotnet build

Open project with VS2017 RC

Expected behavior

csproj file should not be altered Especially references to .cs files should not be introduced.

Actual behavior

.csproj file updated with

<ItemGroup> <Compile Update="Dialogs\AssemblyDialog.cs"> <SubType>Form</SubType> </Compile> </ItemGroup>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bruce31commented, Feb 27, 2017

Using VS Pro 2017 RC 15.0.0-RC.4+26206.0

The metadata (whatever that is) is clearly not required for the build as the dotnet command does not require it. If VS needs to keep track of something about the files in the project surely it can use the .vs folder that it has created which is usually excluded from source control.

The whole point of not requiring lists of .cs files in the project file was to banish forever the .csproj merge conflict issues.

0reactions
blackdwarfcommented, Feb 28, 2017

Opened dotnet/Roslyn-project-system#1643 to keep track of this. Closing this one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does VS2017 RC write Compile elements into the . ...
The whole point of not requiring lists of .cs files in the project file was to banish forever the .csproj merge conflict issues....
Read more >
Visual Studio 2017 csproj .NET Core build - views not ...
NET Core and I am using VS2017 as IDE. When I build my project through Visual Studio 2017 it does not automatically add...
Read more >
Understanding the Project File
The project file is an XML document that contains all the information and instructions that MSBuild needs in order to build your project, ......
Read more >
R.I.P project.json - Out with the new, in with the old
New projects created inside VS 2017 have this by default. When working with teams of developers, the csproj file was a common area...
Read more >
Where do i put in a CSPROJ file into in visual studio ...
The .csproj file is a C# project file, and is usually automatically generated and saved in your project folder by Visual Studio, when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found