Today, Microsoft removed the ability to activate sandbox solutions with code in them. That’s cool, we’ve all known for a couple years that coded sandbox solutions were going away and there’s a post on the office dev blog describing the change, What wasn’t talked about was the fact that any time someone created a no code sandbox solution in visual studio, an assembly was automatically generated which will block it from being deployed as of today!
This feel like a huge deal when you’re trying to deploy an update and things aren’t working, but the fix is pretty easy. Lets walk it through:
First, you’ll see the issue preventing you from activating your solution.
There are two different ways to solve this problem depending on if you still have access to the source code and visual studio. If you do, you can update the project property Include Assembly In Package to false as shown in https://support.microsoft.com/en-us/kb/3183084
If you don’t want to rebuild your package in visual studio, follow the steps below to remove the assembly from the sandbox solution.
Click on the name of the .wsp file to download it to your computer. We need to open it up and remove the dll from inside.
Once you’ve downloaded it, rename the .wsp to a .cab file. If you double click it now to open it with explorer you’ll see that dll file inside.
After extracting to the file system we have 2 changes we need to make.
- Delete the DLL
- Update the manifest
So in windows explorer lets just delete the dll.
Right click on the manifest.xml file and open it in the editor you love most. I chose code here. Then delete the entire Assemblies section of the file and save it.
Next we need to recreate our cab file. I like using a free app called IZArch that will give you a GUI instead of using makecab. Just create a new archive and give it a file name ending in .CAB
Add your files, close IZArch and find the CAB file with windows explorer. Just rename it back to .WSP and you’re ready to upload it to SharePoint
As you can see below, the .WSP with no dll activates just fine and everyone is happy.