我正在尝试复制Visual Studio 2010"发布..."命令(适用于Web应用程序项目),我将在UI中选择发布方法:"文件系统".
我的尝试是......
%msbuild%/ t:MsDeployPublish/property:MsDeployServiceUrl ="file:/// d:\ MyDeploymentFolder"; MsDeployPublishMethod ="File System""d:\ MySourceFolder\Project.csproj"
...并尝试过"FileSystem","File System","Local"等方法.
我得到的错误暗示MsDeploy仍在尝试推送到IIS服务器:
"D:\MySourceFolder\Project.csproj" (MsDeployPub
lish target) (1) ->
(MSDeployPublish target) ->
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web
.Publishing.targets(3847,5): error : Web deployment task failed.(The metabase k
ey '/lm/w3svc' could not be found.) [D:\MySourceFolder\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
ublishing.targets(3847,5): error : \r [D:\MySourceFolder\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
ublishing.targets(3847,5): error : The metabase key '/lm/w3svc' could not be fo
und.\r [D:\MySourceFolder\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
ublishing.targets(3847,5): error : Unable to access the IIS configuration …Run Code Online (Sandbox Code Playgroud) 我刚刚开始使用团队构建功能,而且我发现做一些非常简单的事情需要大量的事情.我目前的设置是一个带有Web应用程序,组装应用程序和测试应用程序的解决方案.Web应用程序具有PublishProfile设置,可通过文件系统发布.
我有一个TFS构建定义设置,它目前每晚构建整个解决方案并将其作为旧构建的备份放到网络共享上.我现在要做的就是拥有PublishProfile我已经设置为我发布Web应用程序.我确定这很简单,但我已经玩了一整天的MSBuild命令而没有运气.救命!
就像是
msbuild /t:publish [use PublishProfileName] someproject.csproj