1

when Visual Studio launch a Sharepoint Project does some steps, when debug ends does a retract to restore the system status.

Now I'm developing an application based on content type.. When I deploy from VS content types are always of the newer version, when I do it from upgrade script it keeps the oldest one..

Can anybody tell me how to write down some stsamd command to perform the same VS operations?

I'm running this scripts:

Disable-SPFeature –Identity "2f41ee84-2b64-4959-bd7f-c1ee906395b8" –url http://sharepoint-ap

Uninstall-SPSolution –Identity SavioGD.wsp -WebApplication http://sharepoint-ap
Remove-SPSolution –Identity SavioGD.wsp

Add-SPSolution “C:\_release\SavioGD.wsp“
Install-SPSolution –Identity SavioGD.wsp –WebApplication http://sharepoint-ap –GACDeployment
Enable-SPFeature –Identity "2f41ee84-2b64-4959-bd7f-c1ee906395b8" –url http://sharepoint-ap

And they works... If I put an IISReset between the Remove-SP and the Add-SP I see all my content Type with only a field.

When the script end I continue to see my content type as the old version...

How could I do to "destroy and recreate" it from the scratch? I can't believe that visual studio does something different but run command like these.

Any suggestion?

1 Answer 1

2

Upgrading won't recreate your content types, since they're already created. You need to handle the version of the deployed content types in your code, and modify the content type accordingly based on what version is currently deployed. Jeremy Thake has a great blog post on using versioning with feature development.

Additionally, STSADM is deprecated--you really should move to PowerShell for your deployment tasks. There's a decent overview here of the PowerShell cmdlets vs. STSADM.

Your Answer

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

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