C# Script execution engine;
-----------------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2014 Oleg Shilo
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-----------------------------------------------------------------------------------------
Contact:
csscript.support@gmail.com
-----------------------------------------------------------------------------------------
Installation:
Precondition: .NET runtime must be installed. You can download it from here or from other well known locations:
http://www.microsoft.com/download/en/details.aspx?id=17851
Despite the fact that you can select earlier versions of .NET as a target .NET Framework version 4.5 is
required for CS-Script to function properly.
To install:
1. extract content of the cs-script.zip on your HD
2. run css_config.exe or install.cmd (it will bring the configuration console)
3. adjust the CS-Script settings in the configuration console according your needs (e.g. enabled debuggers, shell extensions...)
To uininstall:
1. run css_config.exe
2. press 'Deactivate' button on the 'General' tab in the configuration console
OR
1. run unistall.cmd
To upgrade:
No special steps are required. Just do as for normal installation according instructions above.
NOTE:
- After running css_config.exe from some third-party file navigation utilities (e.g. Total Commander)
it might be required to restart this utility in order for changes to take effect.
-----------------------------------------------------------------------------------------
Installing on "Windows 7 family" OS
If during the installation you have "System.IO.FileNotFoundException: Could not load file or assembly
'CSScriptLibrary" error this can be due to the new Win& security measures. You may want to "Unblock" all CS-Script
files you downloaded. This can be done either manually or with Sysinternals Streams.exe utility:
http://www.rogoff.uk.com/blog/post/How-to-bulk-unblock-files-in-Windows-7-or-Server-2008.aspx
-----------------------------------------------------------------------------------------
Running:
Script engine can be run in two different modes:
as a console application (cscs.exe) and as a WinExe application (csws.exe).
C# Script execution engine. Version 3.8.13.0.
Copyright (C) 2004-2014 Oleg Shilo.
Usage: cscs.exe <switch 1> <switch 2> <file> [params] [//x]
<switch 1>
/? - Display help info.
/e - Compile script into console application executable.
/ew - Compile script into Windows application executable.
/c - Use compiled file (cache file .compiled) if found (to improve performance).
/ca - Compile script file into assembly (cache file .compiled) without execution.
/cd - Compile script file into assembly (.dll) without execution.
/co:<options>
- Pass compiler options directly to the language compiler
(e.g. /co:/d:TRACE pass /d:TRACE option to C# compiler
or /co:/platform:x86 to produce Win32 executable)
/s - Print content of sample script file (e.g. cscs.exe /s > sample.cs).
/ac | /autoclass
- Automatically generates wrapper class if the script does not define any class of its own:
using System;
void Main()
{
Console.WriteLine("Hello World!");
}
<switch 2>
/nl - No logo mode: No banner will be shown/printed at execution time.
/dbg | /d
- Force compiler to include debug information.
/l - 'local'(makes the script directory a 'current directory')
/v - Prints CS-Script version information
/verbose
- prints runtime information during the script execution (applicable for console clients only)
/noconfig[:<file>]
- Do not use default CS-Script config file or use alternative one.
Value "out" of the <file> is reserved for creating the config file (css_config.xml) with the default settings.
(e.g. cscs.exe /noconfig sample.cs
cscs.exe /noconfig:c:\cs-script\css_VB.dat sample.vb)
/sconfig[:<file>]
- Use script config file or custom config file as a .NET application configuration file.
This option might be useful for running scripts, which usually cannot be executed without configuration file (e.g. WCF, Remoting).
(e.g. if /sconfig is used the expected config file name is <script_name>.cs.config or <script_name>.exe.config
if /sconfig:myApp.config is used the expected config file name is myApp.config)
/r:<assembly 1>:<assembly N>
- Use explicitly referenced assembly. It is required only for
rare cases when namespace cannot be resolved into assembly.
(e.g. cscs.exe /r:myLib.dll myScript.cs).
/dir:<directory 1>,<directory N>
- Add path(s) to the assembly probing directory list.
(e.g. cscs.exe /dir:C:\MyLibraries myScript.cs).
/co:<options>
- Passes compiler options directy to the language compiler.
(e.g. /co:/d:TRACE pass /d:TRACE option to C# compiler).
/precompiler[:<file 1>,<file N>]
- specifies custom precompiler file(s). This can be either script or assembly file.
If no file(s) specified prints the code template for the custom precompiler.
There is a special reserved word 'nodefault' to be used as a file name.
It instructs script engine to prevent loading any built-in precompilers
like the one for removing shebang
before the execution.
(see Precompilers chapter in the documentation)
file - Specifies name of a script file to be run.
params - Specifies optional parameters for a script file to be run.
//x - Launch debugger just before starting the script.
**************************************
Script specific syntax
**************************************
Engine directives:
------------------------------------
//css_import <file>[, preserve_main][, rename_namespace(<oldName>, <newName>)];
Alias - //css_imp
There are also another two aliases //css_include and //css_inc. They are equivalents of //css_import <file>, preserve_main
If $this (or $this.name) is specified as part of <file> it will be replaced at execution time with the main script full name (or file name only).
file - name of a script file to be imported at compile-time.
<preserve_main> - do not rename 'static Main'
oldName - name of a namespace to be renamed during importing
newName - new name of a namespace to be renamed during importing
This directive is used to inject one script into another at compile time. Thus code from one script can be exercised in another one.
'Rename' clause can appear in the directive multiple times.
------------------------------------
//css_nuget [-noref] package0[,package1]..[,packageN];
Downloads/Installs the NuGet package. It also
没有合适的资源?快使用搜索试试~ 我知道了~
C# 脚本运行环境CS-script
共329个文件
cs:129个
cmd:41个
dll:34个
3星 · 超过75%的资源 需积分: 35 88 下载量 105 浏览量
2016-09-12
09:09:44
上传
评论 2
收藏 8.89MB 7Z 举报
温馨提示
C# 脚本运行环境CS-script,及官方演示程序
资源推荐
资源详情
资源评论
收起资源包目录
C# 脚本运行环境CS-script (329个子文件)
Sandboxing.7z 2KB
uninstall.bat 653B
install.bat 650B
Host.csprojResolveAssemblyReference.cache 9KB
DesignTimeResolveAssemblyReferencesInput.cache 6KB
CSScript.chm 2.82MB
CSScriptLibrary.chm 807KB
install_silent.cmd 677B
ErrorLevelTester.cmd 659B
Run.cmd 369B
runAsApp.cmd 360B
run.cmd 238B
run.cmd 151B
runAsApp.cmd 108B
runAsApp.cmd 108B
02.New WinForm script.cmd 69B
07.VS2013 project.c.cmd 48B
05.VS2010 project.c.cmd 48B
08.VS2015 project.c.cmd 48B
06.VS2012 project.c.cmd 48B
14.Verify.c.cmd 43B
00.Open cache directory.cmd 42B
10.Executable Shortcut (console).cmd 37B
runAsScript.cmd 36B
10.DLL (debug).c.cmd 35B
08.EXE (debug).c.cmd 34B
09.Executable Shortcut.cmd 34B
00.EXE.c.cmd 32B
04.DLL.c.cmd 31B
02.EXE (console).c.cmd 31B
03.Open with VS2010.cmd 31B
01.Open with VS2013.cmd 31B
02.Open with VS2012.cmd 31B
08.Run (console).c.cmd 31B
00.Open with VS2015.cmd 31B
Autoclass.cmd 29B
uninstall.cmd 23B
install.cmd 21B
10.Debug Script.c.cmd 20B
run.cmd 20B
run.cmd 18B
run.cmd 16B
runit.cmd 16B
Run.cmd 16B
18.Configuration....cmd 16B
runAsScript.cmd 15B
runAsScript.cmd 15B
06.Run.cmd 14B
VBCSCompiler.exe.config 2KB
vbc.exe.config 2KB
csc.exe.config 2KB
app.config 144B
app.config 144B
debugVS11.0.cs 73KB
debugVS12.0.cs 73KB
debugVS14.0.cs 73KB
debugVS10.0.cs 72KB
debugVS7.1_nutral.cs 21KB
ScriptEE.cs 19KB
Scripting.evaluator.cs 16KB
Scripting.Extensions.cs 14KB
Scripting.native.cs 13KB
HostingScenarios.cs 11KB
HostingScenarios.cs 11KB
debug#D_1.1.cs 10KB
Progressbar.cs 9KB
Performance.cs 8KB
MemoryManagement.cs 7KB
getUrl.cs 7KB
CRC32.cs 7KB
clearTemp.cs 6KB
App.cs 6KB
who.cs 6KB
Classless.cs 5KB
Eval.cs 4KB
printScreen.cs 4KB
host.cs 4KB
nuget_update.cs 4KB
Host.cs 3KB
Host.cs 3KB
WebApi.cs 3KB
cutfile.cs 3KB
CompileErrors.cs 3KB
Code.cs 3KB
ExecuteClasslessWithDefaultCompiler.cs 3KB
Hello.cs 3KB
Hello.cs 3KB
Host.cs 3KB
precompile.cs 3KB
TypeSafety.cs 2KB
verify.cs 2KB
HostSimlified.cs 2KB
AppDomainExtensions.cs 2KB
WebAPI_Server.cs 2KB
LifetimeManagement.cs 2KB
ReflectScript.cs 2KB
Host.cs 2KB
Debugging.cs 2KB
auto_method.cs 2KB
ConditionalCompilation.cs 2KB
共 329 条
- 1
- 2
- 3
- 4
资源评论
- 账单2018-11-29只是没有街道的信息
- qq17561869912019-09-17不知道怎么用
- hawkins_yu2019-05-06坑爹啊,这是官网的代码,可以直接在github上面卸载,浪费我一个币
s1230wowowowo
- 粉丝: 1
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功