Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet command fails after installing .NET SDK 8.0.403 on Mariner 2.0 #44372

Closed
damonbarry opened this issue Oct 22, 2024 · 4 comments
Closed
Labels
Area-CLI untriaged Request triage from a team member

Comments

@damonbarry
Copy link

Describe the bug

If I install .NET SDK 8.0.402 on a fresh Mariner VM (in Azure cloud) and do dotnet --version, the version is printed and the command has an exit status of 0. However, if I install the latest version, 8.0.403, dotnet --version prints an error message and has an exit status of 150.

To Reproduce

Create a Mariner 2.0 VM in Azure from PowerShell:

$image = 'MicrosoftCBLMariner:cbl-mariner:cbl-mariner-2:latest'
$location = 'westus2'
$nsg = "${env:USERNAME}-nsg"
$prefix = "${env:USERNAME}-mariner2-1"
$rg = "${env:USERNAME}-rg"
$sshkeypath = "$env:USERPROFILE\.ssh\id_rsa.pub"
$subnet = "${env:USERNAME}-subnet"
$subscription = '<Azure subscription name>'
$vmsize = 'Standard_D4ds_v5'
$vnet = "${env:USERNAME}-vnet"
az login
az account set -s $subscription
az group create --name $rg --location $location
az network nsg create --resource-group $rg --name $nsg --location $location
az network vnet create --resource-group $rg --name $vnet --location $location --subnet-name $subnet --nsg $nsg
az network public-ip create --resource-group $rg --name $prefix-ip --location $location --sku standard
az network nic create --resource-group $rg --name $prefix-nic --location $location --public-ip-address $prefix-ip --vnet-name $vnet --subnet $subnet
az vm create --name $prefix-vm --resource-group $rg --location $location --size $vmsize --image $image --admin-username azureuser --ssh-key-values $sshkeypath --nics $prefix-nic

Then SSH into the VM and run:

sudo dnf -y upgrade
sudo dnf install -y dotnet-sdk-8.0-8.0.402-1.x86_64
dotnet --version
echo $?

The output of the last two commands:

$ dotnet --version
8.0.402
$ echo $?
0

Then run:

sudo dnf remove -y dotnet-sdk-8.0-8.0.402-1.x86_64
sudo dnf install -y dotnet-sdk-8.0-8.0.403-1.x86_64
dotnet --version
echo $?

The output of the last two commands:

$ dotnet --version
You must install or update .NET to run this application.

App: /usr/share/dotnet/sdk/8.0.403/dotnet.dll
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.10' (x64)
.NET location: /usr/share/dotnet/

The following frameworks were found:
  8.0.8 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.10&arch=x64&rid=linux-x64&os=mariner.2.0
$ echo $?
150
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-CLI untriaged Request triage from a team member labels Oct 22, 2024
@damonbarry damonbarry changed the title dotnet command fails after installing .NET SDK 8.0.402 on Mariner 2.0 dotnet command fails after installing .NET SDK 8.0.403 on Mariner 2.0 Oct 22, 2024
@baronfel
Copy link
Member

@richlander / @leecow who controls mariner package availability? Are we missing the aspnet framework packages for 8.0.403/8.0.10?

@leecow
Copy link
Member

leecow commented Oct 22, 2024

Apologies for the miss. Mariner 2 has been updated and validated with 8.0.403.

@baronfel
Copy link
Member

Thanks @leecow - @damonbarry if you are able to update please let us know!

@damonbarry
Copy link
Author

@leecow @baronfel Thanks that worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CLI untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants