-
Notifications
You must be signed in to change notification settings - Fork 380
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
Toast throws exception on Windows #946
Comments
Issue moved from dotnet/maui#12976
From @VladislavAntonyuk on Sunday, January 29, 2023 7:43:51 PM Make sure you have Windows SDK version at least version 1.2 |
Issue moved from dotnet/maui#12976
From @msftbot[bot] on Monday, January 30, 2023 12:12:27 PM Hi @cdavidyoung. We have added the "s/needs-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. |
Issue moved from dotnet/maui#12976
From @cdavidyoung on Monday, January 30, 2023 12:38:24 PM Well, it looks like windows10.0.19041 to me. I am not sure where you are getting 1.2. Could you clarify? Do I need to update Windows, VS 2022, a Nuget package? |
Issue moved from dotnet/maui#12976
From @VladislavAntonyuk on Monday, January 30, 2023 1:07:11 PM @cdavidyoung install this NuGet package: https://www.nuget.org/packages/Microsoft.WindowsAppSDK |
Issue moved from dotnet/maui#12976
From @msftbot[bot] on Monday, January 30, 2023 3:15:03 PM Hi @cdavidyoung. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md 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. |
Issue moved from dotnet/maui#12976
From @mattleibow on Monday, January 30, 2023 3:16:10 PM What version of the OS are you running? |
Issue moved from dotnet/maui#12976
From @mattleibow on Monday, January 30, 2023 3:17:27 PM @jfversluis @brminnick is this a community toolkit issue? |
Ugh. When I try to update Microsoft.WindowsAppSDK nuget it says "Implicitly referenced by an SDK. To update the package, update the SDK to which it belongs." I updated .NET/.NET Core to latest .Net 7.0 and it still says the same thing. In my project the Target Windows Framework is 10.0.19041 and I just selected 10.0.22621 but it does not seem to help. Any other hints? |
@cdavidyoung add this line to yor csproj file: <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.230118.102" /> |
When I added that line I got two errors that make no sense to me but this warning seems to indicate the problem: Severity Code Description Project File Line Suppression State |
this is a warning, so you can ignore it. |
Sorry! This should be fixed after dotnet/maui#11206 is merged. Right now we need a bit more control on the versions of things as the system is a bit angry if you change too much. After that PR, your app will only get dependencies transitively from the nugets, so overriding versions will be just the nuget package manager. |
Ok, here is one of the two errors. I don't think I can ignore this. I will need to back out the change to .csproj. Severity Code Description Project File Line Suppression State |
@cdavidyoung what is your .NET MAUI version? Try 7.0.59 |
Hi @jfversluis. We have added the "needs reproduction" label to this issue, which indicates that we cannot take further action. This issue will be closed automatically in 5 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. |
Stupid question but where do I see that?
El El mar, ene. 31, 2023 a la(s) 11:41 p.m., Vladislav Antonyuk <
***@***.***> escribió:
… @cdavidyoung <https://github.com/cdavidyoung> what is your .NET MAUI
version? Try 7.0.59
—
Reply to this email directly, view it on GitHub
<#946 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHE7K6VGMMEY2GSLOQ24GTWVIHQ7ANCNFSM6AAAAAAULJKW2U>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Run |
I did "dotnet workload update" in a Powershell as admin and am now getting compiler errors (listed below the powershell results). I even tried the suggested "--from-previous-sdk" option as well but it made no difference. @VladislavAntonyuk could you provide me guidance now on how to get my project to compile again? I already restarted the computer but that did not help. Thanks. Windows PowerShell Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows PS C:\WINDOWS\system32> dotnet workload update Welcome to .NET 7.0!SDK Version: 7.0.102 TelemetryThe .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell. Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry Installed an ASP.NET Core HTTPS development certificate.
|
run dotnet workload install maui |
That worked! I can now build my project. @VladislavAntonyuk thanks for your guidance and quick response. BTW, the Toast is now working as well on Windows! I haven't tried the other platforms yet. PS C:\WINDOWS\system32> dotnet workload install maui Downloading Microsoft.Maui.Core.Ref.android.Msi.x64 (7.0.59) Successfully installed workload(s) maui. PS C:\WINDOWS\system32> |
I followed up all the steps that you guys described above, but unfortunately I'm still getting error as described below.
It works fine running in debug on Visual Studio, this error occurs when I build it on release using the script below: Visual Studio Community - Version 17.4.4 I tried to use the Toast code from Maui and the error appears to be on Windows classes. |
@danielancines Just confirm - you've added <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.230118.102" /> |
@brminnick Yes, like @VladislavAntonyuk wrote before. |
most likely this can be caused by |
@VladislavAntonyuk same error. :-( |
If you try it building on Visual Studio, Debug or Release, it works fine, the problem occurs only when you build with script that I mentioned before.
|
Hi guys, any idea or workaround for this? |
If you read the previous messages you will see that "dotnet workload install maui" solved the problem for me. The toasts work fine for me on windows. |
Sorry. I had just read your last message and not the previous one. I build within VS so I can't comment on those build commands. |
Issue moved from dotnet/maui#12976
From @cdavidyoung on Saturday, January 28, 2023 1:53:52 PM
Description
With the most recent updates Toast is now throwing an exception on Windows but works fine on the Mac. This is a simple mod to the standard Maui app that illustrates the problem. If you run this and set a breakpoint on the exception it stops when you press the button.
Steps to Reproduce
See the description for sample code.
Link to public reproduction project repository
https://github.com/dotnet/maui
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
I was not able test on other platforms
Affected platform versions
windows10.0.19041
Did you find any workaround?
use try/catch to not crash but Toast not working
Relevant log output
The text was updated successfully, but these errors were encountered: