-
Notifications
You must be signed in to change notification settings - Fork 519
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
Unable to build .NET MAUI iOS project on Windows #18510
Comments
Hello, could you please try the new preview 6 and validate this still happens? There were fixes in this area shipped in P6. |
Hi @brunck. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@dalexsoto Yes this does still exist. I tested this all weekend with P6 and continued to get this error. |
@dalexsoto I was able to get iOS projects to build for if all I did was delete my This makes me wonder if it's a MAX_PATH issue...it's saying a file does not exist and (the Windows half of the path anyway) indeed does not exist. The error message is:
The path exists up to the It doesn't even seem to have this folder and file if I remove the |
Have you tried moving your project really close to the root? I wonder if you are running into MAX_PATH issues, alternatively you could try building from the CLI https://learn.microsoft.com/en-us/dotnet/maui/ios/deployment/publish-cli#publish-an-ios-app-from-windows IIRC CLI on windows does not have the MAX_PATH limitation. Please do share a binlog of you build, I tried to read the ones from you initial post but I was not able to open them at all. |
Hi @brunck. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
An for whatever reason GitHub just showed me you latest reply aster posting this... Yeah I also think it is MAX_PATH try moving it closer to the root or building from CLI to confirm this. |
@dalexsoto I added a link in the issue description to a reproduction sample. It may not be the max path issue. At any rate, you should be able to reproduce my exact behavior with this sample. I'm using VS 17.7 preview 3 and .NET 8 preview 6. If you build it straight away you should see the If you simply remove the Even if I move this folder to the root drive, I get the same behavior. |
This will be fixed in #18618. It should be possible to apply the fix locally, by editing the file (the exact path might be different depending on the installed version):
according to the changes: https://github.com/xamarin/xamarin-macios/pull/18618/files |
This turned out to be a bit more complicated than I thought because of #14904 :/ |
…h is an absolute path. This is way better than some obscure build error. References: * dotnet#18510 * https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1847166
This turned out to be much more complicated than I thought, so #18618 won't fix this at all. |
The current "solution" is that we'll detect this scenario and show a better error message.
This is the change: #18900 |
…OutputPath is an absolute path. (#18900) This is way better than some obscure build error. References: * #18510 * https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1847166
I've opened #18997 to track support for using absolute paths for [Intermediate]OutputPath, and I'll close this since we'll now show an actionable error message for people that run into this. |
@rolfbjarne I'm now suddenly getting:
when building a class library. Should this check be changed to only apply to applications? The .NET class library itself isn't built remotely. |
Actually, yes, iOS class libraries are built remotely, because they may contain resources (xibs, storyboards), which will be compiled, and that has to happen on a Mac. Most iOS class library projects don't have resources, so problems with an absolute output path is unlikely to occur, but given that there's an easy way out of this check (set |
I'm confused by this. If I disconnect from the remote host, it still builds fine and I can ship that assembly as is? I thought the remote host was only needed to deploy or build IPAs / apps |
The remote host is needed to do anything that requires Apple's toolchain. This includes:
For historical reasons, when including a storyboard or xib as a bundle resource in a class library project, we'll compile it using Apple's toolchain, and include the compiled result in the class library (as an embedded resource). All the other points only apply to executable projects. This means that if you don't have an bundle resources in the class library project, the project will build just fine without the remote host, and the result is fully functional. |
Got it. Thanks! I never had a need for thst so never hit it. In that case I'm good with the workaround |
there is no workaround or solution here |
Steps to Reproduce
Expected Behavior
The solution builds on Windows, remoting to the Mac
Actual Behavior
Build fails with error:
MessagingRemoteException: An error occurred on client Build1648525net8p5 while executing a reply for topic...
If you remove the
Directory.build.props
file and delete theartifacts
folder along with anybin
orobj
folders and then rebuild, it works.Environment
.NET 8 on Windows, workload
maui-ios
-8.0.0-preview.5.8529/8.0.100-preview.5
,iOS
-16.4.8525-net8-p5/8.0.100-preview.5
Version information
Reproduction sample
Here is a link to a repo with the repro sample project. Open the solution in the
iOSBuildErrorRepro
folder.Build Logs
MSBuildReproLogs.zip
Seems to be the same as #18308 except the issue persists, even in .NET 8 preview 5 and VS 2022 preview, 17.7.0 Preview 2.0.
The text was updated successfully, but these errors were encountered: