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

Upgrading to version 4.20.1 breaks the build #1371

Closed
spewu opened this issue Aug 8, 2023 · 6 comments · Fixed by #1375
Closed

Upgrading to version 4.20.1 breaks the build #1371

spewu opened this issue Aug 8, 2023 · 6 comments · Fixed by #1375

Comments

@spewu
Copy link

spewu commented Aug 8, 2023

Hi there

I just upgraded our solution to the latest version of Moq (v. 4.20.1), and now all of our test projects fail to build on my Mac. I get this exception:

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

Looks like this was made for Windows, as %TEMP% looks like a Windows environment variable, which does not work on macOS.

Have to downgrade to 4.18.4 to get the build working again.

Hope you can look into this 🙂

@cimnine
Copy link

cimnine commented Aug 8, 2023

My team and I have the same. It seems related to #1363. Though it does not break the build because it's just a warning, it creates unnecessary files and creates unnecessary build warnings. So if you're like our team and fail a build when there's a build warning, Sponsorlink effectively breaks the build.

@stand-sure
Copy link

it is also creating rogue files/directories on macos, to wit: "%TEMP%\1M5Ot/"

@kzu
Copy link
Member

kzu commented Aug 9, 2023

Uh... that's weird. I'm pretty sure I tested it on Linux and it worked, assumed it would on MacOS. I'll revert it. This is a blocker.

@ccremer
Copy link

ccremer commented Aug 9, 2023

Just to be precise: It also breaks on my Linux (Mint/Ubuntu), with rogue files in %TEMP%\\1M5Ot. So not just MacOs ;)

@kzu kzu closed this as completed in #1375 Aug 9, 2023
kzu added a commit that referenced this issue Aug 9, 2023
@kzu
Copy link
Member

kzu commented Aug 9, 2023

Dang, Linux too?! I guess WSL lied to me then, he.

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

Successfully merging a pull request may close this issue.

6 participants
@kzu @cimnine @spewu @stand-sure @ccremer and others