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

Anonymous
TRIAL

a year ago

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

0 Replies

Anonymous
TRIAL

a year ago

N/A


Anonymous
TRIAL

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


a year ago

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


Anonymous
TRIAL

a year ago

do you know the cause of this


Anonymous
TRIAL

a year ago

actually i have an idea


Anonymous
TRIAL

a year ago

an older app i have works fine


a year ago

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


Anonymous
TRIAL

a year ago

this error also happends with .net 7


Anonymous
TRIAL

a year ago

and nixpacks does recognize both


a year ago

my recommendation stands


Anonymous
TRIAL

a year ago

im sure it does but its kinda not the point here


a year ago

it would be best to use a Dockerfile instead of nixpacks


Anonymous
TRIAL

a year ago

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