What are the various “Build action” settings in Visual Studio project properties and what do they do?

后端 未结 7 992
-上瘾入骨i
-上瘾入骨i 2020-11-22 04:22

For the most part, you just take whatever Visual Studio sets it for you as a default... I\'m referring to the BuildAction property for each file selected in Solution Explore

7条回答
  •  独厮守ぢ
    2020-11-22 05:00

    VS2010 has a property for 'Build Action', and also for 'Copy to Output Directory'. So an action of 'None' will still copy over to the build directory if the copy property is set to 'Copy if Newer' or 'Copy Always'.

    So a Build Action of 'Content' should be reserved to indicate content you will access via 'Application.GetContentStream'

    I used the 'Build Action' setting of 'None' and the 'Copy to Output Direcotry' setting of 'Copy if Newer' for some externally linked .config includes.

    G.

提交回复
热议问题