-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Visual Studio 17.11.5 causes Windows MAUI to break build #25160
Comments
Is your project specifying explicit versions of WindowsAppSDK and/or WebView2 nuget packages? |
No NuGet reference to |
I'm not able to reproduce this so far. Are you able to share a reproduction of it? |
Sure no problem. I'll get someone on my team or me to sort this out ASAP. |
For the |
I have the same issue with this project: https://github.com/niksedk/subtitle-alchemist One computer where I updated it just crashes, and another computer with no visual studio update it works fine. I'm on Windows 11 Event viewer: Log Name: Application
Source: Application Error
Date: 09/10/2024 23.19.45
Event ID: 1000
Task Category: Application Crashing Events
Level: Error
Keywords:
User: LAPTOP-JUSVDOJ0\nikse
Computer: LAPTOP-JUSVDOJ0
Description:
Faulting application name: SubtitleAlchemist.exe, version: 1.0.0.0, time stamp: 0x66e80000
Faulting module name: CoreMessagingXP.dll, version: 10.0.26105.1010, time stamp: 0x3cb81cec
Exception code: 0xc000027b
Fault offset: 0x00000000000945b2
Faulting process id: 0x0x4550
Faulting application start time: 0x0x1DB1A90F11A77C6
Faulting application path: C:\git\subtitle-alchemist\src\bin\Debug\net8.0-windows10.0.19041.0\win10-x64\AppX\SubtitleAlchemist.exe
Faulting module path: C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.5_5001.275.500.0_x64__8wekyb3d8bbwe\CoreMessagingXP.dll
Report Id: be9846d4-086d-46ad-8246-43034bfaee45
Faulting package full name: dk.nikse.subtitlealchemist_0.0.6.0_x64__f9j3vma71va8p
Faulting package-relative application ID: App
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" Guid="{a0e9b465-b939-57d7-b27d-95d8e925ff57}" />
<EventID>1000</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>100</Task>
<Opcode>0</Opcode>
<Keywords>0x8000000000000000</Keywords>
<TimeCreated SystemTime="2024-10-09T21:19:45.0432328Z" />
<EventRecordID>338880</EventRecordID>
<Correlation />
<Execution ProcessID="4668" ThreadID="1612" />
<Channel>Application</Channel>
<Computer>LAPTOP-JUSVDOJ0</Computer>
<Security UserID="S-1-5-21-2051407611-681702476-311258538-1001" />
</System>
<EventData>
<Data Name="AppName">SubtitleAlchemist.exe</Data>
<Data Name="AppVersion">1.0.0.0</Data>
<Data Name="AppTimeStamp">66e80000</Data>
<Data Name="ModuleName">CoreMessagingXP.dll</Data>
<Data Name="ModuleVersion">10.0.26105.1010</Data>
<Data Name="ModuleTimeStamp">3cb81cec</Data>
<Data Name="ExceptionCode">c000027b</Data>
<Data Name="FaultingOffset">00000000000945b2</Data>
<Data Name="ProcessId">0x4550</Data>
<Data Name="ProcessCreationTime">0x1db1a90f11a77c6</Data>
<Data Name="AppPath">C:\git\subtitle-alchemist\src\bin\Debug\net8.0-windows10.0.19041.0\win10-x64\AppX\SubtitleAlchemist.exe</Data>
<Data Name="ModulePath">C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.5_5001.275.500.0_x64__8wekyb3d8bbwe\CoreMessagingXP.dll</Data>
<Data Name="IntegratorReportId">be9846d4-086d-46ad-8246-43034bfaee45</Data>
<Data Name="PackageFullName">dk.nikse.subtitlealchemist_0.0.6.0_x64__f9j3vma71va8p</Data>
<Data Name="PackageRelativeAppId">App</Data>
</EventData>
</Event> |
I am seeing the same issue with WinUI 3 projects. I am using the below due to migrating to .NET 8. This only started when I ran the VS2022 update.
|
@niksedk - are you using Skia Sharp extended: If I remove the Not sure if this is an issue with the package or the fact it's loading resources from Previously when running our app in debug mode for either Android or Windows, we'd sometimes, maybe once every 100 build-runs, MAUI will hang on our loading screen as if the debugger hasn't attached or can't progress. Since 17.11.5, instead of hanging it now show the detached debugger modal as in my screen shot in the OP. This now happens every time I build, unless I uninstall the app from the device and debug run again. Next time the debugger detaches I can't get past the loading screen again until I uninstall the debug app and re-build. This is "tentative assumption" at the moment from early testing, it may just be a combination of ways I was testing last night. This might be a separate issue, I'll try to get more information today. For ref: |
@niksedk are any of your resources using Skia loaded or saved to |
I do not think so... but I'm not entirely sure - you can check the source code: https://github.com/niksedk/subtitle-alchemist |
I just investigated another similar issue related to Skia which it seems both repros here have too. See here for more details and a workaround until we fix it: #25150 (comment) And the |
Thanks for the workaround, works. |
This issue has been verified using Visual Studio 17.11.5 (8.0.91 & 8.0.82 &8.0.70 ). Can repro on Windows platform. |
Can confirm adding
And
Has fixed the issue for now. However the SDK package didn't automatically update. On two machines, we did the following:
Should we remove these elements from the |
That would make sense, and then I suspect some folks are hitting this using packages like |
I have a similar issue with my builds since 17.11.5
I have multiple similar projects sharing the same "core" project, of these, 2 have these build errors, another runs fine... I've tried a few of the mentioned work arounds without success so far. Edit: Adding this to my project file has me back up and running:
Just for funsies, here's the full context... windows is a mess right now.
|
Same problem here, with not a single reference to any WebView, with no third party controls, nothing... A very simple project that I've started last week. After upgrading Visual Studio yesterday to 17.11.5, simply stopped working with multiple errors as described in the issue description. Just to confirm, that simply adding <WindowsSdkPackageVersion>10.0.19041.34</WindowsSdkPackageVersion>, solved the issue. Thank you for the workaround. |
now it works, In my case was the version of |
The The only way I was able to successfully compile my small program was by adding |
I'm facing the same problem. But I have also incorrect generated codefiles, for example WinRTGlobalVtableLookup.g.cs which cause build errors. |
To use the latest CommuintyToolkit.Mvvm on Windows you may need to set your WindowsSdkPackageVersion to a .41 version, see CommunityToolkit/dotnet#893 (comment) |
I have also incorrect generated codefiles, for example WinRTGlobalVtableLookup.g.cs which cause build errors. |
Same here, after update to vs 17.11.5 program crash at startup. Edit: As mentioned some post ago adding these lines to maui project resolved the issue:
But the problem is not resolved, some ms devs here have to figure out the problem and why MAUI projects stop to build every time Visual Studio is updated. I have a lot of "workarounds" on my project file... |
Strangely Visual Studio 2022 Preview 17.12.0 Preview 3.0 appears to work ok. This hints at the problem being more to do with Visual Studio 17.11.5 than MAUI? 🤔 |
Microsoft is telling me to follow the issue here, but no one of them is giving answers as I see. Did someone of you found a solution? |
Not working for me |
@rarescho Can you confirm which error you are seeing? Based on that, I should be able to provide a solution to get unblocked until the issue is fixed by default. |
Hi @manodasanW . |
CS1514 { attendue MY-COMETA (net8.0-windows10.0.19041.0) D:\GITHUB\COMETA_APPS\MY-COMETA\obj\Debug\net8.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\WinRTGlobalVtableLookup.g.cs 5 CS0116 Un espace de noms ne peut pas contenir directement des membres tels que des champs, des méthodes ou des instructions MY-COMETA (net8.0-windows10.0.19041.0) D:\GITHUB\COMETA_APPS\MY-COMETA\obj\Debug\net8.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\WinRTGlobalVtableLookup.g.cs 5 CS1022 Définition de type ou d'espace de noms, ou fin de fichier attendue MY-COMETA (net8.0-windows10.0.19041.0) D:\GITHUB\COMETA_APPS\MY-COMETA\obj\Debug\net8.0-windows10.0.19041.0\win10-x64\intermediatexaml\WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\WinRTGlobalVtableLookup.g.cs 6 |
I made our project work with vs 17.11.5 by pinning SDK version to 8.0.402.
global.json
PS: the diff in the sdk seems unsuspicious: dotnet/sdk@v8.0.403...v8.0.402 |
I dumped the stowed exception in windbg: Which seems to be the same as in this issue: mono/SkiaSharp#2999 stack trace of the stowed exception
|
Looking through the last couple issues mentioned (RcwReflectionFallbackGenerator, skia, WinRTGlobalVtableLookup), they look like the ones that we have addressed for the upcoming .NET SDK update. If you want to try out the fix earlier, you can specify the |
If I use WindowsSdkPackageVersion with 10.0.19041.54 it's ok ! |
I also encountered this issue a few days ago. Adding CsWinRTRcwFactoryFallbackGeneratorForceOptOut as mentioned above is working as a workaround for me |
This works for me for a broken WinUI 3 project after upgrading to 17.11.5. How did you find the solution and why does this work? |
There is now a new SkiaSharp build out on nuget that should be fixed! |
By adding this:
I managed to compile. |
17.12.0 is out, on initial testing, it looks good. |
Description
Following on from issue: #25132
Since installing 17.11.5, all of our MAUI builds are failing for Windows with errors along the lines of:
and
Project 1 is a large MAUI project built with .Net 7 MAUI project templates and upgraded with every new release.
Project 2 is a smaller MAUI project built a few months ago with .Net 8 MAUI project templates.
Both projects tested return the same amount of errors (33). with the same errors.
Neither of these projects are intentionally using
WebView2
components that we are aware of.Both projects target:
And platform:
Project 1 has to target Windows 10 to keep compatibility with our customer.
What I've tried to fix this from suggestions in other posts
Adding...
Does not resolve any of the errors.
Adding...
Removes all errors and both projects compile and run.
However, I am now getting a debugging attachment error in Project 1 when running my Windows app that does not appear on machines that have not been upgraded to 17.11.5.
I cannot tell yet if this is an error related to the 17.11.5 update (did anything MAUI based get updated in 17.11.5?) or a new issue for us. I will spend more time on it tomorrow. iOS and Android work as expected, it only seems to be a Windows issue - break points still work but I've not been able to determine what line in our code is causing this. I will update as I debug.
Adding both
WindowsSdkPackageVersion
andCsWinRTRcwFactoryFallbackGeneratorForceOptOut
only outputsunsafe
errors:When me and my team have some spare time, we'll try to rebuild a repo for testing.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.91 SR9.1
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.91 SR9.1
Affected platforms
Windows
Affected platform versions
net8.0-windows10.0.19041.0 / 10.0.17763.0
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: