我對SharePoint開發一個小白,其實我希望我永遠是一個小白吧,和我有困難的建設我的第一個Web部件爲SharePoint 2010網站。我正在使用Visual Studio 2010,並開始使用Visual Web Part。我所添加的只是一個簡單的asp:Label控件,因爲我只是想確保它在我繼續之前正確部署。它的構建,說它甚至部署,然後抨擊「激活功能」的一步。我收到以下錯誤。的SharePoint的WebPart部署 - 激活功能錯誤
Error 1 Error occurred in deployment step 'Activate Features': Feature with Id '12765e82-6e4a-4407-aa8c-77b537841f4b' is not installed in this farm, and cannot be added to this scope. 0 0 scCodePart
這裏沒有太多的幫助。按照建議,我確定該功能的範圍設置爲「網站」。我甚至嘗試將Feature1.Template.xml的xml更改爲:
<?xml version="1.0" encoding="utf-8" ?>
<Feature Id="12765e82-6e4a-4407-aa8c-77b537841f4b" Scope="Site" xmlns="http://schemas.microsoft.com/sharepoint/">
</Feature>
並且錯誤仍然存在。我讀了一些關於該網站的web.config可能導致它,但它沒有解釋爲什麼。有什麼想法嗎?
編輯
還有就是我的Elements.xml:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
<Module Name="scClosetCodesVWP" List="113" Url="_catalogs/wp">
<File Path="scClosetCodesVWP\scClosetCodesVWP.webpart" Url="scClosetCodesVWP.webpart" Type="GhostableInLibrary" >
<Property Name="Group" Value="Custom" />
</File>
</Module>
</Elements>
和我Feature1.Template.xml:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/">
</Feature>
我並沒有改變無論是從其中一人Visual Studio最初創建的內容。我嘗試在Feature1.Template.xml中聲明id &作用域,但後來出現同樣的錯誤。
爲了大家現在看到的這個問題,這個問題在那裏是在同一個農場的多臺服務器,或者類似的東西。一旦你在這種情況下,你可以忘記發佈一個webpart。因爲我離開了當我提出這個問題時所處的位置,所以SharePoint 2010最終不再需要我做任何事情。我建議你們都開始研究Umbraco或Orchard以滿足您的CMS需求。 –