【问题标题】:SharpGL.SceneGraph and SharpGL.Serialization libraries not installed with SharpGLSharpGL.SceneGraph 和 SharpGL.Serialization 库未随 SharpGL 一起安装
【发布时间】:2019-05-19 15:17:31
【问题描述】:

我正在尝试使用 SharpGL 库运行 WPF 应用程序。根据 GitHub 页面上描述的文档,它应该像 PM> Install-Package SharpGL.WPF 一样简单,但是当尝试像这样在 xaml 中创建 OpenGLControl

<Window x:Class="MapRendering.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:sharpGl="clr-namespace:SharpGL.WPF;assembly=SharpGL.WPF"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <DockPanel>
            <sharpGl:OpenGLControl/>
        </DockPanel>
    </Grid>
</Window>

我收到以下程序集引用错误

Could not load file or assembly 'SharpGL.SceneGraph, Version=2.4.1.1, Culture=neutral, PublicKeyToken=27fc851303210b27' or one of its dependencies.

现在我可以从 GitHub 拉取SharpGL.SceneGraph source,通过手动浏览构建和添加 dll。但是为什么SharpGL.SceneGraph dll 没有与SharpGL.WPF 一起分发呢?我错过了什么吗?

【问题讨论】:

    标签: wpf sharpgl


    【解决方案1】:

    当我尝试将 SharpGL NuGet 包从 2.4.0.0 升级到 2.4.1.1 时,我遇到了同样的错误。从您的评论中,我意识到缺少了什么。谢谢。 (我想编辑器只是忘记了 .dll,我希望接下来会修复)。

    如果您想继续使用 NuGet 的完整包,您只需降级到 2.4.0。如果旧版本在 NuGet 存储库中不可见,它应该仍然存在。 要手动降级到隐藏包,只需手动编辑项目中的 packages.config 文件并将版本更改为“2.4.0.0”。然后单击项目的管理 NuGet 包。 Visual Studio 将询问您是否要恢复您应该接受的缺失 NuGet。您可能仍需要在“添加引用”对话框中使用“浏览”选项切换对旧版本的引用。

    【讨论】:

      猜你喜欢
      • 2013-12-14
      • 2015-08-29
      • 2016-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-07
      相关资源
      最近更新 更多