C#PostSharp无法解析程序集引用

时间:2017-12-19 08:58:39

标签: c# .net postsharp

我有一个C#项目,正在使用PostSharp并且很好用。 我想创建一个这个项目的副本,引用相同的文件,但它解决了引用程序集的问题。 引用的程序集已到位(尝试添加/删除它几次),但由于某种原因,找到的程序集的版本(在正确的位置)是0.0.0.0。我在网上搜索并建议在.csproj中使用属性PostSharpTargetFrameworkVersion 4.0的所有解决方案。遗憾的是,这并没有解决我的问题。你有没有想法?这是来自postsharp的日志消息:

1>POSTSHARP : postsharp error PS0099: Unhandled exception (4.3.20.0, postsharp-net40-x86-srv.exe, CLR 4.0.30319.460798, Release): PostSharp.Sdk.CodeModel.AssemblyLoadException: Cannot find assembly 'myapplication.remote, version=2.0.0.22787, culture=neutral, publickeytoken=null'.
1>POSTSHARP : postsharp error PS0099: ============ PostSharp Assembly Loading Log ===================
1>POSTSHARP : postsharp error PS0099: LOG: Finding the assembly with binding identity 'myapplication.remote', version=2.0.0.22787, culture=neutral, publickeytoken=null'.
1>POSTSHARP : postsharp error PS0099: LOG: Found file 'C:\Program Files (x86)\MyCompany\MyApplication\MyApplication.Remote.dll' with identity ', version=0.0.0.0, culture=neutral, publickeytoken=null, processorarchitecture=msil'.
1>POSTSHARP : postsharp error PS0099: LOG: Reference mismatch for 'C:\Program Files (x86)\MyCompany\MyApplication\MyApplication.Remote.dll' [None].
1>POSTSHARP : postsharp error PS0099: LOG: Probing location 'C:\ProgramData\PostSharp\4.3.20\bin.Release\MyApplication.Remote.exe' because this directory was explicitly added to the search path [File Not Found].
1>POSTSHARP : postsharp error PS0099: LOG: Probing location 'C:\ProgramData\PostSharp\4.3.20\bin.Release\MyApplication.Remote.dll' because this directory was explicitly added to the search path [File Not Found].
1>POSTSHARP : postsharp error PS0099: LOG: Probing location 'C:\ProgramData\PostSharp\4.3.20\bin.Release\MyApplication.Remote.winmd' because this directory was explicitly added to the search path [File Not Found].
1>POSTSHARP : postsharp error PS0099: LOG: Probing location 'D:\MyFiles\Test\Server\bin\Debug\MyApplication.Remote.exe' because this directory was explicitly added to the search path [File Not Found].
1>POSTSHARP : postsharp error PS0099: LOG: Found file 'D:\MyFiles\Test\Server\bin\Debug\MyApplication.Remote.dll' with identity ', version=0.0.0.0, culture=neutral, publickeytoken=null, processorarchitecture=msil'.
1>POSTSHARP : postsharp error PS0099: LOG: Reference mismatch for 'D:\MyFiles\Test\Server\bin\Debug\MyApplication.Remote.dll' [None].
1>POSTSHARP : postsharp error PS0099: LOG: Probing location 'D:\MyFiles\Test\Server\bin\Debug\MyApplication.Remote.winmd' because this directory was explicitly added to the search path [File Not Found].
1>POSTSHARP : postsharp error PS0099: LOG: Probing location 'D:\MyFiles\Test\Server\obj\Debug\MyApplication.Remote.exe' because this directory was explicitly added to the search path [File Not Found].
1>POSTSHARP : postsharp error PS0099: LOG: Probing location 'D:\MyFiles\Test\Server\obj\Debug\MyApplication.Remote.dll' because this directory was explicitly added to the search path [File Not Found].
1>POSTSHARP : postsharp error PS0099: LOG: Probing location 'D:\MyFiles\Test\Server\obj\Debug\MyApplication.Remote.winmd' because this directory was explicitly added to the search path [File Not Found].
..........

0 个答案:

没有答案