简体   繁体   English

建立ASP.Net默认网站错误

[英]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. 我正在使用VSTS 2008,并且正在使用Create new ASP.Net网站并使用默认设置/自动生成的文件。

My questions are, 我的问题是

  1. How to use command line script (msbuild) to build the ASP.Net web site automatically? 如何使用命令行脚本(msbuild)自动构建ASP.Net网站?
  2. I want to build the web site into a DLL which could be easily copied to target IIS server later. 我想将网站构建为DLL,以后可以轻松将其复制到目标IIS服务器。

Any samples or quick answer how to do these tasks in msbuild? 任何示例或快速解答如何在msbuild中执行这些任务?

EDIT1: There is no sln and csproj file in the web site folder. 编辑1:网站文件夹中没有sln和csproj文件。 Here is the link. 链接在这里。

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

Here is how I create in VSTS 2008. 这是我在VSTS 2008中创建的方式。

http://i40.tinypic.com/208zfxv.jpg 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 : 我使用VS.NET 2005,并使用以下命令以发布模式构建asp.net Web应用程序:

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. “ Web应用程序”具有.csproj文件,“网站”则没有。 http://damieng.com/blog/2008/02/07/web-site-vs-web-application 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 您要使用bin目录C:\\ windows \\ framework \\ version中的aspnet_compiler.exe进行编译

http://msdn.microsoft.com/en-us/library/ms178466.aspx 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. 更简单的方法是在Visual Studio中使用部署项目或“发布网站”命令。 (Right Click on website) (右键单击网站)

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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