当前位置:网站首页>[unity3d daily bug] unity3d solves "the type or namespace name" XXX "cannot be found (are you missing the using directive or assembly reference?)" Etc
[unity3d daily bug] unity3d solves "the type or namespace name" XXX "cannot be found (are you missing the using directive or assembly reference?)" Etc
2022-07-23 22:32:00 【Quiet little magic dragon】
Recommended reading
Hello everyone , I'm a Buddhist Engineer * Quiet little magic dragon *, Update from time to time Unity Development skills , I think it's useful. Remember to press one button three times .
One 、 Preface
First , See if it's similar to me :
Problem with missing namespace references .
Similar problems are :
The type or namespace name `MySql’ could not be found. Are you missing an assembly referen
The type or namespace name ‘JWT’ could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name ‘Newtonsoft’ could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name ‘****’ could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name ‘BurstCompile’ could not be found (are you missing a using directive or an assembly reference?)
UP It's from Visual Studio Of NuGet A set of plug-ins installed directly by the package manager , stay Visual Studio There is no wrong report , But in Unity China will report an error .
Two 、 Cause analysis
The main reasons are as follows :
1、Unity Version issue for , The old version cannot support the new dependent Library .
2、Unity The target framework library of does not support .Net Framework library for
3、Unity This is not included in dll
3、 ... and 、 solve the problem
It's easy to solve the problem when you know it .
3-1、Unity Version of the problem
If it is Unity The version problem is to upgrade the version
3-2、Unity The target framework library is not supported
If it is Unity The target framework library of does not support .Net Framework library for .
stay Unity Editor , Click on File→Build Settings→Player find Api Compatibility Level:
take .NET Standard 2.0 Change to .NET 4.x.
install .NET 4.6 Framework of the , You can change to 4.6.
3-3、Unity No import dll
There are children's shoes that can say : I Unity Target framework library 、Unity There is no problem with the version of , But what about reporting errors .
Then find the corresponding assembly according to the missing assembly dll file , Then put Unity Of Plugins In the folder :
For example, I lack JWT and Newtonsoft Assembly of , I found the corresponding dll file :

Put it in Unity Of Plugins In the folder :
Wait until the compilation is complete , The error report disappears .
as for dll Where can I find the documents ... To be honest, I don't have a good way , Baidu .. Or go github look for , Students who have better methods can also leave a message to tell me .
边栏推荐
- Wangxuegang video coding -- mediacodec coding and decoding
- Introduction to I2C Principle & Application of esp32
- Inspiration from Buffett's shareholders' meeting 2021-05-06
- Microsoft SQL Server数据库语言及功能使用(十三)
- [C language] address book (static version)
- 巴菲特股东大会的启示 2021-05-06
- 为了一劳永逸而写的数独
- [problem handling] merge made by the 'ort' strategy
- 121. The best time to buy and sell stocks
- VIM common shortcut keys
猜你喜欢

Sword finger offer II 115. reconstruction sequence

Taobao assistant is disabled. What is the reason for using the big Taoying import data package to upload the baby prompt "the main image is required and cannot be empty"? How to solve it?

详解NAT技术

Stm32+esp8266+mqtt protocol connects Alibaba cloud Internet of things platform

LeetCode高频题62. 不同路径:机器人从左上角到右下角的路径有多少条?纯概率排列组合问题,而不是动态规划题

Life always needs a little passion

Investment suggestions for overseas senior players (2) 2021-05-03

JDBC programming of MySQL

海外资深玩家的投资建议(3) 2021-05-04

MySQL索引事务
随机推荐
小说里的编程 【连载之十七】元宇宙里月亮弯弯
[acwing] weekly competition
Jmeter性能综合实战——签到及批量签到
openEuler 资源利用率提升之道 01:概论
糖尿病遗传风险检测挑战赛Baseline
STM32 MCU uses ADC function to drive finger heartbeat detection module
除了钱,创业者还需要什么?专访明月湖创赛创投机构
『晨读』如果你处在我的位置,你会怎么做?我们怎么样做,
Programming in the novel [serial 17] the moon bends in the yuan universe
What else do entrepreneurs need besides money? Exclusive interview with Mingyue Lake venture capital institutions
DeFi项目的盈利逻辑 2021-04-26
Wangxuegang video coding -- mediacodec coding and decoding
121. The best time to buy and sell stocks
Yuanqi Digitalization: existing mode or open source innovation Lixia action
What are the product life cycle, common project functions, and information flow
Comment forcer complètement le meurtre de processus indépendants de l'arrière - plan?
产品生命周期,常见的项目职能,信息流 都是什么
Introduction and project development of MVVM and mvvmlight (I)
Interface test
El select drop-down box multi selection remote search anti display