Closed colemickens closed 8 years ago
When an application is being ran from visual studio its current directory is set to that of the current startup project and not the location of the build directory. Osiris Launcher and Osiris.dll are built into their own directories before being moved to the solution's build folder. You must run Osiris Launcher.exe from the build directory which would be in x64/Debug
based on that screenshot and there you will find the .exe and the .dll next to each other
As a side note, the error actually provides some detail: DLL file: C:\Users\Cole Mickens\Code\colemickens\Osiris\Osiris Launcher\Osiris.dll does not exists
Right. I just feel like there ought to be a way to make F5 work in this case with VS. I'll try sometime later this week to make it work.
This issue has been fixed in the latest build (since commit https://github.com/Wunkolo/Osiris/commit/00cf80a3e23e0dc667e22b6473e68a31321fc8a0) and the launcher will now determine the dll is next to the launcher right from visual studio (if you build from the solution file)
The projects in VS are still not setup right. The launcher doesn't automatically build the Osiris project and doesn't properly cross reference the DLL. It's probably easier to set it up correctly than it is to have to copy around a DLL and remember to build the project manually when it's dirty...
If I make Osiris Launcher
depend on the Osiris
project, it causes it to be built properly, but then I get an Error about not being able to access Osiris.lib
for some reason. (Though tbh, even when it works, I can't tell what injecting the Osiris DLL even does... I'm a noob I guess)
You need to be opening the solution(.sln) file and building from there as the individual project files are isolated environments for the dll and exe separately and their build environments will not find each other while the solution files puts them both into the same x64/Release
or x64/Debug
directory upon building. The launcher simply injects the DLL into the running process and is the only binary that can be debugged directly from Visual Studio.
Yeah... the problem I'm having is that there is not a proper dependency set between the launcher and the DLL.
Osiris Launcher
and then hit Debug -> StartIt fails because running Osiris Launcher
didn't trigger a build of the dependent project Osiris
.
I figured it out for now, I have to manually build the solution. Thanks for helping me!
Osiris Launcher
is the start project.Error:
Screenshot: