部署时找不到 MSBuild 目标 PipelinePreDeployCopyAllFilesToOneFolder
从 VS2010 RTM 部署 Web 应用程序项目会导致 MSBuild 出现错误。它抱怨找不到 PipelinePreDeployCopyAllFilesToOneFolder 目标。
有什么方法可以进一步确诊吗?
谢谢。
Deploying a Web Application Project from VS2010 RTM causes an error in MSBuild. It complains that the PipelinePreDeployCopyAllFilesToOneFolder target cannot be found.
Is there any way to further diagnose this?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我遇到了同样的问题,当我查看 Web 应用程序的 .csproj 文件时,我看到了以下几行...
我猜这是因为我最近从 VS2008 升级到 VS2010 后发生的。所以看起来在转换过程中一切都搞砸了。为了解决这个问题,我只是将这些行替换为...
之后一切都按预期工作。
I had the same problem and when I looked in the .csproj file for my web application I had the following lines...
I guess this happened since I had recently upgraded from VS2008 to VS2010. So it looks like the during the conversion process it got all screwed up. To fix it I just replaced those lines with ...
After that everything worked as it should.
我在网上的几个地方看到了 brodie 给出的答案,这对我来说很奇怪,因为这个任务(PipelinePreDeployCopyAllFilesToOneFolder)甚至不包含在这个目标(Microsoft.WebApplication.targets)中:
如果你实际上去找到这个文件(在 x64 计算机上,它位于 C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets< /strong>,或者 12.0 版本(如果您使用的是 VS2013)并在文本查看器中打开它,您会发现它不在那里。
它实际上包含在 Sayed Ibrahim Hashimi 提到的文件中,即 Microsoft. Web.Publishing.targets 文件(C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets) 。
因此,要将其放入 MSBuild/.csproj 文件中,请包含以下内容:
I've seen the answer given by brodie in several places online, which is strange to me because this task (PipelinePreDeployCopyAllFilesToOneFolder) is not even contained in this target (Microsoft.WebApplication.targets):
If you actually go and find this file (on an x64 machine it's in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets, or the version 12.0 equivalent if you're using VS2013) and open it in a text viewer, you'll see it's not there..
It's actually contained in the file that Sayed Ibrahim Hashimi mentions, which is the Microsoft.Web.Publishing.targets file (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets).
So to get this into your MSBuild/.csproj file, include the following:
您尝试构建的计算机上是否安装了 Visual Studio 2010?如果是这样,则查找位于 %Program Files(x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets 的文件,它应该具有该目标。如果没有,那么这些文件可能已损坏,修复 VS 2010 安装可能可以修复它。
我认为Web部署目标/任务是与VS本身一起提供的,而不是.NET框架,所以你需要安装VS(或者你可以手动配置机器)/
Do you have Visual Studio 2010 installed on the machine where you are trying to build? If so then look for a file located at %Program Files(x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets it should have that target. If it doesn't then those files may have been corrupted and probably reparing your VS 2010 install should fix it.
I think the Web Deployment targets/tasks are shipped with VS itself and not the .NET framework, so you need VS installed (or you can manually configure the machine)/
尽管这是一篇旧帖子,但它仍然提供了一些很大的帮助!
我的设置是使用远程主机来自动化 VS2013 中构建的项目。
当您单独安装 MSBuild 12.0 时,远程主机不包含所有 VS2013 目标,这会导致“Microsoft.Web.Publishing.targets”文件不存在。
为了解决这个目标错误,我必须从本地 VS2013 路径复制文件,并将其复制到远程主机的等效位置。
Even though this is an old post It still provided some great help!
My setup is using a remote host for Automation of a project built in VS2013.
The remote host doesn't contain all the VS2013 targets when you solely install MSBuild 12.0 and this resulted in the 'Microsoft.Web.Publishing.targets' file not existing.
To get around this target error I had to copy the files from my local VS2013 path and copy this to the remote host in the equivalent location.