1

I have a startup project "A" (.exe) with a explicit reference to a project "B". Project "C" is NOT referenced directly by project "A" or indirectly by project "B".

When starting an instance of project "A" (F5), then project "B" is build upfront, but project "C" is not.

Is it possible to force Visual Studio to build project "C" anyway? I am using ReSharper Build, so a solution with ReSharper would be fine.

I don't wan't to add a explicit project reference to project "C". It is loaded implicitly via reflection (why is not the question).

What I already tried:

  • Change Visual Studio setting in "Projects and Solutions --> Build and Run --> On Run, when projects are out of date:" to "Always build"
  • Selected project "C" in ReSharper setting "Tools --> Build --> Heuristics --> Projects that should ALWAYS be built:"
Jonas Benz
  • 503
  • 3
  • 12

2 Answers2

1

Your question seems is a duplicate of this: Visual studio project build dependencies with no references?

You can add the project not referenced as a project dependency.

user3352617
  • 189
  • 4
  • 15
  • If it's a possible duplicate then flag it as such using the flag link under the post, don't link to the duplicate in an answer – Nick is tired Jan 08 '19 at 14:11
  • 1
    I don't have enough reputation points to flag.Once it's flagged as a duplicate I will remove my comment. Thanks – user3352617 Jan 08 '19 at 14:18
  • 1
    Thank you! The project reference is exactly what I need. I couldn't find the duplicate myself, sorry. I will flag this question as duplicate. – Jonas Benz Jan 08 '19 at 14:37
0

You have to make a post build event in the project, right click, properties, build and in the post build configuration set the output path. When you compile the entire solution the post build event will execute and copy "C" project .dll in the path you configured.

Hopes it help.