-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Cannot build with VS4Mac: nuget issue #1641
Comments
Btw, running Running The GitHub Actions Mac build works fine (it's using |
This was changed from In fact the error message from above is visible here: https://github.com/Mapsui/Mapsui/runs/6027476550 |
nuget 5.9 is obviously too old and not fit for restoring .NET 6 projects (https://docs.microsoft.com/en-us/nuget/release-notes/nuget-6.0). Question is why VS4Mac uses that old version from Mono, instead of the new 6.x it ships with. Strongly smells like a VS bug. |
Old xamarin projects are run with the old Mono Tooling. whereas . Net 6 is built by the new dotnet Tooling. A workaround is to run on the command line dotnet commands so it uses the new Tooling. probably this issue Unfortunatly this is only on the Mac the case on Windows it works. |
I had more success with Rider as the IDE of choice on the Mac. I think Visual Studio for Mac Preview has some fixes too because it supports Maui so you could try that if it builds |
Well, updating nuget in Mono would probably help with my problem, but I think the real issue is more with VS than with Mono. In a 'mixed' solution (.NET 6 + classical Xamarin), VS should better use the new tooling instead of the old one, shouldn't it? I guess I will raise a VS ticket for this.
You mean "fortunately" here, right? 🤣 Seriously though, it's a shame that, although MS has been developing "cross-platform" frameworks (.NET Core, Xamarin and MAUI) for years now, the development environment is still completely Windows-centered, with Mac and Linux being second-class citizens that no one at MS seems to care about. (Sorry for the rant, but it is kind of frustrating at times.) |
I think they introduced this problem here https://developercommunity.visualstudio.com/t/Package-restore-fails-in-VS-for-Mac-170/1677883 Before solutions with more than 10 projects where build with the dotnet msbuild, afterwards projects that contain classic Xamarin Forms are built with msbuild from Mono which is ancient. The workaround described there is dotnet restore on command line and disable automatic nuget restore in IDE. |
Tried VS4Mac 2022 Preview (version 17.3 build 198). Same problem. I guess I might indeed move to Rider if the pain with VS persists. |
Yes, that workaround gets me past the error above, but then I actually get another one when trying to build the Mapsui base project:
This is dotnet/sdk#17461, there is a workaround as well, which will probably take me to the next bug (haven't actually tried yet). 🙈 I have to conclude that, as of today, MS's tooling for .NET 6 is simply not ready for prime time, at least not on Mac. |
I think most of our problems arise from the 'mixed' solutions. I have just a couple of hours a week to work on Mapsui an often they all go to waste because of weird build problems. I would like to drop all older platforms in Mapsui v5 and only support .NET 6 (or 7 by then). |
I opened an Feedback issue for Visual Studio for Mac here: Because in other IDEs it works so its clearly a Visual Studio for Mac issue: |
According to the discussion in the Visual Studio for Mac Issue. Visual Studio for Mac does not like mixed Solutions (Mono/NET6) So I think I could split Mapsui.Mac.sln into two solutions. |
I am not opposed to this but I am not developing on Mac. btw, I see that the Microsoft projects often use a .slnf file. This is a filter on sln. Perhaps we should also use these more often. Not sure if that would help here. https://docs.microsoft.com/en-us/visualstudio/msbuild/solution-filters?view=vs-2022 |
Regarding the .slnf I have to test it if the workaround for mapsui.mac.legacy.sln works for mapsui.mac.legacy.slnf too. |
No it won't work because I don't have access to the SolutionFilterName. |
But I think I could make a Mapsui.Mac.slnf (That removes the Windows Projects for the Mac) and the Mapsui.Mac.Legacy could be renamed to Mapsui.Mac.sln |
If done this now in the pull request |
For clarity I renamed it back |
This issue is fixed (or at least worked around) by #1644. |
Describe the bug
I am currently unable to build Mapsui on MacOS (via Mapui.Mac.sln), because I get the following error when restoring packages:
To Reproduce
... simply open Mapsui.Mac.sln in VS4Mac.
I'm using Visual Studio for Mac 2022 version 17.0.2 on MacOS Monterey (12.4) on a MacBook Pro with M1 chip (Apple silicon).
Does anyone have the same problem, or is it just me?
I already tried reinstalling VS4Mac and cleaning the Mapsui directory, but nothing helped so far.
The text was updated successfully, but these errors were encountered: