When using the "Publish Web Site" feature in Visual Studio 2013. How can you exclude publishing the web.config so that it doesn't overwrite the server web.config?
The question is identical to the following except the VS version.
How to exclude web.config when publishing with Visual Web Developer Express?
However, its solution does not apply to VS2013. "Build Action" option cannot be found in VS2013. And setting "ExcludeFilesFromDeployment" causes compile problems.
Yes, you will be able to run an ASP.NET application without a WEB. CONFIG file in its root folder. If the application doesn't find a WEB. CONFIG file in its root folder, then it will take MACHINE.
config file is located in the %SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG\ folder. The default settings that are contained in the Machine.
Yes, IIS Express uses the same applicationhost. config and web. config files supported by IIS.
For an legacy ASP.NET Web Application, add <ExcludeFilesFromDeployment>Web.config</ExcludeFilesFromDeployment>
to the appropriate .xmlpub
profile file found in the Properties\PublishProfiles
folder.
<Project>
<PropertyGroup>
<ExcludeFilesFromDeployment>Web.config</ExcludeFilesFromDeployment>
</PropertyGroup>
</Project>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With