Push of Dotnet Core App Fails - Unable to install dotnet-runtime: could not find a version of dotnet-runtime to install
search cancel

Push of Dotnet Core App Fails - Unable to install dotnet-runtime: could not find a version of dotnet-runtime to install

book

Article ID: 298114

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

When pushing a dotnet core app (source-based), staging fails with the error below:
Updating app <app-name>...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 1.24 MiB / 1.24 MiB [============================================================================================================================================================================================================================================] 100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Downloading dotnet_core_buildpack
   Downloaded dotnet_core_buildpack
   Cell <guid> creating container for instance <guid>
   Cell <guid> successfully created container for instance <guid>
   Downloading app package...
   Downloaded app package (21.3M)
   -----> Dotnet-Core Buildpack version 2.3.19
   -----> Supplying Dotnet Core
   -----> Installing libunwind 1.5
          Copy [/tmp/buildpacks/92612035d6cd08f2732c30967b1621fc/dependencies/66a4a9541b55947fd8e80a9863001705/libunwind_1.5_linux_noarch_cflinuxfs3_6a1dd8f2.tgz]
   -----> Installing dotnet-sdk 5.0.100
          Copy [/tmp/buildpacks/92612035d6cd08f2732c30967b1621fc/dependencies/41b575ca24268a8911a91a00dd1795ef/dotnet-sdk_5.0.100_linux_x64_any-stack_d33b9ac2.tar.xz]
   -----> Installing dotnet-runtime 5.0.0
          Copy [/tmp/buildpacks/92612035d6cd08f2732c30967b1621fc/dependencies/17189cef4e746c99663976929761c839/dotnet-runtime_5.0.0_linux_x64_any-stack_e6845054.tar.xz]
   -----> Finalizing Dotnet Core
          **ERROR** Unable to install dotnet-runtime: could not find a version of dotnet-runtime to install

   Failed to compile droplet: Failed to run finalize script: exit status 12
   Exit status 223
   Cell <guid> stopping instance <guid>
   Cell <guid> destroying container for instance <guid>

Error staging application: App staging failed in the buildpack compile phase
FAILED


Environment

Product Version: 2.9

Resolution

This is a bug with the dotnet core buildpack and will be fixed with a coming release. The buildpack should recognize the target framework value of 'net5.0'.

There are 2 workarounds:

1. Lock your target runtime framework with the RuntimeFrameworkVersion property in your project file and specify a runtime that your buildpack version contains, e.g. 5.0.

2. If you do not wish to lock your runtime version, modify the TargetFramework property in your project file to use the format that was used for previous .NET framework versions, for example for .NET 5, it is "netcoreapp5.0", the property specifically being:
<TargetFramework>netcoreapp5.0</TargetFramework>