VS05、VS08、VS10发布网站应用程序和发布站点

来源:互联网 发布:红米3打开网络没有网络 编辑:程序博客网 时间:2024/06/09 20:42
VS05、VS08、VS10发布网站应用程序和发布站点
VS2005特有的发布站点功能,发布工具是Aspnet_compiler.exe,目录是C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet_compiler.exe
命令窗口发布实例:C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v /test2.dealerop.ucar.cn -p "E:\CCNETBuild\TranstarOP\TranstarOP" -f E:\CCNETBuild\TranstarOP\PublishWebSite -u -fixednames -c
-v                  发布站点IIS的虚拟目录
-p                  发布站点的物理路径
-f                   发布目标物理路径
-u                  发布包括aspx、ascx等等页面文件

-fixednames    指定应该为应用程序中的每一页生成一个程序集
-c                   指定应完全重新生成要编译的应用程序
参数内容可以参考:http://msdn.microsoft.com/zh-cn/library/ms229863.aspx


其他网站应用程序的发布都是使用MSBuild.exe,目录C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe
命令窗口实例:C:\Windows\Microsoft.NET\Framework\v3.5>msbuild.exe E:\Project\2009\Src\Web\Web.csproj  /t:Compile /t:_CopyWebApplication /p:Configuration=Release /p:WebProjectOutputDir=C:\publish /p:OutputPath=C:\publish\bin
/t:Compile                              声明要发布网站
/t:_CopyWebApplication          拷贝发布内容到发布目录
/p:Configuration=Release        发布Release版本
/p:WebProjectOutputDir          非DLL的发布目录
/p:OutputPath                        DLL的发布目录
参数参考:http://msdn.microsoft.com/zh-cn/library/ms164311.aspx

 

VS2010 MSBUILD 发布站点 兼容 VS2010 web.config Transformation

C:\Windows\Microsoft.NET\Framework\v4.0.30319>msbuild E:\Project\VS2010Test\WebTest\WebTest.csproj /t:ResolveReferences;Compile /t:_WPPCopyWebApplication /p:Configuration=Debug /p:WebProjectOutputDir=c:\testpublish

 

原先的 _CopyWebApplication 不支持,变更为_WPPCopyWebApplication

原先的DLL发布地址 /p:OutputPath 不再需要使用

 http://www.cnblogs.com/squle/articles/1543792.html

原创粉丝点击