Solved

changing feature name in visual studio 2008

Posted on 2008-06-11
5
909 Views
Last Modified: 2013-12-17
I have just started a new project using the web part template.  When deploying to Sharepoint I get an error message stating 'the feature name webpart1 already exists in sharepoint'.  I know that to change the feature name I've got to use WSPview and edit either the manifest or feature.xml, but how do I do it?
0
Comment
Question by:millerthegorilla
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 6

Expert Comment

by:zell71
ID: 21761368
head into:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES

and find the feature name (from here you can find the name of the feature and do a stsadm command to fully delete it) or rename it in the xml file...probably a IIS reboot will be required but i really would suggest using stsadm commands for removing/adding solutions
0
 

Author Comment

by:millerthegorilla
ID: 21761547
You misunderstand - I don't want to remove the existing feature - I want to rename the feature in Visual Studio so that when it is deploying I won't get the same error message.  By default, all web part projects started using the installed web part template are named webpart1.  To know how to change the feature name is pretty important.
0
 
LVL 9

Accepted Solution

by:
moss_guru earned 500 total points
ID: 21762226
The Feature's name is the "Title" attribute on the root <feature> tag in the Feature.xml file when you deploy the feature.  If it is already deployed, you have to retract it, remove the solution, then add the new solution with the renamed feature, then deploy it.
<?xml version="1.0" encoding="utf-8" ?>
<Feature Title="My Feature's Title"
ActivateOnDefault="TRUE"
    Description="My Cool Feature" 
    Scope="WebApplication"
    Id="B83ED45F-E2E9-4a5f-BD7F-582B737BE201"
	Hidden="FALSE" 
    xmlns="http://schemas.microsoft.com/sharepoint/"
	Version="1.0.0.0"
	ReceiverAssembly="MyFeature, Version=1.0.0.0, Culture=neutral,PublicKeyToken=f031662e9aa4295c"
	ReceiverClass="MyFeature.Worker"
	>
	<Properties>
		<Property Key="Text" Value="Hello World"/>
	</Properties>
</Feature>

Open in new window

0
 

Author Comment

by:millerthegorilla
ID: 21762453
No that's not the answer.  I found the answer when I used the smarttemplate from codeplex.  
        //     Change the name of the WebPart1 class to a proper name.
        //      If you change the class name of this web part you also have to
        //      update the SiteViewV3.WebPart1.webpart file in the features folder.

where siteviewv3 is my project name.  Simple.
0
 

Author Comment

by:millerthegorilla
ID: 21792333
You can also simply delete the folder 'webpart1' and then right click on the project in solution explorer and choose add new item and choose new webpart.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question