0

I have created an application which uses .NET 3.5. However, some Windows XP machines give the following error:

Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

It's because they have installed a version older than 3.5. How could I check the .NET version decently? I mean I can't check it from my application itself since it's looking for the 3.5 DLL files when the program is launched.

What I thought of, is creating a very simple program using .NET 2.0, and then checking what versions are installed (this program as a launcher). However I'd like to hear your opinions.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Devator
  • 3,686
  • 4
  • 33
  • 52
  • http://stackoverflow.com/questions/198931/how-do-i-tell-if-net-3-5-sp1-is-installed – Tilak Dec 30 '12 at 20:29
  • 1
    this seems to be the authorative source http://support.microsoft.com/kb/318785/en-us – rene Dec 30 '12 at 20:32
  • I'm not asking HOW to detect the .Net version, I'm asking how I should check it, with a launcher? – Devator Dec 30 '12 at 20:35
  • @Devator: I like to do this in the installer – Sam Axe Dec 30 '12 at 21:23
  • You will need to click File > Add new project > Setup and Extensibility > Setup Project. Add the Primary Target Output and .Net dependancies (eg .net 3.5 framework) will be installed along with your application. If you want to detect registry settings in the installer project you can see how I do it in this [example for install paths](http://stackoverflow.com/questions/11474320/install-to-same-path-when-upgrading-application/11490003#11490003). Good luck! – Jeremy Thompson Dec 31 '12 at 00:13

0 Answers0