I'm creating a solution with 2 projects. A class library and a console application to have the XUnit project. Both applications target .net 451 and .net core frameworks.
For the library I have "netstandard1.3" "net451"
For the xunit project I have "netcoreapp1.0" "net451"
I'm having problems when debugging the unit tests inside Visual Studio 2015, using the test explorer, when I try to debug, the symbols are not loaded.
Is there any setup for the projects that I'm missing? Any limitation in Visual Studio 2015 ?
I had this project and tests working fine only targeting .net core version. The problem started after introducing the net451 target. Everything builds right and the tests also are discovered correctly.
Thanks in advance!
project.json from library project
"version": "1.0.4",
"files": {
"includeFiles": [
"Content/ReleaseNotes.txt"
],
"include": [
"../../README"
]
},
"releaseNotes": "Review ReleaseNotes.txt for details.",
"requireLicenseAcceptance": true
},
"buildOptions": {
},
"frameworks": {
"net451": {
"frameworkAssemblies": {
"System.ComponentModel.DataAnnotations": "",
"System.Data": "",
"System.Drawing": "",
"System.Drawing.Design": "",
"System.Transactions": "",
"System.Configuration": "",
"System.Configuration.Install": "",
"System.Management": "",
"System.Xml": "",
"System.Runtime": {
"type": "build"
}
},
"dependencies": {
"Google.Protobuf": "3.0.0-beta4"
}
},
"netstandard1.3": {
"buildOptions": {
"define": [ "NETCORE10" ],
"warningsAsErrors": false,
"embed": [
"keywords.txt",
"Resources.resx"
],
"resource": [ "**/*.resx" ],
"compile": {
"exclude": [
"Framework/Net451/**/*.*",
],
"includeFiles": [
"Resources.Designer.cs"
],
"excludeFiles": [
"Properties/VersionInfo.cs",
]
}
},
"dependencies": {
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"NETStandard.Library": "1.6.0",
"System.Collections.NonGeneric": "4.0.1",
"System.ComponentModel": "4.0.1",
"System.ComponentModel.Annotations": "4.1.0",
"System.ComponentModel.Primitives": "4.1.0",
"System.ComponentModel.TypeConverter": "4.1.0",
"System.Data.Common": "4.1.0",
"System.Data.SqlClient": "4.1.0",
"System.Diagnostics.Process": "4.1.0",
"System.Diagnostics.TextWriterTraceListener": "4.0.0",
"System.IO.Compression": "4.1.0",
"System.IO.FileSystem.Primitives": "4.0.1",
"System.IO.MemoryMappedFiles": "4.0.0",
"System.IO.Pipes": "4.0.0",
"System.Linq.Expressions": "4.1.0",
"System.Net.NameResolution": "4.0.0",
"System.Net.Security": "4.0.0",
"System.Net.Sockets": "4.1.0",
"System.Reflection": "4.1.0",
"System.Reflection.TypeExtensions": "4.1.0",
"System.Security.Principal.Windows": "4.0.0",
"System.Text.Encoding.CodePages": "4.0.1",
"System.Threading.Timer": "4.0.1",
"System.Threading.ThreadPool": "4.0.10",
"Google.Protobuf": "3.0.0-beta4"
}
}
}
}
project.json from xunit project
{
"version": "7.0.4",
"description": "MyLibrary",
"packOptions": {
"requireLicenseAcceptance": true
},
"buildOptions": {
},
"testRunner": "xunit",
"dependencies": {
"dotnet-test-xunit": "2.2.0-*",
"xunit": "2.2.0-*",
"MyLibrary": {
"target": "project"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dnxcore50"
],
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0-*",
"type": "platform"
}
},
"buildOptions": {
"define": [ "NETCORE10" ],
"copyToOutput": [ "appsettings.json" ],
"compile": {
"include": [ "../*.cs" ],
"exclude": [
"**/._*",
"Framework/Net451/**/*.*"
],
"excludeFiles": [
"TestDataTable.cs"
]
},
"warningsAsErrors": false,
"optimize": true
}
},
"net451": {
"frameworkAssemblies": {
"System.Collections": {
"type": "build"
},
"System.Diagnostics.Debug": {
"type": "build"
},
"System.Linq": {
"type": "build"
},
"System.Reflection": {
"type": "build"
},
"System.Reflection.Extensions": {
"type": "build"
},
"System.Runtime": {
"type": "build"
},
"System.Runtime.Extensions": {
"type": "build"
},
"System.Threading.Tasks": {
"type": "build"
}
},
"buildOptions": {
"compile": {
"exclude": [
"Framework/NetCore10/*.*"
],
"excludeFiles": [
"Framework/Net451/PerfMonTests.cs",
"Framework/Net451/ReplicationTests.cs"
]
}
}
}
}
}