Please bear with me on this, I will try to explain as clearly as I can.
I started a new project (class library) which targets 4.5 and not the client profile 4.5.
I added a reference "System.Runtime.Serialization" and the properties indicates it's in location "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Runtime.Serialization.dll"
On my pc it compiles fine with a build script using msbuild.
On the buildserver which uses team city - it complains
error CS0012: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
The buildserver has the full .net framework installed - "dotnetfx45_full_x86_x64.exe"
The only time it will build is if I copy my version of "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5" to the target machine.
I have checked using this link and .net 4.5 is installed - http://myspworld.wordpress.com/2012/10/18/how-to-check-if-net-4-5-is-installed-on-a-server/
I am asking two question: 1. How does this get installed? 2. If it does find it in this location surely it should look in the GAC?
Will appreciate any help on this.
It's the Windows SDK:
The Windows SDK includes the reference assemblies, tools, headers, and libraries needed to build applications that target the .NET Framework 4.5.
(For 1.1 and 2.0, there was a separate .NET Framework SDK, but I can't find a link for any more recent versions - I don't think it's separately available)
For part 2, no. The GAC is not searched at compile time. It's only used at runtime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With