skclusive / Skclusive.Blazor.Samples

Skclusive.Blazor.Samples
https://skclusive.github.io/Skclusive.Blazor.Samples/FlightFinder/
MIT License
169 stars 50 forks source link

Todo app doesn't build. #12

Closed FieldMarshallVague closed 4 years ago

FieldMarshallVague commented 4 years ago

Fresh folder, clone repo from Master or Dev. Get errors about 'not suitable method to override'. I've looked through code in both branches to see if there is a version I should be using, but can't see the 'DisposeAsync' anywhere on TodoAppComponent.

I copied the dependency projects locally, instead of using packages (to change version) and this doesn't work, so it looks like there is a mismatch with the checked in code and your code locally.

If you can provide the correct steps to get the Todo app running, that would be great.

skclusive commented 4 years ago

oh will check and updated. thanks for reporting.

skclusive commented 4 years ago

able to build Todo samples in master branch without modification.

if you are using dependency projects, please switch to develop branch on dependency project. also .NET 5.0.0 rc2 required.

FieldMarshallVague commented 4 years ago

Hmm, that's odd. I am using Rc2 and tried to build the samples (which failed) before I tried referencing the dependencies as projects. I'll give it another go.

FieldMarshallVague commented 4 years ago

you should know, that I get this error when cloning.

image

I tried many times to clone (even with Github desktop), but ended up using the download link instead.

I'm assuming that there is no difference between the download version and the clone version, but it makes me wonder...

FieldMarshallVague commented 4 years ago

Just giving you process feedback... I download the repo as a ZIP and unpack in new folder. I try build and it errors, saying the projects dependencies don't exist.

image

This is understandable, so I clone the repos into the relative folders. So it looks like this:

image

But the build still fails because it can't ind the project files. This is due to them being in a sub-folder of 'src'.

e.g. C:\projects\blazor\skclusive\Skclusive.Mobx.Component\src\Component (note the last 'component').

So, I edit the csproj file to add these missing folders. Rebuilding gives an error saying the project information cannot be found, so I do a dotnet restore from CLI. Then I build each dep project separately.

DomHelpers and DevTools result in error:

The command "npm run build" exited with code 1.

But the DLLs are created anyway, so I retry the build of TodoApp.Client. This proceeds further than last time, but I get the error:

'TodoAppComponent.DisposeAsync()': no suitable method found to override TodoApp.Client C:\projects\blazor\skclusive\Skclusive.Blazor.Samples-master\Skclusive.Blazor.TodoApp\TodoApp.Client\Components\App\TodoApp.cs

So, I have to do a manual NPM Install in the two projects, before running build on them in VS. The npm errors go away, but I still get that error about missing DisposeAsync above.

If I visit the file, I see other errors:

image

I have looked through the repo and cannot see where these methods are being provided. Please advise.

skclusive commented 4 years ago

thanks for the details. will follow the above steps and try to reproduce.

skclusive commented 4 years ago

reproduced. sorry. i should not noticed it. fixed and pushed it in master.

need to check why git clone also fails. might be the repo has commit logs which are quite heavy.

you can either download the master repo to get the fix or just uncomment the package references and comment the project references as in this commit.

https://github.com/skclusive/Skclusive.Blazor.Samples/commit/0650bdbf0913622ce128acd5a08d0945f994f0bb

FieldMarshallVague commented 4 years ago

Thank you! I'll take a look.

FieldMarshallVague commented 4 years ago

Yep, that's working fine for me now, just unzipped into folder, opened solution and ran fine. Thanks for sorting it out 👍