4

I have updated PostSharp from v 4.1.3-alpha to v 4.1.15. There is no issue when I build on my local developer box, but when queueing a gated build it's failing on build server with the following error:

Unhandled exception (4.1.15.0, postsharp.4.0-x86.exe, CLR 4.0.30319.378758, Release): PostSharp.Sdk.CodeModel.AssemblyLoadException: Cannot find assembly 'mscorlib, version=2.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e'. [Public key mismatch]

I updated to the same version from v 4.1.6-alpha in a different solution and build server could build it successfully.

Can any one help me in understanding why PostSharp is looking for mscorlib v 2.0.5.0 when all the projects in the solution are targeting .NET v 4.5.1? How can I resolve this issue?

Wim
  • 11,998
  • 1
  • 34
  • 57
Rajanikar
  • 41
  • 5
  • 1
    mscorlib v2.0.5.0 is the PCL version. Is the PCL profile installed on your build server? – Gael Fraiteur Jun 24 '15 at 19:30
  • I don't think we use any PCL , however i don't know how to check if PCL profile is installed on build server also don't have access to build server, if you can provide steps, I can ask my support team to check that. – Rajanikar Jun 25 '15 at 16:27
  • It can be one of your references that is a PCL. You should have Microsoft Build Tools 2013 installed on the build server. You can also check reference assemblies in `C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable`. Additionally, you can inspect `obj/Debug/Before-PostSharp` directory of the failing project and tell us which assembly does reference `mscorlib, v2.0.5.0`. Thanks! – Daniel Balas Jun 25 '15 at 20:52
  • @Daniel Having the exact same problem here, using PostSharp 4.1.19.0 - MS Build Tools 2013 installed on build server and no references to PCL for the assembly foud in Before-PostSharp dir. Any other suggestions? – Wim Jul 20 '15 at 10:21
  • @WimHollebrandse Could you please contact our support (https://www.postsharp.net/support) and send us the build log and content of `C:\ProgramData\PostSharp\InstalledFrameworks` directory? Thanks! – Daniel Balas Jul 21 '15 at 10:53
  • Thanks @Daniel - I have sent this info to the info@postsharp e-mail addy. Cheers. – Wim Jul 21 '15 at 13:00

0 Answers0