Coder Social home page Coder Social logo

photinosamples.vscodetemplates's People

Contributors

philippjbauer avatar mikeyeager2 avatar mikeyeager avatar

Watchers

 avatar  avatar

photinosamples.vscodetemplates's Issues

PhotinoReact template does not work out of the box

I'm using Windows 11, and when I install the photinoreact template, and run dotnet restore && dotnet run, I get the following warnings:

~\.nuget\packages\microsoft.extensions.fileproviders.embedded\6.0.9\build\netstandard2.0\Microsoft.Extensions.FileProviders.Embedded.targets(19,5): 
warning : GenerateEmbeddedFilesManifest was set, but no EmbeddedResource items were found that could be added to the manifest. 
[~\Dev\DemoPhotinoReactApp2\HelloPhotino.React.csproj]

~\Dev\DemoPhotinoReactApp2\Program.cs(43,48): 
warning CS8622: Nullability of reference types in type of parameter 'sender' of 'lambda expression' doesn't match the target 
delegate 'EventHandler<string>' (possibly because of nullability attributes). 
[~\Dev\DemoPhotinoReactApp2\HelloPhotino.React.csproj]

Warning 1 Fix

I am able to fix the first warning, by setting:

https://github.com/tryphotino/photino.Samples/blob/1e7797146a25304f1439b1236020cf77831ce115/Photino.HelloPhotino.React/HelloPhotino.React.csproj#L17

to:

<EmbedWwwRoot>true</EmbedWwwRoot>

Warning 2 Fix

And fix the second warning by replacing the following part of Program.cs:

https://github.com/tryphotino/photino.Samples/blob/1e7797146a25304f1439b1236020cf77831ce115/Photino.HelloPhotino.React/Program.cs#L44-L55

.RegisterWebMessageReceivedHandler((object? sender, string message) =>
    {
        var window = (PhotinoWindow?)sender;

        // The message argument is coming in from sendMessage.
        // "window.external.sendMessage(message: string)"
        string response = $"Received message: \"{message}\"";

        // Send a message back the to JavaScript event handler.
        // "window.external.receiveMessage(callback: Function)"
        window?.SendWebMessage(response);
    })

Only after applying both fixes, does dotnet run work and the window shows up.

Templates Outdated?

Hello there ๐Ÿ‘‹,

I'm just getting started with Photino - which is really great, and I was wondering why the templates default to .NET 6. Additionally, some of the UI dependencies seem to be out of date as well, e.g Angular 14 instead of 17. Is this some kind of compatibility issue or should they default to the latest versions?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.