Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running unit tests through Rider causes AD0001 : Analyzer 'Moq.SponsorLinker' threw an exception of type 'System.UnauthorizedAccessException' #1369

Closed
VmPeter opened this issue Aug 8, 2023 · 2 comments

Comments

@VmPeter
Copy link

VmPeter commented Aug 8, 2023

I'm trying to run unit tests through JetBrains Rider 2023.2 but I get an error:

1>CSC: Error AD0001 : Analyzer 'Moq.SponsorLinker' threw an exception of type 'System.UnauthorizedAccessException' with message 'Access to the path '/usr/local/share/dotnet/sdk/7.0.100/Roslyn/bincore/%TEMP%\1M5Ot' is denied.'.

Unable to run or debug tests.

Running dotnet test from command line works.

@VmPeter
Copy link
Author

VmPeter commented Aug 8, 2023

Reverting from Moq 4.20.1 -> 4.18.4 fixes the issue.

@VmPeter
Copy link
Author

VmPeter commented Aug 8, 2023

We were treating warnings as errors, can ignore this specific with:

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>AD0001</WarningsNotAsErrors>

In .csproj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant