[英]C# Error: Error CS0246 The type or namespace name '' could not be found (are you missing a using directive or an assembly reference?)
I have an application which suppports both UWP and .NET.我有一个支持 UWP 和 .NET 的应用程序。 I have a namespace test which is .net specific.
我有一个特定于 .net 的命名空间测试。 So I have included it conditional like
所以我有条件地把它包括在内
#if! WINDOWS_UWP
using test;
#endif
test contain classes mytest,mytest1,mytest2.测试包含类 mytest、mytest1、mytest2。 But only one is showing up when I tried test dot.
但是当我尝试测试点时,只有一个出现。
#if! WINDOWS_UWP
mytest obj = new mytest();
#endif
showing error:"Error CS0246 The type or namespace name '' could not be found (are you missing a using directive or an assembly reference?)"显示错误:“错误 CS0246 找不到类型或命名空间名称''(您是否缺少 using 指令或程序集引用?)”
When I tried the same in a sample .net application, all classes are showing up when I used test dot.当我在示例 .net 应用程序中尝试相同时,当我使用测试点时,所有类都显示出来。 test comes from a nuget package.
测试来自 nuget package。
Please help.请帮忙。
Thanks,谢谢,
is test
supposed to be #included
? test
应该是#included
吗? ie IE
#if! WINDOWS_UWP
#include "mytest.cs"
mytest obj = new mytest();
#endif
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.