Reputation: 395
Is there a way to get the version of EF at runtime? Something similar to
Console.WriteLine(Environment.Version);
will return
4.0.30319.18034
Upvotes: 4
Views: 84
Reputation: 108937
Extending Alexei's idea, you can do
string version = typeof(DbSet).Assembly.GetName().Version.ToString();
Upvotes: 3
Reputation: 100527
Print "version" of assembly for any type from the framework you are interested in:
Console.Write( typeof(String).Assembly.GetName().Version);
Upvotes: 1