An error occurred in the Microsoft .NET Framework while trying to load assembly id 65675

前端 未结 5 901
小鲜肉
小鲜肉 2021-02-05 06:33

I have to work on an existing application, comprises of many projects including a database project. In the statup project, which is a windows app., when making a call to a

相关标签:
5条回答
  • 2021-02-05 06:57

    This worked for me

    EXEC sp_configure 'show advanced options', '1';
    GO
    RECONFIGURE;
    GO
    
    --Enable CLR (.NET Common Language Runtime)
    exec sp_configure 'clr enabled', '1';
    GO
    RECONFIGURE;
    GO
    --Enable xp_CmdShell stored procedure to run Command Line programs from within T-SQL
    --EXEC sp_configure 'xp_cmdshell', 1
    --GO
    
    EXEC sp_configure 'show advanced options', '0';
    GO
    RECONFIGURE;
    
    
     /****this is another one****/
    USE master
    GO
    ALTER DATABASE <DB_NAME>SET TRUSTWORTHY ON
    
    USE <DB_NAME>
    GO
    EXEC sp_changedbowner 'sa'
    /****when error occured relating to m,emory***/ 
    
    0 讨论(0)
  • 2021-02-05 07:02

    The stack trace points to an assembly it could not load. If you're using .dll files to build or load anything (data import/export), you may want to start there.

    Check to make sure the assembly is the proper version for your application, or that it even exists within the directory.

    Also, double check the naming convention in the assembly. The stack trace shows an assembly name or codebase being invalid. Is the language parseable within your application? Is there a typo in the name?

    These may be really elementary places to start, so my apologies if you've tried these. I've run into traces like this before, and it my case it usually amounted to a missing .dll or version incompatibility.

    0 讨论(0)
  • 2021-02-05 07:07

    Ensure that the assembly you are using the xxxxx.yyyy.database assembly from is not targeting an older version of the .NET Framework.

    0 讨论(0)
  • 2021-02-05 07:08

    This did the trick for me:

    USE <DATABASE>;
    EXEC sp_configure 'clr enabled' ,1
    GO
    
    RECONFIGURE
    GO
    EXEC sp_configure 'clr enabled'   -- make sure it took
    GO
    
    USE <DATABASE>
    GO
    
    EXEC sp_changedbowner 'sa'
    USE <DATABASE>
    GO
    
    ALTER DATABASE <DATABASE> SET TRUSTWORTHY ON;  
    
    0 讨论(0)
  • 2021-02-05 07:12

    At long last, I could fix it,

    1. Enable the "CLR Integration" in SQL server.
    2. Deploy the CLR Object ,which in my case was the Database Project,and I set the Permission level to external as well.

    Thanks for all comments/answers.

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