Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/331.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Microsoft.Practices.Composite-DLL的强名称导致编译器错误_C#_.net_Dll - Fatal编程技术网

C# Microsoft.Practices.Composite-DLL的强名称导致编译器错误

C# Microsoft.Practices.Composite-DLL的强名称导致编译器错误,c#,.net,dll,C#,.net,Dll,我想签署我的C#解决方案中的所有项目。但当我尝试这样做时,有一个问题,即几个第三方程序集没有强名称。这些组件是: Microsoft.Practices.Composite.dll Microsoft.Practices.Composite.Presentation.dll 在做了一些研究之后,我找到了一种给第三方DLL起一个强名称()的方法: 这些操作都是成功完成的。但是,当我从项目中删除带有未签名程序集的NuGet包并将签名的程序集添加为引用时,会出现以下编译器错误: The type

我想签署我的C#解决方案中的所有项目。但当我尝试这样做时,有一个问题,即几个第三方程序集没有强名称。这些组件是:

  • Microsoft.Practices.Composite.dll
  • Microsoft.Practices.Composite.Presentation.dll
在做了一些研究之后,我找到了一种给第三方DLL起一个强名称()的方法:

这些操作都是成功完成的。但是,当我从项目中删除带有未签名程序集的NuGet包并将签名的程序集添加为引用时,会出现以下编译器错误:

The type 'Microsoft.Practices.Composite.Events.EventBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.Composite, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null'
当然,我已经添加了Microsoft.Practices.Composite.Presentation.dll

为了限制问题的范围,我尝试将引用添加到一个新项目中。但是因为我在那里得到了相同的错误,我可以在我的主解决方案中排除一些奇怪的配置

您可以在此处下载我的测试项目:


我真的希望你能以任何方式帮助我。

今天我发现,从版本4开始,复合库就是Prism的一部分。因此,我没有添加对我签名的DLL的引用,而是添加了Prism的NuGet包,该包已经签名

The type 'Microsoft.Practices.Composite.Events.EventBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.Composite, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null'