Visual Studio Version:
Microsoft Visual Studio Enterprise 2019 Int Preview
Version 16.0.0 Preview 3.0 [28529.153.d16.0]
VisualStudio.16.IntPreview/16.0.0-pre.3.0+28529.153.d16.0
Summary:
Changing project properties adds unnecessary empty ApplicationIcon and StartupObject properties to project file.
Steps to Reproduce:
File -> New Project -> Console App (.NET Core)
Inspect project file
Right click project, properties
Change output type to Windows Application
Inspect project file again
Expected Behavior:
Only change in project file is s/Exe/WinExe/
Actual Behavior:
Two extra lines are added to project file setting ApplicationIcon and StartupObject to empty.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <OutputType>Exe</OutputType>
+ <OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
+ <ApplicationIcon />
+ <StartupObject />
</PropertyGroup>
</Project>
User Impact:
Unwanted, unnecessary content in csproj file
These empty elements would override imported properties too.
Oh that's worse. I thought it was merely persisting the evaluated empty value and hoping if it were non-empty from imports it would reflect that.
I thought it was merely persisting the evaluated empty value
You're right 馃憤. Just tested this out and it copies the evaluated value into the file.
CPS is tracking this here: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1025549
Internal PR https://devdiv.visualstudio.com/DevDiv/_git/CPS/pullrequest/215694 has been completed.