none
GACUTIL is running in an Administrator cmd window but says it's not RRS feed

  • Question

  • Hi

    I'm trying to use GACUTIL to install Mono.Security.DLL so I can use Power BI to connect to a Postgres data base (as instructed by this article).  I managed to get the Npgsql.dll file installed no problem by running a cmd window as Administrator:

    C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools>GACUtil /i "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Npgsql\v4.0_3.0.5.0__5d8b90d52f46fda7\Npgsql.dll"
    Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.0
    Copyright (c) Microsoft Corporation.  All rights reserved.

    Assembly successfully added to the cache

    I didn't seem to have Mono.Security.DLL on my PC so I downloaded it from a DLL site and tried to apply the same process as above to install this, using the same window that I was able to install Npgsql above, but GACUTIL keeps reporting that I'm not running GACUTIL as Administrator.  At the top of the Window, it says "Administrator: Command Prompt" so I'm definitely running this as Administrator.

    C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools>GACUtil /i "C:\Users\jrobson\Downloads\Mono.Security.dll"
    Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.0
    Copyright (c) Microsoft Corporation.  All rights reserved.

    Failure adding assembly to the cache: Administrator permissions are needed to use the selected options. Use an administrator command prompt to complete these tasks.

    I've Googled, trying to find an answer for this but haven't found anything useful.

    Does anyone have any ideas please?  I'm at a loss to understand why it works fine for one DLL, but when I immediately try to do a second one, it reports I need Administrator permissions.

    Could it be something to do with the file I downloaded?  The article providing instructions on setting up the Postgres access for Power BI seems to assume I already have Mono.Security.DLL available but doesn't provide any help on where to get this.

    Thanks!

    Jeff

    Saturday, March 12, 2016 5:35 AM

Answers

  • "Could it be something to do with the file I downloaded?"

    Hmm, maybe. Open the file properties in Explorer and see if at the bottom of the General tab there's an "Unblock" checkbox (on Win10, on earlier versions it's a normal button but I don't remember the text, probably something similar to Unblock). See if unblocking the file helps.

    "I didn't seem to have Mono.Security.DLL on my PC so I downloaded it from a DLL site"

    I wouldn't download stuff from a "DLL site".

    I'm not familiar with Npgsql but I see that they have a .msi installer: https://github.com/npgsql/Npgsql/releases. Couldn't you simply use that instead? Do you have to use that specific 2.0.12 version that's mentioned in the article?

    • Marked as answer by Jeff Robson Tuesday, March 15, 2016 1:24 AM
    Saturday, March 12, 2016 5:58 AM
    Moderator
  • Hey Jeff,

    try look at this topic, it's about C# but hope show steps what to do (maybe correct download site):

    http://www.sqlines.com/postgresql/npgsql_dotnet

    Regards...

    Duris_I

    • Marked as answer by Jeff Robson Tuesday, March 15, 2016 1:24 AM
    Saturday, March 12, 2016 11:09 AM

All replies

  • "Could it be something to do with the file I downloaded?"

    Hmm, maybe. Open the file properties in Explorer and see if at the bottom of the General tab there's an "Unblock" checkbox (on Win10, on earlier versions it's a normal button but I don't remember the text, probably something similar to Unblock). See if unblocking the file helps.

    "I didn't seem to have Mono.Security.DLL on my PC so I downloaded it from a DLL site"

    I wouldn't download stuff from a "DLL site".

    I'm not familiar with Npgsql but I see that they have a .msi installer: https://github.com/npgsql/Npgsql/releases. Couldn't you simply use that instead? Do you have to use that specific 2.0.12 version that's mentioned in the article?

    • Marked as answer by Jeff Robson Tuesday, March 15, 2016 1:24 AM
    Saturday, March 12, 2016 5:58 AM
    Moderator
  • Hey Jeff,

    try look at this topic, it's about C# but hope show steps what to do (maybe correct download site):

    http://www.sqlines.com/postgresql/npgsql_dotnet

    Regards...

    Duris_I

    • Marked as answer by Jeff Robson Tuesday, March 15, 2016 1:24 AM
    Saturday, March 12, 2016 11:09 AM
  • Thanks Mike.

    Yes, I was reluctant to download the DLL from a random DLL site also but since the Power BI page was saying this is required & I didn't have it, I couldn't think where else to get it from.

    The msi installer didn't seem to install this file unfortunately.

    I tried unblocking & then attempting to register it in an Admin cmd window but unfortunately got the same result.

    Good idea: I'll try the 2.0.12 version (I was installing Npgsql v3.05 as I thought this would be best since it's the latest one) & see if that makes a difference ... hopefully!

    Thanks for your help! :)

    Tuesday, March 15, 2016 12:58 AM
  • It looks like v2.0.12 actually has the mono.security.dll file included whereas v3.0.5 doesn't (for some reason)!

    Downloading v2.0.12 from the link provided by Duris below provided both dll files and now I've been able to install both using the GACUtil program running in an Admin cmd window.

    Thanks guys!  Appreciate your help!

    I just wish PowerBI came with all this stuff pre-configured so the users don't have to mess around with all this stuff so much, just to get database access setup.

    cheers

    Tuesday, March 15, 2016 1:24 AM
  • Thanks Duris - when I downloaded v2.0.12 from the link you provided, I was able to obtain both dll files and get them both installed using GACUtil.

    Thanks for your help!

    Tuesday, March 15, 2016 1:25 AM
  • Hey Jeff,

    glad to help, have a nice day.

    Regards...

    Duris_I

    Tuesday, March 15, 2016 6:39 AM