So sometimes (oftentimes!) you want to target a specific .NET version (say 3.0), but then due to some .NET service packs you get into problems like:
Dispatcher.BeginInvoke(Delegate, Object[])
<-- this was added in 3.0 SP2 (3.0.30618 )System.Threading.WaitHandle.WaitOne(Int32)
<-- this was added in 3.5 SP1, 3.0 SP2, 2.0 SP2Now, these are detected by the JIT compiler, so building against .NET 3.0 in Visual Studio won't guarante it will run on .NET 3.0 only systems.
Short of
what's the best way to avoid against using extensions?
Thanks!
A simple solution to DLL Hell in an application is to statically link all the libraries, i.e. to include the library version required in the program, instead of picking up a system library with a specified name. This is common in C/C++ applications, where, instead of having to worry about which version of MFC42.
DLL hell is a common term for various problems associated with the use of dynamic link libraries (DLLs) or DLL files. A DLL file is a resource within the Windows operating system that contains code and data related to the functionality of one or more applications. These files, which may have the file extension .
Net versions adds up certain new features or functionality. Any way its better to understand latest . Net version which will help you in projects.
NET prevent DLL Hell? - The runtime checks to see that only one version of an assembly is on the machine at any one time. - NET allows assemblies to specify the name AND the version of any assemblies they need to run.
Microsoft tend to assume that, if you have .NET XXX installed, then you must be on the latest service pack because Windows Update will push them out to you as critical updates. I know it's a brittle assumption and sometimes breaks down, but that's what's supposed to happen.
Our products currently target .NET 3.5 SP1, and as such we would be astonished to find a target environment still running .NET 3.5 RTM.
This capability is built into Visual Studio as of VS 2008 SP1 and is also available in FxCop 1.36. Take a look at David Kean's blog post for more details.
alt text http://davesbox.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/blog/ErrorList_5F00_3.png
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With