简体   繁体   English

如何解决 CS0246 错误:(类型或命名空间名称错误)?

[英]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.

相关问题 错误 CS0246:找不到类型或命名空间名称“IApplicationBuilderExtensions” - error CS0246: The type or namespace name 'IApplicationBuilderExtensions' could not be found 错误 CS0246:找不到类型或命名空间名称“PlayerMotor” - error CS0246: The type or namespace name 'PlayerMotor' could not be found 错误CS0246:找不到类型或名称空间名称“ HtmlAgilityPack” - Error CS0246: The type or namespace name `HtmlAgilityPack' could not be found 错误 CS0246:找不到类型或命名空间名称“UnityEngine” - error CS0246: The type or namespace name 'UnityEngine' could not be found 错误 CS0246:找不到类型或命名空间名称“KustoConnectionStringBuilder” - error CS0246: The type or namespace name 'KustoConnectionStringBuilder' could not be found 错误CS0246:找不到类型或命名空间名称“AssemblyFileVersion” - Error CS0246: The type or namespace name 'AssemblyFileVersion' could not be found 错误 CS0246:找不到类型或命名空间名称“Newtonsoft” - Error CS0246: The type or namespace name 'Newtonsoft' could not be found 错误 CS0246:找不到类型或命名空间名称“CsvHelper” - error CS0246: The type or namespace name 'CsvHelper' could not be found 错误CS0246:找不到类型或名称空间名称&#39;WebDriverWait&#39;? - Error CS0246: The type or namespace name 'WebDriverWait' could not be found? 错误 CS0246:找不到类型或命名空间名称“MySql” - error CS0246: The type or namespace name 'MySql' could not be found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM