user3610920
user3610920

Reputation: 1652

Is there any way to find framework version of the project by means DTE or VSproject object?

I have an add in which is used to add dll to the project based on the framework of the project.for this i need to know the .NET Frame work of the project and i can achieve this by reading the .csproj file of the project. But what I am looking is Ways to get it via dte/vsproject object. is there any way?

Thanks,

Upvotes: 0

Views: 594

Answers (1)

Carlos Quintero
Carlos Quintero

Reputation: 4414

You can get it from EnvDTE, using:

Project.Properties.Item("TargetFramework").Value

See:

HOWTO: Get the target .NET Framework of a Visual Studio 2008 project from a Visual Studio add-in or macro

Upvotes: 3

Related Questions