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

net9.0 Blazor Server NU1102 on dotnet restore --runtime linux-x64 #110624

Open
Wuz3t opened this issue Dec 11, 2024 · 5 comments
Open

net9.0 Blazor Server NU1102 on dotnet restore --runtime linux-x64 #110624

Wuz3t opened this issue Dec 11, 2024 · 5 comments
Labels
arch-wasm WebAssembly architecture area-Build-mono untriaged New issue has not been triaged by the area owner

Comments

@Wuz3t
Copy link

Wuz3t commented Dec 11, 2024

Description

Hi,

I'm trying to use dontet restore --runtime linux-x64. Restore is failed with message:
error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.Mono.linux-x64 with version (= 9.0.0)

Above line is used in my docker file. It started to crash after updating from .net8 to .net9

Reproduction Steps

  • create clear .net 9 Blazor Web App.
  • run dontet restore --runtime linux-x64

Expected behavior

dontet restore is finished without arrors

Actual behavior

command finishes with message: error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.Mono.linux-x64 with version (= 9.0.0)

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

It is specific to restore, buld works fine.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 11, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Dec 11, 2024
@jeffschwMSFT jeffschwMSFT added the arch-wasm WebAssembly architecture label Dec 12, 2024
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

@jeffschwMSFT
Copy link
Member

That runtime package has been deprecated, here is the breaking change - dotnet/docs#41366.

Please share the exact steps taken to hit this. The command 'dotnet restore --runtime linux-x64' should not be trying to restore the mono runtime pack.

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@vcsjones vcsjones removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 16, 2024
@L-Sypniewski
Copy link

L-Sypniewski commented Dec 17, 2024

I'm having the same issue both when building the docker image and executing dotnet restore Frontend.sln --runtime linux-x64 locally on Ubuntu 24.04:

FROM mcr.microsoft.com/dotnet/sdk:9.0.101-noble-amd64 AS restore
WORKDIR /src

# Copy solution file, project files, and props files
COPY *.sln */*.csproj Directory.Build.props Directory.Packages.props ./
RUN for file in $(ls *.csproj); do mkdir -p ${file%.*}/ && mv $file ${file%.*}/; done

# Restore packages with specific runtime identifier
RUN dotnet restore Frontend.sln --runtime linux-x64

FROM restore AS build
ARG BUILD_CONFIGURATION=Release
# Copy the rest of the source files
COPY . .
WORKDIR /src
RUN dotnet build Blazor/Blazor.csproj --no-restore -c $BUILD_CONFIGURATION -r linux-x64 

FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish Blazor/Blazor.csproj --no-restore --no-build -c $BUILD_CONFIGURATION -r linux-x64  -o /app/publish

FROM mcr.microsoft.com/dotnet/aspnet:9.0.0-noble-chiseled-extra-amd64 AS final
WORKDIR /app
COPY --from=publish /app/publish .
USER app
EXPOSE 8080
ENTRYPOINT ["dotnet", "Blazor.dll"]

The solution contains ASP NET Core and Web Assembly projects, both migrated to NET 9 and using the latest nuget packages.

@steveisok
Copy link
Member

@lewing I think this is <UseMonoRuntime> set for all cases likely as a result of targeting wasm somewhere. I think it needs to be fixed inside the blazor build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Build-mono untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

5 participants