References?

Topics: Questions
Jan 3, 2007 at 7:53 PM
Hi,
I've just discovered this project a couple days ago. I'm assuming that this is a successor to CSX (which I used a good amount). They seem to work pretty similarly...

The problem I'm having now is that I'm not quite sure on how to deal with any outside references. Since the project file is built every time the file is edited, etc., any project references I set are not kept. But some of the scripts I want to write require functionality outside the preset references. Any suggestions on how to handle this would be most welcome!
Coordinator
Feb 9, 2007 at 2:39 AM
Wow, sorry for the delay in getting back to you! I stopped monitoring the discussion lists for a bit there. Yes, this is a successor to CSX. It should be functionally identical. To handle references outside the preset ones you can do one of two things. (1) Create a response file containing lines like /r:MyAssembly.dll. Give the response file the same name as the script, i.e. if the script is MyScript.csr, then the response file should be MyScript.rsp. Csr.exe will pick add the entries in the response file when it compiles and runs the script. If you add the references in a Scaffold project and they are no part of the standard response file entries you will see the Script.rsp file get generated automatically by Scaffold. (2) you can specify /r: on the command line if you just want to quickly reference another assembly, although I have to admit I rarely use this feature. It's there as a last resort in case folk have problems and just need to "make it work".
Mar 5, 2007 at 4:44 PM
Thanks for the reply and the detailed info. I had stopped checking the forums for awhile myself. I was afraid that the project had died...

I will give your instructions a try and let post here as to how it turns out.

BTW, I would like to thank you for such a useful utility. I have several CSR/CSX scripts that run nightly (via Task Manager), and everything always works great. I've thought about going and working with Powerscript, but being able to code in C# is so much more intuitive for me.