Exclude files from web site publish in Visual Studio

后端 未结 11 1962
醉话见心
醉话见心 2020-11-27 12:44

Can I exclude a folder or files when I publish a web site in Visual Studio 2005? I have various resources that I want to keep at hand in the Solution Explorer, such as alte

11条回答
  •  悲哀的现实
    2020-11-27 13:06

    I think you only have two options here:

    • Use the 'Exclude From Project' feature. This isn't ideal because the project item will be excluded from any integrated IDE source control operations. You would need to click the 'Show All Files' button on the Solution window if you need to see the files in Solution Explorer, but that also shows files and folders you're not interested in.
    • Use a post-build event script to remove any project items you don't want to be published (assuming you're publishing to a local folder then uploading to the server).

    I've been through this before and couldn't come up with anything really elegant.

提交回复
热议问题