tags:

views:

162

answers:

4

Hi

I have compiled a NET 2.0 application using C# 2005 Express on a machine that also contains VS 2008 Express. When I run the app on a machine with .NET 2.0 SP1 runtime only the application doesn't execute and raises an error about sending report to Microsoft etc. I have the impression that the compiler silently referenced certain 3.5 libraries and is executable is expecting it on the target machine. How can I force the compilation to be pure .NET 2.0?

+2  A: 

In the project properties page using Visual Studio 2008, you can target specific framework versions. However, if you are compiling this in VS2005 it would be odd if this is your problem, stranger things have happened though.

marr75
A: 

Check the event log for errors and use fusion logging to try and identify what assemblies its attempting to reference (if you believe its attempting to load assemblies in the DotNet 3.5 framework)

Kragen
+2  A: 

In addition to targetting a specific framework as mentioned by marr75, you will also need to verify that any other assemblies you are referencing are targetting .net 2.0. If you are using any 3rd party assemblies, they may have requirements for .NET 3.5.

Reed Copsey
A: 

You mention that you "compiled" the app with 2005, but was it originally "created" with 2005 or 2008? If created in 2008, there may be things in the config file or references to review.

daughtkom