Why does the verbiage for the “Copy to Output Directory” selection change between locations?

后端 未结 1 454
北荒
北荒 2021-01-18 01:48

There is an inconsistency in the configuration value verbiage between Solution Explorer in VS.NET and the projected value within the .csproj file. In Solu

相关标签:
1条回答
  • 2021-01-18 02:28

    I think there is no such place where you can find the mapping like this. However, Automation and Extensibility Reference can clear some things up.

    For example, you can see that FileProperties2 interface has CopyToOutputDirectory property and that the property accepts __COPYTOOUTPUTSTATE enumeration values:

    • COPYTOOUTPUTSTATE_Never = 0
    • COPYTOOUTPUTSTATE_Always = 1
    • COPYTOOUTPUTSTATE_PreserveNewestFile = 2

    Here you can see that PreserveNewest is the only option that fits the Copy if newer UI value.

    My point is: if you have doubts about possible options you always can check it in the automation reference, however, I personally use it only writing NuGet powershell scripts that modifies msbuild files in code. The simplest way is set the value in UI and see that we've got in msbuild file after that.

    0 讨论(0)
提交回复
热议问题