In Debug Mode I am getting a "Could not load file or assembly" error when I try to run my Visual C++ CLI application in debug. Release works
<p>We're working on a programme for an internship but lacking an expert in C++/CLI. The programme compiles and works in release. The programme compiles in debug but on launch crashes with this error:</p>

<blockquote>
  <p>Additional information: Could not load file or assembly ', Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Could not find or load a type. (Exception from HRESULT: 0x80131522). </p>
</blockquote>

<p>In the Disassembly window it shows it stops at <code>_NtWaitForSingleObject@12</code>. The project uses managed and unmanaged code. The project uses boost and armadillo. Build configuration targets win32 only.</p>

<p>These are the last few lines of the output window before crash:</p>

<blockquote>
  <p>First-chance exception at 0x75524598 (KernelBase.dll) in hydro_stats.exe: Microsoft C++ exception: EETypeLoadException at memory location 0x00d3e278.</p>
  
  <p>First-chance exception at 0x75524598 (KernelBase.dll) in .exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.</p>
  
  <p>First-chance exception at 0x75524598 (KernelBase.dll) in .exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.</p>
  
  <p>First-chance exception at 0x75524598 (KernelBase.dll) in .exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.</p>
  
  <p>First-chance exception at 0x75524598 (KernelBase.dll) in .exe: Microsoft C++ exception: EEFileLoadException at memory location 0x00d3d5c8.</p>
  
  <p>An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module.</p>
</blockquote>

<ul>
<li>String pooling is enabled with /GF.</li>
<li>We've tried clean solution many times.</li>
<li>We had clues from fuslog.exe saying system.dll and system.core.dll did not load properly.</li>
<li>We've tried updating to .NET framework 4.6.1.</li>
<li>Sometimes individually we can stop the error with undo in team explorer, continue to code with the debug working but when work is committed to SVN, the error comes back.</li>
<li>Tried Tools -> Options -> Debugging -> General -> Enable Just My Code.</li>
</ul>

<p>Sometimes we think its our code sometimes we think its the project configuration. Thank-you for your time, more info will be provided upon request. </p>

<p>EDIT:
fuslogvw says system and system.core are not binding correctly:
<strong>* Assembly Binder Log Entry  (2016-06-14 @ 1:33:02 PM) *</strong></p>

<p>The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.</p>

<p>Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.exe
--- A detailed error log follows. </p>

<p>=== Pre-bind state information ===</p>

<pre><code>LOG: DisplayName = System
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: System | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is       provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Program Files (x86)/MSBuild/12.0/bin/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MSBuild.exe
</code></pre>

<h1>    Calling assembly : Microsoft.Build.Tasks.v12.0, Version=12.0.0.0,    Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.</h1>

<pre><code>LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files   (x86)\MSBuild\12.0\bin\MSBuild.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from   C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom,  partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System/System.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System/System.EXE.
LOG: All probing URLs attempted and failed.
</code></pre>

<p>If i understand well i have to give more specifics for the name, version, culture, and public key token but i'm not sure where in the .vcxproj or MSBuild.exe.config</p>