Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET vNext only uses one dll from referenced package

I'm adding a dependency (mongocsharpdriver) to the net45 dependencies section like this:

    "net45": {
        "dependencies": {
            "System.Data": "",
            "System.ComponentModel.DataAnnotations": "",
            "mongocsharpdriver": "1.9.1"
        }
    },

Based on all other dependencies I've used, this should be enough to make it work. Here's some sample code I threw in to test it:

MongoDB.Bson.BsonArray test;
MongoDB.Driver.RemoveFlags test2;

With this in place, I'd expect that to compile, but MongoDB.Driver isn't recognized. MongoDB.Bson.BsonArray works fine.

Is having two assemblies in the same package an unsupported scenario in vNext, or is it not implemented yet?

like image 440
Ryan Versaw Avatar asked Nov 11 '22 06:11

Ryan Versaw


1 Answers

I believe this was just a bug in ASP.NET vNext and has been fixed in more recent nightly builds, which are available on the ASP.NET vNext MyGet feed.

Here's the bug: https://github.com/aspnet/KRuntime/issues/266

like image 82
Eilon Avatar answered Nov 25 '22 02:11

Eilon