Struggling with getting a Xamarin project with .NET Standard project to build

xamarin
#21

Thanks so much for these details @freever! Should be well enough for us to properly investigate this :slight_smile: Will keep you in the loop about it!

0 Likes

#22

We’ve fixed this error in the latest (1.4.1) release: https://github.com/bitrise-steplib/steps-nunit-runner/releases/tag/1.4.1

2 Likes

#23

@tamaspapik when this can be available? The latest version we see is 1.4.0

0 Likes

#24

Really sorry about that! I re-ran the release process. It will be available within the next 30 minutes. For sure!
Thanks for the feedback! :rocket:

0 Likes

#25

@tamaspapik the fix doesn’t work for us.

The thing is our project and the one attached by freever (https://github.com/freever/BitriseNunitTestRepo) are using the new way of referencing nugets. Instead of package.config the packages are references from the csproj.

That lead to the differences in the UnitTest project. Instead of <Reference Include="nunit.framework"> there is <PackageReference Include="NUnit">.
So the NUnit project can’t be detected.

This issue is fixed in the go-xamarin repo: https://github.com/bitrise-io/go-xamarin/blob/b4423590eb839704cbbe1e76e28e86bef4b6227a/analyzers/project/project_parser.go#L369

But the step using outdated go-xamarin version: https://github.com/bitrise-steplib/steps-nunit-runner/tree/master/vendor/github.com/bitrise-tools/go-xamarin/analyzers/project

Do you think this might be the reason?

0 Likes

#26

For those who are looking for a temporary solution to make sure your unit-test projects run:

  • add <!-- Include="nunit.framework" --> line somewhere in your Unit-Test csproj file
1 Like