vs2010 命令行下用 msbuild 发布web站点

先来看一下原来 vs2008 的代码

 

 

msbuild website\websiteApp.csproj /t:ResolveReferences;Compile /t:_CopyWebApplication /p:Configuration=Release /p:WebProjectOutputDir=r:\website /p:OutputPath=r:\website\bin

 

 

 

再看看 vs2010 的代码

 

path C:\Windows\Microsoft.NET\Framework\v4.0.30319
msbuild website\websiteApp2010.csproj
/t:ResolveReferences;Compile /t:_WPPCopyWebApplication /p:Configuration=Release /p:WebProjectOutputDir=r:\HitoSNS

 

 

差别在于:

1.msbuild需要用4.0的

2.原先的 _CopyWebApplication 不支持,还为_WPPCopyWebApplication

3.原先的 /p:OutputPath 不需要使用

4.指定平台 /p:Platform=AnyCPU ,主要是有些项目可能是发布到64位平台,使用这个指令可以指定最终生成的目标平台

posted on 2010-06-08 19:36  yahle  阅读(5527)  评论(0编辑  收藏  举报