Thanks, but that's what I was afraid of. I'm working with VS2002 at work so
I don't have access to the 1.1 Framework. Does anyone know of another way
this can be done even if it doesn't involve Framework calls? When I open an
assembly in a text editor I see the following string in several places
"version=1.0.33 00.0" referencing mscorlib and other assemblies such as
System.Drawing. Is there any way to get this information without having to
parse the file until I come upon this string?
Thanks...
Scott
"AirPete" <x@x.x> wrote in message
news:XJ******** ***********@new sread1.news.pas .earthlink.net. ..
Scott wrote: Does anyone know of a way to get the .NET Framework version that's
required by a specified assembly. I have a program I've written that
creates a Windows Installer setup for any application. However, for
many of the programs I work with there are a lot of files that have
come from other developers, and I'd like to be able to determine
programmaticall y which version of the Framework is required by each
assembly. This way I'll know which version to distribute with the
installation.
I can load an assembly and get all of the referenced assemblies and
properties, but I just can't find a way to get the version of the
Framework it was built with.
Any help would be appreciated....
Scott
string version =
System.Reflecti on.Assembly.Get ExecutingAssemb ly().ImageRunti meVersion;
The property is in Framework 1.1 only.
- Pete