none
How to install Main NuGet and dependent NuGet with same FrameWork version. RRS feed

  • Question

  • When i install custom nuget package packages.aspnet.mvc5 in aspnet application with targetFramework 4.6 , The Main package(packages.aspnet.mvc5) dll referred 4.5 Framework. But the dependency of main package compression.base(Independent Nuget) dll referred from 4.6 targetframework instead of 4.5 Framework. Due to his bindig redirect entry added in webconfig file. Example,
    <dependentAssembly>
    <assemblyIdentity name="compression.base" publicKeyToken="7285hf33478get3a" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-11.3450.0.14" newVersion="11.3460.0.14" />
    </dependentAssembly>

    How to resolve this issue, while insalling the NuGet?

    We have tested by , shipping the dependent package(compression.base) dll with Main Package instead of using dependent package. While used like that, it refers all dll from 4.5 Framework. But when uninstall the nuget all dll removed from project. Due to this, when using another package with same dependent package(compression.base), it will removed from project while uninstall the package. So, this is not a correct way.

    How to refer main package and dependent package with same framework version while installing the nuget?
    Monday, October 7, 2019 11:09 AM

Answers