构建部署包和 msbuild t:package 之间的区别

发布于 2025-01-08 19:33:38 字数 1652 浏览 0 评论 0原文

我正在尝试完成我的自动化部署过程,请参阅 这个问题以获取更多信息并且它已经接近。我可以在 VS2010 中右键单击我的 MVC 项目并选择“构建部署包”,它会成功构建它,这将部署到远程服务器。当我运行以下命令时,构建失败:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe mvcproject.csproj /T:Package /p:Configuration=Deployment

我得到的错误是:

MSDEPLOY : error : Object of type 'manifest' and path 'C:\hoh_code\GIT\ai-poker- project\Packages\Deployment\PokerLeague
WebSite\PokerLeagueWebSite.SourceManifest.xml' cannot be created. [C:\hoh_code\GIT\ai-poker-project\Clients\PokerLeague
WebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : One or more entries in the manifest 'sitemanifest' are not valid. [C:\hoh_code\GIT\ai-poker-project\
Clients\PokerLeagueWebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : An error occurred when reading the IIS Configuration File 'MACHINE/REDIRECTION'. The identity perfor
ming the operation was 'wiggly\Jon'. [C:\hoh_code\GIT\ai-poker-project\Clients\PokerLeagueWebSite\PokerLeagueWebSite.cs
proj]
MSDEPLOY : error : Filename: \\?\C:\Windows\system32\inetsrv\config\redirection.config [C:\hoh_code\GIT\ai-poker-projec
t\Clients\PokerLeagueWebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : Cannot read configuration file due to insufficient permissions [C:\hoh_code\GIT\ai-poker-project\Cli
ents\PokerLeagueWebSite\PokerLeagueWebSite.csproj]

我的印象是我所做的右键单击与 msbuild 命令相同。我尝试将输出级别设置为详细,但无法看到正确触发它的命令(但可能没有看到树的木材)。

我的问题是,我该怎么做才能通过命令行构建项目,以便我可以在我的 CI 服务器(没有 VS2010)上构建它,以便它可以自动部署,以及为什么当命令时 VS2010 成功线路故障?

I am trying to complete my automated deployment process see this question for further info and it is close. I can right click on my MVC project in VS2010 and select "Build deployment package" and it successfully builds it, and this will deploy to the remote server. When I run the following command the build fails:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe mvcproject.csproj /T:Package /p:Configuration=Deployment

The error I get is:

MSDEPLOY : error : Object of type 'manifest' and path 'C:\hoh_code\GIT\ai-poker- project\Packages\Deployment\PokerLeague
WebSite\PokerLeagueWebSite.SourceManifest.xml' cannot be created. [C:\hoh_code\GIT\ai-poker-project\Clients\PokerLeague
WebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : One or more entries in the manifest 'sitemanifest' are not valid. [C:\hoh_code\GIT\ai-poker-project\
Clients\PokerLeagueWebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : An error occurred when reading the IIS Configuration File 'MACHINE/REDIRECTION'. The identity perfor
ming the operation was 'wiggly\Jon'. [C:\hoh_code\GIT\ai-poker-project\Clients\PokerLeagueWebSite\PokerLeagueWebSite.cs
proj]
MSDEPLOY : error : Filename: \\?\C:\Windows\system32\inetsrv\config\redirection.config [C:\hoh_code\GIT\ai-poker-projec
t\Clients\PokerLeagueWebSite\PokerLeagueWebSite.csproj]
MSDEPLOY : error : Cannot read configuration file due to insufficient permissions [C:\hoh_code\GIT\ai-poker-project\Cli
ents\PokerLeagueWebSite\PokerLeagueWebSite.csproj]

I was under the impression that the right click I was doing was the same thing as the msbuild command. I tried setting the output level to detailed but could not see the command that was triggering it correctly, (possibly not seeing the wood for the tree's though).

My question is, what can I do to get the project to build via the command line so I can build it on my CI Server (doesn't have VS2010) so that it can be automatically deployed, and why is VS2010 succeeding when the command line fails?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅忆流年 2025-01-15 19:33:38

错误:由于权限不足,无法读取配置文件

从提升的命令提示符运行 msbuild 以避免此错误。与用于提升 Visual Studio 的过程相同。或者更改构建文件夹的权限,这样就没有必要了。

error : Cannot read configuration file due to insufficient permissions

Run msbuild from an elevated command prompt to avoid this error. Same procedure you used to elevate Visual Studio. Or change the permissions on the build folder so this isn't necessary.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文