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

2 years ago

The command failing
nixpacks build WebApplication1/ --env NIXPACKS_CSHARP_SDK_VERSION=8.0

13 Replies

Anonymous
TRIALOP

2 years ago

N/A


Anonymous
TRIALOP

2 years ago

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] -----


2 years ago

you will likely be better off using a Dockerfile to build your application


Anonymous
TRIALOP

2 years ago

do you know the cause of this


Anonymous
TRIALOP

2 years ago

actually i have an idea


Anonymous
TRIALOP

2 years ago

an older app i have works fine


2 years ago

nixpacks does not support version 8.0.7, you should write a Dockerfile instead


Anonymous
TRIALOP

2 years ago

this error also happends with .net 7


Anonymous
TRIALOP

2 years ago

and nixpacks does recognize both


2 years ago

my recommendation stands


Anonymous
TRIALOP

2 years ago

im sure it does but its kinda not the point here


2 years ago

it would be best to use a Dockerfile instead of nixpacks


Anonymous
TRIALOP

2 years ago

i know, my ide even generates a docker file for my project, im just trying to pinpoint to reproduce this


Loading...