[英]Visual Studio project doesn't compile when deleting a reference but the built EXE file runs without that same DLL
I have created .NET 4.7.2 project and now refactoring and removing unused libraries.我创建了 .NET 4.7.2 项目,现在重构和删除未使用的库。
By exe I mean successfully compiled exe file. exe是指成功编译的exe文件。
Try To Delete Bin Folder From your Project Path尝试从项目路径中删除 Bin 文件夹
There is a couple possibilities:有几种可能性:
First: Compiled Exe didn't use the.dll at all as you said, so no piece of code will produce an exception because there's no call to that library inside it.首先:编译的Exe根本没有使用.dll,所以没有一段代码会产生异常,因为里面没有调用那个库。
Second: Actually, the dll is somewhere in your computer (on an obscure folder, but registered) and the exe is accessing it witouth any problem第二:实际上,dll 位于您计算机中的某个位置(在一个不起眼的文件夹中,但已注册)并且 exe 正在访问它而没有任何问题
I would bet on first possibility我会打赌第一种可能性
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.