I want to publish a MVC project and I keep getting this error:
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.
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.
Repairing MS Web Tools for VS2012 did not solve the problem for me.
I have the files in the folder
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web
(I do not know if this is because I have installed VS 2013 Express, or some other tool. Maybe installing the Web Tools for VS 2013 will create them).Copying the files from
v12.0
folder tov11.0
folder fixed the problem.I had a nearly identical problem, except the publish was saying it couldn't find Newtonsoft.Json.dll, Version=4.5.0.0. I tried all of the above solutions before finally realizing that the file was missing from the package directory for Azure WebJobs Publish (apologies for not having the full name of the package at my fingertips). The solution was simply to empty my entire /packages/ folder and let them restore automatically.
Had that problem also. What worked for me was:
This may be an edge case, but I cloned I co-workers GIT repo containing a Visual Studio solution.
Visual Studio was reporting that the
Microsoft.Web.XmlTransform.dll
reference was broken.Looking at the
.csproj
file for that project I found this:<HintPath>..\..\..\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.XmlTransform.dll</HintPath>
This path must have been correct for my co-worker, but for me it was wrong. I corrected to this:
<HintPath>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.XmlTransform.dll</HintPath>
This occured with VS2015 (Version 14 Update 2).
For me 'barca_d' solution worked but i also had to keep my projects
Reinstall NuGet Package Microsoft.Web.Xdt