Problem to connect VS 2019 with my SQL Server. Error: 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken='

Luis 1 Reputation point
2021-12-01T13:58:48.973+00:00

Hi!

I have a problem to connect with SQL Server in my project of Analysis Services Tabular.

The error is:
No se han podido guardar las modificaciones en el servidor. Error devuelto: 'OLE DB or ODBC error: [DataSource.Error] An error happened while reading data from the provider: 'No se puede cargar el archivo o ensamblado 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ni una de sus dependencias. No se ha proporcionado el nivel de representación necesario o el nivel de representación no es válido. (Excepción de HRESULT: 0x80070542)'.

I tried run with administrator user, reinstall Visual Studio and reinstall Net Framework but nothing works for me.

Can anybody help me?

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,236 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CarrinWu-MSFT 6,841 Reputation points
    2021-12-03T03:05:57.743+00:00

    Hi @Luis ,,

    Thanks for your replying.

    Actually, I had a same error when I created a new project that the compatibility level is SQL Server 2019 / Azure Analysis Services (1500). But run as administrator option solved my error.
    154625-1.png
    154626-2.png

    If the above method not works, please have a try with the following:

    1. Please repair your .NET Framework, restart your server and try again to see if it works.
    2. Check the folder: C:\Windows\Microsoft.NET\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a, if it is empty, copy these two dlls: System.EnterpriseServices.dll/ System.EnterpriseServices.Wrapper.dll into this folder. If not, register those dlls again
    3. Open the CMD and run the command: sfc /scannow to scan the system file and fix some corrupted or missing file once it found.

    For more information, please refer to this thread

    Best regards,
    Carrin


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.