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

Blazor support #25

Open
mikart143 opened this issue Jan 28, 2020 · 7 comments
Open

Blazor support #25

mikart143 opened this issue Jan 28, 2020 · 7 comments

Comments

@mikart143
Copy link

In my opinion it will be a good approach to add Blazor support. Currently we have asp.net core and I think that adding a Blazor would be a good idea. I am talking about Blazor server side

@616E64726173
Copy link

that would require this project to actually work, which it does not.

@iwillspeak
Copy link
Member

I haven’t really had the time to maintain this for quite a while now. I’d be happy to receive pull requests to address this.

@iwillspeak
Copy link
Member

As far as blazer support though what would be required on top of just being able to host an ASP.NET Core WebHost?

@Frassle
Copy link
Contributor

Frassle commented Feb 23, 2020

I had a look at seeing if https://github.com/SteveSandersonMS/BlazorDesktop could be rejigged to run with webview rather than winforms. Looks possible but I don't have anything working yet.

@ghost
Copy link

ghost commented Jun 29, 2020

@Frassle You can try WebviewX.Host, don't forget to add STAThread Attribute to your program, if it runs on windows
(only support win10-x64;win10-x86;osx;linux-x64)

And make the following modifications to your program:

        [STAThread]
        public static void Main(string[] args)
        {
            CreateHostBuilder(args)
                .Build()
                // .Run();
                .RunWebview();
        }
            else
            {
                app.UseExceptionHandler("/Error");
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                // app.UseHsts();
            }

            // app.UseHttpsRedirection();
            app.UseStaticFiles();

@mikart143
Copy link
Author

@TheForgetTime did you make it running ? I saw this earlier but I was unable to run it. On new blazor project I get blank screen.

@ghost
Copy link

ghost commented Jul 3, 2020

@mikart143 Sorry, my last reply said not this library, but a brand new library based on the webviewX version that I packaged myself.
it's named of WebviewX.Core and WebviewX.Host

However this seems to work only on Linux and I also get a white screen on windows

webhost seems to stop before the webview window closes
see:
webview/webview#375

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

4 participants