.net 4.5 compilation errors

.net 4.5 compilation errors

woodstylee3
Advocate Advocate
471 Views
0 Replies
Message 1 of 1

.net 4.5 compilation errors

woodstylee3
Advocate
Advocate

I have a .net com-free addin I have been developing for a couple of years. I have been using Visual Express 2013 to write and compile the code sucessfully for about 6 months, which is targetted to .NET 3.5 Framework. Recentley as part of our upgrade of Autodesk products I have installed Inventor 2015 (Previously running 2012).

 

Since installation, I have attempted to re-compile our solutions. These compile sucesfully and Inventor will load the addins, but any calls to .net functions which refer to system drawing result in a crash of the application. This includes loading any resource images or function calls to load a dialogue.

 

The error is logged as "could not load file or assembly 'system.drawing version=4.0.0.0". However all my code is referencing version 2.0.0.0 as required by .net 3.5 framework.

 

I have tried a number of solutions from google, such as adding <startup useLegacyV2RuntimeActivationPolicy="true"> to the app.config startup section. After googing this many times, this seems to be an issue I belive with the .Net 4.5 framework and incompatibilities with .Net 3.5 framework.

 

In an attempt to move forwards I have retargetted the application to .Net 4.5 framework for use in Inventor 2015 only, but I still have the same compilation errors. (I have updated the target framework, and re-reference any vb.net references to ensure a version 4.0.0.0 dll is used).

 

This still has the same issue when loaded in Inventor 2015 that any calls that display a dialogue, simply crash.

The DLL's compiled prior to installing Inventor 2015 (and hence .Net 4.5) still work in both IV2012 & IV2015.

The source code from my repository, rolled back will not compile and work for either product.

 

Are there any solutions any-one can suggest, other than unistalling 2015 and reinstalling Windows SDK 7.1, .net 4.

 

Thanks Ian 

 

0 Likes
472 Views
0 Replies
Replies (0)