locked
Assembly target framework RRS feed

  • Question

  • I guess the answer is NO, but is it possible to determine an assembly's target framework when all we have is the assembly name?

    Thx

    Thursday, September 29, 2016 9:53 PM

Answers

  • Hi Korporal Kernel,

    For your question, the assembly name is a name, it does not contain more information.

    If you want to get assembly's target framework, here are two ways.

    1. If you have a project, in your project file, you could open the .csproj with Nopetad, you will get the target framework like the following.

        <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>

    Or you could right click your project in solution explore, choose unload project. And then right click the project, choose edit projectname.csproj. This could get the same effect.

    2. You could use reflection to get the assembly's target framework as well.

    Such as Assembly.GetReferencedAssemblies Method ().

    I hope this would be helpful

    If you have something else, please feel free to contact us.

    Best Regards,

    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by DotNet Wang Friday, September 30, 2016 4:55 AM
    • Proposed as answer by DotNet Wang Monday, October 10, 2016 6:16 AM
    • Marked as answer by DotNet Wang Monday, October 10, 2016 6:26 AM
    Friday, September 30, 2016 4:54 AM