0

Let's assume I've three assemblies:

  1. A.dll has no references.
  2. B.dll has a file or project reference to A.dll.
  3. C.exe has a project reference to A.dll and loads plugin B.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 and C.exe) of all three assemblies
  • and the project output / source files (B.cs and B.csproj) only of the plugin B.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.

Wollmich
  • 1,616
  • 1
  • 18
  • 46
  • It's not clear to me why you're using project output. Assuming all three go in the Application Folder in the setup project, just drag/drop all three files there from wherever they are, forget project output, and forget (what appears to be) hacking a csproj file. – PhilDW Aug 29 '17 at 20:30
  • @PhilDW: See https://msdn.microsoft.com/en-us/library/k3bb4tfd(v=vs.100).aspx section `To add the Windows-based application to the installer` point 3 and 4. – Wollmich Aug 30 '17 at 07:38
  • That's an example, not a requirement, I believe Drag and Drop individual files will solve your problem, as in my example here, old but still applies: https://www.red-gate.com/simple-talk/dotnet/visual-studio/getting-started-with-setup-projects/ – PhilDW Aug 31 '17 at 17:55

0 Answers0