-
Notifications
You must be signed in to change notification settings - Fork 172
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
System.Exception: Restore operation failed. #1560
Comments
It was working fine for me with SDK 6.0.100 but then, when I updated to 6.0.201, it started giving out errors. I then installed the global tool
|
Same problem here. On installing SDK 6.0.201, I started getting this error. It persisted even after uninstalling that SDK version. I was able to workaround it by removing all installed .NET SDKs (I'm on macOS so I did |
Any update on this?
but I have had to take it out of my GH Actions CI because it throws the aforementioned exception. The GH Action runner has the same versions of dotnet CLI/SDK and dotnet format as above. |
Does running As a workaround you can pass the |
From the logs, it seems to be using the msbuild from the latest sdk instead of the one in the sdk defined in global.json |
dotnet-format started failing after bumping setup-dotnet to v3 it looks like the cause of the failure is: dotnet/format#1560 this was probably succeeding previously because it was using the version preinstalled on the runner until the breaking change introduced with [email protected] which caused the preinstalled version to be overwritten: https://github.com/actions/setup-dotnet/releases/tag/v3.0.0
dotnet-format started failing after bumping setup-dotnet to v3 it looks like the cause of the failure is: dotnet/format#1560 this was probably succeeding previously because it was using the version preinstalled on the runner until the breaking change introduced with [email protected] which caused the preinstalled version to be overwritten: https://github.com/actions/setup-dotnet/releases/tag/v3.0.0
We were suddenly seeing the same error message. |
In my case it was failing because of a reference to non-existing version of the package in a csproj file |
Maybe dotnet format could display a warning message ("restore failed and may need to be run separately beforehand") instead of crashing? This started after updating Visual Studio 2022 and affects the previous SDK (eg. 6.0.118 fails, 6.0.313 works). |
This just started happening to me. My docker build worked fine locally but when running in gitlab agent using Kaniko on a Platform9 cluster, this started popping up. |
I was getting this error, figured out that it was because I have msvc's vcvarsall.bat in my powershell profile (startup script) which sets the PLATFORM env var to x64 which results in this error (I have no .sln.metaproj file, it was inferring the config from that env var I think?) |
When running
dotnet format style -v diag
i get an exception as follows:dotnet format --version
results with6.0.252703+68bc36719088c86b0ff01334039b0611741b8276
Also, this issue does not appear when running under CI with the same repo.
Any guidance on how I might be able to investigate further?
The text was updated successfully, but these errors were encountered: