Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Allow creating hard links to DLLs instead of copying them #17

Open
yodantauber opened this issue Sep 2, 2013 · 8 comments
Open

Allow creating hard links to DLLs instead of copying them #17

yodantauber opened this issue Sep 2, 2013 · 8 comments

Comments

@yodantauber
Copy link

Write-NuGetPackage generates an MSBuild "Copy" task in the targets file for each DLL specified with "bin:" in the autopkg file.

I would like to be able to pass "UseHardlinksIfPossible=true" to the Copy command, thereby creating hard links to the DLLs instead of copying them. In many native libraries this makes a huge difference - I have seen libraries with hundreds of megabytes worth of DLLs, and it takes time to copy them around.

@fearthecowboy
Copy link
Member

Hmm.

That's not a terrible idea; I gotta think on that a bit.

@fearthecowboy
Copy link
Member

I think I could make this work in the non app-store and non-windows-phone models. In those, they use additional elements to control crap going into the output.

The next version of the tools ended up requiring the addition of a MSBuild Tasks Extension DLL being embedded into the package (which makes it easier to add new and more complex actions into the package). A 'smarter' copy/hardlink task could certainly be done now.

I've got a really packed week, but I'm gonna see if I can squeeze it in this week somewhere ... no promises yet (but I think we can make sure it gets done in this month)

@yodantauber
Copy link
Author

Thanks for trying to get this in!
Just to make sure I understand your comment correctly: what do you mean by "A 'smarter' copy/hardlink task could certainly be done now"? The regular MSBuild Copy task is already capable of hard-linking, it's only a matter of adding an attribute to the Copy element in the XML.

@fearthecowboy
Copy link
Member

Well, that I did not know.

Hmm. Wonder how the hell I missed that?

I'll see about making an option for that.

@fearthecowboy
Copy link
Member

Hmm. I can't see a reason not to make that the default, now that I think of it.

@fearthecowboy
Copy link
Member

The next build will have this on by default.

@fearthecowboy
Copy link
Member

I've got a new Development version posted that supports this. (the CopyToOutput methodology changed, and the default now turns this on)

use

  PS > update-coapptools –Development -killallpowershells

To update to my current Dev version (as of this moment, 2.4.164.0 )

As soon as I can get a bit more testing on this to make sure that it's at least fairly stable, and doesn't have any really broken things, I'll promote this to 'Beta'

@yodantauber
Copy link
Author

I tested this on the latest development version (2.4.199.0) and it creates hard links indeed. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants