Error doing web.config transformation for different environments

喜欢而已 提交于 2019-11-30 18:14:01

I fixed this by repairing "Microsoft ASP.NET and Web Tools 2013.1 - Visual Studio 2012" from Control Panel --> Programs and Features.

The file Microsoft.Web.XmlTransform.dll was missing from the path C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web.

I had a similar error, although it was caused for different reasons.

I solved it copying the following DLL from another PC with VS2012 installed: Microsoft.Web.XmlTransforms.dll

from: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web

I hope this helps

I had same problem in VS2012, could not 'Preview Transform' for the PublishPackage tranforms e.g. Web.Staging.config complaining about Microsoft.Web.XmlTransform

I got it working by adding the Package https://nuget.org/packages/Microsoft.Web.Xdt to my Mvc 4.5 project. This package is still in pre release.

PM> Install-Package Microsoft.Web.Xdt -Pre

This package contains the Microsoft.Web.XmlTransform.dll

I still get an error during building complaining about "Could not load file or assembly Microsoft.Web.XmlTransform". The Mvc project has still built ok.

I did try adding the Microsoft.Web.XmlTransform.dll to the Gac using the gacutil but that did not fix the problem.

However I use Team Foundation Service build server and it works and creates the correct Web.config after applying the Web.Release.config and then the Web.Staging.config.

I tried below two things but it did not work for me.

1) copying the Microsoft.Web.XmlTransforms.dll DLL to location C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web

2) And repairing "Microsoft ASP.NET and Web Tools 2013.1 - Visual Studio 2012"

Then I uninstalled Microsoft Azure tool V2.6 from control panel -> Programs and Features. And then I can able to publish my site.

This may have been fixed in Visual Studio 2012 Update 2 (and Visual Studio 2013).

Web.config "Preview Transform" gives an error

...

Posted by Microsoft on 3/1/2013 at 2:46 PM

Thanks for reporting the issue! It will be fixed in Visual Studio 2012 Update 2. Please install it when it becomes available.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!