How to exclude folders from publish/deployment of Visual Studio 2013 Web Application

后端 未结 2 429
难免孤独
难免孤独 2021-01-01 17:18

I\'m publishing a Web Application from Visual Studio 2013. I need include folders that are not a part of the project, and exclude some folders (some apart of the project, so

相关标签:
2条回答
  • 2021-01-01 17:41

    These elements have indeed been moved to the .pubxml file in Visual Studio 2012 and later. Here's the relevant documentation in MSDN about excluding files and folders from deployment.

    Locate the relevant .pubxml file under Properties / Publish Profiles in the Visual Studio Solution Explorer, and add a new element ExcludeFilesFromDeployment or ExcludeFoldersFromDeployment under the PropertyGroup element listing the files or folders to be excluded, delimited by a semi-colon.

    I note these elements didn't appear as options in the IntelliSense selection when I typed them into Visual Studio 2015 - but the project compiled and the exclusion still worked.

    0 讨论(0)
  • 2021-01-01 17:53

    in cpproj file you add those folder and files that are not to be included in publishing process like this

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