суббота, 30 июля 2016 г.

Visual Studio 2015 Ошибка The "TransformXml" task could not be loaded from the assembly ....\Microsoft.Web.Publishing.Tasks.dll

Ситуация


в Visual studio 2015 получаю ошибку при билде проекта (после переустановки студии)

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

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

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.


Решение


Выгрузил проект (Unload Project из контекстного меню проекта)

Открыл окно редактирования файла проекта (Edit (project name).proj из контекстного меню проекта)

в файле проекта нашел строчку

Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets" />

заменил на

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.targets" />

суть замены выделил.

перезагрузил проект (из контексного меню проекта)

Для других версий студии решение тоже должно помочь но в строчках посика и в тексте ошибки версия студии модет отличаться.

Ссылки по теме

TransformXml task could not be loaded from Microsoft.Web.Publishing.Tasks.dll
http://stackoverflow.com/questions/20358747/transformxml-task-could-not-be-loaded-from-microsoft-web-publishing-tasks-dll

1 комментарий: