简体   繁体   中英

how to solve Could not load file or assembly 'Glimpse.Core' or one of its dependencies. Access is denied

When I run my project it's just fine and later suddenly when I run I got this error.

Because I no longer use it I remove the reference of all glimpse file and remove them from nuget pacakges too.

I have remove all configure Glimpse have set but I still got the problem. How I can resist this issue.

    Could not load file or assembly 'Glimpse.Core' or one of its dependencies. Access is denied.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Glimpse.Core' or one of its dependencies. Access is denied.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Glimpse.Core' could not be loaded.

I just had the same issue after removing Glimpse from a web project. The problem was that 2 Glimpse dlls (Glimpse.Ado and Glimpse.EF6) were still in the BIN folder of the website. If you remove them, your website will run again.

You have probably another program running that is using the same assembly.

Edit:
You could try to remove all references manually by opening the .csproj files in a texteditor and removing the Reference tag where the Include is glimpse. It looks like it though that there is still an assembly with a reference to this glimpse. Are you sure you removed all references and rebuild all dependencies?

I run into this problem when there was a common project referencing Glimpse.Ado.dll used by two web projects, and only one of these web projects was configured for glimpse (the web for UI). The other web project (web service project) did not need glimpse, but since it was referencing the same common projects from the solution, it got involved into glimpse as well. What helps is just add the reference to Glimpse.Core.dll also to the second web project that does not need it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM