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

Target .NET Standard 2.0 #21

Merged
merged 1 commit into from Oct 9, 2021
Merged

Conversation

0xced
Copy link
Contributor

@0xced 0xced commented Oct 9, 2021

All the dependencies (Docnet.Core, SixLabors.ImageSharp and Verify) support .NET Standard 2.0 and Verify.DocNet code itself is also .NET Standard 2.0 compliant.

This makes Verify.DocNet available to .NET Framework 4.7.2 and .NET Core 2.0+ for free and reduces the size of the NuGet package since only one dll is required instead of two.

All the dependencies (Docnet.Core, SixLabors.ImageSharp and Verify) support .NET Standard 2.0 and Verify.DocNet code itself is also .NET Standard 2.0 compliant.

This makes Verify.DocNet available to .NET Framework 4.7.2 and .NET Core 2.0+ for free and reduces the size of the NuGet package since only one dll is required instead of two.
@0xced
Copy link
Contributor Author

0xced commented Oct 9, 2021

I found about this when trying to integrate Verify.DocNet in a project targeting .NET Core 3.1. I didn't see this warning:

[NU1701] Package 'Verify.DocNet 0.4.0' 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.

Then eventually I got this error when running the unit tests:

System.IO.FileNotFoundException
Could not load file or assembly 'Docnet.Core, Version=2.3.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

I could probably have manually added Docnet.Core as a dependency in the unit test project but the proper solution is really to make Verify.DocNet target .NET Standard 2.0.

@SimonCropp SimonCropp added this to the 1.0.0 milestone Oct 9, 2021
@SimonCropp SimonCropp added the enhancement New feature or request label Oct 9, 2021
@SimonCropp
Copy link
Member

good point. will deploy now

@SimonCropp SimonCropp merged commit 3e40b5e into VerifyTests:main Oct 9, 2021
@0xced 0xced deleted the netstandard2.0 branch October 10, 2021 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

None yet

2 participants