System.Buffers isn’t copied local so the console app wont run.
I recall the problems I had last time with reference assemblies.
I think there is still an issue and somehow it needs to get copied to the bin folder. From reading the thread it doesn’t copy the lib if its .net standard, I dont really know what to suggest.
I know. they this error is precisely the reverse of the previous one. Since none of this is documented how it’s supposed to work, I really have no idea what to do here…
K, that’s a lede that has been buried well for the past 17 days in this thread, as that seems to be the difference between this and the previous issue :(.
What I have done now, is for .NET only, if a reference is only resolved from ref, (and it or its parent was CopyLocal), I’ll copy it. I’m not sure if thats the correct fix since that results in a whole bunch of extra copies that sound to me like they should conflict with whats already in the regular framework, but who knows.
Well, thats what was happening before. Buffers only exists in ref. I cannot “never copy ref” and still give you the copy your project seem to need. You understand my confusion, right?
the difference here is that this one is common from net45, not netstandard20. not sure if thats the distillery gushing marker? (maybe one coming from netcoreXX should also be copied? We’ll never know until we hit a case…
Using ms tools
I created a .net core console app, added the nuget and it doesnt add it to the bin folder. I also created .net 4.7 web apps, one with system.text.json and the other with Microsoft.Azure.ServiceBus and they both had system.buffers in the bin folder
This stackoverflow post has a few more details about what the difference is
It is used to allow .NET Standard libraries to run on partly-compatible versions of .NET Framework. It works by adding the implementation assemblies to the build output - but these are a special as they only forward to corresponding .NET Framework types and add API surface that throws PlatformNotSupportedException for types that are available in .NET Standard but not implemented by the .NET Framework. E.g. a .NET Standard 1.* library would reference System.Object from System.Runtime.dll and a .NET Standard 2.0 library would reference it from netstandard.dll . The Microsoft.NET.Build.Extensions contains both a System.Runtime.dll and a netstandard.dll that contain type forwarding declarations to forward to .NET Framework’s mscorlib.dll .