EBuild: Referencing .net standard by mistake

(JohnMoshakis) #1

I have the target framework set


and I’ve added a nuget reference

<NuGetReference Include="Newtonsoft.Json:[9.0.1]" />

It looks to me as though its referencing .net standard v1

Shouldnt it just fall back to .net 4.5 ?

This is the projectNewtonConsoleApplication.zip (35.0 KB)


EBuild schedule
(marc hoffman) #2

Now sure what i’m supposed to look at in the screenshot.

(marc hoffman) #3

it resolved to the net45 subfolder for me. which seems correct?

(JohnMoshakis) #4

Then I’m confused. I thought that everything under Newtonsoft.Json was its references and I would therefore only see one reference which was itself.

(marc hoffman) #5

everything under Newtonsoft.Jsaon wa pulled in by that reference, yes. but aside from that, think of all references as a flat list. each one will be expanded on its own, according to the same rules and using the best may thing binary for each reference. if a reference only has a net standard binary but no net45 one, that will be used.

but maybe i’m misunderstanding the problem/confusion?

(JohnMoshakis) #6

Based on what the nuget page says, when Im targeting .net 4.5 I thought it only needs newtonsoft.json.

Why is everything else being pulled in ?

If it did have system references wouldnt they come from mono ?

(marc hoffman) #7

no idea. i’ll check.

How to Create .Net Standard Project