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

Notification

Icon
Error

NCrunch cannot seem to build the unittest project
Dirk Maegh
#1 Posted : Monday, March 13, 2023 8:48:33 AM(UTC)
Rank: Advanced Member

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

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

I have a project that references a source generator project.
I would like to unittest the source generator.

But the unittest project fails to build in NCrunch.
Am I missing something ?

The project reference is the following
<ItemGroup>
<ProjectReference Include="..\OpenApi.Generators\OpenApi.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
</ItemGroup>

I have a sample solution ready, if needed - where should I send it please ?

Best regards,
Dirk
Remco
#2 Posted : Monday, March 13, 2023 11:10:13 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Dirk,

Thanks for sharing this issue.

You can upload the sample solution through the NCrunch contact form (Must be less than 10MB).

Are you able to share the build error here?
Dirk Maegh
#3 Posted : Monday, March 13, 2023 7:22:58 PM(UTC)
Rank: Advanced Member

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

Thanks: 8 times
Was thanked: 8 time(s) in 8 post(s)
The full error is:
NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/d...ng_project-build-issues
NCrunch: This project was built on server '(local)'
ServiceBuilderGeneratorTests.cs (15, 52): The type or namespace name 'ServiceBuilderGenerator' could not be found (are you missing a using directive or an assembly reference?)

But it is less meaningful, if one does not have the code, so I thought not to post it initially.

I had brought my solution already down to 12K, so no problem :)
Remco
#4 Posted : Tuesday, March 14, 2023 5:51:50 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks for sending through the sample solution. I've reproduced the issue exactly as described. I'm not sure at the moment if this is caused by changed behaviour in the platform, or if we missed something when we added special handling for analyzers, but this will require a code-fix to NCrunch. I'll let you know as soon as we have a build available including the fix.
Remco
#5 Posted : Wednesday, March 15, 2023 5:08:03 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Dirk Maegh
#6 Posted : Wednesday, March 15, 2023 8:05:49 AM(UTC)
Rank: Advanced Member

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

Thanks: 8 times
Was thanked: 8 time(s) in 8 post(s)
Seems to work fine now.
Thx!
1 user thanked Dirk Maegh for this useful post.
Remco on 3/15/2023(UTC)
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.048 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download