I have a solution with many .NET Core projects. I did NuGet updates to all of the project and now when I try to build I get the following errors (for some of the projects -
What exactly does this runtime definition means?
runtimes
lists the runtimes that our package supports. Listing runtimes is necessary for self-contained deployments. A deployment is self-contained when it brings its own runtime.
How do we know if our deployment is self-contained? dependencies
list the packages on which our package depends. These dependencies come in three types.
build
the package is for building only and is not part of the deploymentplatform
the package will depend on a pre-installed runtimedefault
neither of thoseIf our "Microsoft.NETCore.App"
dependency is of the default
type, then it is self-contained, and we will need to bring our own runtimes. If it is of the platform
type, then it is framework dependent.
why was this happening only on some projects?
It will only happen in projects that are self-contained deployments. If you look thru those projects that do not require a runtimes
property, you will find that they are either class libraries or framework dependent.
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0"
}
}
}
},
"runtimes": {
"win10-x64": {},
"osx.10.10-x64": {}
}
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
}
}
}
"frameworks": {
"netstandard1.6": {}
}
how does it affect my ability to run on other os like linux or mac?
It doesn't. Windows, Mac OS, and Linux can all either have a runtime pre-installed or have the application bring its own runtime.
See also