-2

What would be possible solution? I know there is no direct referencing because VS 2017 does not support 5.0.

Make project .net 5.0 to make as a COM object? Or something else?

  • 1
    Does this answer your question? [Reference a .net framework 4.5.1 assembly in a 4.0 project](https://stackoverflow.com/questions/23807351/reference-a-net-framework-4-5-1-assembly-in-a-4-0-project) and [.net 3.5 project referencing 4.5 dll](https://stackoverflow.com/questions/15264858/net-3-5-project-referencing-4-5-dll) and [How to reference framework 4.0 dll in project targetting 3.5 in VS2008](https://stackoverflow.com/questions/9747858/how-to-reference-framework-4-0-dll-in-project-targetting-3-5-in-vs2008) –  Jun 10 '21 at 17:13
  • 2
    Use 4.7.2 or later. There are known issue with 4.7.0 and Core. Using Net 4.7.2 or later you can target an other versions of Net. – jdweng Jun 10 '21 at 17:13
  • 1
    Don't get VS version and Net Version confused. VS is a front end application that supports multiple version of the Net Library. Net is the libraries that are used to compile the application. – jdweng Jun 10 '21 at 17:26
  • 1
    See following : https://learn.microsoft.com/en-us/dotnet/standard/frameworks?force_isolation=true – jdweng Jun 10 '21 at 18:05
  • 1
    @jdweng Do you mean that we can add a reference to a .NET 5 dll in a Framework 4.7.2 project under VS2017? –  Jun 10 '21 at 18:07
  • 1
    The version of VS doesn't matter. The c# compiler works with source language so VS has little issues. The link says you can target Core 5.0 from Net 4.8 (but 4.7.2 should still work). You may need to recompile the Net 5 code because different version of Net/Core executables are not always compatible. – jdweng Jun 10 '21 at 18:15

1 Answers1

0

VS2019 will allow to reference the assemblies are compiled as .NET5 in future versions. VS2017 does not support it.