Upgrading
to .NET Framework 2.0
Although it is not required that you upgrade to ASP.NET 2.0, there are many improvements
to the development platform and environment in that release of the framework.
The Windows SharePoint Services 2.0 object model and SOAP services are fully
supported for use in ASP.NET 2.0 applications.
To leverage ASP.NET 2.0 Web Parts in Windows SharePoint Services, a wrapper Web
Part must be written to make the ASP.NET 2.0 Web Part appear to be a Windows
SharePoint Services Web Part. After this is done, your ASP.NET 2.0 Web Part
should function normally within your Windows SharePoint Services pages. Wrapper
Web Parts will not be required in the next version of Windows SharePoint Services
or the next version of SharePoint Portal Server (code named Office “12″
SharePoint Servers), which both natively support ASP.NET 2.0.
In most SharePoint Portal Server installations, it is better to continue to use
the current technologies that are supported natively in the product — that
is, ASP.NET 1.0 and .NET Framework 1.1 — rather than mixing the platforms.
Implications
for Web Part development and deployment
The following set of frequently asked questions is taken from the SharePoint
Thoughts blog, and provides a good set of answers to what we suspect will
be the most commonly considered ways of exploiting this new development:
With Windows SharePoint Services with SP2, will the SharePoint worker process run
in ASP.NET 2.0?
Yes, it can. Alternatively, you are not forced to use ASP.NET version 2.0.
What is the advantage of running my virtual server in ASP.NET v2.0?
After you’re running in the ASP.NET version 2.0 space, the corresponding CLR
libraries are available. Your code will be able to take advantage of new features
in addition to the security and performance enhancements found in the new
runtime.
If my my virtual server continues to run in ASP.NET 1.1, can my code call another
assembly that was compiled in .NET v2.0?
No. CLR fundamentals state that you can’t “upstream” the CLR version
from the current running version. In other words, if you decide to run with
version 1.1, you are limited to loading and working with assemblies compiled
with version 1.1 or earlier.
If my virtual server runs in ASP.NET 2.0, will my Web Part code need to be recompiled?
No. This is basically the reverse scenario of the last question, but the answer
is not the same. “Downstream” is possible; therefore, any existing
1.x compiled assemblies should continue to work.
Can I create a virtual server/directory that runs in ASP.NET 2.0 and have my SharePoint
site running under ASP.NET 1.1 call into the pages and Web services exposed
by the ASP.NET 2.0 site?
Yes.
Can I use ASP.NET 2.0 Web Parts on Windows SharePoint Services with SP2?
Not as Web Parts. Given that all Web Parts can be treated as standard Web
Form controls, ASP.NET 2.0 Web Parts can be added to pages running in Windows
SharePoint Services with SP2, just not within Web Part zones. In this manner,
such Web Parts will behave no differently than standard Web Form controls,
and should have been written with this contingency in mind. Out of the box,
Windows SharePoint Services will not use any ASP.NET 2.0 constructs. At the
core level, SP2 will not change the rendering behavior of Windows SharePoint
Services. In other words, Windows SharePoint Services will not suddenly gain
the ability to use master pages or ASP.NET 2.0 Web Parts. Until the next major
release, your only course of action is to take an approach of encapsulating
an ASP.NET 2.0 Web Part with a Windows SharePoint Services Web Part designed
for this purpose. You might want to investigate http://www.smartpart.info
for an example of this technique.
Can I use Visual Studio 2005 to compile my Windows SharePoint Services Web Parts?
Visual Studio 2005 is bound to the 2.0 runtime; therefore, the answer is yes
if you are using SP2; otherwise, the answer is no.
Will I need to specify assembly redirection or runtime information for my Web Part
assemblies?
No.
Will I need to specify assembly redirection or runtime information anywhere else?
Yes. If you want to deploy Web Part packages that contain CLR version 2.0
compiled Web Part assemblies (that is, SharePoint Web Parts compiled by using
the new CLR), you will need to create a *.config file for stsadm.exe that
specifies the following:
<?xml
version=”1.0″ encoding=”utf-8″ ?>
<configuration>
<startup>
<supportedRuntime version=”v2.0.50727″ /> <!– update the
version # once .Net v2.0 is released –>
<supportedRuntime version=”v1.1.4322″ /> <!– this is the
version number for .Net v1.1 –>
</startup>
</configuration>
The
config file (appropriately named stsadm.exe.config) will need to be placed
next to stsadm.exe. If you don’t add the config file, you will get the error
message, “Version 1.1 is not a compatible version.”
Extracted from : office.microsoft.com