Could not load file or assembly '' or one of its dependencies

后端 未结 9 1478
遇见更好的自我
遇见更好的自我 2020-12-16 13:34

Any help please?

I have only one library and it is driving me crazy. this is the error that I receive. I am not using any other dependancies.

Could n         


        
相关标签:
9条回答
  • 2020-12-16 14:07

    If you are using the code Page.Load("control_path..."). make sure that the actual ascx file you load does not have any directives that include the assembly from your exception message

    <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    
    0 讨论(0)
  • 2020-12-16 14:10

    Assuming that you have access to SharePoint server, try the following. Some random thoughts and no specific order.

    • Deploy the assembly to GAC or copy the dll to the bin folder of your web application
    • Add the assembly info in your web.config assemblies section and in the safe controls section.
    • If you are developing a web part, make sure to add its reference in the safe controls section of the web parts (although i don't think this is your problem)
    • Signing the assembly with a strong name might help in some cases.
    • If you have custom dependencies then you need to do the follow the same steps for all the dependencies (other than .net framework and SharePoint related)

    Are you developing your SharePoint project (do you mean web part?) using visual studio? Are you referencing it in your SharePoint project? You need to give us more details on your development environment to be able to pinpoint the problem.

    0 讨论(0)
  • 2020-12-16 14:10

    for guys still looking into this issue one thing u need to know is there are different GACutils out there , so u need to make sure that ur using correct GACUTIL to deploy the DLL to correct GAC

    for eg: if my dll was complied in 3.5 .net framework and my OS version was 64 bit windows it would be in below location

    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64

    Struggled for 4 stupid days to figure this out

    0 讨论(0)
提交回复
热议问题