![](/img/trans.png)
[英]C# error CS0246 The type or namespace name 'Socket' could not be found (are you missing a using directive or an assembly reference)
[英]C# Error: Error CS0246 The type or namespace name '' could not be found (are you missing a using directive or an assembly reference?)
我有一個支持 UWP 和 .NET 的應用程序。 我有一個特定於 .net 的命名空間測試。 所以我有條件地把它包括在內
#if! WINDOWS_UWP
using test;
#endif
測試包含類 mytest、mytest1、mytest2。 但是當我嘗試測試點時,只有一個出現。
#if! WINDOWS_UWP
mytest obj = new mytest();
#endif
顯示錯誤:“錯誤 CS0246 找不到類型或命名空間名稱''(您是否缺少 using 指令或程序集引用?)”
當我在示例 .net 應用程序中嘗試相同時,當我使用測試點時,所有類都顯示出來。 測試來自 nuget package。
請幫忙。
謝謝,
test
應該是#included
嗎? IE
#if! WINDOWS_UWP
#include "mytest.cs"
mytest obj = new mytest();
#endif
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.