Hybrid release not working

Answered
0
0

Hello,

I have a question regarding testing a program using Wisej.NET 3.5.11 Hybrid.

I created a new project in Visual Studio 2022 (version 17.11.2) using the “Wisej.NET Hybrid Client Application” template. The application runs successfully when executed in debug mode from Visual Studio. However, it fails to start when I try to run the executable created from the release build.

I initially suspected that this issue might be due to not embedding the hybrid license into the program’s source code. To address this, I obtained the license code from Wisej.NET Hybrid Starter, embedded it into the source code, and performed a release build, but the issue persisted.

Could you please help me identify the cause of this problem and suggest a solution?

Note: The developer license I am currently using is an enterprise license purchased through ComponentSource.

Below is the program source code used for testing.
————————————————————————————
using Microsoft.Extensions.Logging;
using Wisej.Hybrid.Native.Core;

namespace HybridClient1
{
public static class Startup
{
public static MauiApp Main()
{
var builder = MauiApp.CreateBuilder();
builder
. UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont(“OpenSans-Regular.ttf”, “OpenSansRegular”);
fonts.AddFont(“OpenSans-Semibold.ttf”, “OpenSansSemibold”);
})

// Uncomment and replace with Offline startup Type to use embedded web server.
// .UseWisejOffline<OfflineStartup>()

.UseWisejHybrid((config) =>
{
config.LicenseKey = “Starter_LINCENSE_KEY”;
// Uncomment to provide an offline fallback timeout.
// config.OfflineTimeout = 5000;

// Provide the startup URL for the Hybrid WebView.
//config.StartupUrl = “http://localhost:5000”;
config.StartupUrl = “https://www.google.com/maps”;
});

#if DEBUG
builder.Logging.AddDebug();
#endif

return builder.Build();
}
}
}
————————————————————————————

  • You must to post comments
Good Answer
0
0

Thank you.
I was able to solve the problem with dotnet publish from the command line.
“publish” with a right mouse button click from the project.
The display is grayed out, so I have to use the Windows application
In the case of a Windows application, do I just run Exe in the release folder?
I was mistaken.

  • Julie (ITG)
    Yes, just run the exe in the release folder. In your case, I believe it should be called HybridClient1.exe, if you use the default name for the project.
  • You must to post comments
0
0

Hello,

I looked at your sample, here are some things you can try:

  1. Make sure to add the “Wisej Hybrid Remote Application” or “Wisej Hybrid Local Application” project template to your solution, not just the “Hybrid Client Application”. Here is a tutorial video for making a Wisej Hybrid Remote Application: https://docs.wisej.com/hybrid/development/remote-application
  2. I don’t think this is what you are experiencing, because you were able to publish the app and create an executable. However, just in case- if you right-click on the Hybrid Client project and see that the “publish” option is grayed out, you can publish using the dotnet publish command.

Hope this helps!

-Julie

  • You must to post comments
0
0

Attached is a sample program source that reproduces the problem.
Thank you in advance.

Attachment
  • You must to post comments
0
0

Can you please provide a sample project that reproduces the issue?

Please follow the guidelines at https://wisej.com/support/question/forum-guidelines under “Before Posting an Issue”

We will check out your sample and see if we can reproduce.

Thanks,

Julie

 

  • You must to post comments
0
0

“config.StartupUrl = “https://www.google.com/maps”;” as a Windows application in a hybrid before creating a web page for testing with no reason to use I just used the GoogleMAP address as a test to see if it would work as a Windows application in a hybrid before creating a test web page.

  • You must to post comments
0
0

Why this ?

config.StartupUrl = “https://www.google.com/maps”;

 

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.