zhouqingqing / qpmodel

A Relational Optimizer and Executor
MIT License
64 stars 18 forks source link

VS2019 on mac occasionally meets antlr generate java files instead of csharp files #166

Open korenhe opened 3 years ago

korenhe commented 3 years ago

This patch may help, but not work on other platform

diff --git a/qpmodel/qpmodel.csproj b/qpmodel/qpmodel.csproj
index db3c017..a648932 100644
--- a/qpmodel/qpmodel.csproj
+++ b/qpmodel/qpmodel.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <TargetFramework>netcoreapp3.1</TargetFramework>
+    <Antlr4UseCSharpGenerator>True</Antlr4UseCSharpGenerator>
     <OutputType>Exe</OutputType>
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <PublishUrl>publish\</PublishUrl>
@@ -39,10 +40,11 @@
     <LangVersion>8.0</LangVersion>
   </PropertyGroup>
   <ItemGroup>
-    <Antlr4 Update="SQLite.g4">
+    <Antlr4 Include="SQLite.g4">
       <Generator>MSBuild:Compile</Generator>
       <CustomToolNamespace>qpmodel.sqlparser</CustomToolNamespace>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+      <TargetLanguage>CSharp</TargetLanguage>
     </Antlr4>
   </ItemGroup>
   <ItemGroup>
zhouqingqing commented 3 years ago

CI indicates ubuntu does not like this but windows is ok