f# - NuGet - dependency installed but not found -


i have problem nuget package manager. published library (a type provider, don't think matters) , testet it, fails find dependency. complete error message (full namespace/name ommitted brevity):

the type provider 'typeproviderimplementation....' reported error: not load file or assembly 'dotnetrdf', version=1.0.3.0, culture=neutral, publickeytoken=...' or 1 of dependencies. 

the thing when installing library, looks dependencies installed correctly. correct libraries downloaded , there no error showing up. in attempt solve problem, specified exact version in .nuspec file, didn't change anything. ...

installing dotnetrdf via nuget , manually referencing precompiled dll (without going through nuget) seems work fine.

so i'm out of ideas on how solve or debug problem. i'm thankful pointers.

addign more information .net version numbers comment below quite hard read:

i checked framework versions suggested. did via looking @ frameworkdisplayname in object browser. basically, library using 4.5 , dotnetrdf using 4.0.

i switched .net 4.0, nothing changed.

  • my library = ".net framework 4"
  • dotnetrdf = ".net framework 4"
  • htmlagilitypack = ".net framework 4.5"
  • newtonsoft.json = ".net framework 4.5"
  • vds.common = ".net framework 4 client profile"

my dependency dotnetrdf, remaining ones dependencies of dotnetrdf.

latest nuspec file can found here. create package via command nuget pack liteq.fsproj -prop configuration=release.

the package id liteq.rdf.

some additional information: library f# project. tested happens if create console project , install library via nuget , send references f# interactive console. works in case.

so feels there problem project configuration after installing library via nuget.

to reproduce, error, download library, open uniko.west.liteq namespace , example use npqltypeprovider:

open uniko.west.liteq  type = npqlrdfprovider< @""> 

certainly me can't see obvious problems, when install package empty console project don't have issues , can write trivial example uses dotnetrdf apis fine. if can produce minimal example project installing packages creates issue helpful.

your issue

however dependencies state project wrong, have .net 4.0 project , dependencies .net 4.5 others not work. note when downgrade projects target framework nuget not cope nicely that, best uninstall , reinstall nuget packages time change target framework version. fine newer version of framework rely on dependencies target older versions, .net 4.5 project can happily depend on .net 4.0 version of dotnetrdf. reverse not true may cause of problems.

you can tell if case because vs may highlight bad dependencies under references in solution explorer little warning icons (sadly doesn't this). if not case should see output following in output window when try , build if have incompatible dependencies , may yield compile errors missing namespaces:

c:\program files (x86)\msbuild\12.0\bin\microsoft.common.currentversion.targets(1697,5): warning msb3274: primary reference "htmlagilitypack" not resolved because built against ".netframework,version=v4.5" framework. higher version targeted framework ".netframework,version=v4.0".

so suggest uninstall packages via nuget , reinstall them whenever change target .net framework of project.

other issues

in terms of other possible issues using dotnetrdf 1.0.3 not latest version, versions prior 1.0.5 have known issue related interactions versioning , framework profiles of json.net. if project installing has dependencies on json.net may run version conflict issues. see core-405: resolve issues json.net dependency discussion on this.

i suggest upgrade dependency latest dotnetrdf release 1.0.6.3421 @ time of writing answer , see if resolves problem.

edit - nuget package versions

nuget packages versions not have correspond assembly version, happens 1.0.6.3421 have assembly version of 1.0.3.0. not our intention flaw in our build process isn't relevant here.

what looks library compiled against different version of dotnetrdf 1 nuget installing you. without seeing source of package impossible debug further.

what if neither solution works?

if neither of these things resolves problem going need provide minimal project reproduces problem.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -