Doraku/DefaultEcs.Analyzer

Type or Namespace was not found

Closed this issue · 2 comments

When installing this packet via nugget and trying out one of the examples... it seems like rider does not find the [Update] tags and is not able to run the project...

Type or namespace [Update] was not found

Any idea how we might solve this ?

This package use Roslyn code generator which were added last year with net5. The generator will create some attribute for you (like DefaultEcs.System.UpdateAttribute) to decorate your method and further generate code for you.
It is fully integrated in VisualStudio and the compiler (so dotnet build also works) but it seems Rider is lagging behind :/ I found this issue https://youtrack.jetbrains.com/issue/RIDER-46389 which says it is supposed to work now but may require you to close and reopen the solution after adding the package reference. I hope they fix it for good as it is really handy for some cases and works far better than other code generation I have encountered in my past experiences.

edit:
Since this was added with c#9 maybe try adding a <LangVersion>latest</LangVersion> in a <PropertyGroup> of your csproj just in case? They even made a blog post about it https://blog.jetbrains.com/dotnet/2020/11/12/source-generators-in-net-5-with-resharper/ it would be strange if it wasn't working on Rider yet :/

This package use Roslyn code generator which were added last year with net5. The generator will create some attribute for you (like DefaultEcs.System.UpdateAttribute) to decorate your method and further generate code for you. It is fully integrated in VisualStudio and the compiler (so dotnet build also works) but it seems Rider is lagging behind :/ I found this issue https://youtrack.jetbrains.com/issue/RIDER-46389 which says it is supposed to work now but may require you to close and reopen the solution after adding the package reference. I hope they fix it for good as it is really handy for some cases and works far better than other code generation I have encountered in my past experiences.

edit: Since this was added with c#9 maybe try adding a <LangVersion>latest</LangVersion> in a <PropertyGroup> of your csproj just in case? They even made a blog post about it https://blog.jetbrains.com/dotnet/2020/11/12/source-generators-in-net-5-with-resharper/ it would be strange if it wasn't working on Rider yet :/

Thanks a lot for your help ! You are the best :) I could finally solved it... i also needed to update the dot net runtime to make it work properly... but now its working fine ! Keep up the great work !