I'm using Visual Studio 2010 with the new website publish dialog. I have a Web Application website. When published, in theory it should compile all the code into an single assembly. However, in both Debug
and Release
, after publishing the directory always contains source code of page and user controls (even with the untransformed web.config files Web.Debug.config and Web.Release.Config). This is very confusing.
But with package/publish web
project configuration and Generate Deploy package
context menu item, the Package\PackageTmp directory is clean.
In Solution Explorer, right-click your project and choose Publish. If you're publishing this web app for the first time, next you see the Publish wizard. Visual Studio filters the list of destinations depending on the type of web app.
The Publish tool helps you deploy your application to various destinations. Get started by right-clicking your project in Solution Explorer and selecting Publish from the context menu.
The correct answer is to look in the Package/Publish Web settings (in the web application project properties) and look for the "Items to deploy".
For a web application you'd want "Items to deploy" to have "Only files needed to run this application" which would NOT copy the source code files, since they've been compiled into the DLL in the bin folder.
Note that this setting varies for your current Build type (Debug/Release/etc), so plan accordingly...
Ciao!
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