What are the benefits of using the Visual Studio publish feature in asp.net? Just because first request to the website take times? Or preventing Source code? (we can use classlibrary project and publish the dll of that code) Is there any other benefit of Publishing?
Thank you .
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.
In ASP.NET when you publish a Visual Studio web project MSBuild is used to drive the entire process. The project file (. csproj or . vbproj) is used to gather the files that need to be published as well as perform any updates during publish (for example updating web. config).
To publish from Visual Studio, do the following: Change the solution configuration from Debug to Release on the toolbar to build a Release (rather than a Debug) version of your app. Right-click on the project (not the solution) in Solution Explorer and select Publish. In the Publish tab, select Publish.
Build compiles the source code into a (hopefully) runnable application. Publish takes the results of the build, along with any needed third-party libraries and puts it somewhere for other people to run it.
There is very little benefit to publishing in ASP.NET, it's a convenience more than anything else.
Publishing won't secure your code - you need to obfuscate for that, and even then there's no guarantee your code is secure.
Publishing simply provides you with a quick way to put the needed files on the server. Like you said, you can just as easily FTP (or whatever method you're using) the files up to the server, protecting your source code by using the compiled assemblies.
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