locked
publish a release version of web site RRS feed

  • Question

  • User-1527480922 posted

    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.

    Sunday, January 6, 2013 7:30 AM

Answers

  • User71929859 posted

    Hello,

    You can do it using Publish Web Site tool. Also, you can follow the below steps I quoted from here.

    1. Click "Copy Web Site" from the "Website" menu in Visual Studio  Express.

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

    3. Enter your credentials when prompted. Click "OK."

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

    5. Click "Disconnect" when you are finished publishing files to the remote  server.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 6, 2013 10:32 AM
  • User1196771204 posted

    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!  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 7, 2013 2:21 AM
  • User1985864055 posted

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 7, 2013 12:09 PM
  • User1196771204 posted

    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!  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 9, 2013 3:15 AM

All replies

  • User-1315512054 posted

    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

    Sunday, January 6, 2013 8:33 AM
  • User71929859 posted

    Hello,

    You can do it using Publish Web Site tool. Also, you can follow the below steps I quoted from here.

    1. Click "Copy Web Site" from the "Website" menu in Visual Studio  Express.

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

    3. Enter your credentials when prompted. Click "OK."

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

    5. Click "Disconnect" when you are finished publishing files to the remote  server.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 6, 2013 10:32 AM
  • User1196771204 posted

    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!  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 7, 2013 2:21 AM
  • User1985864055 posted

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 7, 2013 12:09 PM
  • User1196771204 posted

    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!  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 9, 2013 3:15 AM