ASP.NET Core: jQuery-ajax-unobtrusive ASP.NET Core

This post shows you How to get Microsoft.jQuery.Unobtrusive.Ajax in Visual Studio for ASP.NET Core.

If you try to install Microsoft.jQuery.Unobtrusive.Ajax from Manage Nuget Packages in your Visual Studio, you can't find the library that you have installed. You only can download it offline from the nuget website, then unzip and copy files into your project.

If you want to download Microsoft.jQuery.Unobtrusive.Ajax in Visual Studio you can use bower to install it.

jquery-ajax-unobtrusive core

How to download Microsoft.JQuery.Unobtrusive.Ajax in ASP.NET Core MVC project?

First, you should download nodejs, then install to your computer.

then, read How to install bower for Visual Studio

Right-clicking on your project, then select Quick Install Package

Enter "Microsoft.jQuery.Unobtrusive.Ajax" at the search box.

jquery-ajax-unobtrusive core

Finally, click install button.

If you get an error as shown below.

'node' is not recognized as an internal or external command, operable program or batch file

Right-clicking on your computer, then select Properties => Advanced system settings.

Or you can

Open your Control Panel => System and Security => System => Advanced System Settings => Environment Variables.

In "User variables" or "System variables" you need to find variable PATH, then add node.js folder path as value.

Usually for 64bit you can see in C:\Program Files\nodejs. If variable doesn't exists, you need to create it.

computer system properties

Clicking Envirnoment Variables button => Click New button => Add new item as shown below.

add new user variables

Closing your Visual Studio, then reopen it and try to install Microsoft.jQuery.Unobtrusive.Ajax from bower in your Visual Studio.