maui
maui copied to clipboard
Assembly 'Microsoft.Maui' Version=1.0.0.0 uses 'Microsoft.iOS, Version=16.0.0.0 which has a higher version than referenced assembly 'Microsoft.iOS' 15.4.300.0 -- FAILED.
Description
This is a recurrence of issue #8858 that was determined not to be a bug, but I am having difficulty finding a way to work around it with the latest visual studio releases.
With the latest preview of visual studio, it has the following workloads:
Installed Workload Ids Manifest Version Installation Source
maui-windows 6.0.541/6.0.400 VS 17.3.32929.385 maui-maccatalyst 6.0.541/6.0.400 VS 17.3.32929.385 maccatalyst 15.4.454/6.0.400 VS 17.3.32929.385 maui-ios 6.0.541/6.0.400 VS 17.3.32929.385 ios 15.4.454/6.0.400 VS 17.3.32929.385 maui-android 6.0.541/6.0.400 VS 17.3.32929.385 android 32.0.476/6.0.400 VS 17.3.32929.385
The upgrade at least got rid of a version complaint blocking pairing about emscript, so I was quite hopeful. I uninstalled xcode 14 on my mac and went back to 13.3 as that is supposed to be supported next week. Also, with the preview version I now see iOS simulators again with 13.3 installed.
Building seems to go well, but I get the dreaded (by me in recent weeks at least) message above which does not provide much actionable information. I already uninstalled all of visual studio and reinstalled and behavior remains consistent.
maui-check shows the following in red:
.NET SDK - Workloads (6.0.301) Checkup... x android (Microsoft.NET.Sdk.Android.Manifest-6.0.300 : 32.0.440) not installed. x ios (Microsoft.NET.Sdk.iOS.Manifest-6.0.300 : 16.0.517) not installed. x maccatalyst (Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.400 : 15.4.465) not installed. x tvos (Microsoft.NET.Sdk.tvOS.Manifest-6.0.400 : 16.0.517) not installed. x macos (Microsoft.NET.Sdk.macOS.Manifest-6.0.400 : 12.3.465) not installed. x maui (Microsoft.NET.Sdk.Maui.Manifest-6.0.300 : 6.0.419) not installed. ! Managing Workload installation from the CLI is NOT recommended. Instead you should install the latest Visual Studio preview to automatically get the newest release of .NET MAUI workloads installed. Are you sure you would like to continue the CLI workload installation? [y/n] (n):
But obviously, with latest preview and standard 2022 full installs, I have the latest. Giving 'y' a shot, just gives the following:
Failed to update the advertising manifest microsoft.net.sdk.android: microsoft.net.sdk.android.manifest-6.0.300 is not found in NuGet feeds C:\Users\User\AppData\Local\Temp\maui-check-2626c1fc$(PACKAGE_SOURCE_NUGET_ORG)"..
Failed to update the advertising manifest microsoft.net.sdk.ios: microsoft.net.sdk.ios.manifest-6.0.300 is not found in NuGet feeds C:\Users\User\AppData\Local\Temp\maui-check-2626c1fc$(PACKAGE_SOURCE_NUGET_ORG)"..
Failed to update the advertising manifest microsoft.net.sdk.maccatalyst: microsoft.net.sdk.maccatalyst.manifest-6.0.300 is not found in NuGet feeds C:\Users\User\AppData\Local\Temp\maui-check-2626c1fc$(PACKAGE_SOURCE_NUGET_ORG)"..
Failed to update the advertising manifest microsoft.net.sdk.macos: microsoft.net.sdk.macos.manifest-6.0.300 is not found in NuGet feeds C:\Users\User\AppData\Local\Temp\maui-check-2626c1fc$(PACKAGE_SOURCE_NUGET_ORG)"..
Failed to update the advertising manifest microsoft.net.sdk.maui: microsoft.net.sdk.maui.manifest-6.0.300 is not found in NuGet feeds C:\Users\User\AppData\Local\Temp\maui-check-2626c1fc$(PACKAGE_SOURCE_NUGET_ORG)"..
Failed to update the advertising manifest microsoft.net.sdk.tvos: microsoft.net.sdk.tvos.manifest-6.0.300 is not found in NuGet feeds C:\Users\User\AppData\Local\Temp\maui-check-2626c1fc$(PACKAGE_SOURCE_NUGET_ORG)"..
Failed to update the advertising manifest microsoft.net.workload.emscripten: microsoft.net.workload.emscripten.manifest-6.0.300 is not found in NuGet feeds C:\Users\User\AppData\Local\Temp\maui-check-2626c1fc$(PACKAGE_SOURCE_NUGET_ORG)"..
Failed to update the advertising manifest microsoft.net.workload.mono.toolchain: microsoft.net.workload.mono.toolchain.manifest-6.0.300 is not found in NuGet feeds C:\Users\User\AppData\Local\Temp\maui-check-2626c1fc$(PACKAGE_SOURCE_NUGET_ORG)"..
Downloading microsoft.net.sdk.android.manifest-6.0.300.msi.x64 (32.0.440)
Workload installation failed. Rolling back installed packs...
Downloading microsoft.net.sdk.android.manifest-6.0.300.msi.x64 (32.0.301)
Installation rollback failed: One or more errors occurred. (microsoft.net.sdk.android.manifest-6.0.300.msi.x64::32.0.301 is not found in NuGet feeds C:\Users\User\AppData\Local\Temp\maui-check-2626c1fc$(PACKAGE_SOURCE_NUGET_ORG)".)
Workload installation failed: One or more errors occurred. (microsoft.net.sdk.android.manifest-6.0.300.msi.x64::32.0.440 is not found in NuGet feeds C:\Users\User\AppData\Local\Temp\maui-check-2626c1fc$(PACKAGE_SOURCE_NUGET_ORG)".)
Fix failed - Workload Install failed: dotnet workload install --from-rollback-file "C:\Users\User\AppData\Local\Temp\maui-check-2626c1fc\workload.json" android ios maccatalyst tvos macos maui --source "$(PACKAGE_SOURCE_NUGET_ORG)"
which rolls everything back so no changes are made.
Is this something where you can point me to something to change or is it likely I just need to wait for next week's build?
Thanks! Victor
Steps to Reproduce
MAUI project targeting net6.0-ios.
Visual Studio 2022 preview 3.0
Pair to mac succeeds.
Build almost succeeds but at the very end spits out:
CSC : error CS1705: Assembly 'Microsoft.Maui' with identity 'Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Microsoft.iOS, Version=16.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' which has a higher version than referenced assembly 'Microsoft.iOS' with identity 'Microsoft.iOS, Version=15.4.300.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'
The app works fine on Android, but to do so, I have to remove iOS targeting for build to succeed.
my global.json: { "sdk": { "version": "6.0.401" } }
Link to public reproduction project repository
n/a
Version with bug
6.0 Release Candidate 2 or older
Last version that worked well
6.0.400
Affected platforms
iOS
Affected platform versions
iOS
Did you find any workaround?
I was able to build and deploy a single time immediately after rebuilding mac / windows machines entirely. I think 2022 worked, but once I used preview it changed things up, but I was previously getting a version mismatch on Emscript until today's patch after which I'm getting the maui assembly version info message
Relevant log output
Build started...
1>------ Build started: Project: YourCompany, Configuration: Debug Any CPU ------
1>Executing SayHello Task to establish a connection to a Remote Server.
1> Properties:
1> SessionId=83d9ddd4ba76b43fd4e51a150853625f3e4e2a02b9c8e8c1252149b606d298e2,
1> Addresss=10.67.42.107,
1> SshPort=22,
1> TcpPort=50660,
1> User=VWilcox,
1> AppName=YourCompany,
1> VisualStudioProcessId=44476,
1> ContinueOnDisconnected=False
1>C:\src\YourCompanyPro\Mobile\MAUI\YourCompany\YourCompanyState.Tasks.cs(21,49,21,73): warning CS0067: The event 'YourCompanyState.workflowTaskValueUpdated' is never used
1>C:\src\YourCompanyPro\Mobile\MAUI\YourCompany\YourCompanyState.Tasks.cs(21,49,21,73): warning CS0067: The event 'YourCompanyState.workflowTaskValueUpdated' is never used
1>Detected signing identity:
1> Bundle Id: com.yourCompanyinc.yourCompany
1> App Id: com.yourCompanyinc.yourCompany
1>C:\src\YourCompanyPro\Mobile\MAUI\YourCompany\YourCompanyState.Tasks.cs(21,49,21,73): warning CS0067: The event 'YourCompanyState.workflowTaskValueUpdated' is never used
1>CSC : error CS1705: Assembly 'Microsoft.Maui' with identity 'Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Microsoft.iOS, Version=16.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' which has a higher version than referenced assembly 'Microsoft.iOS' with identity 'Microsoft.iOS, Version=15.4.300.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'
1>Done building project "YourCompany.csproj" -- FAILED.
1>YourCompany -> C:\src\YourCompanyPro\Mobile\MAUI\YourCompany\bin\Debug\net6.0-maccatalyst\maccatalyst-x64\YourCompany.dll
1>YourCompany -> C:\src\YourCompanyPro\Mobile\MAUI\YourCompany\bin\Debug\net6.0-windows10.0.19041.0\win10-x64\YourCompany.dll
Error List:
Severity Code Description Project File Line Suppression State
Error CS1705 Assembly 'Microsoft.Maui' with identity 'Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Microsoft.iOS, Version=16.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' which has a higher version than referenced assembly 'Microsoft.iOS' with identity 'Microsoft.iOS, Version=15.4.300.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' YourCompany (net6.0-ios) C:\src\YourCompanyPro\Mobile\MAUI\YourCompany\CSC 1 Active
for me, uninstall all dotnet sdk, reinstall SDK 6.0, and VS 2022 17.3, it's OK.
@neoayi I uninstall Visual Studio then re-install, I also need to uninstall SDK? I thought it was installed by VS.
update I try to uninstall SDK 6.0.402 but it was installed by Visual Studio 2022 v17.3.6 (not preview)
@neoayi I'm glad your approach worked for you, but I'm sure this is not acceptable "solution" for most of developers with their development environments contains third party extensions that had to be re-installed and re-configured. Microsoft needs to fix the issue that they created with this VS update. Unfortunately, lately I cannot trust VS "stable" updates, after each update I only hope that I will be able to continue to work on my projects, especially when you have a deadline pressure hope transforms to fear.
P.S. This issue not just for a "preview" installation of VS, example the same problem with latest VS 2022 ver. 17.3.6 which is supposed to be a "stable" current version.
Actually, I just gave a plan. I don't like the whole development environment being unavailable because of one update. In fact, we have to make a certain judgment ourselves, that is, the preview version will definitely have problems. It's just that our Principal Product Manager didn't tell us the details, i.e., if you install multiple environments, you create a messy development environment. Actually, this has been bugging me for a day and I have spent a day solving this problem and trying to understand it as well.
@neoayi Thanks for that information! I've done that a few times in last couple of weeks, but I also install preview -- maybe that's breaking it again. If I have time, I will experiment to confirm on my end. Regards.
@belmonmi Thanks for that comment! -- it's reassuring that I'm not the only MAUI developer that, of late, can rarely get an app built let alone published for iOS. You've helped me maintain my sanity.
Updated VS2022 earlier today and it immediately broke my ios build with the same error as above. Tried creating a new hello world MAUI app from scratch in VS2022 and this is seeing the same issue.
I uninstall the SDKs from the Visual Studio installer, re-install (previously try with dotnet workload restore on one of the projects) and the same... nothing to do with the iOS part of the project! 🙄
Same issue!
Something is broken within the development process for MAUI and VS2022. Last SDK 6.0.401 had problems to build and install workloads, now this. I've the same issue.
@foximoxi I think you nailed it. Sometimes mistakes happens and it is OK, sometime third-party products that you relay on change their interfaces/protocols (xCode 13 vs. xCode 14) and this is understandable as well. But when you have 2 or 3 release in the row that cripple or completely stop development - this is a sign. Clearly .NET MAUI iOS team need to take a good look at their development process and figure out why this keep happening. Before VS ver. 17.3.6 release, iOS was broken, but at least I was able to build and debug on Android and moving on, expecting that by the time I'm ready to release MS will figure out the iOS issues. But now, I cannot even build. :(
@belmonmi
I at least have had luck working on Android by editing the project and removing iOS from the target frameworks:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android</TargetFrameworks>
<!-- TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks -->
You can achieve the same turning off the targets in the project, of course.
Same issue!
:)
@VWilcox2000 Really you don't need to take out the iOS setting in the TargetFramework
tag, and works in the others you have set. I'm testing applications with Android, iOS and Windows and only can't compile/deploy if I set iOS.
@VWilcox2000 Thank you for the work around. RESPECT !
Thanks for the issue report @VWilcox2000! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS.
If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.
- Go to the VS feedback tool to report the issue
- Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.
This issue will be automatically closed in 3 days if there are no further comments.
For some reason, my work visual studio account will not log into the report feedback page. If someone else interested wouldn't mind posting it and linking here? I'm hoping it's fixed by Tuesday, but it would be great to have an official issue ready just in case.
The good news is, I saw a new Xamarion.iOS 16.0 pushed to mac on pairing, suggesting MS /Maui team are actively working on it as they said in last patch notes. This still does not help with the build issue on visual studio, but HOPEFULLY that's what we get on Tuesday.
@VWilcox2000 Really you don't need to take out the iOS setting in the
TargetFramework
tag, and works in the others you have set. I'm testing applications with Android, iOS and Windows and only can't compile/deploy if I set iOS.
@elGuille-info that is QUITE interesting. I've tried new projects, manually rebuilding a very simple csproj, etc, and for me, if iOS is in the targets, it throws that build error on all targets. Could be related to the workflows... I do hope they come out with a comprehensive workflow manager with a UI sometime down the road. You can delete the workflow folder and reinstall, but it's still a bit of a black box.
@VWilcox2000 I think (conspiracy theory on my end :) ), that iOS MAUI team spend majority of their time on Mac not on PC. This is why their workload deployments works for them (High Five everyone, another successful release!), but no one is spending time to test it on PC. This is my evidence:
- Update your Visual Studio on Mac
- run: dotnet new maui
- open the project file and leave only iOS target (thanks again @VWilcox2000)
- run: dotnet build
- no errors - success
Following is output from my console on Mac:
$ dotnet build MSBuild version 17.3.2+561848881 for .NET Determining projects to restore... All projects are up-to-date for restore. Detected signing identity:
Bundle Id: com.companyname._1
App Id: com.companyname._1
1 -> /Users/m*****/Documents/Temp/1/bin/Debug/net6.0-ios/iossimulator-x64/1.dll Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
Build succeeded. 0 Warning(s) 0 Error(s)
Time Elapsed 00:00:03.16
maui-check output looks very cheerful as well:
.NET SDK - Workloads (6.0.301) Checkup... ✔ android (Microsoft.NET.Sdk.Android.Manifest-6.0.300 : 32.0.440) installed. ✔ ios (Microsoft.NET.Sdk.iOS.Manifest-6.0.300 : 16.0.517) installed. ✔ maccatalyst (Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.400 : 15.4.465) installed. ✔ tvos (Microsoft.NET.Sdk.tvOS.Manifest-6.0.400 : 16.0.517) installed. ✔ macos (Microsoft.NET.Sdk.macOS.Manifest-6.0.400 : 12.3.465) installed. ✔ maui (Microsoft.NET.Sdk.Maui.Manifest-6.0.300 : 6.0.419) installed.
Connect the dots... ¯_(ツ)_/¯
Same issue!
For the record, the problem was reported to VS Feedback here, but that item is marked closed as a duplicate of this issue
same issue!!
Same issue!
Same here. Very annoying. There should be less bugs with every release... not more :(
@FM1973 I completely agree... a couple of years ago, I just published to archives, then store, put in app password and done. If not for Transporter, I wouldn't have anything in app store more recent than almost 2 years old, and much of the time I can't use the show IPA option, so I get to go on scavenger hunts. I'm hopeful this is all growing pains as we transition from Xamarin into MAUI... exacerbated by xcode 14/iOS 16 introducing a large number of breaking changes. I'm starting to get pressure from the rest of the company to rewrite our app in Swift, now... :(
same here
I ran into the same issue.
I tried a lot, nothing was working. I guess it's messed up by multiple installed Visual Studio Versions.
In my case, VS 2019 Enterprise
, VS 2022 Community
and VS 2022 Com. Preview
.
While Xamarin.Forms
is working, I stuck with the same error on MAUI
as mentioned by the OP. So I decided to reinstall my Windows 10, to start with a completely fresh system to test.
Afterwards I just installed VS 2022 (which should be working for MAUI and XCode 14).
I guess re-installing Windows is not applicable for the most to fix this. In my case, it did the job and was worth the efforts. Maybe, if someone knows how to completely remove the VS stuff from your computer (included all dotnet sdks and so on), this might be sufficient.
I managed to get it to work on another computer. There I have installed the Visual Studio 2022 Preview (Microsoft Visual Studio Community 2022 (64-bit) - Preview - Version 17.4.0 Preview 3.0) and I have had no problems with the workloads, or with anything... I have tried with iOS in a iPhone 7 plus device (I don't have access to a Mac) and with Windows, with Android I haven't tested, but I guess it will work. The installed .NET version is: 7.0.100-rc.2.22477.23 and the .NET MAUI version is: 7.0.100-rc.1.
Guillermo
@elGuille-info thank you for your efforts. It looks like VS Preview code/workloads got trickled in to PROD/Release version of VS. This is again reinforced @foximoxi point, that deployment process for .NET MAUI is broken.
@belmonmi yes, but now I can try on iOS devices 😉