Home > other >  How to prevent VS reference of DLL is copied to the local? How to ensure that VS referenced DLL for
How to prevent VS reference of DLL is copied to the local? How to ensure that VS referenced DLL for

Time:02-23

Question 1: when using VisualStudio2017 community edition for the Unity and development, with the use of ILRuntime, so business logic code can not directly write in Unity, need to generate a DLL in another project to the Unity of the folder,
I just need the DLL itself, other referenced DLL all don't need to be copied, because the Unity of main engineering itself already include them,
The problem is that although in the DLL attributes of each reference copy confirmation placed local=false, but there are still some DLLS are copied to the target folder,
Question 2: in order to guarantee the Unity and the business logic project referenced DLL is consistent, in the business logic project I copied the DLL in the Unity project reference path, the DLLS are located in the folder of the Unity editor, but because of the Unity of multiple machines installation path is different, so the reference path cannot be an absolute path, so I created a system environment variable "UNITY_PATH", is used to specify the directory of the Unity editor, change the business logic project at the same time. The csproj file content, use $(UNITY_PATH) designated reference to the DLL path, theoretically the DLL should is all in the folder in the Unity editor, but that a few were forcibly in question 1 copy by local DLL, its reference is wrongly positioning system. Net directory, for this a few DLL, even use absolute paths VS come to their senses wouldn't use the Unity editor path of files, they include:
System.Data.Com mon; System.Net.Http; System. Diagnostics. StackTrace; System. Diagnostics. Tracing; System. Globalization. Extensions; System.IO.Com pression. System.Net.Sockets.

CodePudding user response:

Question 1 can be generated after the event will not need the DLL deleted:
Del * * *. DLL

ericzhou

CodePudding user response:

Thank you for your reply, I use del System. *. DLL delete these files

CodePudding user response:

I just have this problem, hard top,,,,
  • Related