dotnet / dotnet/project-system
new File gets removed from custom ItemGroup
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
I have following csproj:
```
netcoreapp2.2
```
If I add via the `Add new File` dialog a new File from `Text File` template with the name `TextFile1.customFileType`, Visual Studio changes the csproj to following:
```
netcoreapp2.2
roject>
```
It is removing the new file from the custom ItemGroup.
Is there any workaround to stop this? This behavior makes us problems in SpecFlow, as VS is removing items from our ItemGroups (they are defined in a props file in the NuGet package), which we need in a MSBuild Task.
This happens in Visual Studio 2017 15.9.5 and Visual Studio 2017 16.0.0 Preview 1.1.
Contributor guide
Assessment
This issue has not been assessed yet.