We help IT Professionals succeed at work.

VB.net 2013 - Application Target Framework

If I have my application set in the Project Properties, how do I know it is really pointed to that frame work?

For example I've noticed that in .net 4.5 it puts a line in the Application Config to point to the 4.5 framework...but for 3.5 it doesn't seem to add that entry...so how do I know it is really pointed to that .net framework or do I just believe that it is because I selected it?

Mark
Comment
Watch Question

Right click on project to go to Properties, in Application tab, you have option to select Target framework. All framework installed on your machine will be there.

Author

Commented:
That wasn't really my question...If I select .Net Framework 3.5 how do I know my application is running 3.5 Framework?
Developer
Distinguished Expert 2019
Commented:
ILDASM (accessible from the Visual Studio Command Prompt) is a wonderful tool:Capture.JPGCapture.JPGCapture.JPGUsing ILDASM, you can determine the targeted framework for an assembly:Targeted framework of .NET 4.5 shows references to v4.xTargeted framework of .NET 3.5 shows references to v2.xYou can also use a bit of reflection if you want to capture it in say a string:
Dim netVersion = System.Reflection.Assembly.GetAssembly(Me.GetType()).ImageRunTimeVersion

Open in new window

-saige-

Author

Commented:
Great Thanks!

Mark