ドキュメントを更新する必要があります。 それまでの間、通常は次のようにします。
必要なVSでプロジェクトのフレーバーをビルドし、MUXControlsTestAppでテストしてから、問題がなければ、build-nupkg.ps1を使用してそのフレーバーのnugetパッケージを作成します(ビルドしたフレーバーのBuildFlavor / BuildArchパラメーターを渡します)。 次に、ダウンストリームのテストアプリを同じビルドアーチにビルドする必要があります。
@jevansaksおっしゃった手順に従って、Microsoft.UI.Xamlのデバッグx64バージョンをビルドし、 build-nupkg.ps1
スクリプトを実行してnugetパッケージをビルドしました。
このnugetパッケージを自分のアプリに追加してビルドすると、次のエラーが発生します
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs3_compact_themeresources.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs4_generic.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\19h1_themeresources.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs4_compact_themeresources.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\DensityStyles\Compact.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs2_generic.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs3_generic.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs2_themeresources.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs2_compact_themeresources.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs5_compact_themeresources.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\DensityStyles\CompactDatePickerTimePickerFlyout.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\19h1_generic.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs4_themeresources.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs5_themeresources.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\19h1_compact_themeresources.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs5_generic.xbf' does not exist. TestXamlUI
Payload file 'C:\Users\user\.nuget\packages\microsoft.ui.xaml\2.3.0.28\runtimes\win10-x64\native\Microsoft.UI.Xaml\Themes\rs3_themeresources.xbf' does not exist. TestXamlUI
nugetパッケージのruntimes\win10-x64\native\Microsoft.UI.Xaml
フォルダーにDensityStyles
フォルダーとThemes
runtimes\win10-x64\native\Microsoft.UI.Xaml
フォルダーが存在しないようです。
そこで、nugetパッケージを解凍し、これら2つのフォルダーとその内容を手動でコピーしました( BuildOutput\Debug\x64\Microsoft.UI.Xaml
)。 次に、もう一度圧縮して、名前を.nupkgに変更しました。
その後、それは正しく動作しました。
2つのフォルダがコピーされていないためにbuild-nupkg.ps1
スクリプトに不足しているものはありますか?
ああ、今覚えています。デバッグビルドにはF5回の新しいVS最適化があり、デバッグビルドの.priファイルがデフォルトでnugetパッケージで機能しないようになっています。 リリースをビルドしてそれを使用するか、vcxprojのこの設定をデバッグ用にfalseに変更することができます。