7

Visual Studio で "デバッグ" (F5) すると美しく動作する WPF アプリがあります (デバッグ モードとリリース モードの両方が機能します)。しかし、bin\Release フォルダー内の .exe をダブルクリックしようとすると、Windows によってアプリケーションが強制終了されます。すぐに。

問題は、実行可能ファイルが「PresentationFramework.Aero」を見つけられないことです。これを次のようにアプリのリソース ディクショナリに追加しました。

<ResourceDictionary.MergedDictionaries>
    <ResourceDictionary
        Source="/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml" />
    <ResourceDictionary
        Source="pack://application:,,,/WPFToolkit;component/Themes/Aero.NormalColor.xaml" />
</ResourceDictionary.MergedDictionaries>

アプリをリリースできるように、Aero テーマを含める (またはそれを指す) 適切な方法は何ですか?


これが私が得ている正確なエラーです:

ファイルまたはアセンブリ 'PresentationFramework.Aero, Culture=neutral' またはその依存関係の 1 つを読み込めませんでした。指定されたファイルが見つかりません。":"PresentationFramework.Aero, Culture=neutral

4

1 に答える 1

7

最初のResourceDictionary宣言に詳細を追加する必要があることがわかりました。

<ResourceDictionary
    Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />
于 2010-07-14T20:18:41.230 に答える