I'm trying to use mono to create a simple console application using C# and dnu.
I'm trying to reference a class library project in my console application as you can see in project.json file described below:
{
"version": "1.0.0-*",
"description": "SimpleDependecy Console Application",
"tags": [""],
"projectUrl": "",
"licenseUrl": "",
"dependencies": {
"MessagePrinter": "1.0.0-*"
},
"commands": {
"run": "run"
},
"frameworks": {
"dnx451": {
},
"dnxcore50": {
"dependencies": {
"System.Collections": "4.0.10-beta-23109",
"System.Console": "4.0.0-beta-23109",
"System.Linq": "4.0.0-beta-23109",
"System.Threading": "4.0.10-beta-23109",
"Microsoft.CSharp": "4.0.0-beta-23109"
}
}
}
}
Class library's project.json file is:
{
"version": "1.0.0-*",
"description": "MessagePrinter Class Library",
"tags": [""],
"projectUrl": "",
"licenseUrl": "",
"dependencies": {
"System.Collections": "4.0.10-beta-23019",
"System.Linq": "4.0.0-beta-23019",
"System.Threading": "4.0.10-beta-23019",
"Microsoft.CSharp": "4.0.0-beta-23019",
"System.Runtime": "4.0.20-beta-*"
},
"frameworks": {
"dotnet": {}
}
}
When I run dnu restore; dnu build I receive the following exception:
(1,29): DNX,Version=v4.5.1 error CS0433: The type 'AssemblyFileVersionAttribute'
exists in both 'System.Runtime, Version=4.0.20.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
And some exceptions like:
error CS0518: Predefined type 'System.Void' is not defined or imported
I can see the conflict but I don't know how to solve it.