Skip to content

launch dotnet run app.cs from docker sdk image #6721

@tomap

Description

@tomap

Describe the bug

Hello,

I'm trying to launch the new file-based dotnet run (docker sdk 10.0)

But this does not work

Which .NET image(s) are you using?

mcr.microsoft.com/dotnet/sdk:10.0

Steps to reproduce

dotnet run -v:diag changelog.cs

result:

$ dotnet --info
.NET SDK:
 Version:           10.0.100-rc.1.25451.107
 Commit:            2db1f5ee2b
 Workload version:  10.0.100-manifests.1a2d104c
 MSBuild version:   17.15.0-preview-25451-107+2db1f5ee2
Runtime Environment:
 OS Name:     ubuntu
 OS Version:  24.04
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/10.0.100-rc.1.25451.107/
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
  Version:      10.0.0-rc.1.25451.107
  Architecture: x64
  Commit:       2db1f5ee2b
.NET SDKs installed:
  10.0.100-rc.1.25451.107 [/usr/share/dotnet/sdk]
.NET runtimes installed:
  Microsoft.AspNetCore.App 10.0.0-rc.1.25451.107 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 10.0.0-rc.1.25451.107 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
  None
Environment variables:
  DOTNET_GENERATE_ASPNET_CERTIFICATE       [false]
  DOTNET_NOLOGO                            [true]
  DOTNET_ROLL_FORWARD                      [Major]
  DOTNET_RUNNING_IN_CONTAINER              [true]
  DOTNET_SDK_VERSION                       [10.0.100-rc.1.25451.107]
  DOTNET_USE_POLLING_FILE_WATCHER          [true]
  DOTNET_VERSION                           [10.0.0-rc.1.25451.107]
global.json file:
  Not found
Learn more:
  https://aka.ms/dotnet/info
Download .NET:
  https://aka.ms/dotnet/download
$ chmod +x scripts/changelog.cs
$ cd scripts
$ dotnet run changelog.cs
__________________________________________________
Project "/data/runner/builds/scripts/changelog.csproj" (Restore target(s)):
/data/runner/builds/scripts/changelog.csproj : error MSB4025: The project file could not be loaded. Could not find file '/data/runner/builds/scripts/changelog.csproj'.  /data/runner/builds/scripts/changelog.csproj
Done building project "changelog.csproj" -- FAILED.
The build failed. Fix the build errors and run again.

Other information

No response

Output of docker version

Output of docker info

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions