I would also suggest using a CAB file project for installing web parts. it is much more clean and easier to maintain!
Here is a document I created for my team on web part development. It's a bit overkill for this question, but you may find it useful.
<--------------->
Abstract
SharePoint is a very robust web application with many feature-rich stock components known as “web parts ”. These web parts (many provided by Microsoft) can do a great many things, but they cannot be “everything-to-everybody”.
There are a few steps that need to be done before a web part can be built. (1) The programmer will need to download the Microsoft.Sharepoint.dll file and register it in their global assembly cache (GAC ). (2) The programmer will need to download and install SharePoint’s .Net SDK (wssSdk.exe ). (3) Finally, the developer will need to download and install Lutz Roeder's .Net Reflector program.
Development
Pre-Development
1. Download and register Microsoft.Sharepoint.dll into the GAC
2. Download and install the wsssdk.exe
3. Download and install Lutz Roeder's .Net Reflector program.
Development Steps
1. Using Visual Studio.Net, create a new SharePoint Web Part Project (wssSDK should have added this option to your Visual Studio Project Manager.
2. Include reference to Microsoft.sharepoint.dll
3. Using the sn.exe command line utility create a KeyPair.snk file
4. Include a CAB project into your web part solution
a. Include Primary Output
b. Include Content Files
c. Include KeyPair.snk
d. Include other files (e.g. resX , gifs , etc)
Note: make sure that the CAB project is a dependent of the web part project
5. Edit the AssemblyInfo.cs class, change AssemblyVersion(“1.0.0.1”)
6. Use Lutz Roeder's .Net Reflector to get the PublicKeyToken ID
7. Edit the DWP file to include assembly information (e.g. <Assembly>MyWebPartProject
a. The Assembly name [MyWebPartProjectName] is case sensitive and MUST match the compiled dll name exactly.
b. The entire contents of the <Assembly> tags can be copied and pasted from the .Net Reflector program
8. The version number in the dwp file MUST match the version in the AssemblyInfo.cs file exactly.
Development Notes
1. All public properties will be serialized and be part of the tool parts property pages.
2. Public properties should be of the following types: String, Enumeration, Boolean, Date or Numeric.
Property Type Displays as
String Text Box
Date Text Box
Numeric Text Box
Boolean Check Box
Enumeration Drop Down List
3. Each public property should have the following attributes:
Attribute Name Attribute Resultant
Browsable(<true/false>) - Displays the property in the tool pane (true or false)
Category(<Text Value>) - Determines which category this property will appear under.
- If no category is provided, Miscellaneous will be used
- If the entry matches categories that already exist (Advanced, Layout, etc), the entry will be ignored and Miscellaneous will be used.
DefaultValue(<variable>) - Required for proper initialization
WebPartStorage
(<storage enum value>) - Determines who sets the value (shared is set by admin, personal is set by user)
FriendlyName(<Text Value>) - This is the title of the property and it will show up as a label on the tool property pane.
Description(<Text Value>) - This is the information that will display in the tool tip dialog
4. Each property should be dependent on two defined variables. The first is a constant which defines the default value (<private const string defaultVarValue>). The second is the variable that will store the value of the data entered (<private string varValue>).
Installation
1. Copy the recently compiled CAB project to a directory on the SharePoint web server (must be placed on both production web servers).
a. We are currently storing all of the CAB projects in the following directory:
\\<web server>\Program Files\Common Files\Microsoft Shared\web server extensions\60\WPPACKS
2. Installing the web part can be as easy as right-clicking the CAB project and “Install Web Part”, or by using the stsadm.exe program (the right-click option is a custom batch program developed by T.Degen)
3. Using the command line utility stsadm.exe found at: C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN perform the following commands
a. Add Web Part: stsadm -o addwppack -globalinstall -force -filename C:\<path>\<Cab Project Name>.CAB
b. Delete Web Part: stsadm -o deletewppack -name <Cab Project Name>.CAB
Testing
Task
Verify that you can add the Web Part properly to a Web Part zone.
Verify that static Web Parts render appropriately and do not cause the Web Part Page to fail.
Verify that the Web Part works correctly regardless of where the Web Part Page is located.
Verify that property attributes are correctly defined.
Verify that Web Part changes made in personal view are not reflected in shared view.
Verify that every public property can handle bad input.
Verify that the Web Part handles all of its exceptions.
Verify that the Web Part renders correctly in Microsoft Office FrontPage.
Verify that Web Part properties displayed in the tool pane are user-friendly.
Verify that the Web Part appears appropriately in the search results.
Verify that you can import and export the Web Part properly.
Verify that the Web Part previews properly.
Verify that the Web Part can access its resources in different setup configurations.
Verify that Web Part properties are not dependent on each other.
Verify that Web Parts work correctly with different combinations of Web Part zone settings.
Verify that the Web Part renders appropriately based on user permissions.
Verify that adding several instances of the same Web Part to a Web Part Page (or in the same Web Part zone) works correctly.
Verify that Web Part caching works correctly.
Verify that requests to other HTTP sites or Web services are asynchronous.
Original Source:
http://msdn.microsoft.com/
Appendix
SharePoint Developer to Developer
http://msd2d.com/
Introduction to Web Parts
http://msdn.microsoft.com/
Building a Basic Web Part
http://msdn.microsoft.com/
Web Part Design Considerations
http://msdn.microsoft.com/
Advanced Web Part Design
http://msdn.microsoft.com/
Deploying Web Parts
http://msdn.microsoft.com/
Main Topics
Browse All Topics





by: _TAD_Posted on 2005-06-24 at 14:56:30ID: 14297576
1) reboot the webserver
OR
2) Change the version of your dll. SharePoint will always use the highest version available.