title: WPF .NET CORE 3.0 packing with Costura.Fody
body: <p>When I migrate <code>WPF</code> Project to <code>.NET CORE 3.0</code> and try to pack assemblies using <code>Costura</code> I am getting the following error:</p>
  
  <blockquote> The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.
  <br/>The program '[7980] CryptoBot.exe' has exited with code -2147450740 (0x8000808c).
  <br/>The program '[7980] CryptoBot.exe: Program Trace' has exited with code 0 (0x0).</blockquote> 
  
  <p><a href="https://i.stack.imgur.com/KzDcm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KzDcm.png" alt="enter image description here"></a></p>
  
  <p>I found out that the reason for this behavior is that <code>Costura.Fody</code> doesn't properly handle <code>*.deps.json</code> file and that it should be 'removed or modified accordingly' by me. </p>
  
  <p>There are two problems with this approach:</p>
  
  <p>First: I am using <code>database.sqlite</code> file to store the data, removing <code>*.deps.json</code> will break references to <code>e_sqlite3.dll</code> and I don't know how to modify it properly (just add sqlite basic packages using nuget to an empty project if you want to check it out):</p>
  
  <p><a href="https://i.stack.imgur.com/eFrVw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eFrVw.png" alt="enter image description here"></a></p>
  
  <p>Second: Even if it did work it doesn't produce a single <code>.exe</code> file, but rather small <code>.exe</code> and big <code>.dll</code> containing the dependencies.</p>
  
  <p>The desired result: I would like it to work exactly as it worked in <code>.NET Framework</code>, I want single <code>.exe</code> containing all the <code>.dll</code>s produced on <code>DEBUG</code> after pressing <code>CTRL</code> + <code>SHIFT</code> + <code>B</code>.</p>
  
  <p>Alternatively, I also tried this:
  <code>dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true</code>
  but it didn't seem to pack anything at all, it just placed all the <code>.dll</code>s in the <code>Release\netcoreapp3.0\win-x64</code> folder.</p>
  
  <p>I PREFER that the app is packed into SINGLE <code>.exe</code> by using <code>Costura</code> and NOT anything else.</p>