2

We've created 2 webparts under a single visual studio solution as a farm environment. But after creating the WSP and trying to deploy it to our UAT, we are getting the following error

This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution '59bb837b-7774-4737-b81e-365335f9c665' failed validation, file manifest.xml, line 11, character 4: The element 'Solution' in namespace 'schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'schemas.microsoft.com/sharepoint/'. Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 9a610e27-f8a0-4054-b1b7-93d25321a4de

Do we need to check our manifest file against the schema or is there something we are overlooking?

migrated from stackoverflow.com Aug 1 '13 at 12:34

This question came from our site for professional and enthusiast programmers.

  • Did you use WSP Builder to make your WSP solution, or are you using Visual Studio 2008 or earlier? – detailCode Jul 31 '13 at 17:38
  • I ran into the same problem as you are describing. Unfortunately still no solution although I was browsing quite a bit ... everybody is just giving me c..p about farm vs. sandbox solutions. So, I'm developing a simple SharePoint 2010 WebPart: - open Visual Studio 2012, - create empty Visual Web Part (farm solution) - add label control When I deploy the solution it works on my local server as well as in Office365. But if i try to add a UserControl - [same steps as before] - right click on project and add new item: select User Control Now I deploy it right away. It works on my local SharePoint e – Robert Kuzma Oct 3 '13 at 12:16
  • This YouTube video has a discussion about Visual Web Parts in Farm and Sandbox Solutions and why Visual Studio has two different Visual Web Part templates. youtube.com/watch?v=xjgebK7njbo – Rob Windsor Mar 11 '16 at 23:40
1

If you do not want the solution to be sandboxed, mark the project in Visual Studio and from the Properties Windows set "Sandboxed Solution" to False.

If the solution needs to be Sandboxed you can not use some kind of artifacts, as your error message states. One of these is Visual Webparts!

Here is more about what you can not do in Sandboxed solutions (for 2010, but also valid for 2013):

http://jaliyaudagedara.blogspot.se/2012/11/sharepoint-sandboxed-solutions-vs-farm.html http://msdn.microsoft.com/en-us/library/ee231562%28v=vs.100%29.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy