先来看一下原来 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
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位平台,使用这个指令可以指定最终生成的目标平台