简体   繁体   English

名称空间“ clr-namespace:SharpGL.WPF; assembly = SharpGL.WPF”中不存在“ OpenGLControl”名称

[英]he name “OpenGLControl” does not exist in the namespace “clr-namespace:SharpGL.WPF;assembly=SharpGL.WPF”

I have problem with openGL wrapper - SharpGL-> I am not able to build solution because of missing assembly . 我在使用openGL包装器-SharpGL->时遇到问题,因为缺少程序集,所以无法构建解决方案。

The name "OpenGLControl" does not exist in the namespace "clr-namespace:SharpGL.WPF;assembly=SharpGL.WPF" 名称“ OpenGLControl”在命名空间“ clr-namespace:SharpGL.WPF; assembly = SharpGL.WPF”中不存在

The requiered assemblies are all referenced , also in object browser I can see whole content I am using .NET 4.5.2 and VS2013 所需的程序集都被引用 ,也在对象浏览器中,我可以看到我正在使用.NET 4.5.2和VS2013的全部内容

<Window x:Class="sharpGLTEst.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:my="clr-namespace:SharpGL.WPF;assembly=SharpGL.WPF"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <sharpGL:OpenGLControl />
    </Grid>
</Window>

the solution is to create control directly in code 解决方案是直接在代码中创建控件

SharpGL.WPF.OpenGLControl op = new SharpGL.WPF.OpenGLControl(); SharpGL.WPF.OpenGLControl op =新的SharpGL.WPF.OpenGLControl();

public MainWindow()
        {
            InitializeComponent();
            SharpGL.WPF.OpenGLControl op = new SharpGL.WPF.OpenGLControl();
            SharpGL.OpenGL gl = op.OpenGL;
            SharpGLControlPanel.Children.Add(op);
        }

It is an old question, but since I ran into it recently I thought maybe others hit this too. 这是一个古老的问题,但是自从我最近遇到这个问题以来,我认为也许其他人也可以这样做。

To fix this I changed the project Target .NetFramework to 4.0 instead of leaving the default value, which for a new project is typically the latest version. 为了解决这个问题,我将项目Target .NetFramework更改为4.0,而不是保留默认值,对于新项目,默认值通常是最新版本。

Good luck! 祝好运!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SharpGL.WPF gl.Color不起作用 - SharpGL.WPF gl.Color not working 错误:名称ChromiumWebBrowser在名称空间“clr-namespace:CefSharp.Wpf; assembly = CefSharp.Wpf中不存在 - Error:The name ChromiumWebBrowser does not exist in the namespace "clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf 名称 ChromiumWebBrowser 在命名空间“clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf”中不存在 - The name ChromiumWebBrowser does not exist in the namespace “clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf” C#WPF-名称“…”在命名空间“ clr-namespace:…”中不存在 - C# WPF - The name “…” does not exist in the namespace “clr-namespace:…” C# WPF 在命名空间“clr-namespace=local”中不存在 - C# WPF does not exist in the namespace “clr-namespace=local” 名称 &lt;...&gt; 不存在于命名空间 clr-namespace &lt;...&gt; - the name <...> does not exist in the namespace clr-namespace <...> WPF 设计器问题:XDG0008 名称“NumericTextBoxConvertor”在命名空间“clr-namespace:PulserTester.Convertors”中不存在 - WPF designer issues : XDG0008 The name "NumericTextBoxConvertor" does not exist in the namespace "clr-namespace:PulserTester.Convertors" 名称“ X”在名称空间“ clr-namespace:Y”中不存在 - The name “X” does not exist in the namespace “clr-namespace:Y” 名称“XYZ”在名称空间“clr-namespace:ABC”中不存在 - The name “XYZ” does not exist in the namespace “clr-namespace:ABC” 是否在clr-namespace中不存在UIRoot? - UIRoot does not exist in the clr-namespace?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM