BlazorInputFile
BlazorInputFile copied to clipboard
Installing nuget package broke my solution, uninstalling didn't fix it.
As soon as I installed the Nuget package I received:
"The type or namespace 'MainLayout' could not be found (are you missing a using directive... (I get that 2 times in App.razor)
I also get: "Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the deligate return type." in App.razor.g.cs.
I've cleaned the project, shut down VS2019 Preview, deleted the obj and bin folders. Nothing helps.
Any ideas how to troubleshoot this?
Not sure if it will help you, but I have a sample page that uses BlazorInputFile project, not the Nuget package. It now works with the latest release of Visual Studio 16.4.
https://github.com/DataJuggler/BlazorFileUpload
Sample Project is here: https://github.com/DataJuggler/BlazorFileUpload/tree/master/Sample/FileUploadSample
If it has to be a Nuget package, the same project is on Nuget (makes sure Preview Release is selected if using the GUI Package Manager)
Install-Package DataJuggler.Blazor.FileUpload -Version 1.0.11-Preview
I don't think a nuget can "break" the solution.. vs/blazor has big problems with temp files (in obj folder).. just copy/paste everything into another folder
I have seen same when I was updating old apps.
It is not related to nuget package install.
You are probably missing in _imports.razor
@using Microsoft.AspNetCore.Components.Web
or namespace is wrong or .cshtml is not changed to .razor or some kind of that mistake.
If you show code I can check it.
I did lot of updates to RC lately and have seen those VS complains.
Also in _imports.razor make sure you have shared folder.
@using someapp.shared
It is necessary mainlayout to be visible.