Как использовать MsBuild MsDeployPublish для целевой локальной файловой системы?

Я пытаюсь повторить команду Visual Studio 2010 "Publish..." (применимую к проектам веб-приложений), где в пользовательском интерфейсе я бы выбрал Publish Method: "File System".

Моя попытка заключается в следующем...

%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 syste
m. Please make sure you have IIS 7 (or later) installed.\r [D:\MySourceFolder\Project.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.P
ublishing.targets(3847,5): error : Retrieving the COM class factory for compone
nt with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} failed due to the followin
g error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REG
DB_E_CLASSNOTREG)). [D:\MySourceFolder\Project.csproj]

Как я могу нацелить файловую систему для развертывания, как Visual Studio обычно позволяет мне в GUI?

38
задан DuckMaestro 7 February 2012 в 00:19
поделиться