The title might sound a little bit strange.
With .NET SDK Project Style it's possible to define more than one TargetFramework.
I already worked with projects that have multiple TargetFrameworks. The tests are working and everything looks fine.
This Project + Test both have the same TargetFrameworks defined.
So what exactly is my problem?
We're developing libraries for an application that limits target framework to .net 4.6.2.
On the other side we're using JustMock that raised framework to 4.7.2 with their latest release.
If I define TargetFramework of my project with net462 and reference it in my test project with TargetFramework, NCrunch tells me that net472 is not defined in project.assts.json - what is true.
Btw: This works with non-sdk project style.
Therefore I've tried to define TargetFrameworks with net472;net462 but now this results in "The target "_SplitProjectReferencesByFileExistence" does not exist in the project.
Does someone have an idea how to solve this problem?
This is also not working :-D
Quote:
<PropertyGroup Condition="'$(NCrunch)' == '1'">
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(NCrunch)' != '1'">
<TargetFramework>net462</TargetFramework>
</PropertyGroup>