0

In Visual Studio 2017, I needed to upgrade jQuery UI, from jquery-ui-1.8.20.js to jquery-ui 1.12. I wrote in NuGet console:

Install-Package jQuery.UI -Version 1.12.1

NuGet installed correctly but the files were downloaded in root. I need them in the Scripts folder (VS default for *.js) and in the Content folder (for *.css)

The main file downloaded by NuGet is jquery-ui.js, it has no number of version in the name of file. (Of course it's the correct version when checking its content)

What should I do? Copy manually the files into my desired folder?

I reference my scripts in VS by BundleConfig. Example:

bundles.Add(new ScriptBundle("~/bundles/jquery").Include(                      
                             "~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(                        
                             "~/Scripts/jquery-ui-{version}.js"));

Or maybe I need to modify this code in the Bundle? Or maybe unistall jQuery 1.12 and reinstall with another options in the NuGet console?

1 Answer 1

1

You need to copy manually the files into your desired folder.

The NuGet package files will be added into project based on the structure in packages. In NuGet Packages, all files will be added in Content folder. And if there has other folders under Content, the files will be added to the same folders in project.

For example, in jQuery.UI package, some files are stored under Content folder and others are stored under Scripts and images folder. You could download the package to local and open it with NuGet Package Explorer. If there has the same folder exist in your project, the files will be added into that folder directly. And if there doesn't have such folder, it will create new folder and add the files.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.