Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>1)</strong> You can switch between references for different build configurations if you do it manually by editing the .csproj file.</p> <p>The csproj file is an MSBuild script which is XML. If you browse down it you should find a &lt;ItemGroup&gt; element that contains a bunch of &lt;Reference&gt; elements. You can add a condition to one of these reference elements like this:</p> <pre><code>&lt;Reference Condition=" '$(Configuration)' == 'Debug' " Include="System.Drawing" /&gt; </code></pre> <p>The Include attribute can contain the full strong name of the assembly, which may not necessarily be different for the debug and release builds of your binary. In which case, you can add a &lt;HintPath&gt; element to include the path to the .dll.</p> <pre><code>&lt;Reference Include="assembly strong name"&gt; &lt;HintPath&gt;c:\LibraryStuff\Debug\Library.dll&lt;/HintPath&gt; &lt;/Reference&gt; </code></pre> <p>Your hint path can also be relative:</p> <pre><code>&lt;HintPath&gt;..\..\LibraryStuff\Debug\Library.dll&lt;/HintPath&gt; </code></pre> <p>[Disclaimer: I've never actually done this with references though, I can't guarantee there won't be issues. I quickly tested it out and it seems to work fine, although visual studio does display both the references no matter which build config you have selected (although it only builds the one for the matching config type). It also puts a warning icon on the second one if they have matching names, but the compile seems to work fine.]</p> <p>If you do have problems, you could try just having one reference with two different HintPath nodes and putting the conditional on the hint path.</p> <hr> <p><strong>2)</strong> Provided you have the .pdbs and the source code all in the correct places and accessibly, you should just be able to debug straight through into the library by just stepping into the code even though you are only referencing the .dll file.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload