Issue deploying dotnet blazor app

calvinwilkinson
HOBBY

8 months ago

I am learning about the platform and I am trying to create a super basic default blazor web application, and get it deployed. I am running into issues though.

The errors seem a bit strange, though. Why would the script tags have anything to do with deploying?

This is the deploy logs

[8/9] RUN dotnet publish -c Release -o out:

0.331 MSBuild version 17.7.0-preview-23281-03+4ce2ff1f8 for .NET

0.925 Determining projects to restore…

1.571 All projects are up-to-date for restore.

1.604 /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/BlazorApp1.sln]

1.648 /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/BlazorApp1/BlazorApp1.csproj]

8.219 /app/BlazorApp1/Components/App.razor(17,1): error RZ9992: Script tags should not be placed inside components because they cannot be updated dynamically. To fix this, move the script tag to the 'index.html' file or another static location. For more information, see https://aka.ms/AAe3qu3 [/app/BlazorApp1/BlazorApp1.csproj]

8.219 /app/BlazorApp1/Components/Routes.razor(1,1): warning RZ2012: Component 'Router' expects a value for the parameter 'NotFound', but a value may not have been provided. [/app/BlazorApp1/BlazorApp1.csproj]

8.219 /app/BlazorApp1/Components/Pages/Weather.razor(2,13): error CS7036: There is no argument given that corresponds to the required parameter 'enabled' of 'StreamRenderingAttribute.StreamRenderingAttribute(bool)' [/app/BlazorApp1/BlazorApp1.csproj]

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

1 Replies

calvinwilkinson
HOBBY

8 months ago

Another strange thing is that it is using 8.0.100 preview for the sdk.

But I have an environment variable with the name 'NIXPACKS_CSHARP_SDK_VERSION' set to a value of 8.0.403. But it is using 8.0.100-preview anyways?

║ setup │ dotnet-sdk_8 ║

Nov 02 12:59:03

#8 24.27 /nix/store/r6yspcqpmvjdyvysj5rj7w40xm93g869-dotnet-sdk-8.0.100-preview.5.23303.2

Nov 02 12:59:06

#8 26.90 copying path '/nix/store/r6yspcqpmvjdyvysj5rj7w40xm93g869-dotnet-sdk-8.0.100-preview.5.23303.2' from 'https://cache.nixos.org';...

Nov 02 12:59:21

#10 0.281 SDK Version: 8.0.100-preview.5.23303.2