无法从Microsoft.Web.Publishing.Tasks.dll加载TransformXml任务 [英] TransformXml task could not be loaded from Microsoft.Web.Publishing.Tasks.dll

查看:302
本文介绍了无法从Microsoft.Web.Publishing.Tasks.dll加载TransformXml任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人看到此错误并知道如何解决?

Has anyone seen this error and know how to fix it?

无法从程序集C:\ Program Files(x86)\ MSBuild \ Microsoft \ VisualStudio \ v11.0 \ Web \ Microsoft.Web.Publishing.Tasks.dll加载"TransformXml"任务.

The "TransformXml" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.Tasks.dll.

无法加载文件或程序集'file:///C:\ Program Files(x86)\ MSBuild \ Microsoft \ VisualStudio \ v11.0 \ Web \ Microsoft.Web.Publishing.Tasks.dll'或其中之一依赖关系.该系统找不到指定的文件.

Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.Tasks.dll' or one of its dependencies. The system cannot find the file specified.

确认声明正确无误,并且程序集及其所有依赖项都可用,并且任务包含实现Microsoft.Build.Framework.ITask的公共类.

Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

我在其他地方读到问题是当您没有安装SQL Server时.但是我确实已经在SP1上安装了SQL Express 2012 x64.我也在运行VS 2013 Professional.

I read elsewhere that the problem is when you don't have SQL Server installed. But I do have SQL Express 2012 x64 installed with SP1. I am also running VS 2013 Professional.

我在VS 2012 Express中运行了完全相同的解决方案,没有任何问题.

I have ran this exact same solution in VS 2012 express with no problems.

推荐答案

只要您使用Visual Studio 2012,Dai Bok和emalamisura所提供的答案就可以正常工作. 对于VS 2013,这也将失败.为了使此功能适用于所有版本的Visual Studio,您应该:

The answers provided by Dai Bok and emalamisura work fine as long as you use Visual Studio 2012. For VS 2013 this fails as well. In order to make this work with all versions of Visual Studio you should:

  • 打开无法加载项目的项目文件(.csproj)
  • 搜索<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets" />
  • 将其更改为<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.targets" />
  • 重新加载项目
  • Open the project file (.csproj) of the project failing to load
  • Search for <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets" />
  • Change it to <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.targets" />
  • Reload the project

这将动态,正确地设置Visual Studio的正确版本.

That will set the correct version of Visual Studio dynamically and properly.

这篇关于无法从Microsoft.Web.Publishing.Tasks.dll加载TransformXml任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆