Wednesday 28 January 2015

Getting $Resources:core,ImportErrorMessage error while importing a .webpart-File to a SharePoint2010

Problem :

I have developed a Visual Web part using VS 2010 and deployed to my Local Development environment directly through Visual studio right click Deploy feature. It works fine.

Now i have to move this webpart to the QA environment where no VS 2010 installed. and the environment is like we have to put the dll file in Bin folder of web application, ASCX control we have to put on Control Template.

Step 1 : so i have put the dll and ASCX control to respective folder.

Step 2 : I added the Safe control entry for that dll in web config.

Step 3 : Now i have exported the .webpart file from my Dev Environment site and import to QA environment site Webpart gallery.

Step 4 : I was able to see the webpart in the custom group of webparts.

Step 5 : when i tried to add the webpart to Page i get the Error " $Resources:core,ImportErrorMessage"

Solution :

I tried with all solution available on Internet like add Safe control entry to web config for DLL. verified the dll Public Key token and same GUID in Safe control. but nothing worked out.

After a long effort, i deployed the solution to my Development environment using VS 2010. it creates a Pkg Folder. 

This folder has a feature folder with .webpart file.

I took this .webpart file and uploaded to QA Environment and then Error Message gone and webpart works perfectly.

so in my view problem was with .webpart file which i have exported from DEV and then try to import to QA. so its always better to take the .webpart file from the pkg Folder and upload to another QA site.

Let me know if anybody has any other solutions.

Updated : Actually today ( 24th MARCH 2015) a found the exact problem when you Upload webpart.xml from your Project Folder to webpart gallery then Webpart still refer Project Assembly file which is not present at server.

So you have to change the Project Assembly reference from the actual DLL refrence which you put either in gac or bin folder while you deploy your webpart.

Thank you Cheers.


  1. Great tutorial, thanks a lot. Can you make the same about missing dll errors? I face it often and want to know if there a solution to avoid it forever. For now, I'm using sources such as to solve it, but this error becomes annoying.

  2. Perfect. It worked