发布错误:无法加载文件或程序集“Microsoft.Web.XmlTransform"、Version=1.4.0.0、Culture=neutral 等或其依赖项之一

Publish error: Could not load file or assembly #39;Microsoft.Web.XmlTransform#39;, Version=1.4.0.0, Culture=neutral, etc. or one of its dependencies(发布错误:无法加载文件或程序集“Microsoft.Web.XmlTransform、Version=1.4.0.0、Culture=neutral 等或其依赖项之一) - IT屋-程序员软件开发技术分享

本文介绍了发布错误:无法加载文件或程序集“Microsoft.Web.XmlTransform"、Version=1.4.0.0、Culture=neutral 等或其依赖项之一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想发布一个 MVC 项目,但一直收到此错误:

I want to publish a MVC project and I keep getting this error:

System.IO.FileNotFoundException:无法加载文件或程序集Microsoft.Web.XmlTransform"、版本=1.4.0.0、文化=中性、PublicKeyToken=...或其依赖项之一.系统找不到指定的文件.

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.XmlTransform', Version=1.4.0.0, Culture=neutral, PublicKeyToken=... or one of its dependencies. The system cannot find the file specified.

我在 SO 或 MSDN 上搜索并尝试了一些解决方案,但无济于事.我真的很想得到一些建议.该项目之前已成功发布,但在尝试重新发布我的更新版本后突然出现.

I have searched for and tried some solutions found on SO or MSDN to no avail. I'm really desperate for some suggestions. The project has been published successfully before, but this came out of the blue after trying to republish my updated version.

推荐答案

我终于搞定了.我将把我的解决方案留在这里,以防其他人遇到类似问题.

I finally got this to work. I'm leaving my solution here in case others have a similar issue.

基本上我尝试使用 Microsoft ASP.NET 和 Web Tools 2013.1 修复我的 VS(我从这里得到它 Microsoft Web 工具下载页面).但是,它并没有为我解决问题.解决它的方法是从该位置的另一台机器复制文件 Microsoft.Web.XmlTransforms.dll

Basically I tried repairing my VS using the Microsoft ASP.NET and Web Tools 2013.1 (I got it from here Microsoft Web Tools download page). However, it didn't solve the problem for me. What did solve it was copying the file Microsoft.Web.XmlTransforms.dll from another machine at the location

C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0Web

C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0Web

不知何故,我的从那里丢失了(我从另一台具有相同 .NET 版本的计算机上获取并粘贴到那里),现在发布工作正常.

Somehow, mine was missing from there (I got it from another computer with the same .NET version and pasted it there) and now the publish works fine.

这篇关于发布错误:无法加载文件或程序集“Microsoft.Web.XmlTransform"、Version=1.4.0.0、Culture=neutral 等或其依赖项之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:发布错误:无法加载文件或程序集“Microsoft.Web.XmlTransform"、Version=1.4.0.0、Culture=neutral 等或其依赖项之一

基础教程推荐