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

Oryx fails to spot compatible dotnet runtime versions even when installed. #2541

Closed
Mathiyarasy opened this issue Nov 13, 2024 · 1 comment
Closed

Comments

@Mathiyarasy
Copy link

Mathiyarasy commented Nov 13, 2024

Bug Report

  • At what date and time did you most recently experience the problem?

  • Where did you experience the problem? E.g. Azure Web Apps, Azure Functions, Azure Container Registry, or offline use.

    In building Devcontainer Features and Images

  • If your repo is publicly available please share its URL:
    https://github.com/devcontainers/features/blob/2951f0481a488ea43a6f2ea6f18a47f0a0bf744d/src/oryx/install.sh#L195

  • What happened?
    In Dev containers we are using Oryx as a feature to be installed in images.
    For image: ubuntu:focal installed Dotnet SDK: 8.0.101 and runtime version is 8.0.1
    Then when we build and publish project from oryx repo: BuildScriptGeneratorCli.csproj
    could not run the Published dll GenerateBuildScript.dll . Landing in runtime issue stating
    "You must install or update .net to run the application. Frameworks are not found"
    Despite having .net sdks and runtimes installed. Dotnet is installed using install.sh script
    using 8.0.101 dotnet sdk as mentioned in document: https://github.com/microsoft/Oryx/blob/main/doc/supportedPlatformVersions.md#focal-scm

    Options Checked:
    .
    dotnet --list-sdks :

        Gathering SDK locations in [/usr/share/dotnet]
        Found SDK version [7.0.410]
        Found SDK version [8.0.101]
        7.0.410 [/usr/share/dotnet/sdk]
        8.0.101 [/usr/share/dotnet/sdk]
    

    dotnet --list-runtimes:

      Microsoft.AspNetCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
      Microsoft.AspNetCore.App 8.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
      Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
      Microsoft.NETCore.App 8.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
    
    DOTNET_ROOT environment variable is set correctly
    PATH also have reference to installed dotnet location
    

    Tried higher versions of sdk ex:8.0.202 landed in same issue

    Could you please help us in figuring out the compatible version of .net sdk for GenerateBuildScript.dll?

  • What did you expect or want to happen?
    Published GenerateBuildScript without any issues .

  • How can we reproduce it?
    Build and Publish the project when installed .net SDK is 8.0.101.

  • Do you have log output? Please include between the backticks:

You must install or update .NET to run this application.

App: /usr/local/buildscriptgen/GenerateBuildScript
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0' (x64)
.NET location: /usr/local/buildscriptgen/

No frameworks were found.

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&arch=x64&rid=linux-x64&os=ubuntu.20.04
@Mathiyarasy Mathiyarasy changed the title Oryx GenerateBuildScript.dll fails to spot compatible dotnet runtime versions even when installed. Oryx fails to spot compatible dotnet runtime versions even when installed. Nov 14, 2024
@Mathiyarasy
Copy link
Author

It is working when publishing the dotnet project with runtime. using --self-contained true tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant