Skip to content

Add workaround for Rider to see the Antlr3 generated files at design time - #3518

Merged
hazzik merged 5 commits into
nhibernate:masterfrom
hazzik:antlr-rider-workaround
Apr 6, 2024
Merged

Add workaround for Rider to see the Antlr3 generated files at design time#3518
hazzik merged 5 commits into
nhibernate:masterfrom
hazzik:antlr-rider-workaround

Conversation

@hazzik

@hazzik hazzik commented Apr 4, 2024

Copy link
Copy Markdown
Member

Re-implemented Antlr's DesignTimeGrammarCompilationWorkaround task to be explicitly run by Rider in design time

I've submitted patch to Antlr, but doubt that it'll be accepted.

@hazzik
hazzik requested a review from fredericDelaporte April 5, 2024 02:04
@fredericDelaporte fredericDelaporte added this to the 5.6 milestone Apr 5, 2024
@fredericDelaporte

fredericDelaporte commented Apr 5, 2024

Copy link
Copy Markdown
Member

Can no more compile under VS:

Build started at 07:00...
1>------ Build started: Project: NHibernate, Configuration: Debug Any CPU ------
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
2>------ Build started: Project: NHibernate.DomainModel, Configuration: Debug Any CPU ------
3>------ Build started: Project: NHibernate.Test, Configuration: Debug Any CPU ------
4>------ Build started: Project: NHibernate.Test.VisualBasic, Configuration: Debug Any CPU ------
5>------ Build started: Project: NHibernate.TestDatabaseSetup, Configuration: Debug Any CPU ------
========== Build: 0 succeeded, 5 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 07:00 and took 35,886 seconds ==========

(After bin/obj and .vs purge, VS reload. Does compile again if switched back to master.)

@hazzik

This comment was marked as resolved.

@hazzik

hazzik commented Apr 5, 2024

Copy link
Copy Markdown
Member Author

@fredericDelaporte it seems now it works reliable in both VS and Rider. Could you please check?

@hazzik
hazzik merged commit f3afcf9 into nhibernate:master Apr 6, 2024
@hazzik
hazzik deleted the antlr-rider-workaround branch April 6, 2024 03:24
@hazzik hazzik added this to the 5.6 milestone Aug 1, 2024
tschu-schleupen pushed a commit to schleupen/nhibernate-core that referenced this pull request Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants