Tôi đang cố gắng sao chép Visual Studio 2010 "Xuất bản ..." lệnh (áp dụng cho các dự án ứng dụng Web), nơi tôi sẽ trong giao diện người dùng chọn Phương thức xuất bản: "Hệ thống tệp".Làm thế nào để sử dụng MsBuild MsDeployPublish để nhắm mục tiêu hệ thống tệp cục bộ?
nỗ lực của tôi ở đây là ...
% msbuild%/t: MsDeployPublish/bất động sản: MsDeployServiceUrl = "file: /// d: \ MyDeploymentFolder"; MsDeployPublishMethod = "File System" "d : \ MySourceFolder \ Project.csproj "
... và đã thử phương pháp" FileSystem "," File System "," Local "và một vài cách khác.
Các lỗi tôi nhận được ngụ ý rằng MsDeploy vẫn đang cố gắng đẩy đến một máy chủ 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]
Làm thế nào tôi có thể nhắm mục tiêu các hệ thống tập tin cho việc triển khai, như Visual Studio thường cho phép tôi trong GUI?
Xem [Làm thế nào để xuất bản ứng dụng web đến một địa điểm cụ thể (Nant)?] (Http://stackoverflow.com/questions/2928595) –