chemitaxis
chemitaxis

Reputation: 14937

Framework DNX451 working in a Mac or Linux

I have created my project using YeoMan. In my project.json I have these frameworks:

"frameworks": {
    "dnx451": { },
    "dnxcore50": {
        "dependencies": {
            "System.Runtime.Serialization.Primitives": "4.0.10-*"
        }
    }
}

If I do a "dnu build" I get a lot of errors, but if I remove "dnx451" all works fine.

I have read a lot of question about what is "dnx451" and what is "dnxcore50", but my question is...

Can I use dnx451 and dnxcore50 frameworks toguether in a Linux or Mac? In positive case, How can I install the dnx451?

EDIT: Added Error:

    Unable to resolve dependency fx/mscorlib 

  Unable to resolve dependency fx/System 

  Unable to resolve dependency fx/System.Core 

  Unable to resolve dependency fx/Microsoft.CSharp 

  Unable to resolve dependency fx/System.Collections 

  Unable to resolve dependency fx/System.ComponentModel.DataAnnotations 

  Unable to resolve dependency fx/System.Diagnostics.Debug 

  Unable to resolve dependency fx/System.Diagnostics.Tools 

  Unable to resolve dependency fx/System.Globalization 

  Unable to resolve dependency fx/System.Linq 

  Unable to resolve dependency fx/System.Linq.Expressions 

  Unable to resolve dependency fx/System.Linq.Queryable 

  Unable to resolve dependency fx/System.ObjectModel 

  Unable to resolve dependency fx/System.Reflection 

  Unable to resolve dependency fx/System.Reflection.Extensions 

  Unable to resolve dependency fx/System.Resources.ResourceManager 

  Unable to resolve dependency fx/System.Runtime 

  Unable to resolve dependency fx/System.Runtime.Extensions 

  Unable to resolve dependency fx/System.Threading 

  Unable to resolve dependency fx/System.Data 

  Unable to resolve dependency fx/System.Transactions 

  Unable to resolve dependency fx/System.Net.Http 

  Unable to resolve dependency fx/System.IO 

  Unable to resolve dependency fx/System.Security 

  Unable to resolve dependency fx/System.Xml 

  Unable to resolve dependency fx/System.Xml.Linq 

  Unable to resolve dependency fx/System.Configuration 

  Unable to resolve dependency fx/System.Threading.Tasks 

  Unable to resolve dependency fx/System.Text.Encoding 

  Unable to resolve dependency fx/System.Collections.Concurrent 

/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/mscorlib  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Core  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/Microsoft.CSharp  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Collections  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.ComponentModel.DataAnnotations  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Diagnostics.Debug  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Diagnostics.Tools  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Globalization  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Linq  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Linq.Expressions  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Linq.Queryable  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.ObjectModel  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Reflection  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Reflection.Extensions  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Resources.ResourceManager  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Runtime  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Runtime.Extensions  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Threading  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Data  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Transactions  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Net.Http  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.IO  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Security  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Xml  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Xml.Linq  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Configuration  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Threading.Tasks  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Text.Encoding  could not be resolved.
/Users/chemitaxis/Downloads/MusicStore-dev/src/MusicStore/project.json(0,0): error NU1001: The dependency fx/System.Collections.Concurrent  could not be resolved.
error CS8021: No value for RuntimeMetadataVersion found. No assembly containing System.Object was found nor was a value for RuntimeMetadataVersion specified through options.

Thanks!!

Upvotes: 1

Views: 1271

Answers (1)

armen.shimoon
armen.shimoon

Reputation: 6401

Since you are using System.Runtime.Serialization.Primitives under dnxcore50, you also need to tell dnx451 to pull in the System.Runtime and System.Runtime.Serialization libraries as framework assemblies.

"dnx451": {
  "frameworkAssemblies": {
    "System.Runtime": "",
    "System.Runtime.Serialization": ""
  }
}

Depending on which classes you're using, you might have to pull in System.Xml as well (or any other libraries it complains about when you dnu build)

Upvotes: 2

Related Questions