According to https://devblogs.microsoft.com/dotnet/announcing-net-core-3-0/, the newest version of .NET core should be backward compatible with the previous versions.
However, building a docker image with 2.2sdk won't run on a container with runtime 3.0... Am I missing something or is it the normal behavior?
There is no mention of that in the linked article?
What you are experiencing is normal behavior. Major versions are not backwards compatible (for runtimes).
In your case running a .net core 2.2 app will not work on an image with a .net core 3.0 runtime.
You can read more about version selection where the following is mentioned:
The host chooses the latest patch version installed on the machine. For example, if you specified netcoreapp2.0 in your project file, and 2.0.4 is the latest .NET runtime installed, the 2.0.4 runtime is used.
If no acceptable 2.0.* version is found, a new 2.* version is used. For example, if you specified netcoreapp2.0 and only 2.1.0 is installed, the application runs using the 2.1.0 runtime. This behavior is referred to as "minor version roll-forward." Lower versions also won't be considered. When no acceptable runtime is installed, the application won't run.
A few usage examples demonstrate the behavior, if you target 2.0:
2.0 is specified. 2.0.5 is the highest patch version installed. 2.0.5 is used.
2.0 is specified. No 2.0.* versions are installed. 1.1.1 is the highest runtime installed. An error message is displayed.
2.0 is specified. No 2.0.* versions are installed. 2.2.2 is the highest 2.x runtime version installed. 2.2.2 is used.
2.0 is specified. No 2.x versions are installed. 3.0.0 is installed. An error message is displayed.
They also mention roughly adhering to semantic versioning here:
MAJOR is incremented when:
Significant changes occur to the product, or a new product direction.
Breaking changes were taken. There's a high bar to accepting breaking changes.
An old version is no longer supported.
A newer MAJOR version of an existing dependency is adopted.
Related
I'm using Grails 5.1.4 for a number of projects now, and planning to move to 5.1.7 soon. I've been continuing to develop with Java 8 and deploy with Java 11, but I'm wondering whether there is a more recent version which I could be using without problems? The docs talk about the minimum JDK version required (8), but not the maximum usable one.
I want to use the stable release of the sdk, which should be 2.2.0, but when I in the console check the version with the command "dart --version", it says I am running "Dart VM version: 2.1.0".
I have tried to upgrade via choco, and it says that I already have 2.2.0 installed.
Do I have multiple versions av Dart installed and can switch between them?
If so, can I set a default version?
I'll just mark this as answered with the comment of jamsdlin, as it was the correct answer for me.
When you run dart, you'll run whichever dart binary is found first in your search PATH. You have multiple versions installed. Uninstall the old version or modify PATH so that the location for 2.2.0 occurs first.
I'm trying to work out which version of the ASP.NET related packages I should be using.
We are trying to stick to LTS versions of ASP.NET Core, meaning we are still on version 2.1 and not 2.2 for the compiler and runtime. However I'm having a hard to trying to find out what version of the nuget packages we should be using.
for example, Microsoft.AspNetCore.Mvc says that its latest version is 2.2.0 and visual studio wants me to upgrade to this. However, I am wondering if we should stay on 2.1.3 since we are still on 2.1 for the compiler.
Are these version numbers related? Should we be staying back on 2.1.x to match pace with the compiler or are we doing things wrong?
I have a ASP.NET Core application running in a Docker container (2.1-aspnetcore-runtime).
The docker container with the application ran without any problems for two months. Recently I had to update a ConnectionString in the AppSettings. So I changed the JSON file and deployed a new docker version.
This resulted in the following 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:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
- The following versions are installed:
2.1.4 at [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Why does the application suddenly need the version "2.1.6"? The application didn't change and two months ago the version "2.1.6" didn't even exist.
Besides this there is a specific Docker container for "2.1.6" (2.1.6-aspnetcore-runtime). Why isn't the newest version available in the normal "2.1-aspnetcore-runtime" container?
Why does the application suddenly need the version "2.1.6"? The application didn't change and two months ago the version "2.1.6" didn't even exist.
This one is easy to explain. The newer, ASP.NET Core 2.1 (and later) templates are generated with implicit versioning for Microsoft.AspNetCore.All/Microsofot.AspNetCore.App packages.
In ASP.NET Core 2.1 or later, you can specify the Microsoft.AspNetCore.All package reference without a version. When the version isn't specified, an implicit version is specified by the SDK (Microsoft.NET.Sdk.Web). We recommend relying on the implicit version specified by the SDK and not explicitly setting the version number on the package reference. If you have questions about this approach, leave a GitHub comment at the Discussion for the Microsoft.AspNetCore.App implicit version.
Your entries in csproj will then just look like
<PackageReference Include="Microsoft.AspNetCore.All" />
instead of
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.4" />
This makes sure that every rebuild will use/pick up the latest minor packages available on the system. That applies for portable apps. Self-contained basically do the same, but with the runtime available at the publishing time.
That is whats causing the issue for you in the first place.
Why isn't the newest version available in the normal "2.1-aspnetcore-runtime" container?
You probably didn't run docker pull microsoft/dotnet:2.1-aspnetcore-runtime before creating/building (or running) your docker container.
When you don't do that, it will use the latest locally tagged version (but not the latest version available for that tag on docker hub), because the microsoft/dotnet:2.1-aspnetcore-runtime will point to a newer minor versions when they come out, but this requires you to do a new pull to get the most recent version for the (re)tagged image.
I'm using IBM WebSphere 7.0 with MyFaces 2.0.7 installed as shared library.
Because there are issues with PrimeFaces (for example, p:messages autoUpdate not working) I'm considering the upgrade to newer version (which is not trivial, because this must be the team decision in corporation).
So, my question is, which is the newest version of MyFaces that will work with IBM WebSphere 7.0? The newest version is for now 2.1.10, but according to the answer to the question Can JSF 2.0 be used with Websphere application server version 7.x MyFaces versions starting from 2.1 will not work with WebSphere 7.0.
Have someone managed to run version 2.1.x? If so, which version, and was something additional to do? As I said, I've successfully configured shared library, similar to solution from article like that: http://wasbehindtheglass.blogspot.co.uk/2011/11/myfaces-20-and-websphere-application.html
The MyFaces Core 2.1.10 works well with IBM WebSphere 7.0.
Release notes can be found at MyFaces Core 2.1.10.