FluentAssertion

40 views
Skip to first unread message

Annie Costa

unread,
Oct 3, 2017, 7:31:27 AM10/3/17
to SpecRun
Hi there,

After seeing a document from Gaspar Nagy talking about FluentAssertions, we decide to use it on our test solutions.
It works fine when working on C# project using Nugets.

But I'm trying to use it in a new solution that i must upgrade to make it use Gerkhin.
This solution is using Full-Build ( http://www.full-build.io/ ) but in local I add FluentAssertions thanks to nugget to make the job before askign to the global team to make FluentAssertion to be available through FullBuild

and when I try to call the following sentence:
   Execute.Assertion.FailWith(messageToDisplay, args);

I always see on my log file:   
   [ERROR] No platform-specific assembly detected


On my csproj, i have the following linge:
 <Reference Include="FluentAssertions, Version=4.19.2.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
      <HintPath>..\packages\FluentAssertions.4.19.2\lib\net45\FluentAssertions.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="FluentAssertions.Core, Version=4.19.2.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
      <HintPath>..\packages\FluentAssertions.4.19.2\lib\net45\FluentAssertions.Core.dll</HintPath>
      <Private>True</Private>
    </Reference>

As it is in the previous project...

I dont know where the error is coming from and what I should add to make it work fine.

Can someone can help me? :(

Thanks

Andreas Willich

unread,
Oct 3, 2017, 7:53:03 AM10/3/17
to SpecRun
Hi

Sorry, I can't reproduce this error.

Perhaps if you compare it to your solution, you find a difference.

Best regards
Andreas

--
You received this message because you are subscribed to the Google Groups "SpecRun" group.
To unsubscribe from this group and stop receiving emails from it, send an email to specrun+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Annie Costa

unread,
Oct 3, 2017, 8:28:36 AM10/3/17
to SpecRun
It seems that I had to had this line in top of my csproj:
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />

And also had to add it and add FluentAssertions reference in the csproj that is using the dll of the project containing the Call of "Execute.Assertion.FailWith(messageToDisplay, args);"

.. But it seems to finally work! :D

Thanks a lot :)

Andreas Willich

unread,
Oct 3, 2017, 9:01:01 AM10/3/17
to SpecRun
You are welcome!
Reply all
Reply to author
Forward
0 new messages