-
Notifications
You must be signed in to change notification settings - Fork 511
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 RuntimeIdentifier 'iossimulator-x64' is invalid. #13482
Comments
From @arivoir on Wed, 15 Sep 2021 16:42:50 GMT Since iOS compilation is broken MAUI projects can not be compiled either. It would be interesting to have a way to disable iOS compilation. Now the only way to disable is to edit every single file and remove the TargetFramework |
From @drasticactions on Wed, 15 Sep 2021 18:08:45 GMT iOS Complication isn't broken, that specific iOS TargetFramework from an earlier version of the SDK package, and so workarounds that were in place in earlier maui templates are not needed. In your csproj, you should be able to remove these lines
|
From @arivoir on Thu, 16 Sep 2021 14:44:23 GMT That's the problem, after removing those lines, which I had removed before posting the issue, the problem is still there. Already deleted all "bin" and "obj" folder, what else should I remove? |
From @arivoir on Thu, 16 Sep 2021 14:59:29 GMT Some more things can help figure out the issue. The project I'm not being able to compile targets both iOS and MacCatalyst
When clicking in the error in the "Error List" window of VS. it drives me to this So, apparently the problem is with mac-catalyst compilation |
From @arivoir on Thu, 16 Sep 2021 15:07:55 GMT Removing MacCatalyst from the TargetFramework's worked. What's the problem with targeting both platforms? |
From @arivoir on Thu, 16 Sep 2021 15:17:21 GMT Adding this workarounds the issue
This wasn't needed in preview7. Looks like a regresion |
From @arivoir on Thu, 16 Sep 2021 15:42:21 GMT I compiled the project again, referencing it in another solution and the problem reappeared, even with the hard coded runtime-identifier. I went back to the original solution and now it also fails there. |
From @filipnavara on Thu, 02 Dec 2021 16:47:37 GMT It seems there's a funky glitch in how the runtime identifier is verified. Let's say I have project A with cc @rolfbjarne |
From @rolfbjarne on Thu, 02 Dec 2021 18:03:50 GMT @filipnavara would you happen to have a test solution for those results, or a binlog from the build? |
From @filipnavara on Thu, 02 Dec 2021 19:25:12 GMT I tried to repro it on a smaller project but it didn't trigger so I guess it must be somewhat more complex. I should be able to make the binlog though (already had it and deleted it and then reinstalled .NET on the machine so let's hope it reproduces). |
From @filipnavara on Thu, 02 Dec 2021 19:48:26 GMT Here's a repro: To trigger it you can either: Running just |
I can reproduce, the problem is here:
the passed-in runtime identifier is a global property, and is set in all projects that are loaded. OTOH I'm not sure we can even fix this, because somehow we have to pass the runtime identifier, otherwise doing this won't work:
but we can't execute any tasks or targets... (due to dotnet/sdk#18436). |
heh, turns out it is possible to detect if a property is a global property or not without executing any tasks or targets: <PropertyGroup>
<!-- store the current value of SomeProperty -->
<CurrentPropertyValue>$(SomeProperty)</CurrentPropertyValue>
<!-- try to change it -->
<SomeProperty>$(SomeProperty)dummy</SomeProperty>
<!-- if the property value didn't change, it's a global property -->
<IsSomePropertyGlobal Condition="'$(SomeProperty)' == '$(CurrentPropertyValue)'">true</IsSomePropertyGlobal>
<!-- otherwise it's not a global property -->
<IsSomePropertyGlobal Condition="'$(IsSomePropertyGlobal)' == ''">false</IsSomePropertyGlobal>
<!-- restore the property value in case it wasn't a global property (and we changed it) -->
<CurrentPropertyValue>$(InputValue)</CurrentPropertyValue>
</PropertyGroup> The idea would be to only pass |
Out of curiosity, what would be the use cases for using/checking |
RuntimeIdentifier shouldn't be set in a class library (except when the class library is really an extension project, in which case there will be a RuntimeIdentifier, and it must be checked). |
From @arivoir on Wed, 15 Sep 2021 15:26:27 GMT
After upgrading Visual Studio 2022 to preview 4. I can't complie iOS libraries.
What does this mean?
Copied from original issue dotnet/maui#2495
The text was updated successfully, but these errors were encountered: