PeterHimschoot / BlazorRevealed

0 stars 0 forks source link

How to run the demo in VS2019? #1

Open ZedZipDev opened 4 years ago

ZedZipDev commented 4 years ago

Hi Peter, thank you for your book and for the demo. I have decided to build it in VS2019 (16.4)+NET Core 3.1 and run. The BlazorControlsDemo.Controls, BlazorControlsDemo.Shared were built ok.

But BlazorControlsDemo.Client is failed:

error CS0246: The type or namespace name 'App' could not be found 

 static void Main(string[] args)
        {
            var serviceProvider = new BrowserServiceProvider(services =>
            {
                // Add any custom services here
            });

            new BrowserRenderer(serviceProvider).AddComponent<App>("app"); // <------Error
        }

How to fix it?

PeterHimschoot commented 4 years ago

Hi Oleg,

Blazor Revealed was written for Blazor at that time, which was a pre-release. I am in the process of updating the book for the official release (this year in May). You can find the files in github here: https://github.com/PeterHimschoot/BlazorRevealed2nd

I hope these will help resolving the syntax changes...

Kind regards,

Peter

On Sun, Jan 19, 2020 at 2:07 PM Oleg26Dev notifications@github.com wrote:

Hi Peter, thank you for your book and for the demo. I have decided to build it in VS2019 (16.4)+NET Core 3.1 and run. The BlazorControlsDemo.Controls, BlazorControlsDemo.Shared were built ok.

But BlazorControlsDemo.Client is failed:

error CS0246: The type or namespace name 'App' could not be found

static void Main(string[] args) { var serviceProvider = new BrowserServiceProvider(services => { // Add any custom services here });

        new BrowserRenderer(serviceProvider).AddComponent<App>("app"); // <------Error
    }

How to fix it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PeterHimschoot/BlazorRevealed/issues/1?email_source=notifications&email_token=AAIJHPXOLB4SVY6Y7XGM523Q6RGCJA5CNFSM4KIZFD22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IHFUCNA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIJHPRVYCJBTJRMR2JSIVDQ6RGCJANCNFSM4KIZFD2Q .