Friday, March 16, 2012

VS2005 can also access .Net 3.5 libraries

 

Last week, one of SDKs built with VS2005 threw an exception from client’s hosting apps on their machines. Finally we found the reason – we call GC.WaitForFullGCComplete in our app, though the function was introduced in .Net 3.5, while since 2.0/3.5 share the same mscorlib.dll in the Framework 2.0’s dir, which is also updated by .Net 3.5 after VS2008 is installed. Then VS2005 can use the new functions without problem. Developers did not notice it. Then, if the client’s apps do not install .Net 3.5, the problem happens. So, we need to tell clients to install the 3.5 framework with latest service pack in the future.

This is kind of interesting, and the reason why we distributed the SDK built with VS2005 is that some of our clients have not upgraded to VS2008, and can not open our SDK’s samples if we only distribute VS2008 solutions and samples.

No comments:

Post a Comment