lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucenenet] Xebast opened a new issue #394: Lucene.Net Nugget (4.8.0-beta00013) does not compile under Visual 2017 - Lucene.Net.CodeAnalysis.Lucene1000_TokenStreamOrItsIncrementTokenMethodMustBeSealedCSAnalyzer
Date Tue, 24 Nov 2020 15:41:39 GMT

Xebast opened a new issue #394:
URL: https://github.com/apache/lucenenet/issues/394


   Hi,
   
   I encountered issue integrating Lucene.Net Nugget (4.8.0-beta00013) in a .Net Standard
2.0 assembly.
   My builder is VS2017. 
   
   I reproduced it in simple project. 
   Just creating a .Net Standard 2.0 Library; here is csProj content 
   [LuceneClient.zip](https://github.com/apache/lucenenet/files/5590952/LuceneClient.zip)
: 
   
   ```
   <Project Sdk="Microsoft.NET.Sdk">
     <PropertyGroup>
       <TargetFramework>netstandard2.0</TargetFramework>
     </PropertyGroup>
     <ItemGroup>
       <PackageReference Include="Lucene.Net" Version="4.8.0-beta00013" />
       <PackageReference Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00013"
/>
       <PackageReference Include="Lucene.Net.QueryParser" Version="4.8.0-beta00013" />
     </ItemGroup>
     <PropertyGroup>
       <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
       <WarningsAsErrors />
     </PropertyGroup>
   </Project>
   ```
   
   _Error CS8032 An instance of analyzer Lucene.Net.CodeAnalysis.Lucene1000_TokenStreamOrItsIncrementTokenMethodMustBeSealedCSAnalyzer
cannot be created from C:\Users\sebastien\.nuget\packages\lucene.net\4.8.0-beta00013\analyzers\dotnet\cs\Lucene.Net.CodeAnalysis.CSharp.dll
: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.4.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file
specified.._	
   
   The compilation error is related to TreatWarningsAsErrors == true.
   Of course, I can Add `<NoWarn>CS8032</NoWarn>` to csproj items. But unfortunately,
if another assemblie uses this simple project, it has also to add this NoWarn atribute; so
difficult to maintain later.
   
   I checked #286 but this fix seems to be integrated in version I use (beta00013)
   
   Note that it does NOT occur VS2019 (business assembly and simple project above); but I
cannot use 2019 for the moment.
   
   Thanks for your help.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message