I am working with nuget and find it excellent with my MVC4 project. I use it for all my external dependencies.
I have run in to one small problem with it. For example, installing the jQuery package, it places the jQuery files in to the Scripts folder. My preference is that it places the javascript files in to a libraries folder within scripts. So instead of
Scripts/jquery-1.8.3.js
I want to place it in
Scripts/libraries/jquery-1.8.3.js
Yes I can manually move it but then I lose the features of nuget. Any way that I can direct where a package places the files like this?
This is not supported yet
dupe of
NuGet scripts to different directory
, nuget codeplex issue is here http://nuget.codeplex.com/workitem/1914
Related
In Visual Studio, when you add the Angular.js NuGet package, it adds a ton of angular javascript files. I've always just added the direct reference to angular.js (local or via google URL) to my projects and it always works fine.
What's the reason for using the NuGet version of Angular.js?
With Nuget it's easier to get all dependences (if they exists) and monitor updates when they comes out and install them.
But in case of Angular.js Nuget still just copy some js files in your project. So if you don't plan to follow updates and you know all dependences you can just copy your files.
Related to: Package an ASP.NET MVC application with Nuget
I'm trying to get a mode where I can edit an MVC project and package it easily.
As often suggested it is wise to replace a namespace using NuGet pre-processor functionality.
This would mean that I would have to edit my source files and add the pp extensions to each pre-processed source file.
Are there any tips and tricks to make this less labourious?
There is such a tool, that did almost exactly what I wanted. It's on Codeplex so I could participate in the development, yay!
https://nugetpackager.codeplex.com/
It has a common-line interface too, so I can script my updates.
Is there a fast way to move all the images and CSS from plug-ins' (like CKEditor or TinyMCE) folder to corresponding folders in the ASP.NET MVC projects' folders?
Maybe there are "out-of-the-box" or automated solutions Or the only way is to edit all the paths to the new ones?
NuGet is a Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework.
When you use NuGet to install a package, it copies the library files to your solution and automatically updates your project (add references, change config files, etc). If you remove a package, NuGet reverses whatever changes it made so that no clutter is left.
You can install new packages using the package manager console.
TinyMCE Package
CKEditor Package
I'm building websites in Umbraco and they all use similar components and base templates. The obvious best practice is to create packages that install these things ready. But I can't tell how to do things like add project references in Umbraco, and I can't tell how to create document types (a database object) in NuGet.
I've not been able to find a good comparison of abilities - what one package can do that the other can't - to be able to choose one or the other types of package. Or will I have to use both types of packages for different jobs (I don't want to go down this route if I can help it, since some features may require both packages).
EDIT for clarification, hopefully this will help. I'm trying to ask a blanket question to find out whether it is possible to use only one packaging system, rather than two. I want to avoid installing 2 different packages to get something to work properly.
Can a NuGet package trigger an automatic install of an Umbraco package?
Can a NuGet package create Umbraco objects, like document types, etc?
Can an Umbraco package add assembly references to a project?
I'm not sure where you're trying to use NuGet in Umbraco, the Umbraco packaging system isn't NuGet based, it's entirely different to NuGet (caveat - the next version of Umbraco will use NuGet for packaging).
The Umbraco package system, as currently defined, is capable of deploying any file into your target project be that CSS, JavaScript, Templates, Assemblies, User Controls, etc, as well as data into your database (Document Types, Content, etc).
Okay, so help me understand something here. I've got a new MVC solution and want to use NuGet to keep Modernizr up to date.
The problem is, NuGet puts the Modernizr scripts under ~/Scripts. This won't work--we've decided to put our JS in ~/js.
How do I modify the configuration of this package to tell NuGet that the Modernizr package should go in ~/Scripts or ~/Scripts/global instead?
I don't think you can do this - I don't think this is functionality of NuGet, but rather the location of the scripts inside the NuGet package. This could vary from one package to another :-(
This is currently not a feature of NuGet, but it was mentioned in discussion on the a NuGet forums including members of the NuGet team. I don't see any work item that has officially been created for this yet, unfortunately. I performed a quick search of the NuGet issues list for the word "location" and didn't see one out there for this. You might want to request it as a feature.