Exclude files from web site publish in Visual Studio

后端 未结 11 1923
醉话见心
醉话见心 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 12:55

    This is just an addendum to the other helpful answers here and something I've found useful...

    Using wpp.targets to excluded files and folders

    When you have multiple deployments for different environments then it's helpful to have just one common file where you can set all the excluded files and folders. You can do this by creating a *.wpp.targets file in the root of the project like the example below.

    For more information see this Microsoft guide:

    How to: Edit Deployment Settings in Publish Profile (.pubxml) Files and the .wpp.targets File in Visual Studio Web Projects

    
    
      
        True
        
          *.config;
          *.targets;
          *.default;
        
        
          images;
          videos;
          uploads;
        
      
    
    

提交回复
热议问题