Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the benefits of using the Visual Studio publish feature in ASP.NET?

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 .

like image 799
Mostafa Avatar asked Dec 22 '09 23:12

Mostafa


People also ask

What is the use of publish in Visual Studio?

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.

What is publish in asp net?

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).

How do I publish a program in Visual Studio?

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.

What is the difference between build and publish in Visual Studio?

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.


2 Answers

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.

like image 55
flesh Avatar answered Oct 06 '22 20:10

flesh


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.

like image 35
jchapa Avatar answered Oct 06 '22 20:10

jchapa