Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-541

Nuget defaulting to .net standard 1.3 dependencies when targeting 4.6 full framework

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 2.0.6
    • None
    • Builds
    • None

    Description

      Nuget is defaulting to .net standard 1.3 dependencies when targeting 4.6 full framework. This is only happening on .net 4.6 or greater because version 4.6.2 supports .net standard. The problem can be fixed by specifically declaring .net 4.5 as having no dependencies in the nuspec file. I was able to verify this quickly in a test setup by using NuGet Package Explorer to edit the nuget package and defining net45 with no dependencies.

      Adding the following line to the nuspec file should fix the issue.
      <group targetFramework=".NETFramework4.5" />

      A similar example can be found in the Json.Net nuspec file though he explicitly defines multiple older versions of the framework as having no dependencies.
      https://github.com/JamesNK/Newtonsoft.Json/blob/master/Build/Newtonsoft.Json.nuspec

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nathan059 Nathan Smith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Remaining Estimate - 2h
                  2h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified