我有 WCF 服务,最近从 .NET 3.5/TFS2008 升级到 .NET 4.0/TFS2010。过去几天我一直在调试团队构建错误,但我不太明白为什么会收到该错误。我已经遇到过两次这个错误了。
- 编译Web部署项目时
C:\程序文件
(x86)\MSBuild\Microsoft\WebDeployment\v10.0\Microsoft.WebDeployment.targets
(1728):“Microsoft.Sdc.Tasks.BizTalk2004.Host.Delete”任务可以
不能从程序集 C:\Program Files 加载
(x86)\MSBuild\Microsoft.Sdc.Tasks\Microsoft.Sdc.Tasks.BizTalk.dll。
无法加载文件或程序集“Microsoft.BizTalk.ExplorerOM”
版本 = 3.0.1.0,文化 = 中性,PublicKeyToken = 31bf3856ad364e35' 或
它的依赖项之一。系统找不到指定的文件。
确认声明正确,程序集
并且它的所有依赖项都可用,并且该任务包含
实现 Microsoft.Build.Framework.ITask 的公共类。
- 编译 WiX 项目时
C:\Builds\24\DCFServices2010\Release
4.0\Sources\Bin\wix3-binaries\Wix.targets (1600): 无法加载“Microsoft.Sdc.Tasks.BizTalk2004.Host.Delete”任务
来自程序集 C:\Program Files
(x86)\MSBuild\Microsoft.Sdc.Tasks\Microsoft.Sdc.Tasks.BizTalk.dll。
无法加载文件或程序集“Microsoft.BizTalk.ExplorerOM”
版本 = 3.0.1.0,文化 = 中性,PublicKeyToken = 31bf3856ad364e35' 或
它的依赖项之一。系统找不到指定的文件。
确认声明正确,程序集
并且它的所有依赖项都可用,并且该任务包含
实现 Microsoft.Build.Framework.ITask 的公共类。
在情况 1 中,我通过恢复到 WebDeployment v9.0 来“修复”它——但这并不是真正的修复。
如果出现错误 2,我还没有找到解决方案,我确实需要一些帮助!
事实:
- 我使用 Microsoft.Sdc.Tasks 并且尝试了不同的版本 - 相同的结果。
- 我不使用任何 Biztalk 相关库或任何 BizTalk 相关代码
- 这是一个 VS2010、.NET 4.0 项目,该项目在 TFS2010 生成代理上编译。
有什么想法吗?
I have a WCF service and I've recently upgraded from .NET 3.5/TFS2008 to .NET 4.0/TFS2010. I'm been debugging an team build error for the last couple of days and I can't quite figure why I'm receiving the error. I've encountered the error twice.
- When compiling a Web Deployment project
C:\Program Files
(x86)\MSBuild\Microsoft\WebDeployment\v10.0\Microsoft.WebDeployment.targets
(1728): The "Microsoft.Sdc.Tasks.BizTalk2004.Host.Delete" task could
not be loaded from the assembly C:\Program Files
(x86)\MSBuild\Microsoft.Sdc.Tasks\Microsoft.Sdc.Tasks.BizTalk.dll.
Could not load file or assembly 'Microsoft.BizTalk.ExplorerOM,
Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 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.
- When compiling a WiX project
C:\Builds\24\DCFServices2010\Release
4.0\Sources\Bin\wix3-binaries\Wix.targets (1600): The "Microsoft.Sdc.Tasks.BizTalk2004.Host.Delete" task could not be loaded
from the assembly C:\Program Files
(x86)\MSBuild\Microsoft.Sdc.Tasks\Microsoft.Sdc.Tasks.BizTalk.dll.
Could not load file or assembly 'Microsoft.BizTalk.ExplorerOM,
Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 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.
In case 1 I've 'fixed' it by reverting back to WebDeployment v9.0 - Not really a fix however.
In case of error 2, I haven't found a solution and I could really use some help!
Facts:
- I use Microsoft.Sdc.Tasks and I've tried different versions - same result.
- I do not use any Biztalk releated libraries or have any BizTalk related code
- This is a VS2010, .NET 4.0 project and the project compiles on a TFS2010 Build agent.
Any ideas?
发布评论
评论(1)
问题是命名空间冲突,因为您有多个可用的“删除”任务。 此链接显示了解决该问题的一种方法。我确信有更好的方法,但由于您不需要 BizTalk,这似乎是一个快速而简单的答案:)
基本上您可以注释掉 BizTalk 任务。
您转到此文件夹(根据上面的错误消息):
C:\Program Files (x86)\MSBuild\Microsoft.Sdc.Tasks\
并编辑此文件:
Microsoft.Sdc.Common.tasks
注释或删除 BizTalk 的任务。这些行都开始看起来像:
位于文件底部。
the problem is a namespace conflict, in that you have more than on "Delete" task available. this link shows one way to solve it. I'm sure there is a better way, but since you don't need BizTalk, this seems like a quick and easy answer :)
Basically you comment out the BizTalk tasks.
you go to this folder (from your error message above):
C:\Program Files (x86)\MSBuild\Microsoft.Sdc.Tasks\
and edit this file:
Microsoft.Sdc.Common.tasks
to comment out or remove the tasks for BizTalk. Those lines all start looking like:
and are at the bottom of the file.