-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to take Main from primary script file #68
Comments
You can use |
In my case I'm using newincludes in the precompiler....is there a newimports? |
No there is none. I changed your post into an "enhancement". To allow this feature in future but for now you will need to:
|
Yeah - that's the approach I took. |
- Script engine assembly (e.g. cscs.exe) has been exposed to the precompiler routines. - Added ScriptParser.ProcessImportedScript to be used from precompilers.
Implemented. The script engine is now exposed to the precompiler and now it can use CS-Script API. And for the cases like yours I have added a new method to the ScriptParser class for importing the scripts: var includes = (List<string>)context["NewIncludes"];
includes.Add(CSScriptLibrary.ScriptParser.ProcessImportedScript("<your script to import>")); |
Sometime in the last few versions you started detecting multiple Main methods and throwing an error one was detected. This broke our scripting system. We worked around it, but it might be nice to add an option which takes the Main from the primary script file instead of throwing an error.
The text was updated successfully, but these errors were encountered: