-
Notifications
You must be signed in to change notification settings - Fork 504
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
VS paired to MAC throws MessagingRemoteException when a MAUI app is built for an iOS simulator #18308
Comments
Just a short addition:It looks like msbuild tries to get files using the However, there is no |
We've fixed this already (#18287), and the fix will be in the next service releases. |
What's the time frame on the release? Days, weeks |
@jadenrogers weeks probably. You can likely work around it by applying the fix locally - find the |
#18287 does not fix this. I think this is because of |
@AidarNurmukhametov if you can reproduce this when IsMacEnabled=true, then please attach a binlog from such a build (in the build log provided in the description of this issue IsMacEnabled=false). |
Hi there, Idk about the reasoning about why this happens, but can confirm that w/a does not work |
@rolfbjarne Hope this helps |
@AidarNurmukhametov can you try removing the Remove this line:
So the task looks like this: <GetFileSystemEntries
DirectoryPath="@(_BindingPackagesFromReferencedAssembliesDirectoriesExists)"
Pattern="*"
Recursive="true"
IncludeDirectories="false"
>
<Output TaskParameter="Entries" ItemName="_BindingPackagesFromReferencedAssemblies" />
</GetFileSystemEntries> The path to the file to edit on Windows is probably (not necessarily):
|
@rolfbjarne I tried the original fix suggested with no luck. I just tried the recent suggestion to remove the SessionId property entirely and still get the same error. |
@rolfbjarne I noticed that the link you gave Xamarin.Shared.Sdk.targets file is significantly different than the one I have, which is from 16.4.7060. Is there a workload discrepancy? Installed Workload Id Manifest Version Installation Sourceios 16.4.7060/7.0.100 SDK 7.0.300, VS 17.6.33717.318 |
@rolfbjarne I tried and partially succeeded. Deleting The error is |
And the file is not empty on Windows?
The binlog shows that this file was copied from Windows:
|
I found that I had to restart Visual Studio as well for this to work. |
The GetFileSystemEntries task does not need to be remoted, because it's only used to figure out which additional files to copy from binding projects to projects that reference the binding projects, and that can happen entirely on the local build (wherever that is). Ref: * https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1808448 (third attempt) * xamarin#18308
… to the Mac. Make the GetFileSystemEntries task capable of copying files to the Mac, and enable this new behavior when inspecting references for binding resources. Otherwise the task might not find anything, if the files aren't copied to the Mac (this happens if the files originate from NuGets instead of referenced projects). Ref: * https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1808448 (third attempt) * xamarin#18308
It's not empty. Don't know how it works, maybe another task rewrites it at some point later. Can't check how many times this file on mac is changed during build process. |
@rolfbjarne So making the change to remove SessionId like this: then deleting bin/obj restarting VS produces the following error, which sounds like a malformed xml, but I am sure its not:
|
@NebulaSleuth the Could you get a binlog for this error? |
I got a very similar error - but it might not be 100% the same. It occurs quite often since I updated VS from 17.5.5 to 17.6.1. Sometimes, I'm able to get it running again by re-starting Visual Studio.
|
Looks like the same issue (the important part is "GetFileSystemEntries" in the error message). Can you try the workaround here to see if it helps? |
… to the Mac. (#18324) Make the GetFileSystemEntries task capable of copying files to the Mac, and enable this new behavior when inspecting references for binding resources. Otherwise the task might not find anything, if the files aren't copied to the Mac (this happens if the files originate from NuGets instead of referenced projects). Ref: * https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1808448 (third attempt) * #18308 * dotnet/maui#15042
… to the Mac. Make the GetFileSystemEntries task capable of copying files to the Mac, and enable this new behavior when inspecting references for binding resources. Otherwise the task might not find anything, if the files aren't copied to the Mac (this happens if the files originate from NuGets instead of referenced projects). Ref: * https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1808448 (third attempt) * xamarin#18308
I've merged another attempt at a fix for the problem with the WorkaroundThe workaround is to remove the That means removing this line :
From the
So the task looks like this: <GetFileSystemEntries
DirectoryPath="@(_BindingPackagesFromReferencedAssembliesDirectoriesExists)"
Pattern="*"
Recursive="true"
IncludeDirectories="false"
>
<Output TaskParameter="Entries" ItemName="_BindingPackagesFromReferencedAssemblies" />
</GetFileSystemEntries> This would be the approximate location in the file: xamarin-macios/dotnet/targets/Xamarin.Shared.Sdk.targets Lines 2019 to 2027 in 6d9ed79
The workaround doesn't workPlease get a binlog and we'll have a look. @AidarNurmukhametov I tried creating a project referencing the DevExpress NuGets to try to reproduce the second problem you were seeing, and it worked just fine for me, so I'll either need a binlog or a test project to reproduce the problem in order to diagnose it. @NebulaSleuth the stack trace you posted doesn't give me enough information to even start trying to reproduce the issue, so I'll also need either a binlog or a test project in order to diagnose further. |
I can confirm this solved it for me. I did also have to clear my .nuget packages folder under Much appreciated |
…ask capable of copying files to the Mac. (#18342) Make the GetFileSystemEntries task capable of copying files to the Mac, and enable this new behavior when inspecting references for binding resources. Otherwise the task might not find anything, if the files aren't copied to the Mac (this happens if the files originate from NuGets instead of referenced projects). Ref: * https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1808448 (third attempt) * #18308 Backport of #18324 --------- Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
I filed this here: #18348 |
@rolfbjarne not worked for me. My VS2022 17.6.2 binlog: TipTronicMaui_Debug_AnyCPU_Build_2023-05-28T12_49_52.0026443+06_00.zip |
@rolfbjarne Your workaround worked for me. Thanks. After the next release of VS, should the line |
Success! Not sure which step resolved it. But I can confirm that the removal of the SessionId did indeed work after doing the following. I suspect that the key was what @jadenrogers suggested which was to clear the nuget cache at: C:\Users{YourUser}.nuget\packages For reference... Here are all the steps I took: Deleted Paired Mac from VS 2022 |
That looks like a different problem, so please file a new issue and we'll start diagnosing it. |
following action worked for me.
|
I removed the SessionId but now I am getting a new error, similar to @AidarNurmukhametov above
|
@syewchuk did you clear the nuget cache? What's been happening is the build operation before was making the native framework files 0KB. Clearing the nuget cache should fix that up. |
@InquisitorJax I tried clearing the nuget cache right now, but it doesn't seem to make a difference. The problem appears to be slightly different because on my mac the |
My issue only appeared after I applied the workaround, but my best guess so far is that maybe it is unrelated and has to do with the framework bindings. I'm new to that so don't know if I'm doing it right. My errors are also similar to this issue:
I don't know if this is relevant, but my macbook is on XCode 14.2 with macOS Monterey. EDIT: I've created a new issue: |
Where can I see the progress on solving this error? I have deadlines on my project. |
@scriptBoris did you file a new issue as I requested here? |
I done |
@rolfbjarne i ran into the same/a similar issue with devexpress packages in my maui-project. With your mentioned workarounds i can successfuly build on a remote ios device via a simulator. But it doesn't work on a local iOS device. Here's my binlog: EDIT: Removing (DestinationSubDirectory) from Xamarin.iOS.HotRestart.targets is a workaround for me.
|
@UkeHa when you say it doesn't work on a local iOS device: how does it fail? There are no errors in the build log you attached. |
It fails to start and says that it intends to remove a file but the directory doesn't exist. It seems like the path is too long (260+). Even allowing longer paths in Windows doesn't fix the issue. My workaround is removing the subdirectory. That leads to a smaller path and it works as expected. |
Steps to Reproduce
The issue did not occur before I upgraded Visual Studio to v17.6.
Expected Behavior
The application is built and it's possible to run the simulator to test the app.
Actual Behavior
A error is thrown:
Environment
Version information
Build Logs
Log file: build.binlog.txt
Please rename the file extension from
txt
tobinlog
- I had to change the extension as the Issue form does not allow to drop files withbinlog
extension.Example Project (If Possible)
I did not attach a project as it will require DevExpress packages. If a project is essential to diagnose this behavior, please let me know.
The text was updated successfully, but these errors were encountered: