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

Deploy with .NET7 issue #2

Closed
Laftek opened this issue Mar 4, 2023 · 4 comments
Closed

Deploy with .NET7 issue #2

Laftek opened this issue Mar 4, 2023 · 4 comments

Comments

@Laftek
Copy link

Laftek commented Mar 4, 2023

I followed your tutorial and tried multiple others but having issue to deploy with .NET7. Could you please have a look and update the tutorial? Thanks for all the content you provide.

@Swimburger
Copy link
Owner

@Laftek Is there an error that you can share?

@Laftek
Copy link
Author

Laftek commented Mar 12, 2023

Thanks for coming back to me. Basically I was getting either one of 2 errors -> --output is not defined or .NET7.0 was not found, newest found was .NET Core 3.x.x. I will update with exact error once I got to my dev PC. You can see what I tried to make it work in commits here -> https://github.com/Laftek/BlazorAppPreRenderNoLoadingNet7. Disclaimer: I am using jsakamoto prerendering nuget (because I found it as good workaround to bypass company web server setting -> blocking dlls).

EDIT:
Here is the log from cloudflare:
2023-03-05T18:50:03.913013Z Cloning repository...
2023-03-05T18:50:06.055815Z From https://github.com/Laftek/BlazorAppPreRenderNoLoadingNet7
2023-03-05T18:50:06.056461Z * branch fcfb554695acc8b4153a32b7041d5df9598e2da9 -> FETCH_HEAD
2023-03-05T18:50:06.056649Z
2023-03-05T18:50:06.769929Z HEAD is now at fcfb554 more testing 1
2023-03-05T18:50:06.770582Z
2023-03-05T18:50:06.944282Z
2023-03-05T18:50:06.977254Z Success: Finished cloning repository files
2023-03-05T18:50:07.787633Z Installing dependencies
2023-03-05T18:50:07.80098Z Python version set to 2.7
2023-03-05T18:50:11.497332Z v12.18.0 is already installed.
2023-03-05T18:50:12.80666Z Now using node v12.18.0 (npm v6.14.4)
2023-03-05T18:50:13.051788Z Started restoring cached build plugins
2023-03-05T18:50:13.070175Z Finished restoring cached build plugins
2023-03-05T18:50:13.595738Z Attempting ruby version 2.7.1, read from environment
2023-03-05T18:50:17.657824Z Using ruby version 2.7.1
2023-03-05T18:50:18.058919Z Using PHP version 5.6
2023-03-05T18:50:18.245441Z 5.2 is already installed.
2023-03-05T18:50:18.276642Z Using Swift version 5.2
2023-03-05T18:50:18.277133Z Installing Hugo 0.54.0
2023-03-05T18:50:18.99151Z Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2023-03-05T18:50:18.99535Z Started restoring cached go cache
2023-03-05T18:50:19.015939Z Finished restoring cached go cache
2023-03-05T18:50:19.172429Z go version go1.14.4 linux/amd64
2023-03-05T18:50:19.188899Z go version go1.14.4 linux/amd64
2023-03-05T18:50:19.192148Z Installing missing commands
2023-03-05T18:50:19.192449Z Verify run directory
2023-03-05T18:50:19.192596Z Executing user command: ./cloudflare.build.sh
2023-03-05T18:50:20.362139Z dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
2023-03-05T18:50:20.362584Z dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
2023-03-05T18:50:20.362751Z dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
2023-03-05T18:50:20.362885Z dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
2023-03-05T18:50:20.363002Z
2023-03-05T18:50:21.459977Z dotnet-install: Attempting to download using aka.ms link https://dotnetcli.azureedge.net/dotnet/Sdk/7.0.200/dotnet-sdk-7.0.200-linux-x64.tar.gz
2023-03-05T18:50:22.672041Z dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/7.0.200/dotnet-sdk-7.0.200-linux-x64.tar.gz
2023-03-05T18:50:30.808352Z dotnet-install: Installed version is 7.0.200
2023-03-05T18:50:30.865232Z dotnet-install: Adding to current process PATH: /opt/buildhome/repo/dotnet7. Note: This change will be visible only when sourcing script.
2023-03-05T18:50:30.865667Z dotnet-install: Note that the script does not resolve dependencies during installation.
2023-03-05T18:50:30.865839Z dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
2023-03-05T18:50:30.866109Z dotnet-install: Installation finished successfully.
2023-03-05T18:50:31.099753Z 7.0.200
2023-03-05T18:50:31.385795Z
2023-03-05T18:50:31.387621Z Welcome to .NET 7.0!
2023-03-05T18:50:31.387923Z ---------------------
2023-03-05T18:50:31.388091Z SDK Version: 7.0.200
2023-03-05T18:50:31.38824Z
2023-03-05T18:50:31.38839Z Telemetry
2023-03-05T18:50:31.38855Z ---------
2023-03-05T18:50:31.388708Z The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
2023-03-05T18:50:31.38899Z
2023-03-05T18:50:31.389169Z Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
2023-03-05T18:50:31.389303Z
2023-03-05T18:50:31.389429Z ----------------
2023-03-05T18:50:31.389588Z Installed an ASP.NET Core HTTPS development certificate.
2023-03-05T18:50:31.389719Z To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
2023-03-05T18:50:31.389868Z Learn about HTTPS: https://aka.ms/dotnet-https
2023-03-05T18:50:31.38999Z ----------------
2023-03-05T18:50:31.390114Z Write your first app: https://aka.ms/dotnet-hello-world
2023-03-05T18:50:31.390223Z Find out what's new: https://aka.ms/dotnet-whats-new
2023-03-05T18:50:31.390347Z Explore documentation: https://aka.ms/dotnet-docs
2023-03-05T18:50:31.390457Z Report issues and find source on GitHub: https://github.com/dotnet/core
2023-03-05T18:50:31.390564Z Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
2023-03-05T18:50:31.390678Z --------------------------------------------------------------------------------------
2023-03-05T18:50:31.667479Z MSBuild version 17.5.0-preview-23061-01+040e2a90e for .NET
2023-03-05T18:50:34.215207Z Determining projects to restore...
2023-03-05T18:50:37.531406Z Restored /opt/buildhome/repo/BlazorAppPreRenderNoLoadingNet7.csproj (in 2.83 sec).
2023-03-05T18:50:44.683142Z BlazorAppPreRenderNoLoadingNet7 -> /opt/buildhome/repo/bin/Release/net7.0/BlazorAppPreRenderNoLoadingNet7.dll
2023-03-05T18:50:44.684612Z BlazorAppPreRenderNoLoadingNet7 (Blazor output) -> /opt/buildhome/repo/bin/Release/net7.0/wwwroot
2023-03-05T18:50:45.379097Z Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
2023-03-05T18:50:45.382842Z Optimizing assemblies for size. This process might take a while.
2023-03-05T18:50:51.370906Z Compressing Blazor WebAssembly publish artifacts. This may take a while...
2023-03-05T18:51:15.580629Z BlazorAppPreRenderNoLoadingNet7 -> /opt/buildhome/repo/bin/Release/net7.0/publish/
2023-03-05T18:51:15.610234Z It was not possible to find any compatible framework version
2023-03-05T18:51:15.610583Z The framework 'Microsoft.NETCore.App', version '7.0.0' was not found.
2023-03-05T18:51:15.610728Z - The following frameworks were found:
2023-03-05T18:51:15.610858Z 3.1.6 at [/opt/buildhome/.dotnet/shared/Microsoft.NETCore.App]
2023-03-05T18:51:15.610996Z
2023-03-05T18:51:15.611119Z You can resolve the problem by installing the specified framework and/or SDK.
2023-03-05T18:51:15.611249Z
2023-03-05T18:51:15.611398Z The specified framework can be found at:
2023-03-05T18:51:15.611514Z - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=7.0.0&arch=x64&rid=ubuntu.16.04-x64
2023-03-05T18:51:15.614556Z /opt/buildhome/.nuget/packages/blazorwasmprerendering.build/2.0.0-preview.7/build/BlazorWasmPreRendering.Build.targets(61,5): error MSB3073: The command "dotnet "/opt/buildhome/.nuget/packages/blazorwasmprerendering.build/2.0.0-preview.7/build/../tools/net7.0/BlazorWasmPreRendering.Build.dll" -a "BlazorAppPreRenderNoLoadingNet7" -t "BlazorAppPreRenderNoLoadingNet7.App" --selectorofrootcomponent "#app,app" --selectorofheadoutletcomponent "head::after" -p "/opt/buildhome/repo/bin/Release/net7.0/publish" -i "/opt/buildhome/repo/obj/Release/net7.0/." -m "" -f "net7.0" --serviceworkerassetsmanifest "" --environment "Prerendering" --emulateauthme "true" --locale "en" -o "IndexHtmlInSubFolders" -d -u "" -r "Static" --serverport "5050-5999" --bwapoptionsdllext "bin"" exited with code 150. [/opt/buildhome/repo/BlazorAppPreRenderNoLoadingNet7.csproj]
2023-03-05T18:51:15.685584Z Failed: build command exited with code: 1
2023-03-05T18:51:16.583453Z Failed: an internal error occurred

@Swimburger
Copy link
Owner

@Laftek based on that error it does look like something is going wrong when using the BlazorWasmPreRendering package.
The exit code is 150 which may help you track down the actual error, but apart from that I don't see any error message that could help you figure out what's wrong.

@Laftek
Copy link
Author

Laftek commented Apr 12, 2023

@Swimburger Thanks Swimburger and sorry for late response. I didnt have time to try it without it. Thank you again!

@Laftek Laftek closed this as completed Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants