.NetCore2.2 target framework

(JohnMoshakis) #1


If I create a .Net Core console app the target framework shows up as .Net unexpected value in settings.

It references .Net core.App:2.2.0

I can build and run fine from a console.

If I select .NetCore2.2 in the target framework dropdown, when I run from the console I get

dotnet ConsoleApplication8.exe

A JSON parsing exception occurred in [/Users/JohnMoshakis/Documents/develop/Echoes/Core/ConsoleApplication8/Bin/Debug/ConsoleApplication8.deps.json]: Key not found

Error initializing the dependency resolver: An error occurred while parsing: /Users/JohnMoshakis/Documents/develop/Echoes/Core/ConsoleApplication8/Bin/Debug/ConsoleApplication8.deps.json

Changing it to .NetCore2.1 and it runs fine

Its odd, the sdk version and run version number doesnt change.

This is the file

ConsoleApplication8.deps.json (4.0 KB)


(JohnMoshakis) #2

Sorry my bad, I installed the stable version by mistake.

(JohnMoshakis) #3

Actually I am getting this error with the latest.

(marc hoffman) #4

What am I missing?

is that the Runtime Version thats set to 2.2.0? I currently have 2.1.2 as the highest here, but this depends on your local install let me check there these are gathered from… It uses the subfolders in /usr/local/share/dotnet/shared/X (where X is the name of the Runtime you selected in that option, eg “Microsoft.NETCore.App”).

Any folder that exists there when Fire launches should be shows as valid option for the “Runtime Version” setting.

the values for the TargetFramework are hardcoded based on known versions, and should include “3.0”, “2.2”, “2.1”, “2.0”, “1.6” for .NETCore.

(JohnMoshakis) #5

Sorry Im not able to reproduce the parsing error :frowning:

Whats the importance of target framework ?

It seems like if I pick runtime version and then sdk version, I get messages about no deliverables until I pick the right one

W: Package <NameAndVersion = Microsoft.NETCore.DotNetHostPolicy:2.2.0> has no deliverable for platform ‘netcoreapp 3.0’.
W: Package <NameAndVersion = Microsoft.NETCore.DotNetHostResolver:2.2.0> has no deliverable for platform ‘netcoreapp 3.0’.
W: Package <NameAndVersion = Microsoft.NETCore.DotNetAppHost:2.2.0> has no deliverable for platform ‘netcoreapp 3.0’.

Can target framework be worked out from runtime version ?

(marc hoffman) #6

Well, it defines what framework (.NET Core, .NET Standard, “Full” .NET Framework) you build for, and what version. it’s what distinguishes a .NET Core project from a “regular” .NET one.

Not surprising, given that .NET Core 3.0 isn’t out yet, afaik?

What’s the exact settings you have? RuntimeVersion=2.2.0, I assume (whether explicitly set, or implied because it’s the highest one found on tour system), and TargetFramework=.NETCore3.0? Try setting the latter to .NETCore2.2 (or is 2.1 the latest official — I lose track of all these numbers…) instead.

No, thats a totally separate version number. Welcome to Microsoft.

(marc hoffman) #7

Oddly, I don’t get that error here, even when I set the target to .NETCore 3.0 (and Runtime to 2.2.0, which I just installed here, myself). All builds fine and sues the Microsoft.NETCore.App:2.2.0 package…