0

Is there any way in ASP.NET website project, that allow to publish it from command prompt and I can continue working on project, or if it is not easy to use , at least speed up my publish task?

I know about the auto publishing tools like TFS or CruiseControl, so please don't tell me these ways.

I am thinking to create a .bat file , that I'll run everytime I have to publish. but it should not take changes made by me during its running process.

asp.net single file publish

I really like the Answer given by Ludwo, providing more information on that would be very helpful.

Community
  • 1
  • 1
Imran Rizvi
  • 7,331
  • 11
  • 57
  • 101

3 Answers3

2

You can use MsBuild to publish your websites in parallel. Start with this article. It is about publishing one website using MsBuild. Define your projects inside ItemGroup and use MSBuild task this way:

<MSBuild Projects="@(YourProjectsToBuildInParallel)" BuildInParallel="true" ... 

The final step is to enable parallel processing for MSBuild task.

Community
  • 1
  • 1
Ludwo
  • 6,043
  • 4
  • 32
  • 48
  • the answer looks great, can you please explain how to add this file to my project, I don't know much about MSBuild. – Imran Rizvi Nov 29 '11 at 12:17
  • Save MSBuild project as PublishWebSite.proj. It can be used as standalone project file or as a part of your other MSBuild scripts. You can execute it using MsBuild.exe: "MSBuild.exe PublishWebSite.proj /t:Publish" [more info here](http://msdn.microsoft.com/en-us/library/ms164311.aspx) – Ludwo Nov 29 '11 at 12:28
0

Open another Visual Studio to continue :P. Publishing mechanism can detect updated and can send only changes. So dont upload full site everytime, if its really disturbs you.

Kemal Can Kara
  • 416
  • 2
  • 15
  • I am thinking to create a .bat file , that I'll run everytime I have to publish. but it should not take changes made by me during its running process. http://stackoverflow.com/questions/5551615/asp-net-single-file-publish – Imran Rizvi Nov 29 '11 at 09:40
  • is it really necessary to make changes while its uploading? How much time does it take to upload your site? – Kemal Can Kara Nov 29 '11 at 09:45
  • Oh its a big site, it takes 5 minutes to publish, I want to make few changes and upload it so that testers time should be utilized, I don't want to make changes all day, upload at the end and let my Testers play ping-pong :) – Imran Rizvi Nov 29 '11 at 09:47
0

Use source control and a build server mechanism. The build server should be able to pull from source control when you commit a change, build the project, do any unit tests you may/should have, and then deploy to a test site.

Depending on which build server platform you use you may or may have to do varying amounts of work. In the past I have used Bamboo by Atlassian. Fantastic product but you have to configure the deployment using MSBuild - it's fine but it can take some time to get it perfect. I am sure there are some good examples out there for it.

How it will work for you:

When you are finished working on a file/issue you can commit your changes. The build server will then detect these changes and wait a varying amount of time (waiting for you to commit more) e.g. 3 minutes, check out your changes, and deploy. You can set up notifications when the deployment is done to goto your testing team - with a link in the email saying where the site is, and what the change that occurred (based on your SVN commit log).

So your net effort is to check a file in with a correct comment - and you are finished.

Dave Walker
  • 3,498
  • 1
  • 24
  • 25