.NET framework 3.0 targeting error
I have an application that I am developing in VS 2008 and I am targeting .NET 3.
Unfortunately when I install on a clean computer with .NET 3 it crashes. And apart from the usual TypeInitilisationError, I don't know why.
Updating the same computer to .NET 3.5SP1 makes it work fine.
- Is there something in VS2008 that prevents me from reporting the bug to me in more detail?
- How can I be sure that I am not using any of the newest classes in the framework? It is true that I found I was using DropShadowEffect which belongs to 3SP1. I removed it.
But still ... it doesn't work.
What am I doing wrong?
Have you tried to determine which version of the framework is installed on each computer. If you are using .Net 3.5 SP1 to compile the program, it actually includes .Net 3.0 sp2, which has some additional functionality (MultiSelector class to denote one) that are not available in .Net 3.0 sp1, which is installed by default with. Net 3.0 download from Microsoft.
You can try here for some programs to help: NetVersionCheck
EDIT: Visual Studio won't tell you any errors for this, because everything looks fine with the .Net 3.0 version it is using. I ran into this issue using WPF toolkit as it requires the MultiSelector class, which didn't appear until .Net 3.0 sp2. So Jonathan, if you can show us the error outputting from your program on "Fresh" .Net 3.0 machine, then we could probably tell you what you are using in .Net 3.0 sp2 which is not supported in lower versions.
Also, I usually use VS2005 with programs that I want to run in a lower runtime than .NET 3.5sp1, but this really only applies to .Net 2.0 applications.
If we knew which .Net 3.0 components you are using, that would help too!
source to share
Noah
Thanks for the answer. Due to VS2008, on my dev machine, I have the latest 3.5SP1. But in Visual Studio, I chose 3 as the target.
And check what I am installing on a clean 3.0 computer ...
So your suggestion tells me what framework is installed, but doesn't tell me what my program uses in the newest framework that is not in 3.0.
Also, something must be broken in VS2008 as it should keep me warm for it ...
I feel like this is a problem with VS 2008, but obviously MS feels differently.
VS 2008 ships with .NET 3.5, some .NET 3.0 Service Pack and .NET 2.0 SP1. It can only determine if you are using things that do not belong to the version installed on your computer, and if any service pack matches you. This means that if you target .NET 2.0 but install your software on a computer that does not have .NET 2.0 Service Pack 1 (SP1), if you are using something specific to Service Pack 1 (SP1) the application will fail when trying to make a call.
The only way I have seen this is to check the service pack changelog or configure .NET 3.5. If .NET 3.5 is installed, service packs are also provided. This is not a good solution, but this is the only one I found.
source to share