2
votes

What I currently need is to programmatically make certain changes in existing wsp file. Most likely wsp file will be created using "Save site as template" SharePoint action - and I'll need to update it.

What api/approach would you recommend to accomplish this task? Please note that .NET C# is mandatory. Some approaches/questions I could see now:

  1. Do you guys know some 3rd party tool allowing "friendly" object model to work with WSP files? I could not find one.
  2. Do you know is there any special assemblies that could be used for this in WSPBuilder or Visual Studio 2010?
  3. What CAB tool would you recommend? Because it seems there are not so much .NET solutions to work with CAB files.
1
have you tried the WSP import project in VS2010?Mauro
Yes - I know this technique. But unfortunately I need only programmatic approach - the action will be invoked by ordinary users. The action will work almost like standard "Save site as template" action but the resulting wsp should have some changes (add/remove features, resource files, probably some other).pchel
Mauro: By the way, do you know the Visual Studio assemblies and API that I could utilize for this task?pchel
Unfortunately I do not know the answer to either of the comments. I would suggest though that this may not work for all scenarios, if a site is a publishing site for example you cannot save it as a template.Mauro

1 Answers

2
votes

You can use cablib.dll . Its the same API library which the WSP BUilder uses.

Note that making changes like this programmatically is not recommended and by deploying it might put your server into unsupported mode.

http://www.codeproject.com/KB/files/CABCompressExtract.aspx