Question regarding Target Framework Selection under VS 2010

Posted on 2011-05-03
Last Modified: 2013-11-07
After running into some issues with one of my projects not linking with a dll from a 3rd party company that we are using, one of their senior developers told me that my process was *likely* not using the 4.0 version of the framework even though I had selected that as the target framework in my project's properties. He explained that although I had selected 4.0 as the target framework for the build, this was interpreted only as a "Suggestion", not a "Demand" and that I cannot be assured that my application would necessarily use the framework I select under the project's properties.

I verified in Process Explorer that it was indeed running under 4.0.

Can anyone verify the broader point, though, of whether or not selecting a particular target framework is a "demand" or a "suggestion"?

I think this guy was wrong but I cannot find any info to corroborate or contradict this statement.
Question by:_Wade_
    LVL 11

    Accepted Solution

    I think he is wrong. cause when you change the framework to 4.0 you get more features in Visual Studio (for example support in Parallel).

    You should also see that the references to the Microsoft DLLs are changed  to the 4.0 version.

    Furthermore, if you have a .Net 3.5 project that reference a class library and you change the framework of the class library, the code will most likely not complied.
    LVL 11

    Expert Comment

    Furthermore, if you take a .Net 4.0 compiled program and try to run it on a computer that only has .Net 3.5 then it will crash.
    LVL 23

    Expert Comment

    I agree with @saragani.  Maybe the issue is with the CPU type of your project (32 vs 64 bits) and the CPU type of the 3rd party DLL.
    LVL 8

    Expert Comment

    I agree with the other experts. If you have choosen .NET 4.0 then you will be coding in that specific version.

    If the dll is not working or you get any compile errors please post them here.

    Author Comment

    My thoughts were the same as Saragani's. It absolutely makes no sense that this could be a suggestiong. If you build for Framework 1, your linq assemblies become invalid.

    I was just hoping to find an article reference or something confirming from microsoft. But, it's not necessary. The guy saying was sticking with his theory of what was going wrong and I think he just improvised his answer.

    Actually, the CPU build property isn't the issue either. But thanks everyone for the response.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now