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

强颜欢笑 提交于 2019-11-30 11:32:19
John Trenwith

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!