Reputation: 133
I´m trying to build my c# .NET solution containing 18 projects. Out of the blue I´m receiving an odd error message for one of my projects (the web gui).
Error as follows
"Error 1839 'Could not load file or assembly 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.'"
All but one of the projects are running on .net framework 3.5 but I have framework 4.0 installed on my machine. Visual studio is trying to load the file from 4.0 but not 3.5 (I´ve tried to move the file to 3.5, but that did not work)
Does anyone know what´s wrong here or have any idea what I can do to fix this ?
regards Throstur
Upvotes: 6
Views: 12625
Reputation: 3133
All my projects were set to use .NET 4.0, and other answers didn't work for me, but eventually figured it out. Simple:
For me, it just worked as expected. Thanks to this answer for helping me figure it out.
Upvotes: 2
Reputation: 41
I got the same above error out of the blue.. The project target framework was set to 3.5. Changed it to 4.0 and I was able build successfully.
Upvotes: 4