Using Blazorise in Project Does Not Show menus - blazor-server-side

I have used Visual Studio 2019 to create a Blazor server side project.
I then added Blazorise nuget to the project.
I followed the Blazorise quick start to add in the using statements and style sheets and jquery and the registrations.
Unfortunately, once I did that, the project menu (ie Home, Counter, Fetch Data) no longer works.
What am I doing wrong?
I'm using .net core 3.1 and also tried 3.0.
Thanks for any help.

I see what the issue is now.
In the documentation, some css has to be manually copied into the headers of index.html or _Host.cshtml. I inserted these at the end of the headers but it created a problem.
Instead, I should have inserted it just before site.css stylesheet and let site.css be the last statement in the header. Then, everything started working fine.
Thanks everyone!

Related

Hot Reload not working in Visual Studio 2022 .Net 6 Razor projects

We just upgraded all but one of our web app projects from .NET Core 3.1 projects to .NET 6 in our solution. These were ASP.NET Core 3.1 projects using Razor. Here are the results we're seeing with respect to Hot Reload:
The .NET 6 projects hot reload doesn't seem to work. Hot Reload is enabled, but our Front End is never updated. Refreshing the page doesn't seem to show the updates either.
The ASP.NET Core 3.1 project hot reload is working as expected.
When we run these projects in VS 2019, we can refresh the pages in any of our projects and we will see the updates. Are there some settings that we're missing here?
Big Thank you to Guru Stron! His comment in my question directed me to where I should've looked. We had to:
Update our Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation Nuget package
Add this to our launchsettings.json: ASPNETCORE_HOSTINGSTARTUPASSEMBLIES to "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation"
This answer solved our issue - .NET Core MVC Page Not Refreshing After Changes
First, Make sure all options are selected
In Hot reload, You can select Hot Reload On File Save(Not selected by default), Then VS will hot reload after you ctrl+s;
Demo
I had the same issue and after trying everything including rolling back the version and adding .AddRazorRuntimeCompilation() to Program.cs still didn't work. What I did was literally re-check the "Hot reload on file save" option when you click on the down arrow to bring up the menu on the hot reload button from the menu bar. That did the trick for me.
Hopefully this works for you.

How to create .razor files

I've created a Blazor project using .net core 3.0 preview5 and VS2019 Enterprise. I want to create .razor files, but all of my options have .cshtml extensions.
When I'm creating my project, I'm using asp.net core 3.0 and Blazor server hosted options
In VS 2019 16.3.0, adding "Razor Component" is what worked for me.
What works is:
Add, Add Class
and then change .cs to .razor before clicking [Add]
And immediately delete all the C# stuff of course.
Or you can copy/paste/rename any existing blazor component, like index.razor.
Make sure you've got the blazor extension installed.
This should then allow you to click on the Pages Directory and at the top there's an Add Razor Page option.
But I've got to admit, I tend to find it quicker to just select an existing page in the solution explorer and Ctrl-C Ctrl-V and rename it!
Note: At time of writing this is using the preview branch of Visual Studio 2019 and frameworks.
Right click on Pages-> Add->New Item...-> Razor Component

I cant find MVC 5 template on vs2017 community

please i have a issue; two issues as a matter of fact. I will upload screen shots to better explain my ordeal.
I am new to MVC and intend to start using MVC 5. the tutorial i have works with MVC5.
I have installed vs2017 community. When i star a new project, i find the "ASP.NET Web Application" template. which i select. after giving my project a name and selecting .NET framework version, the development frameworks that shows up for MVC, WEB FORMS, WEB API all have '4' on them (meaning version 4?). see attached screen shots
when i select MVC and my project folders are scafolded, in the App_start folder, i do not find the IdentityCOnfig.cs file (see attached screen shot)
can anyone please help me with how i can rectify this? i really do not know what is going on and need your help
thanks identityConfig.cs missing
MVC template showing '4'
Need choose User accounts I attached a Image

Error "Unable to load one or more of the requested types" on Telerik ASP.NET MVC Project

I start with Piranha for a week now, after read the documents and questions here I still can't solve the problem, so I post it here. Please help me. (I'm using Visual studio 2013 Update 2, Piranha 2.2.4)
I tested Piranha on the template project. Everything is fine, now I create a Telerik ASP.NET MVC Q3 2014 project and follow the "Getting started" tutorial to add Piranha to an exist project. I got this error message (I also applied this issue https://github.com/PiranhaCMS/Piranha/issues/277)
http://pastebin.com/1B0WNA2V
When I remove Piranha and Piranha.MVC reference and add references from source project I get this error
http://pastebin.com/17CSziUK
Please help me. Thanks a lot
Piranha CMS uses MEF to import extensions into the framework. There's been issues before that some other projects don't play to nice with MEF, maybe the Telerik stuff you're using has this issue.
There's a fix coming in 2.3 where you can tell the framework to only scan the Piranha assemblies for extensions which would probably fix your issues. I'll see if I can deploy a patch for this!
Regards
HÃ¥kan

MVC4 - AuthConfig.cs missing

I am trying to get started with the OpenAuth features of MVC4 as described here:
http://pluralsight.com/training/Player?author=scott-allen&name=mvc4-building-m7-security&mode=live&clip=9&course=mvc4-building
I already did start over again a couple of times in order not to miss anything, but even though I am choosing the right template (Internet Application) there is no AuthConfig.cs.
Nor do I find documentation what to do to get the required tasks done manually.
I am pretty sure this is a pretty dumb question, but maybe I don't find the answer because it is so obvious...
thx
I followed these steps:
Open File/New/Project
Select ASP.NET MVC 4 web Application
Then Select internet Application
Once the project was created there should be a AuthConfig.cs file within App_Start folder
unbelievable.. I used the RC Version of Visual Studio and even though I reinstalled MVC4 from scratch the recent version including the openauth extensions wasn't properly available.
Following the same steps on the regular Visual Studio Installation did the trick...