Version not match

BenTam 1,801 Reputation points
2022-11-11T09:54:25.34+00:00

Dear All,

I encounter an error as follows. Could anyone suggest a solution?

The primary reference "C:\Users\Ben Tam\source\repos\NewTims\Library\bin\Debug\Library.dll" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "C:\Users\Ben Tam\source\repos\NewTims\Library\bin\Debug\Library.dll" or retarget your application to a framework version which contains "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. BenTam 1,801 Reputation points
    2022-11-12T02:25:34.433+00:00

    I find the answer as follows.

    1. Open the project file ObjectListView.csproj.
    2. Locate the line <TargetFrameworkVersion>2</TargetFrameworkVersion>
    3. Change 2 to 4.8

    That will fix the error.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.