Results 1 to 3 of 3

Thread: Is there a way to reference multiple frameworks in the same project?

  1. #1
    foraye is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.5
    Join Date
    Jun 2014
    Posts
    2
    Reputation
    0

    Is there a way to reference multiple frameworks in the same project?

    Hello All,

    I'm currently working on a project that I now notice uses 2 different frameworks. I recently installed a new SDK that is based on 4.0 and changed my target framework from 3.5.

    I attempted to run my code and now get the following:

    An unhandled exception of type 'System.IO.FileLoadException' occurred in Seagull.BarTender.Print.dll

    Additional information: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.


    Can someone please help with this? Do I need to reference 2 frameworks?
    Thanks

  2. #2
    Herman is offline VB.NET Forum Idol
    .NET Framework
    .NET 4.0
    Join Date
    Oct 2011
    Location
    Montreal, QC, CA
    Posts
    866
    Reputation
    1213
    You would need to build the two parts as separate projects within the same solution.

  3. #3
    foraye is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.5
    Join Date
    Jun 2014
    Posts
    2
    Reputation
    0
    Thanks Herman,

    I contacted the SDK supplier and they recommended adding the following to my app.config file

    <startup useLegacyV2RuntimeActivationPolicy="true">

    that seem to have fixed the issue as the error went away!

    I'm still a beginner having only written code in VBA and VB6...I have not gotten to the muti-project solutions yet, but i'm heading there.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •