Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Framework Issue

Options
  • 13-08-2011 11:56am
    #1
    Registered Users Posts: 1,686 ✭✭✭


    Hi all,
    I developed a DLL with Visual Studios 2008 VC++, targetting framework 2.0. When I switch to VS2010 everything changes to 4.0.

    Is it possible to make it so my DLL ius compartable with all framework without worrying about what framework the users have.


Comments

  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    You can change your project to target .Net 2 from the project properties, it should then work fine with later versions.


  • Registered Users Posts: 1,686 ✭✭✭RealistSpy


    Yeh but I want the DLL to be compartable with all framework not the application.
    Example:
    Someone making an application in framework 4 + a dll in framework 4 and my dll in framework 2. If they target framework 3.5 or less my dll will work but the other dll in fw4 will stop working.

    I tried adding an app.config file in the dll but didn't work.


  • Registered Users Posts: 15,065 ✭✭✭✭Malice


    RealistSpy wrote: »
    Yeh but I want the DLL to be compartable with all framework not the application.
    I don't understand what you mean by this. A solution can contain multiple projects of which your DLL is one. The target framework can be set at the project level as stevenmu wrote. Your DLL can target .NET 2.0 and other DLLS in the solution can target whatever they need.

    The target framework isn't forward compatible so, while you can set something to target .NET 2.0 and it will work with .NET 4.0, the reverse isn't true.


  • Registered Users Posts: 1,686 ✭✭✭RealistSpy


    SOLVED

    The problem is the programming language
    With vc++ eventhough I am targetting 2.0 fw only 3.5fw applications will work or if I target 4.0fw only 4.0 fw will work

    With c# if I target 2.0 with my dll eveything works with any framework.


Advertisement