Could not load file or assembly The system cannot find the file specified

删除回忆录丶 提交于 2019-11-28 11:59:18

As pointed out in the comments, SysInternals' Process Monitor is a valuable tool to diagnose DLL resolution problems. Tells you when a 3rd party DLL has a dependency you don't know about, also tells you when Windows is looking in the wrong corner of your hard drive for the file or finds the wrong one.

Loader snaps is the built-in diagnostic tool for Windows. But Process Monitor is far more convenient.

It does generate rather a lot of information, start from the bottom of the trace or enable tracing at just the right time. You often need to use its filtering tools to turn the firehose in a relevant trickle. Worth the hour of your time to figure it out, this tool belongs on any programmer's black belt.

Right click on the project you created the dll and the new referencing project, then select properties. Under Application, check the target framework and verify that both have the same framework, some dll projects tend to select 'client profile' version of the framework by default, which tend to give the error you are having now..

Let me know if this is not the issue..

My PowerShell ISE wasn't running as an Administrator. This seemed to be the problem for me.

Vijaykumar

Please Change your application pool setting.
Keep the steps:

  1. IIS manager open
  2. Click 'Application pools' (Application pools list)
  3. Select your application pool
  4. Right click your application pool and select 'Advanced settings '
  5. Change 'Enable 32-bit application' from false to true. (When you create application pool Enable 32-bit application default assign false)
الماسك الضَعيفُ

For the alert error ("The system cannot find the file specified.")

  1. Right click on [Solution Program name] then select Build Dependencies> & left click on Build Customizations... then true-checkbox {MASM} then click OK button.

  2. Right click on [Solution Program name] then left click on Properties, left click on "Linker" form "Linker" choose "Debugging" left click on "Debugging" from "Debugging" choose "Debugging Assembly" & convert the value of "Debugging Assembly" to "Yes (/ASSEMBLYDEBUG)", form "Linker" choose "System" left click on "System" from "System" choose "SubSystem" & convert the value of "SubSystem" to "Windows (/SUBSYSTEM:WINDOWS)",, left click on OK button.

  3. Right click on [Solution Program name] then Add> new item, "C++ File(.cpp)" change the name or rename "new item" to "Main.asm" then left click on Add button, Right click on [Main.asm] then left click on Properties select "General" from "General" choose "Item Type" and convert the value of "Item Type" to "Microsoft Macro Assembler" press left click on OK button, then then then Write your assembly code in "Main.asm" file then [[[Debug]]] it using 'step over === F10' from "Debug" tool-bar on top-screen program, all this about how to using assembly code in "Visual Studio 2017".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!