3

I created my initial project that targets Framework version v4.7.2. I needed to add a class library in my project using visual studio 2022 Community. While doing so, VS2022 gave me only 4 options to choose from for setting Target Framework (.Net Standard 2.0, .Net Standard 1.0, .Net 5.0, .Net 6.0). This feature isn't there in VS2019 Community. I selected .NET 5.0

Now this class library cannot be referenced by my initial project. I think I need to update .NET Core SDK but don't know which version (if I am correct in my assumption).

Please help. Thanks

2
  • 1
    Wrong project template. You picked "Class Library", pick "Class Library (.NET Framework)" instead. Commented May 6, 2022 at 22:03
  • 1
    Done. This solution is correct. Thanks Commented May 6, 2022 at 22:15

1 Answer 1

0

You should add a class library, which is supported .NET Framework. In the one project, all classes are the same target output (.NET Core or .NET Framework) Referred project and reference project are the same target output.

My case: I created Winform Application(.NET Core), then add Junit Project(.NET Framework) referring to Winform Application and they are conflict due to different target.

My Solution: I changed Winform Application from .NET Core to .NET Framework and they are working.

Hope to help you!!!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.