.NETCore


(Mateusz Gałązka) #1

Hi,

after some time I’m back to .NET Core with Elements

I’ve got the project you uploaded, but when I reference it to ASP.NET Core Web Application I’m getting error

Project ‘NetCoreApplication286.elements’ targets ‘.NETCore2.1’. It cannot be referenced by a project that targets ‘.NETCoreApp,Version=v2.1’.

Any idea how to reference it?


(Mateusz Gałązka) #2

Using Elements 10.0.0.2305


(Mateusz Gałązka) #3

Great success :slight_smile: Changed
.NETCore2.1
to
netcoreapp2.1
and I can reference Elements code to ASP.NET Core project :slight_smile:


(Mateusz Gałązka) #4

Success - it would be nice :slight_smile:

I’m trying to add npgsql reference to my .NETCoreApp - could you please look at this?

RemObjects.zip (441.8 KB)

Using VS C# it’s running ok, using Elements build error :frowning:


(Mateusz Gałązka) #5

Under water it builds, but do not work properly

ConsoleApplication3.zip (30.1 KB)


(Mateusz Gałązka) #6

If you’ll fix sth I’ll be happy to test it (before friday beta) because I’ve got time for it this week :slight_smile:


(marc hoffman) #7

Curious. here it fails with the rather unhelpful message:

A JSON parsing exception occurred in [/Users/mh/Downloads/ConsoleApplication3 2/bin/Debug/ConsoleApplication3.deps.json]: Key not found

(ok, but WHAT key? the JSON looks fine…)


(Mateusz Gałązka) #8

Don’t know what’s this, but found, that ASP.NET Core App builds with .NET 4.5 ClassLib and my code is running - one step forward :slight_smile:


(Mateusz Gałązka) #9

Hi,

when EBuild will build ASP.NET Core Web Application - I’ve been trying to run it using VS and MSBuild, but it’s just imposible to work with MSBuild…

Errors like

MSB4018: The “GenerateDepsFile” task failed unexpectedly.

and it’s the end… References to .NET Core project just do not work.

I want to do it all under Water and forget about VS - will you help? :wink:


(marc hoffman) #10

That’s not EBuild…

Well, just try it — what fails? Create a new .NET Core project from template. change the SDK/Runtime setting to ASP. What happens? Maybe it just works? I just haven’t gotten around to testing ASP.NET yet but in theory it should all just work the same as regular .NET Core?


(Mateusz Gałązka) #11

I know that’s no EBuild - I’ve got enough using MSBuild :slight_smile:


(Mateusz Gałązka) #12

Water -> New project Console Application (.NET Core) using C# do not build

Source code file ‘C:\Users\LHeczko\Documents\RemObjects Software\Elements\Water\ConsoleApplication7\Properties\Settings.Designer.swift’ does not exist.

It needs swift file, but its C# project - there is cs file

Oxygene project builds ok, but dont know how to translate some of C# code :slight_smile:


(marc hoffman) #13

Oops, thats a template bug, will fix. Just remove the file from the project for now?


(marc hoffman) #14

fixed.


(Mateusz Gałązka) #15

You’re right - delete helped :slight_smile:


(Mateusz Gałązka) #16

I’ve created .NET Core Console Application, added reference to NuGet Microsoft.AspNetCore.App and there is a problem with multiple references.

Type “System.Reflection.AssemblyTitleAttribute” is defined in multiple references: System.Runtime, System.Runtime

When I look into References there is Microsoft.AspNetCore.App and Microsoft.NETCore.App - just like in VS - one difference - I can count on you :slight_smile:

Test case:
ConsoleApplication8.zip (103.0 KB)

Please look at this :slight_smile:


(marc hoffman) #17

I believe you dont want to add this reference, you just want to set the runtime, eg:


(Mateusz Gałązka) #18

Maybe :slight_smile: But under VS both of this are in references.


(marc hoffman) #19

Yeah, I don’t care about VS right now :wink:


(Mateusz Gałązka) #20

You’re right - sorry - just trying to notice difference