0

I'm a total noob in Sharepoint Development, but I'm quite skilled in .NET.

I need to deploy a ready-to-go website from two .wsp files:

  • App.wsp
  • AppEmployeeService.wsp

I suppose that Lists and other structures should be already present in these .wsp archives.

I got a command-line guide on how to import that and deploy:

• iisreset

• Add-SPSolution -LiteralPath "C:\App.wsp"

• Install-SPSolution -Identity "App.wsp" -WebApplication
"http://10.1.1.140" –GACDeployment

• Add-SPSolution -LiteralPath "C:\AppEmployeeService.wsp"

• Install-SPSolution -Identity "AppEmployeeService.wsp" -GACDeployment

• Enable-SPFeature –Identity APP_APP_Feature –url
"http://10.1.1.140”

• Disable-SPFeature –Identity "APP_APP_Feature" –url
http://10.1.1.140 –force

• Enable-SPFeature –Identity "APP_APP_Feature" –url
http://10.1.1.140 –force

• iisreset 

But when I run Enable-SPFeature –Identity APP_APP_Feature –url "http://10.1.1.140"

I get an exception:

Enable-SPFeature: List 'Employees' does not exist at site with URL 'http://10.1.1.140'

How does it work? Shouldn't it create these lists during import?

1 Answer 1

0

Only if there is a feature built into the wsp to create the employee list when the feature is activated. If not, I would look for a template for the Employee list. If you just make a list called Employees, it might deploy, but more than likely will not work because of missing columns the custom solutions is looking for. I would look through the code and see what the solution is using the Employee list for. Create the Employee list, make a template out of it, and add the stp file for the template to your solution to build the list when the feature is activated (if a template does not already exist). You can check if the list exist in the feature before creating it.

3
  • In the VS project, I have a EmployeeView in which I have ViewFields and FieldRefs with fields, which look like this list's column names. I suppose that this is the list. Isn't it?
    – Jacob
    Commented Jun 20, 2018 at 7:06
  • @Spectre That might just be a view, which doesn't create a list. There should be something in the feature installed/activated event that creates the list. If not, then the feature assumes the list is already created.
    – wjervis
    Commented Jun 20, 2018 at 12:02
  • The code assumes that the list is already created. I have to migrate the entire website and all it's features to the new Sharepoint enviroment which I created. If these lists were created in old Sharepoint, I'd need to export them manually, probably with .cmp files. Correct?
    – Jacob
    Commented Jun 20, 2018 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.