8000 System.IO.FileLoadException: Could not load file or assembly · Issue #736 · dotnet-script/dotnet-script · GitHub
[go: up one dir, main page]

Skip to content
System.IO.FileLoadException: Could not load file or assembly #736
Closed
@m4ss1m0g

Description

@m4ss1m0g

When I execute this code it raises FileLoadException, the issue can be reproduced also in a Docker container.

#r "nuget: NuGet.Packaging, 6.7.0"
#r "nuget: NuGet.Protocol, 6.7.0"

using System.Threading;
using NuGet.Common;
using NuGet.Protocol;
using NuGet.Protocol.Core.Types;
using NuGet.Versioning;

Console.WriteLine("Start");

ILogger logger = NullLogger.Instance;
CancellationToken cancellationToken = CancellationToken.None;

SourceCacheContext cache = new();

And the Dockerfile

FROM mcr.microsoft.com/dotnet/sdk:7.0

# https://www.nuget.org/packages/dotnet-script/
RUN dotnet tool install dotnet-script --tool-path /usr/bin

WORKDIR /app
COPY main.csx .
ENTRYPOINT [ "dotnet", "script", "main.csx" ]

For building the image docker build -t dotnet-script . for run docker run --rm dotnet-script

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0