简体   繁体   中英

build ASP.Net default web site error

I am using VSTS 2008 and I am using Create new ASP.Net web site and using default settings/automatically generated files.

My questions are,

  1. How to use command line script (msbuild) to build the ASP.Net web site automatically?
  2. I want to build the web site into a DLL which could be easily copied to target IIS server later.

Any samples or quick answer how to do these tasks in msbuild?

EDIT1: There is no sln and csproj file in the web site folder. Here is the link.

http://tinypic.com/view.php?pic=dra5jp&s=5

Here is how I create in VSTS 2008.

http://i40.tinypic.com/208zfxv.jpg

I use VS.NET 2005 and using this command to build my asp.net web application in release mode :

cd "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\"
MSBuild "C:\Projects\MyProject.csproj" /t:Rebuild /p:Configuration=Release /verbosity:quiet /p:WarningLevel=0

"Web Applications" have .csproj files, "Web Sites" do not. http://damieng.com/blog/2008/02/07/web-site-vs-web-application

You want to compile it with aspnet_compiler.exe in the bin directory C:\\windows\\framework\\version

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

Easier way is to use deployment projects or the "Publish Web Site" command in Visual Studio. (Right Click on website)

http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project-support-released.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM