Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Framework Issue

  • 13-08-2011 11:56AM
    #1
    Registered Users, Registered Users 2 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,688 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, Registered Users 2 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, Registered Users 2 Posts: 15,079 ✭✭✭✭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, Registered Users 2 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