• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Active Contributor
    metalonmetal
    Posts: 45
    Registered: ‎08-10-2007
    Accepted Solution

    AutoCAD 2011 and .NET Framework 3.5 References

    275 Views, 2 Replies
    11-28-2012 01:35 PM

    There are a few other postings describing the error that I'm receiving, but while others are able to overcome their problem, I'm still having trouble. 

     

    When trying to NETLOAD, I receive this error as others do: 

     

    Command: netload
    Cannot load assembly. Error details: System.BadImageFormatException: Could not
    load file or assembly 'file:///C:\Documents and Settings\metalonmetal\My
    Documents\Visual Studio
    2010\Projects\drewTools\drewTools\bin\Release\drewTools.dll' or one of its
    dependencies. This assembly is built by a runtime newer than the currently
    loaded runtime and cannot be loaded.

     

    The advice from the other posts has been to change the compiler through the advanced settings, so I've tried changing the compiler from the .NET Framework 4.0 to the 3.5, build, NETLOAD and... same thing.

     

    What I'm wondering is whether my references assemblies are correct: 

     

    references3.5.JPG

     

    When the compiler is set to the 4.0 Framework, all the references automatically update to 4.0 version references, but when I downgrade the compiler to 3.5, the references automatically update to 3.0 and 2.0. From what I can tell, my machine has 3.5 installed, including the SP1. 

     

    Can anyone confirm that these references are correct? 

     

    Thanks in advance.

    Please use plain text.
    Distinguished Mentor
    Posts: 664
    Registered: ‎07-30-2008

    Re: AutoCAD 2011 and .NET Framework 3.5 References

    11-29-2012 03:33 AM in reply to: metalonmetal

    The reference to System.xaml is showing as not found which should raise a question.

     

    Checking on my computer System.xaml is .net version 4.0 which is why you are having problems. In a working project I have for 2011, which is set to target .net framework 3.5 system.xaml is not available in the add references dialogue.

     

    You will have to remove the reference to system.xaml.

    If this fixed your issue, click on "Accept as Solution"

    Andrew Puller
    Maitland, NSW, Australia
    Windows 7 Enterprise 64bit
    Intel core i7 2600 @ 3.40 GHz with 16GB Ram
    Civil 3d 2013 64bit
    Please use plain text.
    Active Contributor
    metalonmetal
    Posts: 45
    Registered: ‎08-10-2007

    Re: AutoCAD 2011 and .NET Framework 3.5 References

    11-29-2012 07:35 AM in reply to: andrewpuller3811

    Cheers!! That was exactly what needed to change.

     

    Please use plain text.