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

前端 未结 5 897
孤城傲影
孤城傲影 2020-12-10 11:40

I am building a dll, which references a second dll. I have added the second dll as a reference in the first dll\'s project by going to Properties > Common Properti

相关标签:
5条回答
  • 2020-12-10 11:44

    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)
    0 讨论(0)
  • 2020-12-10 11:45

    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.

    0 讨论(0)
  • 2020-12-10 11:47

    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".

    0 讨论(0)
  • 2020-12-10 11:59

    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..

    0 讨论(0)
  • 2020-12-10 12:08

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

    0 讨论(0)
提交回复
热议问题