# More trouble with .Net Core App

**URL:** https://talk.remobjects.com/t/more-trouble-with-net-core-app/18221
**Category:** Elements
**Created:** [December 14, 2018, 2:26pm UTC](https://talk.remobjects.com/t/more-trouble-with-net-core-app/18221 "2018-12-14T14:26:50Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![phil2](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/p/3ab097/32.png) [@phil2](https://talk.remobjects.com/u/phil2)
#### Post date: [December 14, 2018, 2:26pm UTC](https://talk.remobjects.com/t/more-trouble-with-net-core-app/18221/1 "2018-12-14T14:26:51Z")

</div>

I’m having trouble creating Oxygene .Net Core applications again (or still). To isolate and reproduce the problem, I have used the following test procedure:

I created a new project with Water and built it and ran it with the dotnet command. It worked fine. But when I add a reference to a NuGet package, running with the dotnet command no longer works:

Original project created with Water:

```auto
C:\Users\pmunts\ConsoleApplication>make
"C:/Program Files (x86)/RemObjects Software/Elements/Bin/EBuild" "ConsoleApplication.elements" --configuration:Release
RemObjects EBuild. An open source build engine for Elements and beyond.
Copyright RemObjects Software 2016-2018. All Rights Reserved. Created by marc hoffman.
Version 10.0.0.2347 (develop) built on talax, 20181123-151848. Commit 3758baa.

   Solution 'ConsoleApplication' built successfully.

C:\Users\pmunts\ConsoleApplication>dotnet ConsoleApplication.exe
The magic happens here.

```

The I added a reference to the NuGet package libremoteio-standard (using Water) and tried again:

```auto
C:\Users\pmunts\ConsoleApplication>diff ConsoleApplication.elements.orig ConsoleApplication.elements
39a40,42
> <NuGetReference Include="libremoteio-standard:*">
> <Private>True</Private>
> </NuGetReference>

C:\Users\pmunts\ConsoleApplication>make
"C:/Program Files (x86)/RemObjects Software/Elements/Bin/EBuild" "ConsoleApplication.elements" --configuration:Release
RemObjects EBuild. An open source build engine for Elements and beyond.
Copyright RemObjects Software 2016-2018. All Rights Reserved. Created by marc hoffman.
Version 10.0.0.2347 (develop) built on talax, 20181123-151848. Commit 3758baa.

W: Package Microsoft.NETCore.App:2.2.0 has no deliverable for platform 'netcoreapp'.
   Reference 'Echoes' was resolved to 'C:\Program Files (x86)\RemObjects Software\Elements\Echoes\Reference Assemblies\NETSTandard\Echoes.dll' via XML for target 'Echoes'.
   Reference 'Elements' was resolved to 'C:\Program Files (x86)\RemObjects Software\Elements\Echoes\Reference Assemblies\NETSTandard\Elements.dll' via XML for target 'Echoes'.
   Reference 'libremoteio-standard' already was resolved to 'C:\Users\pmunts\AppData\Local\RemObjects Software\EBuild\Packages\NuGet\libremoteio-standard-1.0.6897.18860\lib\netstandard2.0\libremoteio-standard.dll' for target 'Echoes'.
   Reference 'HidSharp' already was resolved to 'C:\Users\pmunts\AppData\Local\RemObjects Software\EBuild\Packages\NuGet\hidsharp-2.0.5\lib\netstandard2.0\HidSharp.dll' for target 'Echoes'.
   RemObjects Elements (Oxygene, C#, Swift and Java) Compiler for .NET, Cocoa, Java and Island.
   Version 10.0.0.2347 (develop) built on talax, 20181123-151848. Commit 3758baa.
   Copyright 2003-2018 RemObjects Software, LLC. All rights reserved.

   Source file: C:\Users\pmunts\ConsoleApplication\Properties\Resources.Designer.pas
   Source file: C:\Users\pmunts\ConsoleApplication\Properties\Settings.Designer.pas
   Source file: C:\Users\pmunts\ConsoleApplication\Program.pas
   Source file: C:\Users\pmunts\ConsoleApplication\Properties\AssemblyInfo.pas
   Resource file: C:\Users\pmunts\AppData\Local\RemObjects Software\EBuild\Obj\ConsoleApplication-F312CC1DFED8B16B45057FBFB4E921119C4683B3\Release\Echoes\res\Properties-Resources.resources
   Reference: C:\Program Files (x86)\RemObjects Software\Elements\Echoes\Reference Assemblies\NETSTandard\Echoes.dll
   Reference: C:\Program Files (x86)\RemObjects Software\Elements\Echoes\Reference Assemblies\NETSTandard\Elements.dll
   Reference: C:\Users\pmunts\AppData\Local\RemObjects Software\EBuild\Packages\NuGet\hidsharp-2.0.5\lib\netstandard2.0\HidSharp.dll
   Reference: C:\Users\pmunts\AppData\Local\RemObjects Software\EBuild\Packages\NuGet\libremoteio-standard-1.0.6897.18860\lib\netstandard2.0\libremoteio-standard.dll
   Reference: C:\WINDOWS\assembly\GAC_MSIL\RemObjects.Elements.Cirrus\10.0.0.2347__3df3cad1b7aa5098\RemObjects.Elements.Cirrus.dll
   Reference: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll
   Solution 'ConsoleApplication' built successfully.

C:\Users\pmunts\ConsoleApplication>dotnet ConsoleApplication.exe
A JSON parsing exception occurred in [C:\Users\pmunts\ConsoleApplication\ConsoleApplication.deps.json]: Key not found
Error initializing the dependency resolver: An error occurred while parsing: C:\Users\pmunts\ConsoleApplication\ConsoleApplication.deps.json

```

I’ve uploaded the entire project, including the build artifacts but excluding the large .mdb and .pdb files:  
[ConsoleApplication.zip](https://talk.remobjects.com/uploads/default/original/2X/5/52699fb36337d7823e03279daa66ca2e6a995c47.zip) (324.8 KB)

I can’t see anything wrong with the deps file and I cannot for the life of me get dotnet to tell me **what** key it can’t find. At this point I’m stumped.

Addendum: Another oddity, that may or may not be relevant: The version of libremoteio-standard being refererenced is not the latest on nuget: Instead it is one build behind. The deps file references build 1.0.6897.18860 but the latest on NuGet is build 1.0.6915.28430, from one week ago.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [December 19, 2018, 7:39pm UTC](https://talk.remobjects.com/t/more-trouble-with-net-core-app/18221/2 "2018-12-19T19:39:06Z")

</div>

My apologies for the delayed response, somehow this slipped by me. Having a look now.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [December 19, 2018, 7:51pm UTC](https://talk.remobjects.com/t/more-trouble-with-net-core-app/18221/3 "2018-12-19T19:51:52Z")

</div>

Good news is, I can reproduce the issue.

selectively removing stuff from the Json, it seems the presence of any of these three blocks in the libraries section throws it off:

```auto
    "hidsharp/2.0.5": {
      "type": "package",
      "serviceable": false,
      "path": "hidsharp/2.0.5",
      "hashPath": "hidsharp.2.0.5.nupkg.sha512"
    },
    "libremoteio-standard/1.0.6915.28430": {
      "type": "package",
      "serviceable": false,
      "path": "libremoteio-standard/1.0.6915.28430",
      "hashPath": "libremoteio-standard.1.0.6915.28430.nupkg.sha512"
    },
    "Microsoft.NETCore.App/2.2.0": {
      "type": "package",
      "serviceable": true,
      "path": "microsoft.netcore.app/2.2.0",
      "hashPath": "/Users/mh/Library/Application Support/RemObjects Software/EBuild/Packages/NuGet/Microsoft.NETCore.App-2.2.0/microsoft.netcore.app.2.2.0.nupkg.sha512"
    }

```

but this one is fine:

```auto
    "ConsoleApplication/1.0.0": {
      "type": "project",
      "serviceable": false,
      "sha512": ""
    },

```

…

looks like its the lack of an

```auto
      "sha512": ""

```

entry that it doesn’t like. fixing…

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [December 19, 2018, 8:06pm UTC](https://talk.remobjects.com/t/more-trouble-with-net-core-app/18221/4 "2018-12-19T20:06:48Z")

</div>

Fixed. I can send you a new build in ~1-2h. Workaround unit then, manually add a `sha512` item to the deps file after the build, like this:

[ConsoleApplication.deps.json](https://talk.remobjects.com/uploads/default/original/2X/0/0cc045e9c5baebaa2b56e81fcc39eea254a40e74.json) (1.9 KB)

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [December 20, 2018, 11:28am UTC](https://talk.remobjects.com/t/more-trouble-with-net-core-app/18221/5 "2018-12-20T11:28:36Z")

</div>

Phil,

I’ve uploaded a new build to your Personal Downloads folder.

—marc

---

<div class="post-metadata">

### Author: ![phil2](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/p/3ab097/32.png) [@phil2](https://talk.remobjects.com/u/phil2)
#### Post date: [December 20, 2018, 2:23pm UTC](https://talk.remobjects.com/t/more-trouble-with-net-core-app/18221/6 "2018-12-20T14:23:16Z")

</div>

The new build works great. I can build a .Net Core app using NuGet package libremoteio-standard, and run it on Windows and Linux, including the Raspberry Pi.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [December 20, 2018, 4:25pm UTC](https://talk.remobjects.com/t/more-trouble-with-net-core-app/18221/7 "2018-12-20T16:25:35Z")

</div>

Cool! glad to hear.
