R
Railway3mo ago
v

[Nixpacks] Trouble with .net 8 and the Web API template.

The command failing
nixpacks build WebApplication1/ --env NIXPACKS_CSHARP_SDK_VERSION=8.0
nixpacks build WebApplication1/ --env NIXPACKS_CSHARP_SDK_VERSION=8.0
10 Replies
Percy
Percy3mo ago
Project ID: N/A
v
v3mo ago
N/A LOGS
> [8/9] RUN dotnet publish --no-restore -c Release -o out:
0.212 MSBuild version 17.7.0-preview-23281-03+4ce2ff1f8 for .NET
0.374 /nix/store/r6yspcqpmvjdyvysj5rj7w40xm93g869-dotnet-sdk-8.0.100-preview.5.23303.2/sdk/8.0.100-preview.5.23303.2/Current/SolutionFile/ImportAfter/Microsoft.NET.Sdk.Solution.targets(36,5): warning NETSDK1194: The "--output" option isn't supported when building a solution. Specifying a solution-level output path results in all projects copying outputs to the same directory, which can lead to inconsistent builds. [/app/WebApplication1.sln]
0.553 /nix/store/r6yspcqpmvjdyvysj5rj7w40xm93g869-dotnet-sdk-8.0.100-preview.5.23303.2/sdk/8.0.100-preview.5.23303.2/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [/app/WebApplication1/WebApplication1.csproj]
0.646 /nix/store/r6yspcqpmvjdyvysj5rj7w40xm93g869-dotnet-sdk-8.0.100-preview.5.23303.2/sdk/8.0.100-preview.5.23303.2/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1064: Package Microsoft.AspNetCore.OpenApi, version 8.0.7 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. [/app/WebApplication1/WebApplication1.csproj]
-----
> [8/9] RUN dotnet publish --no-restore -c Release -o out:
0.212 MSBuild version 17.7.0-preview-23281-03+4ce2ff1f8 for .NET
0.374 /nix/store/r6yspcqpmvjdyvysj5rj7w40xm93g869-dotnet-sdk-8.0.100-preview.5.23303.2/sdk/8.0.100-preview.5.23303.2/Current/SolutionFile/ImportAfter/Microsoft.NET.Sdk.Solution.targets(36,5): warning NETSDK1194: The "--output" option isn't supported when building a solution. Specifying a solution-level output path results in all projects copying outputs to the same directory, which can lead to inconsistent builds. [/app/WebApplication1.sln]
0.553 /nix/store/r6yspcqpmvjdyvysj5rj7w40xm93g869-dotnet-sdk-8.0.100-preview.5.23303.2/sdk/8.0.100-preview.5.23303.2/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [/app/WebApplication1/WebApplication1.csproj]
0.646 /nix/store/r6yspcqpmvjdyvysj5rj7w40xm93g869-dotnet-sdk-8.0.100-preview.5.23303.2/sdk/8.0.100-preview.5.23303.2/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1064: Package Microsoft.AspNetCore.OpenApi, version 8.0.7 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. [/app/WebApplication1/WebApplication1.csproj]
-----
Brody
Brody3mo ago
you will likely be better off using a Dockerfile to build your application
v
v3mo ago
do you know the cause of this actually i have an idea an older app i have works fine
Brody
Brody3mo ago
nixpacks does not support version 8.0.7, you should write a Dockerfile instead
v
v3mo ago
this error also happends with .net 7 and nixpacks does recognize both
Brody
Brody3mo ago
my recommendation stands
v
v3mo ago
im sure it does but its kinda not the point here
Brody
Brody3mo ago
it would be best to use a Dockerfile instead of nixpacks
v
v3mo ago
i know, my ide even generates a docker file for my project, im just trying to pinpoint to reproduce this
Want results from more Discord servers?
Add your server