I have a fairly simple MVC 5 project in Visual Studio 2013. I have successfully configured publishing through Web Deploy to the server. I want to exclude a specific file from deployment without previewing / removing it from the screen each time I publish (I publish the Release build).
I edited the .csproj file for the project to include the <ExcludeFilesFromDeployment> .
<Project...> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> ... <ExcludeFilesFromDeployment>Library-that-is-not-good-for-server.dll</ExcludeFilesFromDeployment> </PropertyGroup>
But nothing changes / the file still needs to be disabled to be added when I go to publish to VS2013.
I also tried adding bin\ in front of the library, just in case. Not to mention, a warning appears for an element that says ' The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'ExcludeFilesFromDeployment' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. ... "
The Microsoft documentation that I could find in the search results regarding excluding files from the deployment and the ExcludeFilesFromDeployment tag, http://msdn.microsoft.com/en-us/library/ee942158(v=vs.110).aspx , states that the instructions apply only to VS2012 and partially to VS2010. Does anyone know what has changed for VS2013 or what am I doing wrong?
source share