Solve the problem of missing VSCode development reference

Many times when we are developing, we use the .NET Standard 2.0 standard framework by default in Unity (

.NET Standard 2.0 is a set of formal .NET API specifications, which is equivalent to a set of specifications. Whether .Net Core or .Net Frameworkd, all must implement this specification.

), as shown in the figure:

When developing some codes, the libraries we reference will not be found within the standard framework, as shown in the figure:

When we change the standard framework .NET Standard 2.0 to .NET 4.x, the corresponding library file is still not referenced in VSCODE. At this time, if the compiler automatically compiles and references the corresponding library file (how to make it automatically change the corresponding library file) I don’t know how to set the address of the reference library, please let me know if you know how).

At this time, we first understand the Assembly-CSharp.csproj file. This file is specially used for the editor of development scripts. It contains referenced dll library files. We open it and find the corresponding reference. At this time, we see that the referenced address is still. NET Standard 2.0 standard framework dll, as shown in the figure:

 At this time we need to change the path and reference the library file in .NET 4.x.

The default installation path of library files in .NET 4.x:

C:\Program Files\Unity\Hub\Editor\2020.3.30f1c1\Editor\Data\MonoBleedingEdge\lib\mono\4.7.1-api

C:\Program Files\Unity\Hub\Editor\2020.3.30f1c1\Editor\Data\MonoBleedingEdge\lib\mono\4.7.1-api\Facades

After modification:

It can be solved by:

 

 。

(Generally after changing the .net framework used, as long as ***2.0.0 is used, it will be changed to the corresponding application version) As shown in the figure:

Default use:

 After manual changes:

 

 

Guess you like

Origin blog.csdn.net/qq_18427785/article/details/124813378