diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 305e736c..aed3c3fd 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -5,29 +5,60 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + $(MSBuildVersion) + 15.0.0 + false + true true $(MSBuildThisFileDirectory) $(MSBuildThisFileDirectory)..\ $(PaketRootPath)paket-files\paket.restore.cached $(PaketRootPath)paket.lock + classic + proj + assembly + native /Library/Frameworks/Mono.framework/Commands/mono mono - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe - "$(PaketExePath)" - $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" - + + $(PaketRootPath)paket.bootstrapper.exe + $(PaketToolsPath)paket.bootstrapper.exe + $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ + + + + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + $(PaketToolsPath)paket.exe + $(_PaketBootStrapperExeDir)paket.exe + paket.exe + + + $(PaketRootPath)paket + $(PaketToolsPath)paket + $(PaketToolsPath)paket + + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + + + $(PaketBootStrapperExeDir)paket.exe + + + paket + + <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) - dotnet "$(PaketExePath)" + dotnet "$(PaketExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" + "$(PaketExePath)" - - "$(PaketExePath)" - $(PaketRootPath)paket.bootstrapper.exe - $(PaketToolsPath)paket.bootstrapper.exe "$(PaketBootStrapperExePath)" $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" @@ -36,60 +67,86 @@ true true + + + True + + $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) - + + + + + + + + - + true $(NoWarn);NU1603;NU1604;NU1605;NU1608 + false + true - - - /usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }' - /usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }' + + + + + + + $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) + + + + + + + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``)) + $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``)) + + + + + %(PaketRestoreCachedKeyValue.Value) + %(PaketRestoreCachedKeyValue.Value) - - - - - - - - - - - - - - $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) - $([System.IO.File]::ReadAllText('$(PaketLockFilePath)')) + + true - false + false true - + + true - - - + + + + + + - + - + - $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached + $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached $(MSBuildProjectFullPath).paket.references @@ -124,8 +181,9 @@ - - + + + @@ -141,21 +199,24 @@ + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) %(PaketReferencesFileLinesInfo.PackageVersion) All - runtime + runtime + runtime true + true - $(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).paket.clitools + $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools @@ -174,44 +235,144 @@ - + false - + - <_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/> + <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/> + + $(MSBuildProjectDirectory)/$(MSBuildProjectFile) true - false - true - $(BaseIntermediateOutputPath)$(Configuration) - $(BaseIntermediateOutputPath) + false + true + false + true + false + true + false + true + $(PaketIntermediateOutputPath)\$(Configuration) + $(PaketIntermediateOutputPath) - <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.nuspec"/> + <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/> - + + + - - + + + + - - + - + diff --git a/src/ScriptCs.Contracts/ScriptCs.Contracts.csproj b/src/ScriptCs.Contracts/ScriptCs.Contracts.csproj index 8d7c12e5..312e1920 100644 --- a/src/ScriptCs.Contracts/ScriptCs.Contracts.csproj +++ b/src/ScriptCs.Contracts/ScriptCs.Contracts.csproj @@ -4,7 +4,7 @@ netstandard2.0 ScriptCs.Contracts Glenn Block, Filip Wojcieszyn, Justin Rusbatch - https://github.com/scriptcs/scriptcs/blob/master/LICENSE.md + Apache-2.0 http://scriptcs.net http://www.gravatar.com/avatar/5c754f646971d8bc800b9d4057931938.png?s=120 ScriptCs.Contracts diff --git a/src/ScriptCs.Core/ScriptCs.Core.csproj b/src/ScriptCs.Core/ScriptCs.Core.csproj index a83e1dc5..9b8b29cb 100644 --- a/src/ScriptCs.Core/ScriptCs.Core.csproj +++ b/src/ScriptCs.Core/ScriptCs.Core.csproj @@ -4,7 +4,7 @@ netstandard2.0 ScriptCs.Core Glenn Block, Filip Wojcieszyn, Justin Rusbatch - https://github.com/scriptcs/scriptcs/blob/master/LICENSE.md + Apache-2.0 http://scriptcs.net http://www.gravatar.com/avatar/5c754f646971d8bc800b9d4057931938.png?s=120 ScriptCs.Core diff --git a/src/ScriptCs.Engine.Roslyn/CSharpScriptEngine.cs b/src/ScriptCs.Engine.Roslyn/CSharpScriptEngine.cs index ad99e9b9..51555d2b 100644 --- a/src/ScriptCs.Engine.Roslyn/CSharpScriptEngine.cs +++ b/src/ScriptCs.Engine.Roslyn/CSharpScriptEngine.cs @@ -26,7 +26,7 @@ protected bool IsCompleteSubmission(string code) return true; } - var options = new CSharpParseOptions(LanguageVersion.Latest, DocumentationMode.Parse, SourceCodeKind.Script); + var options = new CSharpParseOptions(LanguageVersion.Preview, DocumentationMode.Parse, SourceCodeKind.Script); var syntaxTree = SyntaxFactory.ParseSyntaxTree(code, options: options); return SyntaxFactory.IsCompleteSubmission(syntaxTree); diff --git a/src/ScriptCs.Engine.Roslyn/CommonScriptEngine.cs b/src/ScriptCs.Engine.Roslyn/CommonScriptEngine.cs index 5c482533..743503c3 100644 --- a/src/ScriptCs.Engine.Roslyn/CommonScriptEngine.cs +++ b/src/ScriptCs.Engine.Roslyn/CommonScriptEngine.cs @@ -29,10 +29,10 @@ protected CommonScriptEngine(IScriptHostFactory scriptHostFactory, ILogProvider ScriptMetadataResolver = ScriptMetadataResolver.Default; ScriptOptions = ScriptOptions.Default. WithReferences(typeof(object).Assembly, typeof(TupleElementNamesAttribute).Assembly). // System.ValueTuple - WithMetadataResolver(ScriptMetadataResolver); + WithMetadataResolver(ScriptMetadataResolver). + WithLanguageVersion(LanguageVersion.Preview); _scriptHostFactory = scriptHostFactory; Log = logProvider.ForCurrentType(); - SetCSharpVersionToLatest(); } public string BaseDirectory @@ -186,21 +186,5 @@ protected virtual ScriptResult Execute(string code, object globals, SessionState } protected abstract ScriptState GetScriptState(string code, object globals); - - private void SetCSharpVersionToLatest() - { - try - { - // reset default scripting mode to latest language version to enable C# 7.1 features - // this is not needed once https://github.com/dotnet/roslyn/pull/21331 ships - var csharpScriptCompilerType = typeof(CSharpScript).GetTypeInfo().Assembly.GetType("Microsoft.CodeAnalysis.CSharp.Scripting.CSharpScriptCompiler"); - var parseOptionsField = csharpScriptCompilerType?.GetField("s_defaultOptions", BindingFlags.Static | BindingFlags.NonPublic); - parseOptionsField?.SetValue(null, new CSharpParseOptions(LanguageVersion.Latest, kind: SourceCodeKind.Script)); - } - catch (Exception) - { - Log.Warn("Unable to set C# language version to latest, will use the default version."); - } - } } } \ No newline at end of file diff --git a/src/ScriptCs.Engine.Roslyn/ScriptCs.Engine.Roslyn.csproj b/src/ScriptCs.Engine.Roslyn/ScriptCs.Engine.Roslyn.csproj index e88e280a..d1a43e48 100644 --- a/src/ScriptCs.Engine.Roslyn/ScriptCs.Engine.Roslyn.csproj +++ b/src/ScriptCs.Engine.Roslyn/ScriptCs.Engine.Roslyn.csproj @@ -4,7 +4,7 @@ netstandard2.0 ScriptCs.Engine.Roslyn Glenn Block, Filip Wojcieszyn, Justin Rusbatch - https://github.com/scriptcs/scriptcs/blob/master/LICENSE.md + Apache-2.0 http://scriptcs.net http://www.gravatar.com/avatar/5c754f646971d8bc800b9d4057931938.png?s=120 ScriptCs.Engine.Roslyn diff --git a/src/ScriptCs.Hosting/ScriptCs.Hosting.csproj b/src/ScriptCs.Hosting/ScriptCs.Hosting.csproj index 3a164047..f818d811 100644 --- a/src/ScriptCs.Hosting/ScriptCs.Hosting.csproj +++ b/src/ScriptCs.Hosting/ScriptCs.Hosting.csproj @@ -4,7 +4,7 @@ net461 ScriptCs.Hosting Glenn Block, Filip Wojcieszyn, Justin Rusbatch - https://github.com/scriptcs/scriptcs/blob/master/LICENSE.md + Apache-2.0 http://scriptcs.net http://www.gravatar.com/avatar/5c754f646971d8bc800b9d4057931938.png?s=120 ScriptCs.Hosting diff --git a/src/ScriptCs/ScriptCs.csproj b/src/ScriptCs/ScriptCs.csproj index 20e9f2dc..2d7f57bd 100644 --- a/src/ScriptCs/ScriptCs.csproj +++ b/src/ScriptCs/ScriptCs.csproj @@ -5,7 +5,7 @@ net461 scriptcs Glenn Block, Filip Wojcieszyn, Justin Rusbatch - https://github.com/scriptcs/scriptcs/blob/master/LICENSE.md + Apache-2.0 http://scriptcs.net http://www.gravatar.com/avatar/5c754f646971d8bc800b9d4057931938.png?s=120 scriptcs