Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

SourceGenerator
Dirk Maegh
#1 Posted : Friday, February 19, 2021 2:10:21 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 11/30/2016(UTC)
Posts: 48
Location: Belgium

Thanks: 6 times
Was thanked: 7 time(s) in 7 post(s)
Hi,

I am working on a source generator now.
Is there a way to get NCrunch to work on this one please ?

https://github.com/dotne...CSharp/SourceGenerators

I made a copy of these projects, upgraded to dotnet5 and made that work.
Then I added a source generator to the project SourceGeneratorSamples.

I added a unit test project (xunit) to test my new source generator.
In my test project, I will create a GenerationContext via invoking the internal constructor etc.
So I could create a ISourceGenerator and test it. There's no problem in that. NCrunch runs those without issue.

So these tests run, but the generated project (the one that uses the generated code - in the url, that would be the GeneratedDemo) does not compile with ncrunch.
If I wanted to write a test for classes in this GeneratedDemo project, I would not be able to execute them with ncrunch. (and that will be my next focus, I guess, like in a week or two)

Thx,
Dirk
Remco
#2 Posted : Friday, February 19, 2021 11:29:30 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Dirk,

Last month we did an assessment of the Roslyn based source generators to see if we could find a way to support them (see here).

Unfortunately, the platform is not yet ready for us to integrate with. We will re-assess when it is closer to RTM.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.025 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download