-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
The "nuget restore" command fails #21180
Comments
I asked @MaksimZhukov to check whether NuGet.targets shipped with Mono 6.12.0.147 ( |
@rainersigwald sorry for bothering here - could you help identify any recent changes in MSBuild which could lead to such a problem? Perhaps, there is some gap between mono/msbuild and dotnet/msbuild but I wasn't able to track down the difference. |
I don't know of any recent changes that would result in something like this. Was there a |
As far as I can see, there was a version bump for both NuGet and MSBuild - cc8b25a |
Maybe @radical, based on his experience, could point us out to the right direction? :) |
@mrward @KirillOsenkov in case you guys know anything about such a problem |
Mono 6.12.0.147 has:
Does |
@MaksimZhukov Does this option work for you? |
Hello and thanks for your time. We investigated an issue deeper and found the issue root which was related to project. Looking at the package restore logs for build with repro (https://github.com/nikolai-frolov/xamarin-forms-samples/actions/runs/1363166336), we found that both "nuget restore" and "msbuild /t:restore" for all Mono versions can't restore packages for Todo.UWP.csproj (due to project related issue) but difference is following:
In addition, I would like to pay your attention to odd Mono behavior which we found during investigation: "nuget restore" uses correct msbuild version (16+), but can't determine the version number correctly probably due to hardcoded 15.0 version (https://github.com/mono/mono/search?q=lib%2Fmono%2Fmsbuild%2F15.0&type=code).
|
The If you run |
@MaksimZhukov @MaximLipnin @nikolai-frolov @mrward Any updates on this? |
@mgierlasinski I described above that it's not a Mono issue but a difference in how "nuget restore" in different mono versions deals with failure during package restoring. Our failure is related to project where we tried to restore packages. |
@nikolai-frolov thanks for diving into this! I'm just wondering if ignoring UWP-projects during restoring on MacOS works for you? |
@nikolai-frolov This change of behaviour seems to have impact on AppCenter builds, suddenly they just started to fail because of Mono 6.12.* update. It seems that they need some scripted workaround. |
Removing UWP-projects is definitely a workaround here, e.g. jonathanpeppers/boots#87 (comment) |
@MaximLipnin Yes, we temporary disabled UWP subproject until it be fixed. Probably this issue can be resolved in case changing of "nuget restore" behavior is expected. |
Perhaps. something like
would help as well. However, there might be a problem as related code base doesn't seems to be in Mono's MSBuild fork but in some NuGet repo we're pulling in. |
@MaximLipnin, do you know if there are plans to change this behavior in future versions of Mono, or will it remain the default? |
@nikolai-frolov @MaximLipnin Thanks guys for explanation and help, removing UWP from solution in AppCenter script did the job, as described here: |
I wouldn't expect any changes in the behavior. One can remove UWP-projects from the solution and use |
In total:
Since the workaround was successfully applied, I'm closing this issue. In case you guys have questions or need clarification on any Mono aspects, feel free to open another issue. |
Yes. It works! Updated the pipeline. |
The
nuget restore
command fails with new Mono version6.12.0.140
and6.12.0.147
on macOS 10.15 Catalina image with the following error:Steps to Reproduce
We forked the xamarin/xamarin-forms-samples repository and created a workflow file to test mono with different applications. We specified the following mono versions for each app:
6.12.0.125
(default on hosted images),6.12.0.140
and6.12.0.147
.All builds with mono 6.12.0.125 are successful. Builds with other mono versions failed with the error that I mentioned above except 1 application. Please find details in the build logs.
Current Behavior
The
nuget restore
command failsExpected Behavior
The
nuget restore
command passes successfullyOn which platforms did you notice this
macOS
Version Used:
6.12.0.140
and6.12.0.147
The text was updated successfully, but these errors were encountered: