[英]How to resolve CS0246 ERROR: (The type or namespace name Error)?
The type or namespace name
CameraSpace
could not be found (are you missing a using directive or an assembly reference?)"找不到类型或命名空间名称
CameraSpace
(您是否缺少 using 指令或程序集引用?)”
What I have tried:我试过的:
I have tested all the packages are installed properly but i still have this error shows.我已经测试了所有软件包都正确安装,但我仍然有这个错误显示。 I added these new .NET frameworks, namely,
System.windows.forms
, System.data.Linq
, System.configuration
AND as i already said all the mentions packages are installed. I added these new .NET frameworks, namely,
System.windows.forms
, System.data.Linq
, System.configuration
AND as i already said all the mentions packages are installed. I'm using VS2015 and I'm not sure whether it's somehow related to VS or not.我正在使用VS2015 ,我不确定它是否与 VS 有某种关系。 And needless to say, I'm new to C# .
不用说,我是 C# 的新手。 I spend too much time to solve it my own and watching some videos but all the errors are different with the same name 'CS0246' Please Please help me.
我花了太多时间自己解决它并观看了一些视频,但是所有错误都与同名“CS0246”不同,请帮助我。
I have this following code:我有以下代码:
using System;
using System.ComponentModel;
using Baselabs.Statistics.Spaces;
using Baselabs.Statistics.Models.AdditiveNoise;
namespace DataFusion
{
[DisplayName("..........")]
[Description("..............")]
class CameraMeasurementModel : MeasurementModel<CameraSpace, CVComponentsSpace>
I also want to add , using Baselabs.Statistics.Spaces;
我还想添加,
using Baselabs.Statistics.Spaces;
this package give the CameraSpace
namespace这个 package 给了
CameraSpace
命名空间
Make sure you have added CameraSpace
assembly reference correctly.确保您已正确添加
CameraSpace
程序集引用。
According to Microsoft docs :根据微软文档:
A type or namespace that is used in the program was not found.
未找到程序中使用的类型或命名空间。 You might have forgotten to reference (-reference) the assembly that contains the type, or you might not have added the required using directive.
您可能忘记引用 (-reference) 包含该类型的程序集,或者您可能没有添加所需的 using 指令。 Or, there might be an issue with the assembly you are trying to reference.
或者,您尝试引用的程序集可能存在问题。
Track the possible cases in the page.跟踪页面中可能出现的情况。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.