Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
korenhe opened this issue Jul 27, 2020 · 1 comment

Comments

@korenhe
Copy link
Contributor

korenhe commented Jul 27, 2020

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
Copy link
Owner

CI indicates ubuntu does not like this but windows is ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants