Running docker build --no-cache --force-rm -f [DockerFile path] -t [imagename]:latest failed, throw 'Invalid runtimeconfig.json [/usr/share/dotnet/sdk/6.0.403/dotnet.runtimeconfig.json] [/usr/share/dotnet/sdk/6.0.403/dotnet.runtimeconfig.dev.json] : The document is empty'.
CLI error:
PS C:\> docker --version
Docker version 20.10.21, build baeda1f
PS C:\> dotnet --version
7.0.100
PS C:\> dotnet --info
.NET SDK:
Version: 7.0.100
Commit: e12b7af219
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.100\
Host:
Version: 7.0.0
Architecture: x64
Commit: d099f075e4
.NET SDKs installed:
2.1.602 [C:\Program Files\dotnet\sdk]
3.1.425 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.403 [C:\Program Files\dotnet\sdk]
7.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
the sdk folder contents:
sdk folder contents:
'dotnet.runtimeconfig.json' is in correct folder:
/dotnet.runtimeconfig.json:
the contents of dotnet.runtimeconfig.json:
{
"runtimeOptions": {
"tfm": "net6.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.11"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
}
}
}
Running docker build should create the docker image (as previousely works fine!) but throw the above error at restoring stage.
I finally found the source of the issue. The problem is not in the SDK installation, nor the Visual Studio. I found the issue in 'Docker Desktop'. For me using 'Reset to factory defaults' button in troubleshoot, solve the issue!
Docker Desktop version = 4.15.0 (93002).
Hi All,
I deploy emgu.cv on CentOS 7, I got The framework 'Microsoft.WindowsDesktop.App', version '3.1.0' was not found ..
below what I have:
[root#demo Microsoft.AspNetCore.App]# dotnet --list-runtimes
Microsoft.AspNetCore.App 3.0.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
I am not using Microsoft.WindowsDesktop.App in my ASP Net Core project..
Seems to be a know issue for .NETCore-Apps on a non Windows-Machine.
Will be fixed with v4.4
https://github.com/emgucv/emgucv/issues/339
update:
v4.4 is released and compiles with .NET Standard 2.0 projects on all platforms
I try running a project with a GenericHost in docker. It works running the console app locally on my machine, and builds correctly. If I remove some code and the package Microsoft.AspNetCore.App it works good, so the issue seems to be isolated to that package when running it on Docker.
Error message:
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.6' was not
found.
- Check application dependencies and target a framework version installed at:
/usr/share/dotnet/
- Installing .NET Core prerequisites might help resolve this problem:
https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.
The program '[24] dotnet' has exited with code 150 (0x96).
The program 'dotnet' has exited with code 150 (0x96).
Below is my DockerFile:
FROM microsoft/dotnet:2.1-runtime AS base
WORKDIR /app
FROM microsoft/dotnet:2.1-sdk AS build
WORKDIR /src
COPY ../TestProj/TestProj.csproj ../TestProj/
RUN dotnet restore ../TestProj/TestProj.csproj
COPY . .
WORKDIR /src/../TestProj
RUN dotnet build TestProj.csproj -c Release -o /app
FROM build AS publish
RUN dotnet publish TestProj.csproj -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "TestProj.dll"]
The original Docker file includes some more "COPY" because of references needed, but edited those out here.
update
Local machine:
dotnet --info
.NET Core SDKs installed:
1.1.9 [C:\Program Files\dotnet\sdk]
1.1.11 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.300 [C:\Program Files\dotnet\sdk]
2.1.402 [C:\Program Files\dotnet\sdk]
2.1.500 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.4 [C:\Program
Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0_old [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.4_old [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
On my local docker:
Host (useful for support):
Version: 2.1.6
Commit: 3f4f8eebd8
.NET Core SDKs installed:
No SDKs were found.
.NET Core runtimes installed:
Microsoft.NETCore.App 2.1.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Apparently there was an issue if the project was created as a console application and use the nuget Microsoft.aspnetcore.app. I re-created the project but as a Web application and then it worked. Maybe it's obvious because it's a "web-nuget", but it didn't cross my mind.
I should note that I got some issues with the docker image, and had to pull the dotnet docker-image again with specific version.
docker pull microsoft/dotnet:2.1-aspnetcore-runtime
It wouldn't load/start with the correct dotnet version.
I am having an issue where virtually every Package during the nuget restore (when building on TFS agent) is being marked as not compatible. Why would this be the case? This builds perfectly on my local machine but will not work when in TFS. It just doesn't make sense to me why the inclusion of AspNetCore.All version 2.1.0 wouldn't be compatible with netcoreapp2.1. Is there some other version that I should be using in my solution or is something wrong with my agent?
Package Microsoft.Extensions.Configuration.CommandLine 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.CommandLine 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Configuration.EnvironmentVariables 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.EnvironmentVariables 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Configuration.FileExtensions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.FileExtensions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Configuration.Ini 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.Ini 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Configuration.Json 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.Json 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Configuration.KeyPerFile 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.KeyPerFile 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Configuration.UserSecrets 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.UserSecrets 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Configuration.Xml 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Configuration.Xml 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.DependencyInjection.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.DependencyInjection.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.FileProviders.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.FileProviders.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.FileProviders.Composite 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.FileProviders.Composite 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.FileProviders.Physical 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.FileProviders.Physical 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.FileSystemGlobbing 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.FileSystemGlobbing 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Hosting 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Hosting 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Hosting.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Hosting.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Http 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Http 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Identity.Core 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Identity.Core 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Identity.Stores 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Identity.Stores 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Localization 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Localization 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Localization.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Localization.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Logging 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Logging.Abstractions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.Abstractions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Logging.AzureAppServices 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.AzureAppServices 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Logging.Configuration 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.Configuration 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Logging.Console 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.Console 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Logging.Debug 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.Debug 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Logging.EventSource 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.EventSource 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Logging.TraceSource 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Logging.TraceSource 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.ObjectPool 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.ObjectPool 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Options 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Options 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Options.ConfigurationExtensions 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Options.ConfigurationExtensions 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Primitives 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.Primitives 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.WebEncoders 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Extensions.WebEncoders 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Net.Http.Headers 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.Net.Http.Headers 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.VisualStudio.Web.BrowserLink 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.VisualStudio.Web.BrowserLink 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.VisualStudio.Web.CodeGenerators.Mvc 2.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.VisualStudio.Web.CodeGenerators.Mvc 2.1.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.AspNetCore.OData 7.0.0-beta4 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Microsoft.AspNetCore.OData 7.0.0-beta4 supports: netstandard2.0 (.NETStandard,Version=v2.0)
One or more packages are incompatible with .NETCoreApp,Version=v2.1.
NuGet Config files used:
C:\Agents\FirstStrikeCoreMaintenance_work\1\Nuget\tempNuGet_13261.config
Feeds used:
https://api.nuget.org/v3/index.json
Error: C:\Agents\FirstStrikeCoreMaintenance_work_tool\NuGet\4.0.0\x64\nuget.exe failed with return code: 1
Packages failed to restore
Using the .net core build, publish, and restore task allowed the project to build successfully. Using the Visual Studio Build would not work.
How to upgrade Grails 2.4.4 to 2.5.0 ?
I am using STS
Version: 3.6.4.RELEASE
Build Id: 201503100339
Platform: Eclipse Luna SR1 (4.4.2)
Grails 2.4.4.
Mac 10.10
Java jdk1.8.0_45.jdk
The grails upgrade command is gone from 2.4. You have to run set-grails-version
grails set-grails-version 2.5.6
Then go into BuildConfig.groovy and manually upgrade your dependencies/plugins:
https://github.com/grails/grails-core/releases/tag/v2.5.0