MSBuild 使用 Take 无法加载程序集
我正在尝试使用 MSBuild 和 YUICompressor for .NET 在构建时压缩我的 js 和 css 文件。
当我尝试构建时,出现以下错误:
Error 4 The "CompressorTask" task could not be loaded from the assembly C:\Apps\MyApp\packages\YUICompressor.NET.1.7.0.0\lib\net35\Yahoo.Yui.Compressor.dll.
请确认声明是否正确,程序集及其所有内容 依赖项可用,并且该任务包含一个实现 Microsoft.Build.Framework.ITask。
我的构建后命令是这样的:
$(MSBuildBinPath)\msbuild.exe /p:Configuration=$(ConfigurationName) "$(ProjectDir)MSBuild\MSBuildSettings.xml"
关于为什么会发生这种情况有什么想法吗?程序集似乎位于正确的目录中。
I am attempting to use MSBuild and the YUICompressor for .NET to compress my js and css files upon build.
I am following the documentation found here and here
When I try to build, I am getting the following error:
Error 4 The "CompressorTask" task could not be loaded from the assembly C:\Apps\MyApp\packages\YUICompressor.NET.1.7.0.0\lib\net35\Yahoo.Yui.Compressor.dll.
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.
My post build command is as such:
$(MSBuildBinPath)\msbuild.exe /p:Configuration=$(ConfigurationName) "$(ProjectDir)MSBuild\MSBuildSettings.xml"
Any ideas on why this may be occuring? The assemblies seem to be in the correct directories.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决了这个问题...我需要在UsingTask设置中引用不同的dll
请参阅http的下载部分引用的示例应用程序://yuicompressor.codeplex.com/
Solved this... I needed to reference a different dll in the UsingTask setting
Please see the sample application referenced in the downloads section of http://yuicompressor.codeplex.com/