install.ps1 only runs when installed via Console

Oct 9, 2010 at 2:51 AM

This seems to be true for me. I have a script which runs successfully when I install through the Console but when I do the install by clicking on the References node the script never fires. Debugging the code I don't see any hooks where it seems to even be trying. What's the story here?

Oct 9, 2010 at 6:41 AM

It's a bug that's going to be fixed. I'll check to see if it's filed. Known issue though.

Jan 12, 2011 at 11:11 PM

Any update on this? My package was blocked by this. I'm searching for a work item but cannot find one to check for myself.

Jan 12, 2011 at 11:43 PM

It has been "partially" fixed in the default branch. I said "partially" because although I have enabled executing scripts from the dialog, I execute them in a separate host from the console host. As a result, if your install.ps1 needs to import any cmdlets/function into the console, it will not be available in the console. On the other hand, if your script only need to modify project properties, you are good to go.

You can try installing the VSIX from our CI machine.

Jan 12, 2011 at 11:57 PM

I just need to add <Import /> elements basically, so that's good news. I (almost) have a branch ready with some code added that will add the Append-Import command to nuget. I need to figure out the process for submitting pull requests and code reviews, etc.

Jan 13, 2011 at 12:30 AM

The Contribution section on this page has all the information that you need for submitting code reviews and pull requests.