I have a project that I made with VS 2008, and I need it to use the 2.0 Framework and not the 3.5 Framework because they company hasn't moved to a newer Framework yet. I already have a setup project with it, I just need to know how to roll back the Framework. I have already gone to the setup properties and made sure 3.5 wasn't a prereq. I have also gone to the solution properties, then application, and made sure that the target framework is set to 2.0, but it seems to still be compiling and debugging with the 3.5 framework. What else do I need to do?

If you do that, you're applications supposed to run on .NET framework 2, did you do that? with all application references??

Yes I changed the Target Framework to 2.0, and it complies fine.
I also made it so the pre-reqs didn't include the 3.5 Framework.
I thik I also need to change the Framework Destination folder...but I don't know how to do that.

Excuse me, how could you know it's compiling on 3.5 ? did you try to run this application on machine JUST HAS 2.0??
Installation project is 2.0 or 3.5?

The install project was created with the original project because it is a shared add in. When building, I get this in the output section, which is why I believe somewhere it still uses the 3.5 Framework.

c:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /warn:4 /define:DEBUG;TRACE /reference:"c:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Extensibility.dll" /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.VisualBasic.Compatibility.dll /reference:"c:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\stdole.dll" /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Security.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll /reference:C:\WINDOWS\assembly\GAC\Office\\Office.dll /debug+ /optimize- /out:obj\Debug\TVASignatureAddin.dll /resource:obj\Debug\TVASignatureAddin.BSLLogin.resources /resource:obj\Debug\TVASignatureAddin.LockedSetup.resources /resource:obj\Debug\TVASignatureAddin.Properties.Resources.resources /resource:obj\Debug\TVASignatureAddin.ShowSignatureSetupLocked.resources /resource:obj\Debug\TVASignatureAddin.SignatureDetails.resources /target:library AssemblyInfo.cs BSLLogin.cs BSLLogin.Designer.cs Connect.cs LockedSetup.cs LockedSetup.Designer.cs Properties\Resources.Designer.cs ShowSignatureSetup.cs ShowSignatureSetup.Designer.cs SignatureDetails.cs SignatureDetails.Designer.cs

I know, how do I do that! That is the question! Haha :)

I don't have solution else open the downgraded project on VS 2005 then add new project (Setup wizard project) there on it.

But did you answer my questions

Excuse me, how could you know it's compiling on 3.5 ? did you try to run this application on machine JUST HAS 2.0??
Installation project is 2.0 or 3.5?

commented: Here is some rep! Thanks for the help today! +1

Here is my output from compiling a 2.0 project:

c:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /unsafe- /checked- /nowarn:1701,1702 /nostdlib- /errorreport:prompt /warn:4 /baseaddress:285212672 /define:DEBUG;TRACE /main:WnProg.Program /reference:DLL\ApexLibrary.dll /reference:DLL\AxInterop.AcroPDFLib.dll /reference:bin\Debug\ChilkatDotNet2.dll ....

You should be OK.

commented: Thanks for the help! Here is some rep! +1

Okay, thanks for the help guys, I will mark as solved and hopefully test it on a 2.0 machine soon. But if it isn't okay I will just create a new project and make sure it starts off using 2.0. But I agree that it should be okay if you get that output as well. Thanks for the help from both of you.

You're welcome, please tell us the solution then.

I agree with Scott that is probably is setup up correct even though my output message. I think I set everything up correctly by changing the pre-reqs to not include the 3.5 Framework, and setting the Target Framework to 2.0. When I install on a 2.0 machine I will let you guys know how it goes.

The pre-req is just an aesthetic requirement to stop the installer from running and installation an application that will crash with 100% certainty when installed.

The real fix is changing the target framework version in the project properties and letting it update your project. The 3.5 and 2.0 framework aren't that much different when it comes to the code base:

As with .NET Framework 3.0, version 3.5 uses the CLR of version 2.0. In addition, it installs .NET Framework 2.0 SP1, (installs .NET Framework 2.0 SP2 with 3.5 SP1) and .NET Framework 3.0 SP1 (installs .NET Framework 3.0 SP2 with 3.5 SP1), which adds some methods and properties to the BCL classes in version 2.0 which are required for version 3.5 features such as Language Integrated Query (LINQ). These changes do not affect applications written for version 2.0, however.


2.0 is the "big daddy" of frameworks if you will.

Yes Scott I knew that is what I had to do...but I couldn't figure out exactly which one I was missing. I did change the Target Framework, but something was still up, but after searching today I found one more thing you have to change.

Under the Setup Project you have your Detectable Dependencies, if you double click the .Net Framework icon it brings up a folder called launch conditions, from there, you change the version number in the properties menu. Now, no more message! :)