I'm working on SP2016 On-Premises and VS2017, new in Server Side development and trying to create a custom WebPart. In order to get familiar with it I followed some tutorial found on the web. Let's take this one from Microsoft. Followed step by step but when I try to add the webpart to a page, I get the message $Resources:core,ImportErrorMessage;.

I know, google already knows a lot about it. Also here we find some question about it, but I read and tried a lot without success.

What I tried:

  • Double check Namespace, Assembly Name as mentioned here
  • Redeploy as mentined here. Actually I tryied to deploy it using VS and also by hand (powershell commands) as mentioned here. Must confess I don't know what @Michael Goldshmidt means with Resolved the error by changing BadString to a number: 8
  • Added SafeControls in web.config as mentioned here. However this tutorial says it is not needed since the VS Deploys adds it automatically.
  • Took a look to the ULS as mentioned here but there is nothing helpful
  • No idea what he corrected here

What am I missing?

2 Answers 2


I have a video tutorial that walks you through the process of deploying a farm solution that contains a web part. I hope you'll find it to be helpful.

Deploying Farm Solutions Containing Web Parts to SharePoint 2013 or 2016 https://youtu.be/UOsEo6E0iA4

  • Thanks, the key was to use a Visual Web Part (Farm Solutions Only)!
    – Emaborsa
    Commented May 7, 2018 at 6:21

That tutorial looks like it is for SP 2010. Are you using the SharePoint 2016 templates in Visual Studio? The 2010 templates may not be usable in 2013 or 2016. In any case, Resource files are used to supply language and culture specific text from either out of the box resource files, or custom resource files. The text is looked up by keys, and if the key no longer exists in the 2016 resource files, then you could get that error. If you can find where the resource is being referenced in the sample code, replace it with a simple string.

Also check to see if server side, full trust, code is permitted in your web application. This was allowed by default in SP 2010, but discouraged in SP 2016.

  • Hi, thanks for your answer. Obviously I did not use old templates, I took the "Visual Webpart 2016" in VS2017.
    – Emaborsa
    Commented May 7, 2018 at 5:58

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.