Welcome to MSDN Blogs Sign in | Join | Help

How to create a Visual Studio project to compile the sample .NET Framework detection code

I posted some sample code a while back to demonstrate how to detect whether or not each version of the .NET Framework is installed, and if so, whether any service packs are installed.  I only posted the source code for the samples.  Since then, I've gotten a few questions about how to use Visual Studio to compile the code, so I decided to post the steps I use to create a Visual Studio project that can be used to compile the sample code:

  1. Start Visual Studio 2005 or Visual Studio 2008
  2. Click on the File menu, choose New | Project...
  3. In the Visual C++ node, select the Win32 project item, enter a project name and click OK
  4. Choose Windows Application in the wizard
  5. Right-click on your project in the Visual Studio solution explorer and choose Properties
  6. In the property pages, change the Configuration dropdown at the top from Active (Debug) to All Configurations
  7. Go to Configuration Properties | C/C++ | Precompiled Headers and change the Create/Use Precompiled Header from Use Precompiled Headers to Not Using Precompiled Headers
  8. Click OK to dismiss the property pages
  9. Replace the contents of your main CPP file with the contents of one of the 2 sample code files described in this blog post
  10. Save all of the project files
  11. Build the project
Published Saturday, January 31, 2009 8:59 PM by astebner

Comments

Monday, February 02, 2009 8:02 PM by gOODiDEA.NET

# Interesting Finds: 2009 02.02~02.03

.NET Performance, Measure and ANTS Profiler A common class for executing tasks with a responsive UI NVelocity

Monday, February 02, 2009 8:03 PM by gOODiDEA

# Interesting Finds: 2009 02.02~02.03

.NETPerformance,MeasureandANTSProfilerAcommonclassforexecutingtaskswitharespon...

# Bootstrapper for .NET framework version detector | Tamir Khason - Just code

Thursday, February 05, 2009 2:07 PM by Controllo presenza framework | hilpers

# Controllo presenza framework | hilpers

Tuesday, June 16, 2009 7:33 PM by Aaron Stebner's WebLog

# Sample code to detect .NET Framework install state and service pack level

Introduction .NET Framework versions that can be detected by the sample code .NET Framework 1.0 .NET

Anonymous comments are disabled
 
Page view tracker