Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Core Issues With Latest Version (2.3.0.759) #154

Open
Axemasta opened this issue Dec 7, 2020 · 2 comments
Open

.NET Core Issues With Latest Version (2.3.0.759) #154

Axemasta opened this issue Dec 7, 2020 · 2 comments

Comments

@Axemasta
Copy link

Axemasta commented Dec 7, 2020

I was doing some routine package updates in my project and noticed upgrading from 2.1.0.714 to 2.3.0.759 causes my unit test project to no longer build.

I've been able to replicate my issue in a fresh project, a blank forms app and a .NET Core 3.1 Unit Test project. If you target the older pancake view version the whole solution builds and the test project runs. If you upgrade to the latest stable version the package restores with warnings and you see the following errors/warnings when building:

/usr/local/share/dotnet/sdk/3.1.404/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(5,5): 
Error NETSDK1073: 
The FrameworkReference 'Microsoft.WindowsDesktop.App' was not recognized (NETSDK1073) (UnitTestCore.Tests)
Warning NU1701: Package 'OpenTK 3.0.1' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. 
This package may not be fully compatible with your project. (NU1701) (UnitTestCore.Tests)

Since the change to .NET 5 I have noticed this error in a few places, I have fixed most of the errors by using a global.json pointed to .NET Core 3.1 however the issue persists with this single library. I wonder if the MSBuild.Sdk.Extras version needs to be updated to the latest version (I believe is now 3.0.22).

I have provided the reproduction project, if you swap between the versions you should be able to see the issue PancakeViewBreakUnitTestCore.zip.

@AlejandroRuiz
Copy link

Hey theres a workaround for this you can add the next line into your csproj

<PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>

    <!-- Add This Line -->
    <GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>

seems that is something related to the pancakeview dependencies config

@Axemasta
Copy link
Author

@AlejandroRuiz Thanks thats the workaround I went with in the end, Figured I'd raise this as an issue anyway since there's some issue with this libraries dependencies 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants