错误MSB4062:" MSBuild.ExtensionPack.Web.Iis7Application"无法从程序集MSBuild.ExtensionPack.Iis7.dll加载任务

时间:2015-06-02 15:14:48

标签: c# msbuild

尝试使用msbuild构建应用程序时收到此错误:

error MSB4062: The "MSBuild.ExtensionPack.Web.Iis7Application" task could not be loaded from the assembly MSBuild.ExtensionPack.Iis7.dll. Could not load file or assembly 'Microsoft.Web.Administration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> 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. [17:37:46] [Step 1/1]

有没有人有任何建议? TIA。

1 个答案:

答案 0 :(得分:0)

最初,原本以为问题出在MSBuild扩展包上,但事实证明我需要添加IIS:

enter image description here