In the previous blog, Create a new NuGet package, we successfully create a NuGetExample.1.0.0.nupkg
Now, let’s using it in our Visual Studio project.
Create an empty MVC4 project, so far there is no Scripts folder
We can install jQuery but version 1.7 first into our project by execute command in Package Manager Console
Install-Package jQuery –Version 1.7
Now, Scripts folder and 3 jQuery .js files are added
Click to open Package Manager Settings
Add a new local source which we created in previous blog
Open Manager NuGet Packages window, switch to “Local 2” source, we are now able to install our own package, NuGetExample with jQuery 2.0 dependency
Installing…in progress
After that, we can see both our script file, MyNuGetScript.js and jQuery 2.0 are added in our project
*********************************************************************************************************
By the way, if we are trying to Uninstall-Package jQuery, we will encounter an error saying that due to NuGetExample has dependency with jQuery
沒有留言:
張貼留言