System.Buffers part 2

yeah i feel like this is reverting something but i don’t remember what for :). Could you do a zip build ?

1 Like

Started.

I compared visual studio against Water and the System.Buffers are the same but I have 2 problems

visual studios has more dlls

04/29/2020 05:49 PM 21,216 Microsoft.Win32.Primitives.dll
04/29/2020 05:49 PM 98,616 netstandard.dll
04/29/2020 05:49 PM 21,176 System.AppContext.dll
05/15/2018 01:29 PM 28,304 System.Buffers.dll
04/29/2020 05:49 PM 21,224 System.Collections.Concurrent.dll
04/29/2020 05:49 PM 21,696 System.Collections.dll
04/29/2020 05:49 PM 21,224 System.Collections.NonGeneric.dll
04/29/2020 05:49 PM 21,224 System.Collections.Specialized.dll
04/29/2020 05:49 PM 21,192 System.ComponentModel.dll
04/29/2020 05:49 PM 21,768 System.ComponentModel.EventBasedAsync.dll
04/29/2020 05:49 PM 21,752 System.ComponentModel.Primitives.dll
04/29/2020 05:49 PM 22,784 System.ComponentModel.TypeConverter.dll
04/29/2020 05:49 PM 21,160 System.Console.dll
04/29/2020 05:49 PM 154,448 System.Data.Common.dll
04/29/2020 05:49 PM 21,736 System.Diagnostics.Contracts.dll
04/29/2020 05:49 PM 21,208 System.Diagnostics.Debug.dll
04/29/2020 05:49 PM 21,248 System.Diagnostics.FileVersionInfo.dll
04/29/2020 05:49 PM 21,728 System.Diagnostics.Process.dll
04/29/2020 05:49 PM 23,936 System.Diagnostics.StackTrace.dll
04/29/2020 05:49 PM 21,280 System.Diagnostics.TextWriterTraceListener.dll
04/29/2020 05:49 PM 21,208 System.Diagnostics.Tools.dll
04/29/2020 05:49 PM 21,744 System.Diagnostics.TraceSource.dll
04/29/2020 05:49 PM 31,608 System.Diagnostics.Tracing.dll
04/29/2020 05:49 PM 21,208 System.Drawing.Primitives.dll
04/29/2020 05:49 PM 22,224 System.Dynamic.Runtime.dll
04/29/2020 05:49 PM 21,744 System.Globalization.Calendars.dll
04/29/2020 05:49 PM 21,192 System.Globalization.dll
04/29/2020 05:49 PM 25,992 System.Globalization.Extensions.dll
04/29/2020 05:49 PM 110,944 System.IO.Compression.dll
04/29/2020 05:49 PM 21,224 System.IO.Compression.ZipFile.dll
04/29/2020 05:49 PM 21,144 System.IO.dll
04/29/2020 05:49 PM 21,192 System.IO.FileSystem.dll
04/29/2020 05:49 PM 21,232 System.IO.FileSystem.DriveInfo.dll
04/29/2020 05:49 PM 21,232 System.IO.FileSystem.Primitives.dll
04/29/2020 05:49 PM 21,224 System.IO.FileSystem.Watcher.dll
04/29/2020 05:49 PM 21,208 System.IO.IsolatedStorage.dll
04/29/2020 05:49 PM 21,216 System.IO.MemoryMappedFiles.dll
04/29/2020 05:49 PM 21,168 System.IO.Pipes.dll
04/29/2020 05:49 PM 21,232 System.IO.UnmanagedMemoryStream.dll
04/29/2020 05:49 PM 21,152 System.Linq.dll
04/29/2020 05:49 PM 22,224 System.Linq.Expressions.dll
04/29/2020 05:49 PM 21,192 System.Linq.Parallel.dll
04/29/2020 05:49 PM 21,192 System.Linq.Queryable.dll
04/29/2020 05:49 PM 198,472 System.Net.Http.dll
04/29/2020 05:49 PM 21,208 System.Net.NameResolution.dll
04/29/2020 05:49 PM 22,248 System.Net.NetworkInformation.dll
04/29/2020 05:49 PM 21,168 System.Net.Ping.dll
04/29/2020 05:49 PM 22,216 System.Net.Primitives.dll
04/29/2020 05:49 PM 21,184 System.Net.Requests.dll
04/29/2020 05:49 PM 21,696 System.Net.Security.dll
04/29/2020 05:49 PM 30,544 System.Net.Sockets.dll
04/29/2020 05:49 PM 21,232 System.Net.WebHeaderCollection.dll
04/29/2020 05:49 PM 21,224 System.Net.WebSockets.Client.dll
04/29/2020 05:49 PM 21,192 System.Net.WebSockets.dll
04/29/2020 05:49 PM 21,696 System.ObjectModel.dll
04/29/2020 05:49 PM 22,200 System.Reflection.dll
04/29/2020 05:49 PM 21,224 System.Reflection.Extensions.dll
04/29/2020 05:49 PM 21,736 System.Reflection.Primitives.dll
04/29/2020 05:49 PM 21,200 System.Resources.Reader.dll
04/29/2020 05:49 PM 21,232 System.Resources.ResourceManager.dll
04/29/2020 05:49 PM 21,200 System.Resources.Writer.dll
04/29/2020 05:49 PM 21,784 System.Runtime.CompilerServices.VisualC.dll
04/29/2020 05:49 PM 29,360 System.Runtime.dll
04/29/2020 05:49 PM 21,720 System.Runtime.Extensions.dll
04/29/2020 05:49 PM 21,200 System.Runtime.Handles.dll
04/29/2020 05:49 PM 24,296 System.Runtime.InteropServices.dll
04/29/2020 05:49 PM 28,624 System.Runtime.InteropServices.RuntimeInformation.dll
04/29/2020 05:49 PM 21,200 System.Runtime.Numerics.dll
04/29/2020 05:49 PM 21,264 System.Runtime.Serialization.Formatters.dll
04/29/2020 05:49 PM 21,240 System.Runtime.Serialization.Json.dll
04/29/2020 05:49 PM 27,048 System.Runtime.Serialization.Primitives.dll
04/29/2020 05:49 PM 24,816 System.Runtime.Serialization.Xml.dll
04/29/2020 05:49 PM 21,200 System.Security.Claims.dll
04/29/2020 05:49 PM 47,016 System.Security.Cryptography.Algorithms.dll
04/29/2020 05:49 PM 21,240 System.Security.Cryptography.Csp.dll
04/29/2020 05:49 PM 21,256 System.Security.Cryptography.Encoding.dll
04/29/2020 05:49 PM 21,784 System.Security.Cryptography.Primitives.dll
04/29/2020 05:49 PM 22,832 System.Security.Cryptography.X509Certificates.dll
04/29/2020 05:49 PM 21,208 System.Security.Principal.dll
04/29/2020 05:49 PM 22,392 System.Security.SecureString.dll
04/29/2020 05:49 PM 21,696 System.Text.Encoding.dll
04/29/2020 05:49 PM 21,232 System.Text.Encoding.Extensions.dll
04/29/2020 05:49 PM 21,232 System.Text.RegularExpressions.dll
04/29/2020 05:49 PM 22,192 System.Threading.dll
04/29/2020 05:49 PM 37,752 System.Threading.Overlapped.dll
04/29/2020 05:49 PM 22,224 System.Threading.Tasks.dll
04/29/2020 05:49 PM 21,232 System.Threading.Tasks.Parallel.dll
04/29/2020 05:49 PM 21,200 System.Threading.Thread.dll
04/29/2020 05:49 PM 21,216 System.Threading.ThreadPool.dll
04/29/2020 05:49 PM 21,200 System.Threading.Timer.dll
04/29/2020 05:49 PM 24,240 System.ValueTuple.dll
04/29/2020 05:49 PM 21,712 System.Xml.ReaderWriter.dll
04/29/2020 05:49 PM 21,696 System.Xml.XDocument.dll
04/29/2020 05:49 PM 21,712 System.Xml.XmlDocument.dll
04/29/2020 05:49 PM 21,712 System.Xml.XmlSerializer.dll
04/29/2020 05:49 PM 21,176 System.Xml.XPath.dll
04/29/2020 05:49 PM 22,904 System.Xml.XPath.XDocument.dll
97 File(s) 2,665,296 bytes
0 Dir(s) 268,446,437,376 bytes free

I dont get it, the nuget page

says no references

and I get this

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly ‘System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at PoolConsoleApplication.Program.Main(String[] args)

There is no binding redirect in the visual studio app

Do you think when you add a .net standard lib you have to add every other dlls in net standard ?

To a .NET Framework app? Most definitely not, as that Woodmere duplicate and confuse all of the standard types.

I’ll have a more detailed look tomorrow or, more likely, Sunday. But I’d say this is a new issue?

If you look at what I posted, thats what visual studio appears to be doing.

I can no longer tell whats new and what isnt :slight_smile:

I tried to build my big web app in Water and that had issues. Im waiting for the zip build to appear so I can work on my mac before I investigate. From the brief look I took, they look sort of familiar :frowning:

Hi,

So I added System.Buffers 4.5.0 to a visual studio console app and to one created in Fire. Both are .net 4.7

I used Jetbrains dotpeek on them both and vs has a reference of 4.0.3 and ebuild 4.0.2.

in nuget the ref version is 4.0.2 but the lib version is 4.03, so I think thats why I get the FileLoadException.

I dont know how references are added to the exe but I think it should use whats copied to the lib folder rather than the version from the ref ?

Cheers,
John

That’s not how references work,.

Why is this, of all things, a new thread about the same issue?

Hi,

So I added System.Buffers 4.5.0 to a visual studio console app and to one created in Fire. Both are .net 4.7

I used Jetbrains dotpeek on them both and vs has a reference of 4.0.3 and ebuild 4.0.2.

in nuget the ref version is 4.0.2 but the lib version is 4.03, so I think thats why I get the FileLoadException.

I dont know how references are added to the exe but I think it should use whats copied to the lib folder rather than the version from the ref ?

Cheers,
John

If you compare it to visual studio it looks like the right file is being copied so when I run I shouldn’t get the FileLoadException.
Isnt there metadata in the exe that contains what versions it wants and thats what dotpeek is using ?

There is, yes, but that comes from the version of the dll passed to the compiler.

Shouldnt the two console apps have the same version ?

No idea?

Hi,

This is new with 2516

E: Unknown type “ComVisible” [/Users/JohnMoshakis/Documents/develop/Echoes/SailingLog/SailingLogSelfHosted/Properties/AssemblyInfo.pas (20)]
E: Type “System.Reflection.AssemblyDelaySignAttribute” is defined in multiple references: System.Runtime, mscorlib [/Users/JohnMoshakis/Documents/develop/Echoes/SailingLog/SailingLogSelfHosted/Properties/AssemblyInfo.pas (47)]

It occurs with a .net 4.7 console app, that contains .net standard references. I dont yet know what causes the issue.

Untitled-2.zip (17.2 KB)

Cheers,
John

I do, the experimental change for the Buffers thing.

I meant how to reproduce it

FWIW, this is exactly what i expect would happen if we reference too many .NET Standard dll, because basic system types from mscorlib and System.dll live in different .dlls, on .NET Standard and .NET Core. Because, why be consistent and sane.

My guess, without having looked at your project yet, that we’re triggering the thing i said probably got broken by the other change, and then base .NET Standard package is now being pulled in for this project, causing the conflict. IOW, as i expected, the fix i did for the other issue regressed this.

The fix in the build you have was never meant or expected to be fully functional; I’ll need to have a look on Monday. Can we try to not open 5 new threads on this topic, in the mean time?

I cannot unzip this, just gives me an a single file called “Untitled-2”.

Sure you’re not comparing .NET Core in VC# to .NET in Elements? This looks a hell of a lot like the file list for .NET Core.

Its just the log file. As I mentioned I didnt know which reference broke everything, I tried a console app, with a standard project that referenced buffers but that worked. The solution is my biggest one, I dont mind sending it you ?