ListInstance deployment guid problems
I have a very basic setup, currently, and I'm fairly new to Sharepoint. I followed the walkthrough here to create a Field definition, content type, list definition from the content type, and a list instance from that list definition.
Currently, if I attempt to deploy my feature with everything in it, I get the following error:
Error occurred in deployment step 'Activate Features': Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
The feature doesn't show up in the administration panel, but the list instance i开发者_Python百科s created (but has no fields because the custom content type isn't activated).
If I remove the listinstance from the feature, everything else activates just fine, and if I put the listinstance in a separate feature it still works, but this really all needs to be in one feature and I don't understand why it doesn't work that way. I added a guid to the list instance that was auto generated because I need to reference this list in the rest of the feature's code. This is the list instance's Elements.xml file:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListInstance Title="SurveyModule - SurveyList"
Id="{C0ED4B73-B140-4057-989B-43344CEE921E}"
OnQuickLaunch="TRUE"
TemplateType="10000"
Url="Lists/SurveyModule-SurveyList"
Description="My List Instance">
</ListInstance>
</Elements>
If there are any other code snippets which would be relevant I can post them.
try it without the braces in the id attribute
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListInstance Title="SurveyModule - SurveyList"
Id="C0ED4B73-B140-4057-989B-43344CEE921E"
OnQuickLaunch="TRUE"
TemplateType="10000"
Url="Lists/SurveyModule-SurveyList"
Description="My List Instance">
</ListInstance>
</Elements>
if it still doesn't work, generate a new GUID using: Visual Studio - Tools - Generate GUID (Registry)
精彩评论