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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy