代码之家  ›  专栏  ›  技术社区  ›  devuxer

WPF可执行文件不会在Visual Studio之外运行(资源字典问题)

  •  7
  • devuxer  · 技术社区  · 14 年前

    我有一个WPF应用程序,如果我在visualstudio中“debug”(F5)(debug和Release模式都可以),它会运行得很好,但是如果我尝试双击bin\Release文件夹中的.exe,Windows会立即终止该应用程序。

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

    什么是正确的方式包括航空主题(或指向它),以便我可以发布我的应用程序?


    无法加载文件或程序集“PresentationFramework.Aero,Culture=neutral”或其依赖项之一。系统找不到指定的文件。“:”PresentationFramework.Aero,Culture=neutral

    1 回复  |  直到 14 年前
        1
  •  7
  •   devuxer    14 年前

    结果我只需要在我的第一次演讲中加入一些细节 ResourceDictionary 宣言:

    <ResourceDictionary
        Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />