Nuget for Microsoft.NETCore.App 3.0.0 not available? - asp.net-core

We are facing memory leak with ConfigurationRoot. Looking at this thread, it's now been fixed:
https://github.com/aspnet/Extensions/issues/861
This requires us to upgrade to Microsoft.NETCore.App 3.0.0
https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Abstractions/
But, I am not able to locate Microsoft.NETCore.App 3.0.0 nuget anywhere. Any idea where I can find this?

Microsoft.NETCore.App is a metapackage, which references all commonly used library for an .NET Core application. Install a new .NET SDK Runtime on the target system.
The version will still be 3.0.0, but when you run the application it will roll-forward to the newest patch version.
If its an self-contained application (vs. portable application which requires a .NET Core runtime installed on target system), then update the SDK on the build system and recompile your application to cause build system putting the latest .NET Core artefacts in the publish directory.

Related

After moving .NET Core 2.2 web application to new computer with Windows 10, it fails

After moving the application I get this error. I have downloaded and installed SDK 3.1.302 and runtime 3.1.6 but I get this error:
HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
Common solutions to this issue:
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
Specific error detected by ANCM:
It was not possible to find any compatible framework version The framework 'Microsoft.AspNetCore.App', version '2.2.0' was not found. - The following frameworks were found: 2.1.20 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] 3.1.6 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] You can resolve the problem by installing the specified framework and/or SDK. The specified framework can be found at: - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=2.2.0&arch=x64&rid=win10-x64
On the SDK .net core download page it says 2.2 is no longer supported and so I downloaded. 3.1.302 as recommended.
However, I think I need to find somewhere in my VS 2019 for that solution and change it to 3.1.6 runtime from 2.2 but I have no idea where that would be.
I looked on the web for a solution but could not find one. I found a mention of removing this
environment variable but that didn't work.
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
Where is my app referencing .net core 2.2? It worked so well on Windows 7 Visual Studio 2017 that I moved it from.
Under project csproj file configuration you have something like <RuntimeFrameworkVersion>2.2</RuntimeFrameworkVersion> or <TargetFramework>netcoreapp2.2</TargetFramework> or <PackageReference Include="Microsoft.AspNetCore.All" Version="2.2" />?
And 2.2 is no longer supported you need back to 2.1 or 3.x. I suggest you to upgrade project to latest version if is it possible.
or you can still download the SDK 2.2 from archive.
https://dotnet.microsoft.com/download/dotnet-core
Installing .Net Core 3.1 does not install the older runtimes by default. You will need to install 2.2, or when you publish your program, publish it as "Self-contained" which should include everything needed to run it.
While 2.2 has been EOLed, you can still run your .net core 2.2 program. You can download the last 2.2 runtime here: https://dotnet.microsoft.com/download/dotnet-core/2.2
You will likely want the Windows Hosting Bundle.
Install that, and once it's complete, you can check your runtime version from powershell with dotnet --list-runtimes
You should see a list of installed runtimes come up. You will want to see something like: Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
With that you should be able to run the application.
That being said, I would also recommend updating to 3.1 as soon as possible.

What am I missing to upgrade asp.net mvc .net core 2.2.0 apps to .net core 2.2.1

I have the latest version of visual studio, the sdk and runtimes for x64 and x86 version 2.2.1, but my asp.net mvc .net core applications will only recognize being 2.2.0. I can install 2.2.1 into .net core libraries.
What do I need to change to allow my web projects to be 2.2.1 instead of 2.2.0?
(It can't be done through nuget, it provides the statement: Implicitly refrenced by an SDK. To update the package, update the SDK to which it belongs
Since the project is referencing a library with 2.2.1, I see the error: Error NU1605 Detected package downgrade: Microsoft.AspNetCore.App from 2.2.1 to 2.2.0. Reference the package directly from the project to select a different version.)
According to Microsoft documentation packages Microsoft.AspNetCore.App and Microsoft.NETCore.App have special versioning semantics which is handled outside of NuGet.
Also note that specifying a version number on Microsoft.AspNetCore.App package does not guarantee that desired version will be chosen. In general, you should not explicitly specify Microsoft.AspNetCore.App version unless you have a good reason to do so (applies to .NET Core 2.1 and later).
You can read more about that here: Microsoft.AspNetCore.App metapackage
If you want to target specific SDK used in your project or solution, add global.json file to project folder (if you want to target only that specific project) or solution folder if you want to target all projects in the solution.
global.json example:
{
"sdk": {
"version": "2.2.103"
}
}

The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found

I tried to upgrade my web app from .net core 2.0 to .net core 2.1
I did:
1) Install Visual Studio Professional 2017 Preview Version 15.8.0 Preview 1.1
2) Installed the .net core 2.1.3 RC1 SDK from here: https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-rc1
3) Updated all of my aspnetcore nuget packages to the latest version.
After doing both of these things, when I start my project I get this screen:
HTTP Error 502.5 - Process Failure Common causes of this issue:
The application process failed to start
The application process started but then stopped
The application process started but failed to listen on the configured port
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit:
https://go.microsoft.com/fwlink/?LinkID=808681
and in my Output window from ASP.NET Core Web Server, I get this:
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.
- Check application dependencies and target a framework version installed at:
C:\Program Files\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.0-preview2-final at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2.1.0-rc1-final at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.
- Check application dependencies and target a framework version installed at:
C:\Program Files\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.0-preview2-final at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2.1.0-rc1-final at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
.NET Core 2.1 SDK will be released this week. If you can't wait until then, add this to your *.csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RestoreAdditionalProjectSources>
https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-1/20180515-07/final/index.json
</RestoreAdditionalProjectSources>
</PropertyGroup>
....
</Project>
And download the final SDK from: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/2.1.300/dotnet-sdk-2.1.300-win-x64.exe
For more details visit: https://github.com/aspnet/Home/wiki/2.1.0-Early-Access-Downloads
By updating all NuGet packages, you seem to have upgraded from the RC version you started out with (which is installed on your system) to the RTM version currently being released (and thus already available on NuGet but not installed on your system).
The Microsoft.AspNetCore.App NuGet packages are supposed to be referenced without a version so that the installed tooling can pick an appropriate version.
Update your .csproj file to remove the Version attribute and only reference that package through:
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
.NET Core SDK 2.1.300 is now available: https://www.microsoft.com/net/download/windows Install it, this fixed the problem for me.
Looks like it's available on chocolatey now https://chocolatey.org/packages/dotnetcore-sdk/2.1.300
Not yet on the normal dotnet distribution sites. Crazy.
uninstall previous version
Download and install version 2.1 sdk
After the whole process reboot your PC
It should work.
I opened the Visual Studio installer, went to Individual Components, selected .NET Core 2.1 Runtime (LTS), and installed it.
Solved my problem.

How to update from Microsoft.NetCore.App 2.0 to 2.1.4

I created an ASP.NET Core Web API project in Visual Studio 2017 version 15.7.2.
When I created it, it was Microsoft.NetCore.App 2.0.
Now I want to update to Microsoft.NetCore.App 2.1.4 but I can't because Visual Studio tells me:
Implicitly referenced by an SDK. To update the package, update the
SDK to which it belongs
I download the latest version of .NET Core and I installed it, but I got the same issue.
Any ideas?
Don't confuse SDK (=> Build tools) versions with .NET Core versions.
The 2.1.* SDK versioning was unfortunate, the versioning scheme has since been changed and the scheme transition will be (mostly) complete with the release of .NET Core 2.1.
You don't need to update the Microsoft.NETCore.App NuGet package as it only contains build references needed to build your application.
For self-contained applications, you can also set the <RuntimeFrameworkVersion> property inside the csproj file, but starting with the .NET Core SDK 2.1.300, you no longer need to as it will know about the latest versions.
As Martin points out above, the SDK and .Net Core Runtime are separate entities.
I went to https://www.microsoft.com/net/download/windows and downloaded the latest SDK (2.1) and installed it on my local machine. You'll need to close any open VS instances to complete the SDK installation.
Open your project's csproj file and update netcoreapp2.0 to netcoreapp2.1 and while you're at it you can update the "Microsoft.AspNetCore.All" to version 2.1. This will save you from having to update the nuGet package.
Worked for me. Best of luck.

TeamCity can't build a portable/custom targeted library

I have a solution with a core library that is portable, targeted at Windows Store, .NET 4.5 and Windows Phone 8.0
This project will not build via TeamCity.
[12:31:36][GetReferenceAssemblyPaths] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(983, 5): warning MSB3644: The reference assemblies for framework ".NETPortable,Version=v4.5,Profile=Profile78" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
Is this a known problem or do I have to install something?
Install the Windows Phone SDK. Although the portable library offer's a bunch of platforms to be commonly compatible with, it still needs the relevant SDKs installed.