Solved

changing feature name in visual studio 2008

Posted on 2008-06-11
5
894 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
  • 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

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. …
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

930 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now