Open brunck opened 7 months ago
While this obviously also should work for the Pair to Mac scenario, have you tried to do this directly on a Mac?
Does that work?
Haven't gotten that to work yet, but since I'm blocked in this direction, it's time to turn back to Mac.
@jfversluis Trying to configure VS Code on a Mac to build or run anything .NET MAUI is incredibly painful
, and I can't get the configuration to work. Xcode is installed properly, and VS Code insists that Xcode is not installed.
I was able to get iOS to build using
git clean -xdf
dotnet cake --ios
and then run on a simulator using the .NET MAUI extension to set the startup project and debug target, and via F5 to commence running the app.
The latest VS Windows errors are on this VS feedback issue that you closed as a duplicate.
Have you seen the instructions here? Do those work for you?
I think in regard to the original error we might be in a bit of a weird state were something got inserted into builds or manifests (Microsoft.NET.ILLink.Tasks) which isn't available on public NuGet feeds yet and that is why you are seeing that and are currently blocked. They should be available when a new preview comes out.
@jfversluis The errors are quite a bit different now. You can see screen recordings and logs in the VS community issue you closed as a duplicate. They are the same with preview 7 of VS 2022 preview as they were with preview 6.
Here are examples of these errors:
As far as the instructions you mentioned, I have no issues with those. I am having trouble installing Android SDKs and getting them to be in the location that matches the environment variables to put into the .zprofile
, but that is kind of out of scope and I was able to work around that as mentioned in my previous comment.
I can repro the error MSB4018 at iOS platform on the latest 17.11.0 Preview 2.1 (9.0.0-preview.5.24307.10).
Description
Trying to build the
Maui.Controls.Sample
project for iOS in VS 2022 Preview paired to a Mac usingdotnet cake
fails with:10> Determining projects to restore... 10>/var/folders/m1/j6flwm0d4kbcxqkgkyq74n8m0000gp/T/tmp630e8267.tmp/ComputeAotCompilerPath.csproj : error NU1102: Unable to find package Microsoft.NET.ILLink.Tasks with version (>= 9.0.0-preview.3.24162.31) 10>/var/folders/m1/j6flwm0d4kbcxqkgkyq74n8m0000gp/T/tmp630e8267.tmp/ComputeAotCompilerPath.csproj : error NU1102: - Found 19 version(s) in nuget.org [ Nearest version: 9.0.0-preview.2.24128.5 ]
I first ran into the problem described in #21657 but I got past that by trying to launch the project using an available iOS simulator rather than just building the project.
Presumably using the cake script will build and use a local copy of dotnet that corresponds to what is needed to build the branch, which seems to be a version of preview 4 of .NET 9, although only preview 2 is available for direct download and installation at this time.
I was able to build the
main
branch and run the sample app on an iOS simulator using the stable version of VS 2022.Edit:
Since .NET 9 preview 3, the error is similar, and it can be seen just by building the
Maui.Controls.Sample.Sandbox
project which is much simpler.Steps to Reproduce
net9.0
branch locallydotnet cake --target=VS
Maui.Controls.Sample.Sandbox
projectExpected - to successfully build the sample sandbox app
Actual - got the build error
Link to public reproduction project repository
use the
net9.0
branch in this repositoryVersion with bug
Unknown/Other
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.3 GA
Affected platforms
iOS
Affected platform versions
any simulator - 17.0 or 17.2
Did you find any workaround?
No.
Relevant log output
New error:
Old error: