0

I'm familiar with how to set the location for a .dll for a project in Visual Studio: Visual Studio: how to set path to dll?.

But these methods only allow you to set the .dll path for a single project. My solution has many projects which need to have the same .dll path. Is there a method to set all the paths for all projects in a solution at once?

Community
  • 1
  • 1
user650261
  • 2,115
  • 5
  • 24
  • 47
  • That link is not useful. It already works this way, all projects build to the same directory, $(SolutionDir)$(Configuration). Best to keep it that way. If you want to change a setting for more than one project at a time then simply select them all before you use Project > Properties. Select multiple projects in the Solution Explorer window with Shift + Click. – Hans Passant Mar 22 '16 at 04:56
  • Can you elaborate? I think the shift+click thing will work, but are you saying that I only need to add the .dll path to one project, and then that will add it for all projects? I can check this really quickly - I thought that wasn't the case, but even if it were, that seems a messy solution, as it seems arbitrary as to which project's settings you would edit. – user650261 Mar 22 '16 at 05:01
  • multi-select the trick. I'd still like more clarification on what precisely you were trying to say precisely, but if you add an answer for the multi-select trick I will accept it. – user650261 Mar 22 '16 at 05:07
  • Hmm, you are talking about something completely different. Changing the debugging settings for DLL projects is not useful, you always start by debugging an EXE project. The EXE should exist in the same directory as the DLLs, by far the simplest way to start testing your app. Be sure to have a project that builds that EXE. Why this isn't the case is completely unclear. – Hans Passant Mar 22 '16 at 05:09
  • I'm a little confused about what you are talking about. I have a solution with multiple project files; each can start up its own .exe. I have, in my same directory structure, .dll files which are compiled to support these projects. I want each of these .dll files to be visible and linked to the executables. I do not want to simply toss all of my dlls in my bin folder as that is very messy project management; and as I recompile these .dll files I will have to keep copying them over. Why would that be the solution? – user650261 Mar 22 '16 at 05:15
  • Still pretty murky when you don't say anything about the EXE that is needed to debug these DLLs. The location the DLL projects build to is rather irrelevant, the default is just fine. This only matters for testing, you always want to minimize the hassle. "Project management" of course gets messy when you have to change the default for every single project or have to copy files by hand. Just don't. – Hans Passant Mar 22 '16 at 05:42
  • Well, I can't really help you help me if you don't tell me what information you want, suffice to say this is in a team project and changing the structure they started with is out of my scope; I'm sure they chose this structure for a good reason. Changing the default for every project seems to be the best solution in this case unless there's a way to automate it with CMake. – user650261 Mar 22 '16 at 05:45

1 Answers1

0

I will jut answer this by saying I followed Hans Passant's suggestion of highlighting multiple projects with shift and then set all the project environment paths simultaneously that way.

user650261
  • 2,115
  • 5
  • 24
  • 47