SFML community forums

Bindings - other languages => DotNet => Topic started by: ggggggggggggggg on May 30, 2016, 06:53:00 am

Title: How to hide the sfml .dlls from my solution explorer?
Post by: ggggggggggggggg on May 30, 2016, 06:53:00 am
I tried doing it the normal way by adding the .dll are reference but I got this error:

A reference to the "....dll" could not be added. Please make sure that the file is accessible and that it is a valid assembly or COM component.

I also tried NuGet but it also threw all the .dlls in my solution explorer. When I try to put them in a folder they break and the compiler can't find them.

How do I put the .dlls inside a folder or add them them by reference?

Title: Re: How to hide the sfml .dlls from my solution explorer?
Post by: Recoil on May 30, 2016, 07:51:03 am
I have come across several threads when I first started using SFML about how to keep the dll's in a separate folder myself.  Unfortunately this is not possible.  The .dll file have to be in the same directory as you exe.
Title: Re: How to hide the sfml .dlls from my solution explorer?
Post by: zsbzsb on June 04, 2016, 09:22:31 pm
Speaking of the CSFML dlls here, just put them in any folder you please and then use a post build command to copy them to the output (build) folder. No need to put them in your project as individual files.
Title: Re: How to hide the sfml .dlls from my solution explorer?
Post by: Recoil on June 05, 2016, 12:41:11 am
@zsbzsb - But they will still be required to be in the same folder as the build .exe file, correct?  There is not way to have say a "Libs" folder for all the .dll's, then just have all that put in the build folder?

I just want to be sure I am correct on whether that is the case or not :)
Title: Re: How to hide the sfml .dlls from my solution explorer?
Post by: zsbzsb on June 09, 2016, 01:34:17 pm
Yes, that is why your post build command would copy from the libs folder (or w/e you name it) to the build folder.

Something like this would work:
xcopy "$(ProjectDir)/Libs/*" "$(ProjectDir)$(OutDir)" /sy