I have a web site that is created in visual studio 2010 through: File > New > Web site (it is not a Web Project).
I want to publish a release version of my web site but there is no 'Release' mode in VS and there is no possibility to add 'Release' mode through Build > Configuration manager.
How can I publish a release version of my web site ??(I can not convert my web site to a Web Project)
Click "Copy Web Site" from the "Website" menu in Visual Studio Express.
Select the "Connect" button above the two-paned publishing window. Select "Remote Site" on the left of the dialog box. Enter the URL of the website destination on the right. Click "Open.
Enter your credentials when prompted. Click "OK."
Select the files on the left you wish to publish to the remote website. Use "Shift" + click to select contiguous files and "Ctrl" + click to select non-contiguous files. Click the top arrow to indicate you wish to copy selected source files to the remote
server.
Click "Disconnect" when you are finished publishing files to the remote server.
To deploy your project, you need to fully compile your code and you just need to deploy the "published" version of your site. Hence, your source code is not visible to anyone.
Please follow the steps below:
1. Please open your project in Visual Studio tool 2. On the Solution Explorer Windows, please right click your project and select "Publish" 3. Please publish it to your local folder, such as C:\Project 4. You just need to upload all the files and subfolders you see on C:\Project to the server. You will also notice that all the .cs or .vb files have disappeard
Please mark this response as an "answer" if it helps you. Thanks heaps!
Dynamic compilation will automatically give you a release build, just make sure that you have debug off -- you can create a Web.config transform to do that automatically:
Name the transform file Web.ProfileName.config where you replace "ProfileName" with the actual name of your publish profile. Then publish according to the instructions in this how-to MSDN page:
http://msdn.microsoft.com/en-us/library/dd465337.aspx
Note that this will only work for web site projects if you have installed the latest web publish update; see
http://msdn.microsoft.com/en-us/library/jj161045.aspx Unfortunately, you have to install the whole Azure SDK in order to get the web publish update, that is the only way you can use the latest
tools for web site projects in VS 2012 or VS 2010.
Marked as answer by Angie xu - MSFT on Jan 13, 2013 11:04 PM
To deploy your project, you need to fully compile your code and you just need to deploy the "published" version of your site. Hence, your source code is not visible to anyone.
Please follow the steps below:
1. Please open your project in Visual Studio tool 2. On the Solution Explorer Windows, please right click your project and select "Publish" 3. Please publish it to your local folder, such as C:\Project 4. You just need to upload all the files and subfolders you see on C:\Project to the server. You will also notice that all the .cs or .vb files have disappeard
Please mark this response as an "answer" if it helps you. Thanks heaps!
reza.sorouri
Member
4 Points
25 Posts
publish a release version of web site
Jan 06, 2013 11:30 AM|LINK
Hi,
I have a web site that is created in visual studio 2010 through: File > New > Web site (it is not a Web Project).
I want to publish a release version of my web site but there is no 'Release' mode in VS and there is no possibility to add 'Release' mode through Build > Configuration manager.
How can I publish a release version of my web site ??(I can not convert my web site to a Web Project)
Thank you very mush for your reply.
HostingASPNe...
All-Star
15866 Points
2974 Posts
Re: publish a release version of web site
Jan 06, 2013 12:33 PM|LINK
Hello,
You could read more about Web Application Projects versus Web Site Projects, and how to deploy a web site project at http://forums.asp.net/post/set/26/1872092/5261011.
Regards
Free ASP.NET Examples and source code.
Ruchira
All-Star
42885 Points
7019 Posts
MVP
Re: publish a release version of web site
Jan 06, 2013 02:32 PM|LINK
Hello,
You can do it using Publish Web Site tool. Also, you can follow the below steps I quoted from here.
Click "Copy Web Site" from the "Website" menu in Visual Studio Express.
Select the "Connect" button above the two-paned publishing window. Select "Remote Site" on the left of the dialog box. Enter the URL of the website destination on the right. Click "Open.
Enter your credentials when prompted. Click "OK."
Select the files on the left you wish to publish to the remote website. Use "Shift" + click to select contiguous files and "Ctrl" + click to select non-contiguous files. Click the top arrow to indicate you wish to copy selected source files to the remote server.
Click "Disconnect" when you are finished publishing files to the remote server.
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.necro_mancer
Star
7981 Points
1566 Posts
Re: publish a release version of web site
Jan 07, 2013 06:21 AM|LINK
Hi Reza,
To deploy your project, you need to fully compile your code and you just need to deploy the "published" version of your site. Hence, your source code is not visible to anyone.
Please follow the steps below:
1. Please open your project in Visual Studio tool
2. On the Solution Explorer Windows, please right click your project and select "Publish"
3. Please publish it to your local folder, such as C:\Project
4. You just need to upload all the files and subfolders you see on C:\Project to the server. You will also notice that all the .cs or .vb files have disappeard
Please mark this response as an "answer" if it helps you. Thanks heaps!
Professional SQL 2008 R2 Service
tdykstra
Contributor
4432 Points
620 Posts
Microsoft
Moderator
Re: publish a release version of web site
Jan 07, 2013 04:09 PM|LINK
Dynamic compilation will automatically give you a release build, just make sure that you have debug off -- you can create a Web.config transform to do that automatically:
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <system.web> <compilation xdt:Transform="RemoveAttributes(debug)" /> </system.web> </configuration>Name the transform file Web.ProfileName.config where you replace "ProfileName" with the actual name of your publish profile. Then publish according to the instructions in this how-to MSDN page: http://msdn.microsoft.com/en-us/library/dd465337.aspx
Note that this will only work for web site projects if you have installed the latest web publish update; see http://msdn.microsoft.com/en-us/library/jj161045.aspx Unfortunately, you have to install the whole Azure SDK in order to get the web publish update, that is the only way you can use the latest tools for web site projects in VS 2012 or VS 2010.
necro_mancer
Star
7981 Points
1566 Posts
Re: publish a release version of web site
Jan 09, 2013 07:15 AM|LINK
hi reza,
To deploy your project, you need to fully compile your code and you just need to deploy the "published" version of your site. Hence, your source code is not visible to anyone.
Please follow the steps below:
1. Please open your project in Visual Studio tool
2. On the Solution Explorer Windows, please right click your project and select "Publish"
3. Please publish it to your local folder, such as C:\Project
4. You just need to upload all the files and subfolders you see on C:\Project to the server. You will also notice that all the .cs or .vb files have disappeard
Please mark this response as an "answer" if it helps you. Thanks heaps!
Professional SQL 2008 R2 Service