Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publishing a website using msbuild

Tags:

.net

msbuild

I would like to publish a website using msbuild. Since I have a website and not a web application project, how can I go about this since I do not have the .csproj file and msbuild expects a project file as input or you can execute it in a folder with a project file. My solution file contains multiple websites that do not have .csproj files ?

like image 315
sam Avatar asked Apr 17 '26 13:04

sam


2 Answers

I would create Web Deployment Projects for each website, MSBuild can read the .wdproj file (it actually is an MSBuild script).

VS2008 Web Deployment Project download

This is a Visual Studio template that accomplishes exactly what you need.

Internally this script using the ASP.NET Compiler task, as well as some copying of files depending on project settings.

like image 122
Adam Avatar answered Apr 19 '26 04:04

Adam


Use the Aspnet compiler task.

http://msdn.microsoft.com/en-us/library/ms164291.aspx

It works on asp.net websites. Just copy (or output directly) to where you need it deployed.

like image 20
Min Avatar answered Apr 19 '26 04:04

Min



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!