How can I manually update jQuery UI installed via NuGet package? - asp.net

Situation
I am working on an ASP.NET Web Forms project that was generated using the default Visual Studio 2012 project template. I have since then used NuGet to install jQuery UI version 1.10.0.
I need to update to jQuery UI 1.10.1 because there is a bug fix I need. According to the website, 1.10.1 is the current stable version. However, there is not a NuGet package available for this version!
I don't know why the NuGet package would lag behind the latest available stable release from the jQuery UI team on their website. (Yes, I realize there is probably a different team managing the nuget package itself... but it still seems like this needs to be kept up to date.... or the value of installing jQuery via NuGet is very limited.)
Question
How do I update jQuery UI (installed as a NuGet package) manually to 1.10.1 on my project?
I have already downloaded the latest 1.10.1 javascript files. Now.... when I look inside my ASP.NET Web Forms project, I see in the following files in the Scripts folder:
So what should I do here... delete the following two files?
jquery-ui-1.10.0.js
jquery-ui-1.10.0.min.js
...and replace with these new files?
jquery-ui-1.10.1.js
jquery-ui-1.10.1.min.js
This doesn't seem like it would work.
The way jQuery is being include in my masterpage (from the default template generated by Visual Studio 2012) is like this:
That JS bundle you see above, called "jquery.ui.combined" is auto-magically generated by some kind of hidden code. Go ahead and look through your project... you won't find anywhere obvious this bundle is defined. So if I add the latest JS files... it seems I have no way to define that they get used or bundled at all. They aren't the version that the NuGet package logic/code would be expecting!!!
Any ideas?
Another potential problem
When I downloaded jQuery UI 1.10.1, it also came with jQuery Core 1.9.1. As you will see above in my Scripts folder, it appears as if jQuery UI 1.10.0 goes hand-in-hand with jQuery Core 1.9.0. If I update jQuery UI..... do I also need to update to the matching jQuery Core as well? (These are separate NuGet packages)
Please answer this specifically
I would like for the answer to explain how to manually update the version of jQuery UI installed from NuGet package.... on an ASP.NET Web Forms project.
I think this would be useful so that in the future a developer can pull down the latest bug fixes as soon as they are included in a stable release on the jQuery UI website.... without needing to wait for the package to show up on the NuGet feed.

The jQuery UI team hasn't uploaded the version 1.10.1 for their package. I'm afraid you just have to wait until they release it.
If you can't wait, you can uninstall the current version of jQuery UI first, and then manually add the script files of version 1.10.1 into your project.

Work-around... although it seems like a bad approach....
I just opened up these files....
jquery-ui-1.10.0.js
jquery-ui-1.10.0.min.js
...and replaced the contents with the contents from these files:
jquery-ui-1.10.1.js
jquery-ui-1.10.1.min.js
I left the file names the same as they were. So even though the JavaScript files are named as version "1.10.0".... they are actually holding the code for version "1.10.1".
One of the reasons I think this might be a terrible idea
What happens if some other developer attempts to pull down my code from source control... and they use NuGet Package Manager to restore the packages they did not have yet. Wouldn't it pull jQuery UI nuget package and replace the JavaScript files I have modified with the ones from the nuget package? Then the page would start exhibiting the buggy behavior again, and no one would know why.
At the very least.... for now I can continue development with the bug fixed! It was very annoying... the overlay was appearing on top of the dialog and I couldn't interact with the page. Here is the bug that was fixed: http://bugs.jqueryui.com/ticket/8984

Go To : Visual Studio -> Tools => Library Package => And Package Manager Setting
Window opens Having Options as in Screenshot
Click On Add (+) Button At Right Top And Inside Source Browser To Your Folder Location of Whatever Package of Nuget You HAve. Name is Whatever You Want And Press Ok
You Can See Now Your Package Into Extensions And Updates Window
To Install In Current Project
use Package Manager console : Install-Package ANd your package name

Related

Xamarin.Forms: Using open source code instead of the nuget package to debug

I am using this nuget package
https://github.com/jamesmontemagno/MediaPlugin
It is available for both ios and android in pcl.
I am using it to make videos in my app.
Unfortunately, it has issues on iOS that are inside the project, not inside my code.
I am therefore trying to debug the project, not just implement the nuget library.
It does work fine on Android, so all I want to change is the iOS part.
Unfortunately, I dont know how to insert the same library when it isnt a nuget package but just the solution and also how to then adress it from pcl code.
I havent found a solution on google, but probably I dont know how to describe the problem well enought.
How can I debug an open source nuget package?
Thank you
Download or clone the src code,
Go to your project in VS,
Right click on your solution, choose Add -> Existing project,
Navigate to MediaPlugin-master\src\Media.Plugin and choose Media.Plugin.csproj file,
Right click on your iOS project (or whatever project where you use the plugin), choose Add -> Reference,
Check Media.Plugin and click OK,
Now you should be able to use the plugin in your project code after adding using Plugin.Media; (and the code of the plugin will be available to you).

Do I need two versions of jQuery in Meteor?

In my Meteor project it looks like I've got two versions of jQuery running. My app is using the atmosphere package materialize:materialize and I know that one of its dependencies is jQuery. In my meteor/packages folder it shows version 1.11.10 being used.
But the confusing part is in my External Libraries folder. It also shows a version of jQuery 2.0.0. The only npm package that I have used for my app was when I brought in the babel runtime that was required for Meteor version 1.4.3.2. I had in the past installed Materialize from npm but removed it some time ago. Confused to why that jQuery 2 is there.
This is fine, it happens this way because of package dependencies, Meteor depends on what is quite an old version of JQuery, and one of your npm packages depends on 2.0.
It does seem strange, but it isn't a problem.
What is happening here is some of the meteor packages depends on jquery and some of the npm packages does the same so you end up having the lib installed twice. Nothing terrible except that clients would have to download the same library twice. This is a known bug here https://github.com/meteor/meteor/issues/6626. Not sure where is it going though, it's been there for quite long already.

Qt Installer Framework Uninstaller

Is there any script or example of Qt installer framework for "Un-installer"? I want to remove some folders using the maintenance tool.
According to the official documentation for Qt installer framework, the "uninstall" part is simply built in. Running the maintenance tool after install will provide the end user with the option of removing components or the entire package.
So for each component you have previously specified in your configuration, it will automatically show up as something that you can un-install.
Here is the screenshot from the documentation for reference:

Xamarin.Forms version

When I create a new Xamarin.Forms project within Visual Studio it uses an old version of the Xamarin.Forms DLL (v2.0.0.6482). In nuget theres an update available to v2.3.0.107.
Why is an old version being used on project creation?
Im on the latest Visual Studio 2015 update and Xamarin version.
Thanks in advance
This is expected since the Forms templates that ship with Xamarin for Visual Studio are not updated as frequently as the package itself. You can go ahead and update the packages to the latest version available on NuGet. Just make sure to update the Forms package in all the projects to the same version.
Note though, only update the Forms package inside the Android project and not the Android Support packages. Forms will also update those to the correct versions needed in order to avoid compatibility issues.
Ok, sounds like it is an issue for a few people.
I have gotten it working with the help of a friend!
It's working fine for me now; I followed the steps below:
Start a new Xamarin.Forms portable project
Uninstall all Xamarin nugets, clear the packages folder (others will be downloaded)
Close VS 2015
Clear the C:\Users_[Username]_\AppData\Local\Xamarin\zips folder, these will be downloaded automatically as needed.
Open the project
Update nugets then install Xamarin.Forms 2.0.0.6490, this should get the relevant version of dependencies for the android project (ie Xamarin.Android.Support.x). This will be v23.0.1.3, even though an update exists, as MatPag stated, it is not yet compatible.
Build.
This will take a long, long time, as the Xamarin\zips folder will be re-populated so a quite hefty file will be downloaded.
Might complain again, clean, save then reopen.
This is will definitely work fine

Updating Files in Existing Nuget Package

I've got a multi-project ASP.NET Web Forms Application solution. I need to share a master page (3 files), some user controls and some images, scripts and CSS files out to the other projects in the solution.
I have already created a package using the NuGet Package Explorer per the documentation:
http://docs.nuget.org/docs/creating-packages/using-a-gui-to-build-packages
My current problem is this: I have updated the shared files in the root project and now I want to update the package before pulling it into the other projects (package currently in a local folder on my dev machine). How do I do this?
If anyone has some getting-started-quickly NuGet links, please share as the official docs just aren't doing it for me.
create the package again with a new version aka if the orginal is 1.0 make this 1.1 and NuGet will pick up the update.
The NuGet file is ultimately just a zip file. You can update entries using anything that can update a zip file. Such as something like
using System.IO.Compression;
using System.IO.Compression.FileSystem;
// EG: AddOrUpdateZipEntry("mypackage.nupkg", "my.dll", "bin/my.dll")
void AddOrUpdateZipEntry(string zipFilePath, string contentsFilePath, string entryPathInZip)
{
using (var zip = ZipFile.Open(zipFilePath, ZipArchiveMode.Update))
{
zip.GetEntry(entryPathInZip)?.Delete(); // Remove any existing entry first.
zip.CreateEntryFromFile(contentsFilePath, entryPathInZip);
}
}
Are you asking what you need to do to update projects that are already using the package?
The key thing in this kind of scenario is simply versioning. The new version of the file will be sub'd out. Bundle up the package again with a new version number and then run Update-Package from the package manager console in VS.
You may also want to consider a couple of discreet packages, rather than one straight one. If you want to update a couple images or a CSS file, but not the MasterPage, it might work best to have a couple smaller ones.
Use the PM Explorer (from the post you mentioned) to open a couple packages from the NuGet main repository, in particular, jQuery 1.5.1 and 1.6.x and have a look, as these will be doing very similar things. No real magic needed!
Cheers.
I've already done it before. You just have to increment the version of your package, inside metadata of .nuspec file.
In my case, my packages names are '[name].[version].nupkg' so I save my new package as '[name].[version +1].nupkg' as well.
The update apears in 'Manage nuget packages' updates section.

Resources