Skip to content
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

Can not find the .xbf file #10039

Closed
Miaoyww opened this issue Oct 5, 2024 · 3 comments
Closed

Can not find the .xbf file #10039

Miaoyww opened this issue Oct 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Miaoyww
Copy link

Miaoyww commented Oct 5, 2024

Describe the bug

before:

image

        <OutputType>WinExe</OutputType>
        <TargetFramework>net9.0-windows10.0.22621.0</TargetFramework>
        <WindowsSdkPackageVersion>10.0.22621.41</WindowsSdkPackageVersion>
        <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>

after

image

        <OutputType>WinExe</OutputType>
        <TargetFramework>net9.0-windows10.0.26100.0</TargetFramework>
        <WindowsSdkPackageVersion>10.0.26100.48</WindowsSdkPackageVersion>
        <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>

Steps to reproduce the bug

I just upgraded my app from .net 8 to 9 and it could not compile any longer.

Expected behavior

No response

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.6.1: 1.6.240923002

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

@Miaoyww Miaoyww added the bug Something isn't working label Oct 5, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Oct 5, 2024
@Miaoyww
Copy link
Author

Miaoyww commented Oct 5, 2024

whole csproj

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <TargetFramework>net9.0-windows10.0.26100.0</TargetFramework>
        <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
	    <WindowsSdkPackageVersion>10.0.26100.48</WindowsSdkPackageVersion>\
        <Platforms>x86;x64;ARM64</Platforms>
        <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
        <PublishProfile>win10-$(Platform).pubxml</PublishProfile>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
        <EnableMsixTooling>true</EnableMsixTooling>
        <!-- Assembly Info Properties -->
        <RootNamespace>NonsPlayer</RootNamespace>
		<AssemblyName>NonsPlayer</AssemblyName>
        <ProductName>NonsPlayer</ProductName>
        <Product>NonsPlayer</Product>
        <Description>NonsPlayer</Description>
        <AssemblyTitle>NonsPlayer</AssemblyTitle>
        <!-- WinUI Properties -->
        <UseRidGraph>true</UseRidGraph>
        <UseWinUI>true</UseWinUI>
        <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
        <WindowsPackageType>None</WindowsPackageType>
        <AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
        <ApplicationIcon>Assets/WindowIcon.ico</ApplicationIcon>
        <Configurations>Debug;Release</Configurations>
        <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
        <IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
        <JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
        <PublishReadyToRun>true</PublishReadyToRun>
        <ApplicationManifest>app.manifest</ApplicationManifest>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
        <PackageReference Include="CommunityToolkit.WinUI.Controls.MetadataControl" Version="8.1.240916" />
        <PackageReference Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.1.240916" />
        <PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.1.240916" />
        <PackageReference Include="CommunityToolkit.WinUI.Media" Version="8.1.240916" />
    </ItemGroup>
    
    <ItemGroup>
        <PackageReference Include="WinUIEx" Version="2.4.2" />
        <PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0-rc.1.24431.7" />
        <PackageReference Include="Microsoft.Windows.CsWin32" PrivateAssets="all" Version="0.3.106">
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240923002" />
        <PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
    </ItemGroup>
    
    <ItemGroup>
        <PackageReference Include="Serilog" Version="4.1.0-dev-02238" />
        <PackageReference Include="Serilog.Extensions.Logging" Version="8.0.1-dev-10398" />
        <PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
        <PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
    </ItemGroup>
    
    <ItemGroup>
        <PackageReference Include="Dapper" Version="2.1.35" />
        <PackageReference Include="F23.StringSimilarity" Version="6.0.0" />
        <PackageReference Include="ksemenenko.ColorThief" Version="1.1.1.4" />
        <PackageReference Include="MouseKeyHook" Version="5.7.1" />
        <PackageReference Include="NAudio" Version="2.2.1" />
        <PackageReference Include="NuGet.Versioning" Version="6.11.1" />
        <PackageReference Include="QRCoder" Version="1.6.0" />
        <PackageReference Include="RestSharp" Version="112.1.0" />
        <PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
        <PackageReference Include="z440.atl.core" Version="6.5.0" />
        <Manifest Include="$(ApplicationManifest)" />
    </ItemGroup>
    
    <ItemGroup>
        <ProjectReference Include="..\NonsPlayer.Core\NonsPlayer.Core.csproj" />
        <ProjectReference Include="..\NonsPlayer.Updater\NonsPlayer.Updater.csproj" />
    </ItemGroup>
    
    <ItemGroup>
        <Content Include="Assets\**">
            <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        </Content>
    </ItemGroup>
    
    <ItemGroup>
        <Content Update="Assets\Fonts\HARMONYOS_SANS_SC_BLACK.TTF">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </Content>
        <Content Update="Assets\Fonts\HARMONYOS_SANS_SC_BOLD.TTF">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </Content>
        <Content Update="Assets\Fonts\HARMONYOS_SANS_SC_LIGHT.TTF">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </Content>
        <Content Update="Assets\Fonts\HARMONYOS_SANS_SC_MEDIUM.TTF">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </Content>
        <Content Update="Assets\Fonts\HARMONYOS_SANS_SC_REGULAR.TTF">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </Content>
        <Content Update="Assets\Fonts\HARMONYOS_SANS_SC_THIN.TTF">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </Content>
        <Content Update="Assets\Fonts\NOVECENTO-WIDE-BOLD.OTF">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </Content>
        <Content Update="Assets\Fonts\Segoe Fluent Icons.ttf">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </Content>
    </ItemGroup>
</Project>

@kmgallahan
Copy link
Contributor

kmgallahan commented Oct 5, 2024

.NET 9 hasn't had its final release yet and isn't supported out of the box. I imagine if you want to get this to work before release you'd have to do something along of the lines of what is required in the UWP .NET 9 support writeup:

https://devblogs.microsoft.com/ifdef-windows/preview-uwp-support-for-dotnet-9-native-aot/

You’ll also need an updated version of the XAML compiler that supports .NET 9 projects. This will be included in an upcoming servicing release of the Windows 11 SDK (10.0.26100.0). However, if you want to try things out today, we have a small bundle with just the updated XAML compiler, which you can manually patch on your machine.

@Miaoyww
Copy link
Author

Miaoyww commented Oct 5, 2024

Well, after i added <PackageReference Include="Microsoft.Windows.SDK.Win32Metadata" Version="62.0.23-preview" /> and updated xaml compiler with preview-uwp-support-for-dotnet9-windows-sdk, it indeed did not report xaml errors any more.However, it still told me that it couldn't find .xbf file.

    <ItemGroup>
        <PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
        <PackageReference Include="CommunityToolkit.WinUI.Controls.MetadataControl" Version="8.1.240916" />
        <PackageReference Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.1.240916" />
        <PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.1.240916" />
        <PackageReference Include="CommunityToolkit.WinUI.Media" Version="8.1.240916" />
        <PackageReference Include="Microsoft.Windows.SDK.Win32Metadata" Version="62.0.23-preview" />
    </ItemGroup>

image

@Miaoyww Miaoyww closed this as completed Oct 18, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the needs-triage Issue needs to be triaged by the area owners label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants