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
Please Change your application pool setting.
Keep the steps:
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.
For the alert error ("The system cannot find the file specified.")
Right click on [Solution Program name] then select Build Dependencies> & left click on Build Customizations... then true-checkbox {MASM} then click OK button.
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.
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".
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.