scriptcs/scriptcs-samples

"Packages directory does not exist" error

alexangas opened this issue · 3 comments

I want to try out ScriptCS and followed the instructions in the scriptcs-samples readme on its Github home page. I get the following:

PS C:\Windows\system32> scriptcs -install
INFO: Installing packages...
INFO: Nothing to install.
INFO: Installation completed successfully.
Initiated saving packages into packages.config...
Packages directory does not exist!

I've tried the current release version of scriptcs using chocolatey as well as the latest nightly with the same result. I've also tried uninstalling and reinstalling scriptcs with chocolatey.

I don't have a packages folder or a packages.config under c:\chocolatey. I think this is what's missing but don't know why they're not there. I had no problems yesterday on another machine.

Thanks for any help!

you are using PS C:\Windows\system32> scriptcs -install

this means, scriptcs will try to look in C:\Windows\system32 for packages.config to run a sepcific demo. If it's not there then it will give you the error you see.

Make sure, when you download the demos, you run scriptcs -install from the folder of the demo - that's where packages.config will be, after all. Scriptcs always installs packages locally next to the given script file, not globally where it was placed by chocolatey (that would effectively be another GAC).

I probably didn't give the best example there - i've tried running the command in all of the Chocolatey folders (none of which have a packages folder or packages.config anyway). I've gone back over the sample install steps. Where should this packages.config be so I know i'm running it in the correct folder?

I'm really not sure what you are doing. But - scriptcs -install is a command that installs packages based on packages.config. It does not install the samples. You have to pull the samples from github first.

If you download the entire samples repo from github using git clone, it will have a number of folders - each being a separate sample. Each sample has a packages.config inside it. If you run scriptcs -install inside that folder it will install the dependencies allowing you to run the sample.

You can read more about package installation here in the wiki - https://github.com/scriptcs/scriptcs/wiki/Package-installation