-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source items in NuGets, e.g. bootstrap, jquery etc. not handled yet? #65
Comments
Yes Scripts and Content folders are not handled yet. Would you volunteer? |
I'd love to but I can't spread myself too thin right now - I have a backlog of OS and CS work at the minute. I will continue to beta test Paket in the context of the CS work but there's just too much yakshavery infrastructure stuff (which will go into FunDomain). But watch this space :D |
Are we also gonna make use of PowerShell? Nuget uses it when installing/uninstalling packages: http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#Automatically_Running_PowerShell_Scripts_During_Package_Installation_and_Removal |
@theimowski I think it's not possible. NuGet command line doesn't run |
No. I don't want to go this route. FYI: FAKE.deploy can run FAKE scripts (fsx) in nuget packages. ;-)
|
@agross Yes, there's not much meaningful out of a One potential thing though is token replacement and/or source file substitutions which should be considered part of this (i.e. its pretty common for source projects to have |
Please don't do any pre/post-execution using anything that is provided in packages. This is one of the worst features of nuget. It was only invented for VS conveniences and causes a lot of troubles and misuses. Apart of that, Powershell would break the x-plat promise. Please, I urge you to not do anything with scripts in packages. |
no we won't run code from the package - but we should try to repect all the declarative information that we find |
then, for now, the task here would be to copy stuff from Content dir to project dir and add appropriate entries to proj file? |
exactly. flagging this as up-for-grabs |
I will give it a try |
@theimowski As alluded to in the comment above, note that part of the standard NuGet functionality in this area is that the old files get removed as the old package is 'uninstalled' except if there have been changes, it issues a warning and leaves them there. IIRC then installing the new version warns again about not replacing it. Examples of stuff using this is Ninject.Web, which has a 'template' file that sets up initialization order wiring, and then in the comments says "put your stuff here". Now, arguably Of course, having said that, I'd like a half baked impl to blast in new boostrap/jquery as it happens (though I'll get annoyed if I end up chasing problems due to orphaned files!). Another potential thing that native NuGet more than likely does not address is that updates to Good writeup on authoring conventions (obv the impl needs to primarily concern itself with the nuget consumption side of things more than that) |
I created a PR with very simple strategy for the moment: Removing all content files that Paket resolved followed by reinstalling all defined |
Yes please test #84 and give us feedback. Thanks |
@forki @theimowski As noted over on #84, tested the PR in the context of this and main issue is that the insertion sequence triggers issues due to the order sensitivity of the VS @theimowski BTW most of this stuff should be v reproable with a vanilla [F# MVC 5](http://visualstudiogallery.msdn.microsoft.com/39ae8dec-d11a-4ac9-974e-be0fdadec71b project). (I chose Web Api 2, the non-empty one which has an |
Ok there are a couple of half-baked solutions to this. I would start with alphabetical order. @forki https://github.com/forki @theimowski — |
@forki For F# projects, conceptually the dependency hierarchy should be considered, i.e. if source package A has a The other constraint is (obviously) that the Paket insertions need to be injected [immediately] before the batch of user-added files in that same folder. And (for avoidance of doubt, I'm sure you're considering this) for avoidance of eggregious diffs, it needs to guarantee idempotency via some predictable ordering after that.
Erwhaddyamean? |
I examined packages we really use and the main useful thing param($rootPath, $toolsPath, $package, $project)
Add-BindingRedirect $project.Name I'm not sure we can ignore this. |
So, what I should do with something param($installPath, $toolsPath, $package, $project)
foreach ($fontFile in $project.ProjectItems.Item("fonts").ProjectItems)
{
$fontFile.Properties.Item("BuildAction").Value = 2;
} Do you suggest adding all those files by hand? |
No but that's something that should be declared not programmed. I'm suggesting we (as a . NET community) start to fix this at the root. |
I mean this loop is broken on so many levels and only works from inside VS |
nuget.exe install FontAwesome doesn't run the script either. If you need tooling to change the items to be always copied to the output directory, then yes, I think you should learn to do that yourself. |
@agross It seems it's hard to formulate this in a nice way. ;-) Let me rephrase a bit: we do know that these problems exist. We don't think adding ps1 to paket would help. Actually we don't know of any way to get it working with our model since we don't live inside vs. But we are open for all other solutions to make the transition easier. |
@vasily-kirichenko @forki OK, I think an apology is in order. I'm sorry my last statement came across as harsh. Still, in my opinion, the discussion about the scripts shows how spoilt we all are w.r.t. our beloved VS tooling. |
@vasily-kirichenko @forki @agross In my (production, diverse VS versions, diverse NuGet versions, closed source) experience, the mucking about in VS in the |
This is just a summary, all these items are covered elsewhere, but in terms of supporting the F# MVC template, the following things could be better. None are disasters so arguably these could be split out into individual issues:
It should also be pointed out that right now, NuGet cannot update from boostrap 3 / w/ jquery 1.9 to anything as it chokes due to the project system/VFPT not handling foldering sufficiently so this is quite an achievement - and a must have for this stuff to even work. |
Remaining bit is that because no binding redirects get added, when I use specify my deps as:
OOTB Build output on a wizard MVC 5 + WebApi 2 app says:
I can't figure out why I can't hit enter / why I should be able to hit enter (C#/web project system?) but if I put in what it says, it works. UPDATE: Doing |
UPDATE: So the issues spawned by the F# MVC 5 template that are not yet in separate issues [and hence things I'd like to cover before this gets closed] are:
Happy to expand and/or calve off issues for these one by one as desired |
I'm using the F# MVC 5 template addin to wizard up a WebApi app (targetting FW 4.5.1).
The
bootstrap
(v3.2) package (and I think jquery which it depends on too) seems not to be extracting files when listed in thePaket.references
.The
bootstrap
NuGet has source files 2 levels nested (a fonts folder, someScripts
and someContent
) and install seems to ignore them. So I let it and jquery be managed by NuGet (which croaks with a nullref every 2 seconds).The text was updated successfully, but these errors were encountered: