SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom WSP with (among other things) a user control and a DLL for GAC deployment. It's been built for SharePoint 2010 and .NET 3.5 and is fully working on my SharePoint 2010 Farm.

I also have a new SP2013 farm and installed the same WSP using:

Add-SPSolution -LiteralPath C:\WSPs\mypackage.wsp
Install-SPSolution -Identity "mypackage.wsp" -WebApplication http://mywebapp -GACDeployment

This gives no errors. I have attached my 2010 content database, ran test-spcontentdatabase with no errors and have mounted it to the 2013 web app. No worries so far.

When opening the page where I expect to see the user control, I receive the error "Could not load type 'MY.DLLname'. This is the DLL contained in the WSP and referenced by my user control.

The DLL IS present in the "old" gac: c:\windows\assembly, but NOT present in the .net 4.5 gac, which is expected (I guess).

Why isn't this working? Are SharePoint 2013 sites running in "2010 mode" only looking for dll's in the "new" GAC? If so, what is the correct deployment procedure for legacy 2010 WSPs containing assemblies?

share|improve this question
Hey did you find any solution to this. I am having same issues. – Nadeem Yousuf Jan 20 '14 at 12:19
Yes, I belive so, I will add my answer below. Let me know if it's not working for you, and I will try to find my notes from back when I had this issue. – anderaus Jan 20 '14 at 16:50
Thanks looking forward to your resolution to this issue. – Nadeem Yousuf Jan 20 '14 at 17:09

The issue was resolved by adding a strong-name assembly reference in the ascx file pointing to the code-behind assembly.

If your ascx file's assembly references do not include strong-name, like this:

<%@ Control Language="C#" AutoEventWireup="true" 
CodeBehind="SomeFile.ascx.cs" Inherits="SomeNameSpace.SomeClass" %>

Try adding a full assembly reference, like this:

<%@ Assembly Name="SomeAssembly, Version=, 
Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

Which for SharePoint can be achieved using this token (if the current project assembly is the issue):

<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
share|improve this answer
Thanks, all my controls are having full assembly references. I seem to have some different issue.… – Nadeem Yousuf Jan 21 '14 at 9:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.