开发者

Ensuring file is not embedded during a build?

I am developing a failry standard Winforms application in .NET 3.5. It has an xml config file (app.config). When I do a build (either release or debug), I do not want the .config file to be embedded into the containing assembly but always its own, standalone file, whic开发者_如何学Pythonh can be edited at will.

What compiler switches would I need to set to do this? Thanks


For app.config files, you do not need to do anything special as by default they will get copied to the output directory as part of the build (and renamed to match the output of the project). They will not be embedded inside the compiled assembly.

You can also set the build action of any file by viewing its properties (right-click -> properties) to alter how it behaves when a build occurs.


In the properties of the file set the 'Build Action' to content and the Copy to output Directory to 'Copy Always'

Ensuring file is not embedded during a build?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜