Let's assume I've three assemblies:
A.dll
has no references.B.dll
has a file or project reference toA.dll
.C.exe
has a project reference toA.dll
and loads pluginB.dll
during runtime using reflection.
Up to this point everything works as expected.
Now let's assume I've a setup project for this three assemblies and I want to provide
- the project output / primary output (
A.dll
,B.dll
andC.exe
) of all three assemblies - and the project output / source files (
B.cs
andB.csproj
) only of the pluginB.dll
.
If the plugin B.dll
is using a file reference to A.dll
and I set a reference path to the installation folder in the B.csproj
project file then the user, which installed the software, is able to rebuild the B.dll
.
On the other hand if the plugin B.dll
is using a project reference to A.dll
then the user, which installed the software, has to replace the broken project reference with a file reference to A.dll
.
Normally I prefer using project references in the same solution, see Project Reference Vs File Reference?.
So how can I use project references and avoid that the user has to replace the broken project refernces of the plugin B.dll
?
BTW: I'm using Visual Studio 2013.