Target V4.7.2 and netcoreapp3.1 in same project. Value does not fall witnin the expected range

后端 未结 1 953
再見小時候
再見小時候 2021-01-27 04:23

I want my Framework 4.7.2 code to use a library that targets netcoreapp3.1 Nuget indicates that the library is referenced, yet I do not see it in the list of references.

相关标签:
1条回答
  • 2021-01-27 05:00

    I think your looking for <TargetFrameworks>

    so in this case:

    <TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
    

    Please note you need a SDK-style csproj. I assume this in the case for you. If not, check How to upgrade csproj files with VS2017

    See also the article about <TargetFrameworkVersion>:

    This article shows the old way to specify a target framework. SDK-style projects enable different TargetFrameworks like netstandard. For more info, see Target frameworks.

    0 讨论(0)
提交回复
热议问题