Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazor web assembly docker error blazor-devserver.dll does not exist

$
0
0

i'm trying to dockerize blazor web assembly app by docker composeso, do i need to to run a command to install the SDK because it's referring me to SDK or maybe some dll file doesn't copy to container or i'm not doing the right way for blazor web assembly

here is Dockerfile

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS baseUSER $APP_UIDWORKDIR /appEXPOSE 8080EXPOSE 8081FROM mcr.microsoft.com/dotnet/sdk:8.0 AS buildARG BUILD_CONFIGURATION=ReleaseWORKDIR /srcCOPY ["Client/AnswerMe.Client/AnswerMe.Client.csproj", "Client/AnswerMe.Client/"]COPY ["Client/AnswerMe.Client.Core/AnswerMe.Client.Core.csproj", "Client/AnswerMe.Client.Core/"]COPY ["BuildingBlocks/Models.Shared/Models.Shared.csproj", "BuildingBlocks/Models.Shared/"]RUN dotnet restore "Client/AnswerMe.Client/AnswerMe.Client.csproj"COPY . .WORKDIR "/src/Client/AnswerMe.Client"RUN dotnet build "AnswerMe.Client.csproj" -c $BUILD_CONFIGURATION -o /app/buildFROM build AS publishARG BUILD_CONFIGURATION=ReleaseRUN dotnet publish "AnswerMe.Client.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=falseFROM base AS finalWORKDIR /appCOPY --from=publish /app/publish .ENTRYPOINT ["dotnet", "AnswerMe.Client.dll"]

and the docker-compose.yml

  AnswerMe.client:    container_name: AnswerMe.client    image: ${DOCKER_REGISTRY-}answermeclient    build:      context: .      dockerfile: Client/AnswerMe.Client/Dockerfile    ports:      - "8080"      - "8081"

and I'm getting this error in container log file

2024-05-16 09:46:19 The command could not be loaded, possibly because:2024-05-16 09:46:19   * You intended to execute a .NET application:2024-05-16 09:46:19       The application '/app/../../../../.nuget/packages/microsoft.aspnetcore.components.webassembly.devserver/8.0.2/tools/blazor-devserver.dll' does not exist.2024-05-16 09:46:19   * You intended to execute a .NET SDK command:2024-05-16 09:46:19       No .NET SDKs were found.2024-05-16 09:46:19 2024-05-16 09:46:19 Download a .NET SDK:2024-05-16 09:46:19 https://aka.ms/dotnet/download2024-05-16 09:46:19 2024-05-16 09:46:19 Learn about SDK resolution:2024-05-16 09:46:19 https://aka.ms/dotnet/sdk-not-found

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>