Last post Sep 03, 2013 01:31 PM by tomballard
Aug 30, 2013 01:50 PM|tomballard|LINK
When I create a new Web project in Visual Studio, the Web.Debug.Config and Web.Release.Config files are marked as "Content".
I always go back and change the type to "None" because after I transform the Web.Config, the files are no longer needed and I don't want them on the server.
I should proabably be asking this question on connect.microsoft.com, but I'm just curious why they are marked as Content by default. They do not need to be deployed.
Does anyone know?
Sep 01, 2013 04:57 AM|stmarti|LINK
When you deploy/publish your web project, the Web.Debug/Release.Config files won't be published at all. You can leave the files marked as content.
Sep 02, 2013 05:26 AM|Starain chen - MSFT|LINK
Thanks for you post!
Based on my test, I find there is difference between Visual Studio 2010 with Visual Studio 2012.
In Visual Studio 2010 they are both included in Content. However in visual Studio 2012 they are both included in
So, in my opinion, I think that is by design.
On the other hand, I am agree with
stmarti said that the Web.Debug or Release.Config files won't be published at all.
Sep 03, 2013 01:31 PM|tomballard|LINK
Yep, I saw that - in VS2012 they are marked as None by default.
And I did verify that even when they are marked as "Content", they are not published when I use "Publish" dialog box from inside Visual Studio 2012.
Interestingly, they *are* included when marked as Content when I build from the command line like this, and they are not when they are marked as None:
msbuild /p:Configuration=Release /t:Rebuild,ResolveReferences,TransformWebConfig,_CopyWebApplication WebApplication1.csproj
But since they are marked as None by default I will definitely go back and change the type from Content to None for my old VS2010 projects.
Thanks both of you!