Closed DierkDroth closed 1 year ago
Does it help if you change <EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
to <EnableMsixTooling>true</EnableMsixTooling>
? Also update Microsoft.WindowsAppSDK NuGet package, clean the solution and delete bin and obj folders of the project, then rebuild.
@remokeitel thanks for your feedback.
Yes, I'm on latest NuGet package and already cleaned up the solution a couple of time: the problem persists. The warning suggests that the WindowAppSDK NuGet just it 'not ready yet' for .NET8. I certainly could just disable the warning, but that would not resolve the issue which is within the WindowsAppSDDK NuGet itself.
In the WinUI project -> Properties -> PublishProfiles -> change every instance of win10 to win, including in the file names
I'd recommend doing a solution search for "win10" to ensure you don't miss anything.
Thanks for your feedback @kmgallahan.
I can't seem to find the option you mentioned (please see screenshot). Where would I find that?
Also: I already tweaked all my *.csproj files to replace win10
by win
(please see my original) post, because I could not compile at all my solution at all after upgrading to .NET 8. Now, it gives my warnings (as per my original post) but build and runs.
Still like to see resolved the cause of the warnings...
As is described in the warning message, version-specific or distribution-specific runtime identifiers won't be found by the .NET SDK by default. Even after updating the .csproj file by changing the identifiers to win-ARCH, however, the upstream WinAppSDK package has not got ready for .NET 8, and that's where the warning message came from.
Currently I'm also upgrading a couple of my WinAppSDK projects to .NET 8, (the LTS version, of course). One possible workaround for this would be to add a UseRidGraph
field to the project file.
<UseRidGraph>true</UseRidGraph>
Here is a reference to that, as stated in the breaking changes of .NET 8.
Thanks @brandonw3612.
In fact I came across the article you referenced before, but was shying away to apply any 'backward compatible' changes to my solution, since I found it hard to believe that Microsoft did not prepare their own WindowsAppSDK as they rolled .NET8 last week. Oh well...
In any case: your suggested change got me rid of the warnings. Hopefully it does not bring unwanted side affects ... we'll see. Thanks again
Well, we haven't been seeing any of the 1.5 preview releases yet, and 1.4.3 isn't a good place for adding .NET 8 support. I also wonder about the status of Cs/WinRT and Native AOT support. Getting the Windows App SDK WinRT projection .NET 8 compatible is one thing, but I feel that it would be tough pushing Native AOT back to 1.6.
I don't use <UseRidGraph>true</UseRidGraph>
and don't get any warnings. I upgraded my Windows App SDK project at last weekend to .NET 8 with changing identifiers from win10-xxx to win-xxx.
There would be another issue in your project.
@remokeitel
Do you use <RuntimeHostConfigurationOption Include="System.Runtime.Loader.UseRidGraph" Value="true" />
? This is seen as the same thing.
Without this, the build process will output:
1>C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(284,5): warning NETSDK1206: Found version-specific or distribution-specific runtime identifier(s): win10-arm64, win10-x64, win10-x86. Affected libraries: Microsoft.WindowsAppSDK. In .NET 8.0 and higher, assets for version-specific and distribution-specific runtime identifiers will not be found by default. See https://aka.ms/dotnet/rid-usage for details.
It is also understandable, for example, the bootstrapper is in a win10 rid named directory.
If you don't see that, consider the fact that it may be a template issue. Maybe the WinUI 3 with packaging may not show this.
@DarranRowe No, I don't use this option. There is no warning regarding runtime identifiers.
So it is a project template thing. This seems to be related to the fact that the separate packaging project does the publish as a separate step. Having the package generation as part of the same process seems to bypass something.
@DierkDroth thanks for your patience - the next servicing release of Windows App SDK, 1.4.4, will be out shortly and the UseRidGraph workaround will no longer be necessary. @DarranRowe support for NativeAOT is nearly complete in both C#/WinRT and Windows App SDK and we intend to deliver that with Windows App SDK 1.5.
Thanks for the update @Scottj1s
Any updates on how to solve this issue? It still persists as of June 2024
Describe the bug
I just upgraded my WindowsAppSDK project to latest .NET8 and now am getting this warning
I have this in my project file
Related?
How could that issue be resolved?
Steps to reproduce the bug
Please see above
Expected behavior
WindowsAppSDK project should build in .NET8 as it did in .NET7
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.4.2: 1.4.231008000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response