locked
Cannot add .dll, warning about framework versions RRS feed

  • Question

  • User-765362821 posted

    I'm trying to add a .dll. This .dll was part of the project already, but today it started not working. I've tried re-adding it, and even re-adding different versions of it clear back from 2009, I keep getting the same error.

    Here is the error:
    The primary reference "myDLL" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=3.5.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 "myDLL" or retarget your application to a framework version which contains "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

    The project is in .NET 2.0, upgrading it to 3.5 or 4.0 is not an option.

    The current version of the myDLL, which is the one that is also GAC'd, is compiled as 3.5, but (a) it has worked up until today and (b) even the older 2.0 versions I've pulled in still give this error.

    One of my co-workers can open the project and add the .dll just fine.

    I'm using VS2010, as is my co-worker.

    I also tried rolling back the project to the last changeset in our source control, same error.

    Thursday, January 24, 2013 4:14 PM

Answers

  • User1630798415 posted

    downgrade framework is supported but not upgraded.

    e.g. If you are using 2.0 framework then DLL in later version will not be supported. But if you use older version (before 2.0) then it will support.

    Now, you can build your DLL in 2.0 or previous framework and then you will be able to add reference.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 28, 2013 1:42 AM
  • User-166373564 posted

    Hi abbyful

    Version=3.5.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 "myDLL" or retarget your application to a framework

    I think you have two options to deal with this error,

    1) You could have a try reconstruct you 'myDLL' using .net Framework 2.0;

    2) upgrade your .net Framework 2.0 to .net Framework 3.5(install .net Framework 3.5) below,

    http://msdn.microsoft.com/en-us/library/5a4x27ek(v=vs.90).aspx

    hope it helps you,

    Kind regards

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 31, 2013 3:34 AM

All replies

  • User1630798415 posted

    downgrade framework is supported but not upgraded.

    e.g. If you are using 2.0 framework then DLL in later version will not be supported. But if you use older version (before 2.0) then it will support.

    Now, you can build your DLL in 2.0 or previous framework and then you will be able to add reference.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 28, 2013 1:42 AM
  • User-166373564 posted

    Hi abbyful

    Version=3.5.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 "myDLL" or retarget your application to a framework

    I think you have two options to deal with this error,

    1) You could have a try reconstruct you 'myDLL' using .net Framework 2.0;

    2) upgrade your .net Framework 2.0 to .net Framework 3.5(install .net Framework 3.5) below,

    http://msdn.microsoft.com/en-us/library/5a4x27ek(v=vs.90).aspx

    hope it helps you,

    Kind regards

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 31, 2013 3:34 AM