<p>Suppose I have some code that would, in theory, compile against <em>any</em> version of the .net framework. Think "Hello World", if you like. </p>

<p>If I actually compile the code, though, I'll get an executable that runs against one <em>particular</em> version. </p>

<p>Is there any way to arrange things so that the compiled exe will just run against whatever version it finds? I strongly suspect that the answer is no, but I'd be happy to be proven wrong...</p>

<hr>

<p>Edit: Well, I'll go to the foot of our stairs. I had no idea that later frameworks would happily run exe's compiled under earlier versions. Thanks for all the responses!</p>

Read ScuttGu's post about
VS 2008 Multi-Targeting Support
One of the big changes we are making
  starting with the VS 2008 release is
  to support what we call
  "Multi-Targeting" - which means that
  Visual Studio will now support
  targeting multiple versions of the
  .NET Framework, and developers will be
  able to start taking advantage of the
  new features Visual Studio provides
  without having to always upgrade their
  existing projects and deployed
  applications to use a new version of
  the .NET Framework library.
Now when you open an existing project
  or create a new one with VS 2008, you
  can pick which version of the .NET
  Framework to work with - and the IDE
  will update its compilers and
  feature-set to match this.  Among
  other things, this means that
  features, controls, projects,
  item-templates, and assembly
  references that don't work with that
  version of the framework will be
  hidden, and when you build your
  application you'll be able to take the
  compiled output and copy it onto a
  machine that only has an older version
  of the .NET Framework installed, and
  you'll know that the application will
  work.
That way you can use VS2008 to develop .NET 2.0 projects that will work on both .NET 2.0, 3.0 and 3.5