Changelog History
-
v0.17.1 Changes
February 22, 2017๐ฆ 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
-
v0.17.0 Changes
February 12, 2017๐ฆ 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
-
v0.16.1 Changes
April 07, 2016๐ This hotfix addresses an issue we found with the
ScriptCs.Engine.Roslyn
module that affects hosters of scriptcs who are using that package.โฌ๏ธ The issue does not affect direct users of scriptcs, so it is not necessary to upgrade unless you are hosting.
-
v0.16.0 Changes
April 03, 20160.16.0 is here!
๐ฆ Go get it via svm, Chocolatey or Homebrew!
This release brings a MAJOR upgrade to scriptcs.
๐ New Roslyn!
The most prominent feature is we've upgraded to newer Roslyn
1.0.0-rc2
bits! This is a big deal as we've been on the same bits for 3+ years and this brings some major enhancements. The new Roslyn finally brings async/await and dynamic to scripts running on .NET. Not only that, it includes awesome new language enhancements of C# 6.0, like Auto-Property initializers!Note - We are updating to Roslyn
1.0.0-rc2
and not the latest Roslyn1.2.1
as the newer bits require .NET 4.6+ and this allows us to keep .NET 4.5 compat.๐ Look below and see dynamic and Auto-Property initializers in action (On Windows)!
And here is an example using async/await!
REPL enhancements from Mono
๐ This release includes enhancements in our REPL to make it behave similar to the Bash shell. This includes Emacs keybindings, history, searching, etc. Special thanks to @migueldeicaza for this contribution.
๐ Below you can see I have pressed
ctrl+R
to use reverse-search to find the code that I had entered witha
. As it is reverse it found the last line that I had entered.Debugging in Visual Studio
๐ A long sought after feature for scriptcs has been to enable debugging in Visual Studio. In this release we introduce the
:openvs
command. From the repl, you can type:openvs "[filename]"
and it will create a solution for you including all the files and subdirectories in the same folder. It will then launch Visual Studio where you can execute the script and debug! You can add breakpoints, watches, etc.๐ Below you can see a screenshot:
๐ฅ Breaking API Changes
Low Impact - The
IConsole.ReadLine
method signature has changed tostring ReadLine(string prompt)
. This was necessary to properly support the latest REPL enhancements. This change will impact custom hosters who have provided their ownIConsole
implementation and it will need to get updated to support the new signature.Issue Details
๐ New: Upgrade to Roslyn packages 1.0.0 rc2 #1059
๐ New: OpenVS #1109
๐ New: Provide editing capabilities using Mono.Terminal.GetLine. #1118 / #1119๐ Fixed: Cannot use array initializers #1070
๐ Fixed: Error on double handling in REPL #864
๐ Fixed: Support thedynamic
keyword in the Roslyn engine #1057
๐ Fixed: v0.9.0 - Using Generic Method Call Results In "ERROR: Unable to change after type..." #580
๐ Fixed: Stack overflow in Roslyn when local variable is used before declared #691
๐ Fixed: Cannot call external methods with params args #1066
๐ Fixed: Change cache folder to being script-local #1086
๐ Fixed: NullReferenceException running script (x86 Win10, .NET 4.6) #1095
๐ Fixed: Compilation error using dynamic #1110
๐ Fixed: scriptcs -install gives a very verbose error for package not found #1114Thanks to our contributors!!!
๐ Thank you to the following people outside of our core team who contributed filing issues and sending PRs to this release:
@aikeru, @ClockEndGooner, @ChrSteinert, @migueldeicaza, @nesteruk, @olagjo and @sapiens
Thanks to Microsoft and the Roslyn team!
๐ This release would not have been possible without the support of the Roslyn team and their awesome move of releasing Roslyn under OSS!
โก๏ธ Look for an update in the future that will move on to the latest Roslyn bits!
-
v0.15.0 Changes
August 03, 2015๐ฆ Get it via svm, Chocolatey or Homebrew!
๐ This release, our first for a while, introduces a new
:scriptpacks
REPL command, fixes a bug which preventedelse
from being used in Mono and many other small enhancements, bug fixes and performance improvements as well as a significant API change. See 'Issue Details' below for more details.๐ For API users (hosting or other programmatic usage), there is one major change, the deprecation of Common.Logging (#847). This has been replaced by LibLog, but this is an internal implementation detail, since LibLog is a source code package. The end effect for scriptcs API users is that the members which use Common.Logging types have been obsoleted in the public API and replaced with new members which use types under the
ScriptCs.Contracts
namespace. Support for the Common.Logging types will be removed completely in a later release and the dependency on Common.Logging will be removed entirely, so you are encouraged to switch to the new API as soon as possible.๐ฆ All script packs, script libraries, modules, hosts and other code which uses the scriptcs NuGet packages should be changed to switch from using the Common.Logging members to the new API members as soon as possible to prevent breakage when Common.Logging is removed. For more details, see the related blog post.
For users of ScriptCs.Hosting there is also a further minor change to make the API a little more friendly (#998).
๐ฅ Breaking API Changes
Low impact : The
ScriptCs.Hosting.IScriptServicesBuilder
interface has a new method,LoadScriptPacks(bool load = true)
. Given there is little utility for API users in implementing this interface, it is extremely unlikely that this will cause any breakages. Indeed, this interface may even be removed in future.Issue Details
๐ New: Added :scriptpacks REPL command #1005
๐ New: Print exception stack traces to console when logging at debug level #987
๐ New: Warn on scriptcs -save when packages directory does not exist #989
๐ New: Better console output when script not found #1010
๐ New: Show logger name at debug and trace level #1008
๐ New: Update to Mono.CSharp 4.0.0 and NRefactory 5.5.1 #1046
๐ New: Upgrade to NuGet 2.8.6 #1072๐ New (API): Deprecate Common.Logging usage in favour of our own logging API #847
๐ New (API): Add LoadScriptPacks method to ScriptServicesBuilder #998 (breaking - see above)
๐ New (API): Make ScriptExecutor references methods virtual #1036๐ Fixed:
else
keyword not correctly parsed in Mono #1060
๐ Fixed: Namespaces and references are not properly imported within Script Libraries #1025
๐ Fixed: scriptcs -debug without -repl does not configure REPL correctly. #990
๐ Fixed: Namespace aliasing causes an exception to be thrown #826
๐ Fixed: Script pack usings don't appear in :usings #992
๐ Fixed: Command alias not shown in :help #985
๐ Fixed: Extra line breaks in scriptcs -help #962๐ Performance: Fix profile optimization #945
๐ Performance: Speed up -help and -version #963 -
v0.14.1 Changes
April 12, 2015๐ฆ Get it via svm, Chocolatey or Homebrew!
๐ Fixed: Hotfix NuGet.Core package reference #1020
-
v0.14.0 Changes
March 23, 2015๐ฆ Get it on Chocolatey!
๐ For more information see the blog!
๐ New: Script Libraries #909
๐ New: Remove redundant $id from JSON strings in REPL #700
๐ New: Add an ":exit" command to the REPL. #427
๐ New: Ignore shebang on *nix platforms #956
๐ New: Include binstub for *nix in build artifacts #675
๐ New: Better REPL greeting message #932๐ Fixed: Duplicate references cause script execution to fail #953
๐ Performance: Only scan for modules when -m is specified #964
-
v0.13.3 Changes
February 24, 2015๐ This is a bug fix release.
๐ Fixed: Unable to install Script CS v0.13.2 - Get-EnvironmentVariable not recognized - #936
-
v0.13.2 Changes
February 07, 2015๐ This is a bug fix release.
๐ Fixed: scriptcs 0.13.1 crashes when a package has a framework assembly reference - #922
-
v0.13.1 Changes
February 05, 2015