I have developed a Farm solution webpart for SharePoint 2013 Enterprise more than a year ago. This project uses two DLL which are:
The whole solution consist:
- (2) Class libraries build in Framework 4.0 (for use the SharePoint Dll's reference described below).
- SharePoint 2013 visual webpart.
These DLL's uses the following SharePoint DLL reference:
Microsoft.SharePoint.dll: "runtime version used is v4.0.30319 / version 220.127.116.11".
These DLL's are registered in the PC that I used for develop this project and the project itself was implemented in a test site.
Due to certain limitations that I'm afraid I can't explain in detail, the Application pool and the site "in IIS" was shutdown after delivery this project to the client (mostly for saving "RAM")...
Now, the site and application pool has been turned on again. To my surprise, the site hasn't the webpart anymore and I had to start the implementation again.
When I tried to add the webpart in a test page in the test site, I get this error:
Checking the logs, I found this detailed error:
Getting Error Message for Exception Microsoft.SharePoint.WebPartPages.WebPartPageUserException: $Resources:core,ImportErrorMessage; ---> System.Reflection.TargetInvocationException: An exception occurred in the target of an invocation ---> System.IO.FileNotFoundException: Could not load file or assembly 'sample_1, Version=18.104.22.168, Culture=neutral, PublicKeyToken=f1cd0442b97c7541' or one of its dependencies. The system cannot find the file specified.
web.config file has added the entries in the entries in
I have used
gacutil.exe for register those DLL's, but, they aren't registered in the following location:
Instead, they're registered in
Which, according to this link I used the 4.0 version of
gacutil.exe I should use the 2.0 version.
I really don't understand why these DLL's need to be in the first location.