I looked around the .spdata files, checked the Feature file and double-checked them all again. Everything looked right. The ULS Logger wasn't much help but it did give me the actual exception: "Exception: Microsoft.SharePoint.SPException: Invalid file name. The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file"
Still not much help. I removed all the items from the feature and was able to deploy successfully. Unfortunately, a feature that doesn't do anything isn't much good so I started adding items and deploying one at a time. Feature Receivers: Check. Content Type: Check. List Template: Check. List Instance: Failed.
After looking at the List Instance for a while and not seeing the problem, I deleted the Instance from the project and recreated it from scratch. I added it to the feature, deployed and it failed again.
I went through the List Template again and saw the familiar warning:
<?xml version="1.0" encoding="utf-8"?>
<!-- Do not change the value of the Name attribute below.
If it does not match the folder name of the List Definition project item,
an error will occur when the project is run. -->
I had renamed the List Template folder from within Visual Studio but it did not update the ListTemplate Name element.
After correcting the Name to match the new folder name everything worked and the world was right again.
Found 1 deployment conflict(s). Resolving conflicts ...
Deleted list instance 'Lists/SomeAwesomeList' from server.
Adding solution 'SomeAwesomeSolution.wsp'...
Deploying solution 'SomeAwesomeSolution.wsp'...
Activating feature 'SomeAwesomeFeature' ...
Run Post-Deployment Command:
Skipping deployment step because a post-deployment command is not specified.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
Thanks man, you rock!
thanks. you save another sleepless night
thanks. you saved me another sleepless night. Microsoft developers can be so stupid at times.
Thank you very much, that helps me ^^
Perfekt. That helped and indeed saved me a bit of teeth grinding :)
Thanks for that. Saved me a lot of time.
Great Man, thank you
This saved me a lot of time
Thanks Man, saved me a lot of time
Thanks man, just saved me some time
thanks.. it worked like a wonder!!
Post a Comment