I am trying to deploy an alpha version of the project I'm working on and I'm running into some issues that are likely because I have a flawed understanding of how to do deployments.
My site is fairly simple. On my development machine I customized some lists and added a CustomAction to one of them that takes you to a custom aspx.
I'm running into issues when I try to deploy this to the test environment. Here are some things I've tried and the issues I've had:
1) I tried saving my site as a template and then uploading it from the sharepoint web ui.
Problem: The custom action doesn't seem to go along with the WSP and so I get an error saying that I cannot create a site from the template because of a missing feature.
2) I then tried using powershell which let me successfully install & add the solution.
Problem: This did not make my solution available to create sites from. That option seems to only be available when you upload them from the web ui.
3) Here is where it gets murky... through some combination of playing around in powershell and the web ui i managed to get my feature to show up in the features list, but my custom action didn't work because i was using a specific list id for it and the new site i created had a different list Id
4) I generalized my custom action by list type which worked in dev. I then attempted to remove all the solutions I tried.
Problem: A few of these cannot be removed and give a generic error message.
5) I moved my custom action to a separate project and deployed it with powershell. Then I deployed the project containing the aspx page with powershell. Then i saved my dev site as a template and uploaded it to test, then created a new site based on the template.
So now that I've given all my background, here are my questions:
Q1: Is #5 the right way to deploy this? Is it possible to group all this up in one deployment?
Q2: Do you have any suggestions for organizing my project more effectively? This is my first time dealing with SharePoint and this thing is only going to grow. Having a simple deployment process is important to me because I know that even simple processes can be a pain to get installed when dealing with admins who are not on the project.
Q3: How can I clean up the failed deployments I tried? Am I stuck with them forever?
Thanks for your time!
Edit: I broke Q3 (how do I clean up failed deployments?) into a separate question: Cannot Uninstall UserSolution: non-existent or broken web
Edit: I was finally able to deploy the solution by following these steps:
- In VS I retracted all of my code.
- In my local environment I packaged the site into a WSP
- I uploaded my wsp to the test site and activated it, then created a site from the template.
- I deployed the two wsp's that contained my code.
- I activated the feature for my custom action.
It seems like Louis is suggesting that I create a template for my site once and then work with it in visual studio.