lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [lucenenet] NightOwl888 commented on issue #336: Method not found: 'System.IO.MemoryMappedFiles.MemoryMappedFile System.IO.MemoryMappedFiles.MemoryMappedFile.CreateFromFile
Date Thu, 10 Sep 2020 13:29:24 GMT

NightOwl888 commented on issue #336:

   4.8.0-beta00006 is more than a year old and has not been tested with .NET Core 3.1. Could
you please confirm this problem exists in the latest version, 4.8.0-beta00011?
   That being said, it seems unlikely that this problem can be caused by the released binaries
unless you are using a really old version of NuGet to install them (thus getting the wrong
target DLL in your project) or you are using the source code directly without the proper conditional
compilation symbols. There is a conditional section to remove the `memoryMappedFileSecurity`
parameter when using .NET Standard. For 4.8.0-beta00006, .NET Standard 2.0 would normally
be the target that is installed when the consuming project targets .NET Standard 3.1 and you
are using a recent version of NuGet to install it.
               if (input.memoryMappedFile == null)
                   input.memoryMappedFile = MemoryMappedFile.CreateFromFile(
                       fileStream: fc, 
                       mapName: null, 
                       capacity: length, 
                       access: MemoryMappedFileAccess.Read,
                       memoryMappedFileSecurity: null,
                       inheritability: HandleInheritability.Inheritable, 
                       leaveOpen: true); // LUCENENET: We explicitly dispose the FileStream
   Of course, if compiling from source, this (unintuitively) means that you will need to use
a `NETSTANDARD` compilation symbol to target .NET Core 3.1 directly, otherwise it will call
the wrong overload.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message