.net standard - NuGet: Force project to chose more specific target framework over netstandard -
short version
i author package targets .net standard 1.3 , 1.6. 1.6 build references system.runtime.loader
. package has placeholder monoandroid framework, meaning nuget package can not loaded in android 7.x projects.
my .net standard 1.3 build not have dependency. how can force nuget load netstandard-1.3 build android projects, instead of netstandard-1.6?
more details
when try , load our current package in android 7 project uses project.json, see below error message:
system.runtime.loader 4.3.0 provides compile-time reference assembly system.runtime.loader on monoandroid,version=v7.1, there no run-time assembly compatible win.
my understanding, caused system.runtime.loader nuget package using placeholders number of target frameworks. structure of package, such:
lib -> netstandard1.5 -> system.runtime.loader.dll monoandroid10 -> _._
i package netstandard-1.3 build of package, not reference system.runtime.loader assembly. i'm happy android users reduced functionality in 1.3 build - can't figure out how force nuget pick framework, on .net standard 1.6.
my current package structure below:
lib -> netstandard1.3 -> build13.dll netstandard1.6 -> build16.dll
i've attempted change below - force nuget pick more specific target framework, nuget seems prefer netstandard1.6 on monoandroid. (i've tried monoandroid10)
lib -> netstandard1.3 -> build13.dll monoandroid -> build13.dll netstandard1.6 -> build16.dll
is there way, package author, can force downstream users' android projects use .net standard 1.3 build of project, instead of 1.6 build, fails restore due placeholder items in system.runtime.loader package?
i found caching problem.
everything assumed how nuget should work correct. issue nuget appears cache package dependencies, when rebuilding package, still using old dependency list. annoyingly, internal cache - visual studio ui made appear new package's dependencies being recognised correctly, yet logs showing old dependencies being installed.
the solution clear nuget cache between each repackage.
Comments
Post a Comment