On the Lucene.Net GitHub page (https://github.com/apache/lucenenet), it says that version 4.8.0 (the beta version currently available on GitHub) is compatible with the .Net Standard 1.5 and .Net 4.5.1 frameworks. Fantastic!
I did a git clone https://github.com/apache/lucenenet.git to pull the code. The solution opened right up and compiled in Visual Studio 2017 with no errors under the default framework of .NET 4.5.1. All is well thus far.
What I really need is to compile Lucene.NET 4.8.0 to work with .NET Core 1.1.x. This is where things kind of went a bit sideways.
When I opened up the properties page for the Lucene.Net project (as well as the many other included projects), they are all referencing the default .NET 4.5.1. There does not appear to be any option to reference .NET Standard 1.x or .NET Core 1.x.y instead of a standard .NET framework version.
I am sure this must be a really simple fix, but I am at a bit of a loss as to how get Lucene.Net working with .Net Standard / .Net Core.
Here are a few quick notes that might be of interest.
- The latest
Dot Net Core SDKis installed on my machine. - I installed the
NetStandard.Libraryto all projects usingNuGet Package Manager. (TheNetStandard.Libraryappears in the references for all projects with a blue and white icon. The solution still compiles but I am unable to drill down and see the constituent files in theNetStandard.Libraryas I can with other.NET Standardor.NET Coreprojects.) - I ran
dotnet restorejust in case that might have been needed to pull the various files needed for theNetStandard.Library. All of the projects in the solution contain
[projectname].project.jsonfiles. After installing the NetStandard.Library to each project, there is now a dependencies entry in the[projectname].project.jsonfile."dependencies": { "NETStandard.Library": "1.6.1" }
I did attempt to update just the
frameworkentry in theLucene.Net.project.jsonfile to use.NETStandard,Version=1.5and then recompile only theLucene.Netproject. I ended up with several compile errors so I reverted the entry to its orginal value ofnet451.- There is no
.csprojfile for any of the projects. I did not attempt to rundotnet migrateas I was unsure if it was necessary, and I did not want to introduce additional variables.
Any help here is much appreciated. Thank you so much!