ScriptCS v0.17.1 Release Notes
Release Date: 2017-02-22 // almost 8 years ago-
๐ฆ Get it via svm, Chocolatey! or Homebrew.
๐ This Release
๐ This patch release fixes a bug with NuGet that was causing .NET Standard packages to get installed for .NET 4.5 framework assemblies.
Issue Details
๐ Fixes
- ๐ฆ scriptcs now detects the current framework version and ensures only packages for that version are installed. (#1213) - by @glennblock
Previous changes from v0.17.0
-
๐ฆ Get it via svm, Chocolatey! or Homebrew.
๐ Special thanks to: @BlackFrog1, @gregoryyoung, @aarondandy, and @rickardp for their contributions to this release.
๐ This Release
๐ This is the first release in a while for scriptcs. It includes some great new features such as Pretty Printing, Support for NuGet credentials, enrichment to the execution environment and more!
๐ฆ For API users (hosting or other programmatic usage), there is one major change, the removal of members exposing Common.Logging types (#1189) from the public API. These were deprecated in version 0.15.0. As a result, the ScriptCs.Core NuGet package no longer takes a dependency on the Common.Logging package.
๐ฅ Breaking API Changes
High impact : Common.Logging types have been removed from the scriptcs public API.
Medium impact : The ScriptCs.Core NuGet package no longer takes a dependency on the Common.Logging package. If you are using Common.Logging for other purposes, after upgrading your project to ScriptCs.Core 0.17.0 you should check to see if NuGet has removed Common.Logging. If so, you will have to reinstall it yourself.
Low impact :
Affects hosters / module authors only
- The
IConsole
interface has a newWidth
parameter. - ๐จ The
IScriptEnvironment
interface has new membersAddCustomPrinter<T>)
,Print<T>()
,ScriptPath
,LoadedScripts
,ScriptAssembly
, andInitialize()
. - ๐ The
FileParserContext
andFilePreProcessResult
classes have a new member:ScriptPath
Issue Details
๐ New Features
- ๐ฒ Common Logging is gone! (#1190) - by @glennblock. Kudos to @adamralph for getting everything in place to allow the surgical removal.
- ๐จ Pretty printing support has now been added to the REPL (#1156) - by @gregoryyoung
๐ฑ [screen shot 2017-02-11 at 10 46 24 pm] (https://cloud.githubusercontent.com/assets/141124/22864844/8de41d34-f10d-11e6-9f9a-5091f5a42812.png)
You can now access the main script and any loaded script paths using the new
Env.ScriptPath
andEnv.LoadedScripts
properties (#225) - by @glennblockYou can access the compiled script assembly from within a script using the new
Env.ScriptAssembly
property. This alleviates having to use reflection or jump through hoops to get the script assembly (#244) - by @glennblock#load child.csxConsole.WriteLine("Main script:" + Env.ScriptPath); Console.WriteLine("Loaded scripts:");Console.WriteLine("\t" + String.Join(Environment.NewLine + "\t", Env.LoadedScripts.ToArray())); Console.WriteLine("Assembly:" + Env.ScriptAssembly);
โ Added a ScriptCs Nuget package which has all the binaries. This allows running scripts like on a CI server simply by installing the package from NuGet. Also makes it easy to include ScriptCs binaries in a project. (#1061) - by @glennblock
โ Added new
-e
and--eval
options for allowing execution of code passed at the command line. (Currently does not work with svm due to a bug) (#1085) - by @glennblockGlobal Credential provider can now be set for NuGet. (#1018) - by @aarondandy
๐ Fixes
REPL command help displays formatted to the width of the terminal. (#1047) -by @BlackFrog1
Char literals are properly handled if they have escape chars. (#1143) - by @rickardp
Compilation into cache no longer throws a ScriptCompilationException (#1153) - by @filipw
๐ Stylecop removed from test projects, LibLog and Mono LineEditor (#1191) - by @glennblock
๐ Changed errors to always show in Red as opposed to Dark Red to address readability (#1198) - by @glennblock
Comments can now be before directives. (#1185) - by @glennblock
Relative paths are now handled properly (#1193) - by @glennblock
โก๏ธ Updated to Nuget.core 2.14.0 fixes error with ScriptCs.OctopusClient script pack (#1208) - by @glennblock
- The