Frage

I have a project that creates a DLL intended to be used by my Powershell profile; whenever I finish creating a new version of it, I have to copy/paste it into my bin directory (which is where my Powershell profile looks for these little toys of mine).

One day I thought to myself, "Self, why not just use a post-build event command to do this automatically?"

...Well, the answer to that question is "because it doesn't damn well work, that's why." This is among the simplest commands on the planet and it exits with code 1, whatever that means.

cp originPath destinationPath

If I just run that in PS, it turns out fine. I have quotes in the paths and everything. What on earth is wrong?

War es hilfreich?

Lösung

My mistake: I have never used build events before and I guess I misunderstood what I was supposed to be typing, but apparently this works:

powershell cp originPath destinationPath

So, for anyone else that might be confused, that's how you do that. >.> I guess it's not actually a powershell command? Not sure what it is, exactly.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top