diff --git a/.azure-pipelines/1esmain.yml b/.azure-pipelines/1esmain.yml index e6221d5db..c149b7e23 100644 --- a/.azure-pipelines/1esmain.yml +++ b/.azure-pipelines/1esmain.yml @@ -51,7 +51,7 @@ extends: credscan: suppressionsFile: $(Build.SourcesDirectory)/.azure-pipelines/compliance/CredScanSuppressions.json codeql: - language: javascript # only build a codeql database for javascript, since the jsoncli pipeline handles csharp + language: javascript # enabled: true # TODO: would like to enable only on scheduled builds but CodeQL cannot currently be disabled per https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/codeql/1es-codeql pool: name: VSEngSS-MicroBuild2022-1ES # Name of your hosted pool diff --git a/.vscode/settings.json b/.vscode/settings.json index 62004225b..208649074 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,9 +7,6 @@ "editor.formatOnSave": true, "editor.insertSpaces": true, "editor.tabSize": 4, - "files.exclude": { - "tools/JsonCli/src/**": true - }, "files.insertFinalNewline": true, "files.trimTrailingWhitespace": true, "search.exclude": { diff --git a/resources/dotnetJsonCli/Microsoft.DotNet.Cli.CommandLine.dll b/resources/dotnetJsonCli/Microsoft.DotNet.Cli.CommandLine.dll deleted file mode 100644 index 448b83589..000000000 Binary files a/resources/dotnetJsonCli/Microsoft.DotNet.Cli.CommandLine.dll and /dev/null differ diff --git a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Abstractions.dll b/resources/dotnetJsonCli/Microsoft.TemplateEngine.Abstractions.dll deleted file mode 100644 index 8db4f0427..000000000 Binary files a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Abstractions.dll and /dev/null differ diff --git a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Cli.dll b/resources/dotnetJsonCli/Microsoft.TemplateEngine.Cli.dll deleted file mode 100644 index e8330edd9..000000000 Binary files a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Cli.dll and /dev/null differ diff --git a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Core.Contracts.dll b/resources/dotnetJsonCli/Microsoft.TemplateEngine.Core.Contracts.dll deleted file mode 100644 index c7e2a2675..000000000 Binary files a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Core.Contracts.dll and /dev/null differ diff --git a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Core.dll b/resources/dotnetJsonCli/Microsoft.TemplateEngine.Core.dll deleted file mode 100644 index 4cf644f3d..000000000 Binary files a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Core.dll and /dev/null differ diff --git a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Edge.dll b/resources/dotnetJsonCli/Microsoft.TemplateEngine.Edge.dll deleted file mode 100644 index d2d118925..000000000 Binary files a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Edge.dll and /dev/null differ diff --git a/resources/dotnetJsonCli/Microsoft.TemplateEngine.JsonCli.deps.json b/resources/dotnetJsonCli/Microsoft.TemplateEngine.JsonCli.deps.json deleted file mode 100644 index 9db046a2f..000000000 --- a/resources/dotnetJsonCli/Microsoft.TemplateEngine.JsonCli.deps.json +++ /dev/null @@ -1,1685 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v6.0", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v6.0": { - "Microsoft.TemplateEngine.JsonCli/1.0.0": { - "dependencies": { - "Microsoft.TemplateEngine.Cli": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Orchestrator.RunnableProjects": "5.0.0-preview.6.20304.1" - }, - "runtime": { - "Microsoft.TemplateEngine.JsonCli.dll": {} - } - }, - "Microsoft.CSharp/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Dynamic.Runtime": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "Microsoft.DotNet.Cli.CommandLine/1.0.0-preview.19208.1": { - "dependencies": { - "NETStandard.Library": "1.6.1" - }, - "runtime": { - "lib/netstandard1.5/Microsoft.DotNet.Cli.CommandLine.dll": { - "assemblyVersion": "1.0.0.0", - "fileVersion": "1.0.19.20801" - } - } - }, - "Microsoft.NETCore.Platforms/1.1.0": {}, - "Microsoft.NETCore.Targets/1.1.0": {}, - "Microsoft.TemplateEngine.Abstractions/5.0.0-preview.6.20304.1": { - "runtime": { - "lib/netstandard2.0/Microsoft.TemplateEngine.Abstractions.dll": { - "assemblyVersion": "5.0.0.0", - "fileVersion": "5.0.20.30401" - } - } - }, - "Microsoft.TemplateEngine.Cli/5.0.0-preview.6.20304.1": { - "dependencies": { - "Microsoft.DotNet.Cli.CommandLine": "1.0.0-preview.19208.1", - "Microsoft.TemplateEngine.Abstractions": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Edge": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Utils": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateSearch.Common": "5.0.0-preview.6.20304.1", - "Newtonsoft.Json": "10.0.3", - "System.Diagnostics.Process": "4.3.0" - }, - "runtime": { - "lib/netstandard2.0/Microsoft.TemplateEngine.Cli.dll": { - "assemblyVersion": "5.0.0.0", - "fileVersion": "5.0.20.30401" - } - } - }, - "Microsoft.TemplateEngine.Core/5.0.0-preview.6.20304.1": { - "dependencies": { - "Microsoft.TemplateEngine.Abstractions": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Core.Contracts": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Utils": "5.0.0-preview.6.20304.1" - }, - "runtime": { - "lib/netstandard2.0/Microsoft.TemplateEngine.Core.dll": { - "assemblyVersion": "5.0.0.0", - "fileVersion": "5.0.20.30401" - } - } - }, - "Microsoft.TemplateEngine.Core.Contracts/5.0.0-preview.6.20304.1": { - "dependencies": { - "Microsoft.TemplateEngine.Abstractions": "5.0.0-preview.6.20304.1" - }, - "runtime": { - "lib/netstandard2.0/Microsoft.TemplateEngine.Core.Contracts.dll": { - "assemblyVersion": "5.0.0.0", - "fileVersion": "5.0.20.30401" - } - } - }, - "Microsoft.TemplateEngine.Edge/5.0.0-preview.6.20304.1": { - "dependencies": { - "Microsoft.TemplateEngine.Abstractions": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Utils": "5.0.0-preview.6.20304.1", - "Newtonsoft.Json": "10.0.3", - "System.IO.Compression": "4.3.0", - "System.Runtime.Loader": "4.3.0" - }, - "runtime": { - "lib/netstandard2.0/Microsoft.TemplateEngine.Edge.dll": { - "assemblyVersion": "5.0.0.0", - "fileVersion": "5.0.20.30401" - } - } - }, - "Microsoft.TemplateEngine.Orchestrator.RunnableProjects/5.0.0-preview.6.20304.1": { - "dependencies": { - "Microsoft.TemplateEngine.Abstractions": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Core": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Core.Contracts": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Utils": "5.0.0-preview.6.20304.1", - "Newtonsoft.Json": "10.0.3" - }, - "runtime": { - "lib/netstandard2.0/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.dll": { - "assemblyVersion": "5.0.0.0", - "fileVersion": "5.0.20.30401" - } - } - }, - "Microsoft.TemplateEngine.Utils/5.0.0-preview.6.20304.1": { - "dependencies": { - "Microsoft.TemplateEngine.Abstractions": "5.0.0-preview.6.20304.1" - }, - "runtime": { - "lib/netstandard2.0/Microsoft.TemplateEngine.Utils.dll": { - "assemblyVersion": "5.0.0.0", - "fileVersion": "5.0.20.30401" - } - } - }, - "Microsoft.TemplateSearch.Common/5.0.0-preview.6.20304.1": { - "dependencies": { - "Microsoft.TemplateEngine.Abstractions": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Edge": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Orchestrator.RunnableProjects": "5.0.0-preview.6.20304.1", - "Microsoft.TemplateEngine.Utils": "5.0.0-preview.6.20304.1", - "Newtonsoft.Json": "10.0.3" - }, - "runtime": { - "lib/netstandard2.0/Microsoft.TemplateSearch.Common.dll": { - "assemblyVersion": "5.0.0.0", - "fileVersion": "5.0.20.30401" - } - } - }, - "Microsoft.Win32.Primitives/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "Microsoft.Win32.Registry/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "NETStandard.Library/1.6.1": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.Win32.Primitives": "4.3.0", - "System.AppContext": "4.3.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Console": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.Compression.ZipFile": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Net.Http": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Net.Sockets": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Timer": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0", - "System.Xml.XDocument": "4.3.0" - } - }, - "Newtonsoft.Json/10.0.3": { - "dependencies": { - "Microsoft.CSharp": "4.3.0", - "NETStandard.Library": "1.6.1", - "System.ComponentModel.TypeConverter": "4.3.0", - "System.Runtime.Serialization.Formatters": "4.3.0", - "System.Runtime.Serialization.Primitives": "4.3.0", - "System.Xml.XmlDocument": "4.3.0" - }, - "runtime": { - "lib/netstandard1.3/Newtonsoft.Json.dll": { - "assemblyVersion": "10.0.0.0", - "fileVersion": "10.0.3.21018" - } - } - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, - "runtime.native.System/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.IO.Compression/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Net.Http/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Security.Cryptography.Apple/4.3.0": { - "dependencies": { - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" - } - }, - "runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "dependencies": { - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple/4.3.0": {}, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": {}, - "System.AppContext/4.3.0": { - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Buffers/4.3.0": { - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Collections/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.Concurrent/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Collections.NonGeneric/4.3.0": { - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Collections.Specialized/4.3.0": { - "dependencies": { - "System.Collections.NonGeneric": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.ComponentModel/4.3.0": { - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.ComponentModel.Primitives/4.3.0": { - "dependencies": { - "System.ComponentModel": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.ComponentModel.TypeConverter/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Collections.NonGeneric": "4.3.0", - "System.Collections.Specialized": "4.3.0", - "System.ComponentModel": "4.3.0", - "System.ComponentModel.Primitives": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Console/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Diagnostics.Debug/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.DiagnosticSource/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Diagnostics.Process/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.Win32.Primitives": "4.3.0", - "Microsoft.Win32.Registry": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Thread": "4.3.0", - "System.Threading.ThreadPool": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Diagnostics.Tools/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.Tracing/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Dynamic.Runtime/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Globalization/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Calendars/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Extensions/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.Compression/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.IO.Compression": "4.3.0" - } - }, - "System.IO.Compression.ZipFile/4.3.0": { - "dependencies": { - "System.Buffers": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.IO.FileSystem/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.FileSystem.Primitives/4.3.0": { - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Linq/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Linq.Expressions/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Emit.Lightweight": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Net.Http/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Net.Sockets/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.ObjectModel/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reflection/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit/4.3.0": { - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration/4.3.0": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight/4.3.0": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Primitives/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions/4.3.0": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.Extensions/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices.RuntimeInformation/4.3.0": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Runtime.Loader/4.3.0": { - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Numerics/4.3.0": { - "dependencies": { - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Runtime.Serialization.Formatters/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Serialization.Primitives": "4.3.0" - } - }, - "System.Runtime.Serialization.Primitives/4.3.0": { - "dependencies": { - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Primitives/4.3.0": { - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.Encoding.Extensions/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Text.RegularExpressions/4.3.0": { - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Threading/4.3.0": { - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Tasks/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Threading.Tasks.Extensions/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Thread/4.3.0": { - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Threading.ThreadPool/4.3.0": { - "dependencies": { - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Threading.Timer/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Xml.ReaderWriter/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Tasks.Extensions": "4.3.0" - } - }, - "System.Xml.XDocument/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0" - } - }, - "System.Xml.XmlDocument/4.3.0": { - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0" - } - } - } - }, - "libraries": { - "Microsoft.TemplateEngine.JsonCli/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Microsoft.CSharp/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-P+MBhIM0YX+JqROuf7i306ZLJEjQYA9uUyRDE+OqwUI5sh41e2ZbPQV3LfAPh+29cmceE1pUffXsGfR4eMY3KA==", - "path": "microsoft.csharp/4.3.0", - "hashPath": "microsoft.csharp.4.3.0.nupkg.sha512" - }, - "Microsoft.DotNet.Cli.CommandLine/1.0.0-preview.19208.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-BR5gKy+zFLgDdDbrb+YwUYSF7Rk9YLq6nxyUHeWh42y6hgVLNHUhR+8td2V69BVoxdOCx2GlWsESQ6kd/fYyiw==", - "path": "microsoft.dotnet.cli.commandline/1.0.0-preview.19208.1", - "hashPath": "microsoft.dotnet.cli.commandline.1.0.0-preview.19208.1.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", - "path": "microsoft.netcore.platforms/1.1.0", - "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" - }, - "Microsoft.NETCore.Targets/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==", - "path": "microsoft.netcore.targets/1.1.0", - "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512" - }, - "Microsoft.TemplateEngine.Abstractions/5.0.0-preview.6.20304.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-0bp5sv+fENDfNG+gPs5Othcsm9FuWzjjyIyKTydceQznYTjAtogwl8doA5RFW9ZH5RoMLgoBCyzhRE1CS0217g==", - "path": "microsoft.templateengine.abstractions/5.0.0-preview.6.20304.1", - "hashPath": "microsoft.templateengine.abstractions.5.0.0-preview.6.20304.1.nupkg.sha512" - }, - "Microsoft.TemplateEngine.Cli/5.0.0-preview.6.20304.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-SfwLsqA61ub15q2CSr/+arC1k07y48+eCVoR3H0A3p21lJfjBgdQQ1eZDjvRGGMXU7jAtnjb7ZLEAc0bijceHQ==", - "path": "microsoft.templateengine.cli/5.0.0-preview.6.20304.1", - "hashPath": "microsoft.templateengine.cli.5.0.0-preview.6.20304.1.nupkg.sha512" - }, - "Microsoft.TemplateEngine.Core/5.0.0-preview.6.20304.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-GLgQTJzjMwWOs+iniHPRnVrQcaKbfo2LDrRj7Wu9aW/0A6LoxaYxk7seaui1BI+sY4RE7VYKGkgfoF/Xw+AvWw==", - "path": "microsoft.templateengine.core/5.0.0-preview.6.20304.1", - "hashPath": "microsoft.templateengine.core.5.0.0-preview.6.20304.1.nupkg.sha512" - }, - "Microsoft.TemplateEngine.Core.Contracts/5.0.0-preview.6.20304.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-AN4ozaqQ9Z1m3z5iSjG3T5PY1ciSpsFMu6mF4lc8D+fed9LNxes7PejWyIpKrAVGd1ZhZQlaY+U2xsqUbX4B9A==", - "path": "microsoft.templateengine.core.contracts/5.0.0-preview.6.20304.1", - "hashPath": "microsoft.templateengine.core.contracts.5.0.0-preview.6.20304.1.nupkg.sha512" - }, - "Microsoft.TemplateEngine.Edge/5.0.0-preview.6.20304.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-pUhOCCNxN4Jq6lXWRKDy4vvj44jcBVbO1xMYpzznG5Guok+gdI7cbEqs8ZR4yAUSTZW2AOEL2XrUSvKGcHj88g==", - "path": "microsoft.templateengine.edge/5.0.0-preview.6.20304.1", - "hashPath": "microsoft.templateengine.edge.5.0.0-preview.6.20304.1.nupkg.sha512" - }, - "Microsoft.TemplateEngine.Orchestrator.RunnableProjects/5.0.0-preview.6.20304.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3hjFwlUYFRrSd6bP99zLuLFiAiQWqiQLl9NyNhj1Iwhq0sOqkOrBMTTQSiBD0PFlSB99Jh52I6jZJPbw4IFqPA==", - "path": "microsoft.templateengine.orchestrator.runnableprojects/5.0.0-preview.6.20304.1", - "hashPath": "microsoft.templateengine.orchestrator.runnableprojects.5.0.0-preview.6.20304.1.nupkg.sha512" - }, - "Microsoft.TemplateEngine.Utils/5.0.0-preview.6.20304.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-UoDOzkDlRDJjdvyJOAfpXtADzea1QXIFeX/sH7sD1j4iNC2FVTIlfigc5f0AIG4nPlulCdxOEGxCznyRFxmCjg==", - "path": "microsoft.templateengine.utils/5.0.0-preview.6.20304.1", - "hashPath": "microsoft.templateengine.utils.5.0.0-preview.6.20304.1.nupkg.sha512" - }, - "Microsoft.TemplateSearch.Common/5.0.0-preview.6.20304.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-o8SJUqBeu1eZVMzeEMhHuEsVxWJ6VoPYBCqrf/6PLEg2hXnxEP2N1Z6YaOm6P+3+ICweibsw+I42vP674R080w==", - "path": "microsoft.templatesearch.common/5.0.0-preview.6.20304.1", - "hashPath": "microsoft.templatesearch.common.5.0.0-preview.6.20304.1.nupkg.sha512" - }, - "Microsoft.Win32.Primitives/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "path": "microsoft.win32.primitives/4.3.0", - "hashPath": "microsoft.win32.primitives.4.3.0.nupkg.sha512" - }, - "Microsoft.Win32.Registry/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Lw1/VwLH1yxz6SfFEjVRCN0pnflLEsWgnV4qsdJ512/HhTwnKXUG+zDQ4yTO3K/EJQemGoNaBHX5InISNKTzUQ==", - "path": "microsoft.win32.registry/4.3.0", - "hashPath": "microsoft.win32.registry.4.3.0.nupkg.sha512" - }, - "NETStandard.Library/1.6.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", - "path": "netstandard.library/1.6.1", - "hashPath": "netstandard.library.1.6.1.nupkg.sha512" - }, - "Newtonsoft.Json/10.0.3": { - "type": "package", - "serviceable": true, - "sha512": "sha512-hSXaFmh7hNCuEoC4XNY5DrRkLDzYHqPx/Ik23R4J86Z7PE/Y6YidhG602dFVdLBRSdG6xp9NabH3dXpcoxWvww==", - "path": "newtonsoft.json/10.0.3", - "hashPath": "newtonsoft.json.10.0.3.nupkg.sha512" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==", - "path": "runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl/4.3.0", - "hashPath": "runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==", - "path": "runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl/4.3.0", - "hashPath": "runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==", - "path": "runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl/4.3.0", - "hashPath": "runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "runtime.native.System/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", - "path": "runtime.native.system/4.3.0", - "hashPath": "runtime.native.system.4.3.0.nupkg.sha512" - }, - "runtime.native.System.IO.Compression/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", - "path": "runtime.native.system.io.compression/4.3.0", - "hashPath": "runtime.native.system.io.compression.4.3.0.nupkg.sha512" - }, - "runtime.native.System.Net.Http/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", - "path": "runtime.native.system.net.http/4.3.0", - "hashPath": "runtime.native.system.net.http.4.3.0.nupkg.sha512" - }, - "runtime.native.System.Security.Cryptography.Apple/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", - "path": "runtime.native.system.security.cryptography.apple/4.3.0", - "hashPath": "runtime.native.system.security.cryptography.apple.4.3.0.nupkg.sha512" - }, - "runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", - "path": "runtime.native.system.security.cryptography.openssl/4.3.0", - "hashPath": "runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==", - "path": "runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl/4.3.0", - "hashPath": "runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==", - "path": "runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl/4.3.0", - "hashPath": "runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==", - "path": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.apple/4.3.0", - "hashPath": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.apple.4.3.0.nupkg.sha512" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==", - "path": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0", - "hashPath": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==", - "path": "runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl/4.3.0", - "hashPath": "runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==", - "path": "runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0", - "hashPath": "runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==", - "path": "runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0", - "hashPath": "runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==", - "path": "runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0", - "hashPath": "runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "System.AppContext/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", - "path": "system.appcontext/4.3.0", - "hashPath": "system.appcontext.4.3.0.nupkg.sha512" - }, - "System.Buffers/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", - "path": "system.buffers/4.3.0", - "hashPath": "system.buffers.4.3.0.nupkg.sha512" - }, - "System.Collections/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "path": "system.collections/4.3.0", - "hashPath": "system.collections.4.3.0.nupkg.sha512" - }, - "System.Collections.Concurrent/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", - "path": "system.collections.concurrent/4.3.0", - "hashPath": "system.collections.concurrent.4.3.0.nupkg.sha512" - }, - "System.Collections.NonGeneric/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-prtjIEMhGUnQq6RnPEYLpFt8AtLbp9yq2zxOSrY7KJJZrw25Fi97IzBqY7iqssbM61Ek5b8f3MG/sG1N2sN5KA==", - "path": "system.collections.nongeneric/4.3.0", - "hashPath": "system.collections.nongeneric.4.3.0.nupkg.sha512" - }, - "System.Collections.Specialized/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Epx8PoVZR0iuOnJJDzp7pWvdfMMOAvpUo95pC4ScH2mJuXkKA2Y4aR3cG9qt2klHgSons1WFh4kcGW7cSXvrxg==", - "path": "system.collections.specialized/4.3.0", - "hashPath": "system.collections.specialized.4.3.0.nupkg.sha512" - }, - "System.ComponentModel/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VyGn1jGRZVfxnh8EdvDCi71v3bMXrsu8aYJOwoV7SNDLVhiEqwP86pPMyRGsDsxhXAm2b3o9OIqeETfN5qfezw==", - "path": "system.componentmodel/4.3.0", - "hashPath": "system.componentmodel.4.3.0.nupkg.sha512" - }, - "System.ComponentModel.Primitives/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-j8GUkCpM8V4d4vhLIIoBLGey2Z5bCkMVNjEZseyAlm4n5arcsJOeI3zkUP+zvZgzsbLTYh4lYeP/ZD/gdIAPrw==", - "path": "system.componentmodel.primitives/4.3.0", - "hashPath": "system.componentmodel.primitives.4.3.0.nupkg.sha512" - }, - "System.ComponentModel.TypeConverter/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-16pQ6P+EdhcXzPiEK4kbA953Fu0MNG2ovxTZU81/qsCd1zPRsKc3uif5NgvllCY598k6bI0KUyKW8fanlfaDQg==", - "path": "system.componentmodel.typeconverter/4.3.0", - "hashPath": "system.componentmodel.typeconverter.4.3.0.nupkg.sha512" - }, - "System.Console/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", - "path": "system.console/4.3.0", - "hashPath": "system.console.4.3.0.nupkg.sha512" - }, - "System.Diagnostics.Debug/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "path": "system.diagnostics.debug/4.3.0", - "hashPath": "system.diagnostics.debug.4.3.0.nupkg.sha512" - }, - "System.Diagnostics.DiagnosticSource/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-tD6kosZnTAGdrEa0tZSuFyunMbt/5KYDnHdndJYGqZoNy00XVXyACd5d6KnE1YgYv3ne2CjtAfNXo/fwEhnKUA==", - "path": "system.diagnostics.diagnosticsource/4.3.0", - "hashPath": "system.diagnostics.diagnosticsource.4.3.0.nupkg.sha512" - }, - "System.Diagnostics.Process/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-J0wOX07+QASQblsfxmIMFc9Iq7KTXYL3zs2G/Xc704Ylv3NpuVdo6gij6V3PGiptTxqsK0K7CdXenRvKUnkA2g==", - "path": "system.diagnostics.process/4.3.0", - "hashPath": "system.diagnostics.process.4.3.0.nupkg.sha512" - }, - "System.Diagnostics.Tools/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", - "path": "system.diagnostics.tools/4.3.0", - "hashPath": "system.diagnostics.tools.4.3.0.nupkg.sha512" - }, - "System.Diagnostics.Tracing/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "path": "system.diagnostics.tracing/4.3.0", - "hashPath": "system.diagnostics.tracing.4.3.0.nupkg.sha512" - }, - "System.Dynamic.Runtime/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-SNVi1E/vfWUAs/WYKhE9+qlS6KqK0YVhnlT0HQtr8pMIA8YX3lwy3uPMownDwdYISBdmAF/2holEIldVp85Wag==", - "path": "system.dynamic.runtime/4.3.0", - "hashPath": "system.dynamic.runtime.4.3.0.nupkg.sha512" - }, - "System.Globalization/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "path": "system.globalization/4.3.0", - "hashPath": "system.globalization.4.3.0.nupkg.sha512" - }, - "System.Globalization.Calendars/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "path": "system.globalization.calendars/4.3.0", - "hashPath": "system.globalization.calendars.4.3.0.nupkg.sha512" - }, - "System.Globalization.Extensions/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "path": "system.globalization.extensions/4.3.0", - "hashPath": "system.globalization.extensions.4.3.0.nupkg.sha512" - }, - "System.IO/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "path": "system.io/4.3.0", - "hashPath": "system.io.4.3.0.nupkg.sha512" - }, - "System.IO.Compression/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", - "path": "system.io.compression/4.3.0", - "hashPath": "system.io.compression.4.3.0.nupkg.sha512" - }, - "System.IO.Compression.ZipFile/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", - "path": "system.io.compression.zipfile/4.3.0", - "hashPath": "system.io.compression.zipfile.4.3.0.nupkg.sha512" - }, - "System.IO.FileSystem/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "path": "system.io.filesystem/4.3.0", - "hashPath": "system.io.filesystem.4.3.0.nupkg.sha512" - }, - "System.IO.FileSystem.Primitives/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", - "path": "system.io.filesystem.primitives/4.3.0", - "hashPath": "system.io.filesystem.primitives.4.3.0.nupkg.sha512" - }, - "System.Linq/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", - "path": "system.linq/4.3.0", - "hashPath": "system.linq.4.3.0.nupkg.sha512" - }, - "System.Linq.Expressions/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", - "path": "system.linq.expressions/4.3.0", - "hashPath": "system.linq.expressions.4.3.0.nupkg.sha512" - }, - "System.Net.Http/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", - "path": "system.net.http/4.3.0", - "hashPath": "system.net.http.4.3.0.nupkg.sha512" - }, - "System.Net.Primitives/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "path": "system.net.primitives/4.3.0", - "hashPath": "system.net.primitives.4.3.0.nupkg.sha512" - }, - "System.Net.Sockets/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", - "path": "system.net.sockets/4.3.0", - "hashPath": "system.net.sockets.4.3.0.nupkg.sha512" - }, - "System.ObjectModel/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", - "path": "system.objectmodel/4.3.0", - "hashPath": "system.objectmodel.4.3.0.nupkg.sha512" - }, - "System.Reflection/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "path": "system.reflection/4.3.0", - "hashPath": "system.reflection.4.3.0.nupkg.sha512" - }, - "System.Reflection.Emit/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "path": "system.reflection.emit/4.3.0", - "hashPath": "system.reflection.emit.4.3.0.nupkg.sha512" - }, - "System.Reflection.Emit.ILGeneration/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", - "path": "system.reflection.emit.ilgeneration/4.3.0", - "hashPath": "system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512" - }, - "System.Reflection.Emit.Lightweight/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", - "path": "system.reflection.emit.lightweight/4.3.0", - "hashPath": "system.reflection.emit.lightweight.4.3.0.nupkg.sha512" - }, - "System.Reflection.Extensions/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", - "path": "system.reflection.extensions/4.3.0", - "hashPath": "system.reflection.extensions.4.3.0.nupkg.sha512" - }, - "System.Reflection.Primitives/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "path": "system.reflection.primitives/4.3.0", - "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512" - }, - "System.Reflection.TypeExtensions/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", - "path": "system.reflection.typeextensions/4.3.0", - "hashPath": "system.reflection.typeextensions.4.3.0.nupkg.sha512" - }, - "System.Resources.ResourceManager/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "path": "system.resources.resourcemanager/4.3.0", - "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512" - }, - "System.Runtime/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "path": "system.runtime/4.3.0", - "hashPath": "system.runtime.4.3.0.nupkg.sha512" - }, - "System.Runtime.Extensions/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "path": "system.runtime.extensions/4.3.0", - "hashPath": "system.runtime.extensions.4.3.0.nupkg.sha512" - }, - "System.Runtime.Handles/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "path": "system.runtime.handles/4.3.0", - "hashPath": "system.runtime.handles.4.3.0.nupkg.sha512" - }, - "System.Runtime.InteropServices/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "path": "system.runtime.interopservices/4.3.0", - "hashPath": "system.runtime.interopservices.4.3.0.nupkg.sha512" - }, - "System.Runtime.InteropServices.RuntimeInformation/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", - "path": "system.runtime.interopservices.runtimeinformation/4.3.0", - "hashPath": "system.runtime.interopservices.runtimeinformation.4.3.0.nupkg.sha512" - }, - "System.Runtime.Loader/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-DHMaRn8D8YCK2GG2pw+UzNxn/OHVfaWx7OTLBD/hPegHZZgcZh3H6seWegrC4BYwsfuGrywIuT+MQs+rPqRLTQ==", - "path": "system.runtime.loader/4.3.0", - "hashPath": "system.runtime.loader.4.3.0.nupkg.sha512" - }, - "System.Runtime.Numerics/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", - "path": "system.runtime.numerics/4.3.0", - "hashPath": "system.runtime.numerics.4.3.0.nupkg.sha512" - }, - "System.Runtime.Serialization.Formatters/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-KT591AkTNFOTbhZlaeMVvfax3RqhH1EJlcwF50Wm7sfnBLuHiOeZRRKrr1ns3NESkM20KPZ5Ol/ueMq5vg4QoQ==", - "path": "system.runtime.serialization.formatters/4.3.0", - "hashPath": "system.runtime.serialization.formatters.4.3.0.nupkg.sha512" - }, - "System.Runtime.Serialization.Primitives/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Wz+0KOukJGAlXjtKr+5Xpuxf8+c8739RI1C+A2BoQZT+wMCCoMDDdO8/4IRHfaVINqL78GO8dW8G2lW/e45Mcw==", - "path": "system.runtime.serialization.primitives/4.3.0", - "hashPath": "system.runtime.serialization.primitives.4.3.0.nupkg.sha512" - }, - "System.Security.Cryptography.Algorithms/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "path": "system.security.cryptography.algorithms/4.3.0", - "hashPath": "system.security.cryptography.algorithms.4.3.0.nupkg.sha512" - }, - "System.Security.Cryptography.Cng/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "path": "system.security.cryptography.cng/4.3.0", - "hashPath": "system.security.cryptography.cng.4.3.0.nupkg.sha512" - }, - "System.Security.Cryptography.Csp/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "path": "system.security.cryptography.csp/4.3.0", - "hashPath": "system.security.cryptography.csp.4.3.0.nupkg.sha512" - }, - "System.Security.Cryptography.Encoding/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "path": "system.security.cryptography.encoding/4.3.0", - "hashPath": "system.security.cryptography.encoding.4.3.0.nupkg.sha512" - }, - "System.Security.Cryptography.OpenSsl/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "path": "system.security.cryptography.openssl/4.3.0", - "hashPath": "system.security.cryptography.openssl.4.3.0.nupkg.sha512" - }, - "System.Security.Cryptography.Primitives/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", - "path": "system.security.cryptography.primitives/4.3.0", - "hashPath": "system.security.cryptography.primitives.4.3.0.nupkg.sha512" - }, - "System.Security.Cryptography.X509Certificates/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "path": "system.security.cryptography.x509certificates/4.3.0", - "hashPath": "system.security.cryptography.x509certificates.4.3.0.nupkg.sha512" - }, - "System.Text.Encoding/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "path": "system.text.encoding/4.3.0", - "hashPath": "system.text.encoding.4.3.0.nupkg.sha512" - }, - "System.Text.Encoding.Extensions/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "path": "system.text.encoding.extensions/4.3.0", - "hashPath": "system.text.encoding.extensions.4.3.0.nupkg.sha512" - }, - "System.Text.RegularExpressions/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", - "path": "system.text.regularexpressions/4.3.0", - "hashPath": "system.text.regularexpressions.4.3.0.nupkg.sha512" - }, - "System.Threading/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "path": "system.threading/4.3.0", - "hashPath": "system.threading.4.3.0.nupkg.sha512" - }, - "System.Threading.Tasks/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "path": "system.threading.tasks/4.3.0", - "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512" - }, - "System.Threading.Tasks.Extensions/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-npvJkVKl5rKXrtl1Kkm6OhOUaYGEiF9wFbppFRWSMoApKzt2PiPHT2Bb8a5sAWxprvdOAtvaARS9QYMznEUtug==", - "path": "system.threading.tasks.extensions/4.3.0", - "hashPath": "system.threading.tasks.extensions.4.3.0.nupkg.sha512" - }, - "System.Threading.Thread/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-OHmbT+Zz065NKII/ZHcH9XO1dEuLGI1L2k7uYss+9C1jLxTC9kTZZuzUOyXHayRk+dft9CiDf3I/QZ0t8JKyBQ==", - "path": "system.threading.thread/4.3.0", - "hashPath": "system.threading.thread.4.3.0.nupkg.sha512" - }, - "System.Threading.ThreadPool/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-k/+g4b7vjdd4aix83sTgC9VG6oXYKAktSfNIJUNGxPEj7ryEOfzHHhfnmsZvjxawwcD9HyWXKCXmPjX8U4zeSw==", - "path": "system.threading.threadpool/4.3.0", - "hashPath": "system.threading.threadpool.4.3.0.nupkg.sha512" - }, - "System.Threading.Timer/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", - "path": "system.threading.timer/4.3.0", - "hashPath": "system.threading.timer.4.3.0.nupkg.sha512" - }, - "System.Xml.ReaderWriter/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", - "path": "system.xml.readerwriter/4.3.0", - "hashPath": "system.xml.readerwriter.4.3.0.nupkg.sha512" - }, - "System.Xml.XDocument/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", - "path": "system.xml.xdocument/4.3.0", - "hashPath": "system.xml.xdocument.4.3.0.nupkg.sha512" - }, - "System.Xml.XmlDocument/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-lJ8AxvkX7GQxpC6GFCeBj8ThYVyQczx2+f/cWHJU8tjS7YfI6Cv6bon70jVEgs2CiFbmmM8b9j1oZVx0dSI2Ww==", - "path": "system.xml.xmldocument/4.3.0", - "hashPath": "system.xml.xmldocument.4.3.0.nupkg.sha512" - } - } -} \ No newline at end of file diff --git a/resources/dotnetJsonCli/Microsoft.TemplateEngine.JsonCli.dll b/resources/dotnetJsonCli/Microsoft.TemplateEngine.JsonCli.dll deleted file mode 100644 index 767af028d..000000000 Binary files a/resources/dotnetJsonCli/Microsoft.TemplateEngine.JsonCli.dll and /dev/null differ diff --git a/resources/dotnetJsonCli/Microsoft.TemplateEngine.JsonCli.runtimeconfig.json b/resources/dotnetJsonCli/Microsoft.TemplateEngine.JsonCli.runtimeconfig.json deleted file mode 100644 index e7b3b03d6..000000000 --- a/resources/dotnetJsonCli/Microsoft.TemplateEngine.JsonCli.runtimeconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "runtimeOptions": { - "tfm": "net6.0", - "framework": { - "name": "Microsoft.NETCore.App", - "version": "6.0.0" - }, - "configProperties": { - "System.Reflection.Metadata.MetadataUpdater.IsSupported": false - } - } -} \ No newline at end of file diff --git a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.dll b/resources/dotnetJsonCli/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.dll deleted file mode 100644 index d316e41a3..000000000 Binary files a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.dll and /dev/null differ diff --git a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Utils.dll b/resources/dotnetJsonCli/Microsoft.TemplateEngine.Utils.dll deleted file mode 100644 index 08e6a05de..000000000 Binary files a/resources/dotnetJsonCli/Microsoft.TemplateEngine.Utils.dll and /dev/null differ diff --git a/resources/dotnetJsonCli/Microsoft.TemplateSearch.Common.dll b/resources/dotnetJsonCli/Microsoft.TemplateSearch.Common.dll deleted file mode 100644 index b224d920f..000000000 Binary files a/resources/dotnetJsonCli/Microsoft.TemplateSearch.Common.dll and /dev/null differ diff --git a/resources/dotnetJsonCli/Newtonsoft.Json.dll b/resources/dotnetJsonCli/Newtonsoft.Json.dll deleted file mode 100644 index de482f64e..000000000 Binary files a/resources/dotnetJsonCli/Newtonsoft.Json.dll and /dev/null differ diff --git a/src/commands/createFunction/dotnetSteps/DotnetFunctionCreateStep.ts b/src/commands/createFunction/dotnetSteps/DotnetFunctionCreateStep.ts index 8fc4cdd40..5747d2b6e 100644 --- a/src/commands/createFunction/dotnetSteps/DotnetFunctionCreateStep.ts +++ b/src/commands/createFunction/dotnetSteps/DotnetFunctionCreateStep.ts @@ -4,12 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { type IActionContext } from '@microsoft/vscode-azext-utils'; -import { composeArgs, withArg, withNamedArg } from '@microsoft/vscode-processutils'; import * as path from 'path'; import { type FuncVersion } from '../../../FuncVersion'; import { ext } from '../../../extensionVariables'; import { type FunctionTemplateBase } from '../../../templates/IFunctionTemplate'; -import { executeDotnetTemplateCommand, validateDotnetInstalled } from '../../../templates/dotnet/executeDotnetTemplateCommand'; +import { executeDotnetTemplateCreate, validateDotnetInstalled } from '../../../templates/dotnet/executeDotnetTemplateCommand'; import { nonNullProp } from '../../../utils/nonNull'; import { assertTemplateIsV1 } from '../../../utils/templateVersionUtils'; import { FunctionCreateStepBase } from '../FunctionCreateStepBase'; @@ -32,20 +31,18 @@ export class DotnetFunctionCreateStep extends FunctionCreateStepBase getBindingSetting(context, setting) !== undefined) - .flatMap(setting => { - const value = getBindingSetting(context, setting); - return withNamedArg(`--arg:${setting.name}`, String(value), { shouldQuote: true })(); - }); - - const args = composeArgs( - withNamedArg('--identity', template.id), - withNamedArg('--arg:name', functionName, { shouldQuote: true }), - withNamedArg('--arg:namespace', nonNullProp(context, 'namespace'), { shouldQuote: true }), - withArg(...settingArgs), - )(); + // Build template args as a record + const templateArgs: Record = { + name: functionName, + namespace: nonNullProp(context, 'namespace'), + }; + + for (const setting of template.userPromptedSettings) { + const value = getBindingSetting(context, setting); + if (value !== undefined) { + templateArgs[setting.name] = String(value); + } + } const version: FuncVersion = nonNullProp(context, 'version'); let projectTemplateKey = context.projectTemplateKey; @@ -53,7 +50,7 @@ export class DotnetFunctionCreateStep extends FunctionCreateStepBase = { + name: projectName, + AzureFunctionsVersion: functionsVersion, + }; + if (context.workerRuntime?.targetFramework) { + templateArgs.Framework = context.workerRuntime.targetFramework; + } - await executeDotnetTemplateCommand(context, version, projTemplateKey, context.projectPath, 'create', args); + await executeDotnetTemplateCreate(context, version, projTemplateKey, context.projectPath, identity, templateArgs); await setLocalAppSetting(context, context.projectPath, ConnectionKey.Storage, '', MismatchBehavior.Overwrite); } diff --git a/src/templates/README.md b/src/templates/README.md index b81f79c50..3c8ffcaf1 100644 --- a/src/templates/README.md +++ b/src/templates/README.md @@ -153,4 +153,4 @@ In both cases, the templates are split into three parts: templates.json, binding ## .NET Templates -.NET templates are retrieved from the 'itemTemplates' and 'projectTemplates' properties in the CLI Feed. A single version of the Azure Functions runtime might support multiple versions of the .NET runtime, so we use the target framework and sdk from a user's `*.csproj` file to pick the matching templates. We then leverage the JsonCLI tool ('Microsoft.TemplateEngine.JsonCli') which provides a JSON-based way to interact with .NET templates. More information on that tool can be found in the [tools/JsonCli](https://github.com/microsoft/vscode-azurefunctions/tree/main/tools/JsonCli) folder at the root of this repo. +.NET templates are retrieved from the 'itemTemplates' and 'projectTemplates' properties in the CLI Feed. A single version of the Azure Functions runtime might support multiple versions of the .NET runtime, so we use the target framework and sdk from a user's `*.csproj` file to pick the matching templates. Templates are parsed directly from the nupkg files (which contain `.template.config/template.json` metadata) and instantiated using native `dotnet new` commands. diff --git a/src/templates/dotnet/DotnetTemplateProvider.ts b/src/templates/dotnet/DotnetTemplateProvider.ts index f83c2fbd9..eadb8178a 100644 --- a/src/templates/dotnet/DotnetTemplateProvider.ts +++ b/src/templates/dotnet/DotnetTemplateProvider.ts @@ -165,7 +165,7 @@ export class DotnetTemplateProvider extends TemplateProviderBase { } private async parseTemplates(context: IActionContext, projKey: string): Promise { - this._rawTemplates = parseJson(await executeDotnetTemplateCommand(context, this.version, projKey, undefined, 'list')); + this._rawTemplates = parseJson(await executeDotnetTemplateCommand(context, this.version, projKey)); return parseDotnetTemplates(this._rawTemplates, this.version); } diff --git a/src/templates/dotnet/executeDotnetTemplateCommand.ts b/src/templates/dotnet/executeDotnetTemplateCommand.ts index 3e9fbeb97..47ec8e68d 100644 --- a/src/templates/dotnet/executeDotnetTemplateCommand.ts +++ b/src/templates/dotnet/executeDotnetTemplateCommand.ts @@ -3,38 +3,132 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { type IActionContext } from '@microsoft/vscode-azext-utils'; -import { composeArgs, withArg, withNamedArg, withQuotedArg, type CommandLineArgs } from '@microsoft/vscode-processutils'; +import { randomUtils, type IActionContext } from '@microsoft/vscode-azext-utils'; +import { composeArgs, withArg, withNamedArg, withQuotedArg } from '@microsoft/vscode-processutils'; +import * as fs from 'fs'; +import * as os from 'os'; import * as path from 'path'; import { coerce as semVerCoerce, type SemVer } from 'semver'; import { type FuncVersion } from '../../FuncVersion'; import { ext } from "../../extensionVariables"; import { localize } from '../../localize'; import { cpUtils } from "../../utils/cpUtils"; +import { findShortNameByIdentity, parseTemplatesFromNupkg } from './parseNupkgTemplates'; -export async function executeDotnetTemplateCommand(context: IActionContext, version: FuncVersion, projTemplateKey: string, workingDirectory: string | undefined, operation: 'list' | 'create', additionalArgs?: CommandLineArgs): Promise { - const jsonDllPath: string = ext.context.asAbsolutePath(path.join('resources', 'dotnetJsonCli', 'Microsoft.TemplateEngine.JsonCli.dll')); - - const args = composeArgs( - withNamedArg('--roll-forward', 'Major'), - withQuotedArg(jsonDllPath), - withNamedArg('--templateDir', getDotnetTemplateDir(context, version, projTemplateKey), { shouldQuote: true }), - withNamedArg('--operation', operation), - withArg(...(additionalArgs ?? [])), - )(); - return await cpUtils.executeCommand( - undefined, - workingDirectory, - 'dotnet', - args); +const itemNupkgFileName = 'item.nupkg'; +const projectNupkgFileName = 'project.nupkg'; + +/** + * Lists templates by parsing nupkg files directly (no longer uses the JsonCli DLL). + */ +export async function executeDotnetTemplateCommand(context: IActionContext, version: FuncVersion, projTemplateKey: string): Promise { + const templateDir = getDotnetTemplateDir(context, version, projTemplateKey); + return await listDotnetTemplates(templateDir); +} + +/** + * Lists all templates from the item.nupkg and project.nupkg in the template directory + * by parsing the `.template.config/template.json` files directly from the nupkg archives. + */ +async function listDotnetTemplates(templateDir: string): Promise { + const itemNupkg = path.join(templateDir, itemNupkgFileName); + const projectNupkg = path.join(templateDir, projectNupkgFileName); + + const templates: object[] = []; + + for (const nupkgPath of [itemNupkg, projectNupkg]) { + try { + await fs.promises.access(nupkgPath); + templates.push(...await parseTemplatesFromNupkg(nupkgPath)); + } catch { + // nupkg doesn't exist, skip + } + } + + return JSON.stringify(templates); +} + +/** + * Creates a function or project from a .NET template using native `dotnet new` commands. + * Uses an isolated DOTNET_CLI_HOME to avoid polluting the user's global template installation. + */ +export async function executeDotnetTemplateCreate( + context: IActionContext, + version: FuncVersion, + projTemplateKey: string, + workingDirectory: string | undefined, + identity: string, + templateArgs: Record, +): Promise { + const templateDir = getDotnetTemplateDir(context, version, projTemplateKey); + const itemNupkg = path.join(templateDir, itemNupkgFileName); + const projectNupkg = path.join(templateDir, projectNupkgFileName); + + // Collect existing nupkg paths + const nupkgPaths: string[] = []; + for (const p of [itemNupkg, projectNupkg]) { + try { + await fs.promises.access(p); + nupkgPaths.push(p); + } catch { + // doesn't exist, skip + } + } + + // Find the shortName for the given template identity + const shortName = await findShortNameByIdentity(nupkgPaths, identity); + + // Use an isolated DOTNET_CLI_HOME so template installation doesn't affect the user's global state + // This is how the JSON CLI tool operated + const tempCliHome = path.join(os.tmpdir(), `azfunc-dotnet-home-${randomUtils.getRandomHexString()}`); + const prevDotnetCliHome = process.env.DOTNET_CLI_HOME; + + try { + process.env.DOTNET_CLI_HOME = tempCliHome; + + // Install template packages + for (const nupkgPath of nupkgPaths) { + await cpUtils.executeCommand( + undefined, + undefined, + 'dotnet', + composeArgs(withArg('new', 'install'), withQuotedArg(nupkgPath))(), + ); + } + + // Build dotnet new args: dotnet new -- ... + const createArgs = composeArgs( + withArg('new', shortName), + ...Object.entries(templateArgs) + .filter(([, value]) => value !== undefined && value !== '') + .map(([key, value]) => withNamedArg(`--${key}`, value, { shouldQuote: true })), + )(); + + await cpUtils.executeCommand( + undefined, + workingDirectory, + 'dotnet', + createArgs, + ); + } finally { + // Restore DOTNET_CLI_HOME + if (prevDotnetCliHome !== undefined) { + process.env.DOTNET_CLI_HOME = prevDotnetCliHome; + } else { + delete process.env.DOTNET_CLI_HOME; + } + + // Clean up isolated home directory + await fs.promises.rm(tempCliHome, { recursive: true, force: true }).catch(() => { /* best-effort cleanup */ }); + } } export function getDotnetItemTemplatePath(context: IActionContext, version: FuncVersion, projTemplateKey: string): string { - return path.join(getDotnetTemplateDir(context, version, projTemplateKey), 'item.nupkg'); + return path.join(getDotnetTemplateDir(context, version, projTemplateKey), itemNupkgFileName); } export function getDotnetProjectTemplatePath(context: IActionContext, version: FuncVersion, projTemplateKey: string): string { - return path.join(getDotnetTemplateDir(context, version, projTemplateKey), 'project.nupkg'); + return path.join(getDotnetTemplateDir(context, version, projTemplateKey), projectNupkgFileName); } export function getDotnetTemplateDir(context: IActionContext, version: FuncVersion, projTemplateKey: string): string { diff --git a/src/templates/dotnet/parseNupkgTemplates.ts b/src/templates/dotnet/parseNupkgTemplates.ts new file mode 100644 index 000000000..44d5eef6a --- /dev/null +++ b/src/templates/dotnet/parseNupkgTemplates.ts @@ -0,0 +1,173 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { randomUtils } from '@microsoft/vscode-azext-utils'; +import extract from 'extract-zip'; +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; + +interface TemplateJsonSymbol { + type: string; + datatype?: string; + defaultValue?: string; + description?: string; + choices?: TemplateJsonChoice[] | Record; +} + +interface TemplateJsonChoice { + choice: string; + description: string; +} + +interface TemplateJson { + identity: string; + name: string; + shortName: string; + defaultName?: string; + sourceName?: string; + author?: string; + classifications?: string[]; + groupIdentity?: string; + symbols?: Record; +} + +/** + * Output format matching the JSON Cli tool's output so that + * parseDotnetTemplates.ts can consume it without changes. + */ +export interface RawParameter { + Documentation: string | undefined; + Name: string; + DefaultValue: string | undefined; + DataType: string | undefined; + Choices: Record | undefined; +} + +export interface RawTemplate { + Identity: string; + Name: string; + ShortName: string; + DefaultName: string; + Author: string; + Classifications: string[]; + GroupIdentity: string; + Parameters: RawParameter[]; +} + +/** + * Parses .NET template metadata directly from a nupkg file by extracting + * the `.template.config/template.json` files within it. + * This replaces the need for the Microsoft.TemplateEngine.JsonCli tool. + */ +export async function parseTemplatesFromNupkg(nupkgPath: string): Promise { + const tempDir = path.join(os.tmpdir(), `azfunc-templates-${randomUtils.getRandomHexString()}`); + + try { + await extract(nupkgPath, { dir: tempDir }); + + const templateJsonFiles = await findTemplateJsonFiles(tempDir); + + const results = await Promise.all(templateJsonFiles.map(async (jsonFile) => { + try { + const content = await fs.promises.readFile(jsonFile, 'utf-8'); + const templateJson: TemplateJson = JSON.parse(content); + return convertToRawTemplate(templateJson); + } catch { + // Ignore malformed template.json files + return undefined; + } + })); + + return results.filter((t): t is RawTemplate => t !== undefined); + } finally { + await fs.promises.rm(tempDir, { recursive: true, force: true }).catch(() => { /* best-effort cleanup */ }); + } +} + +/** + * Finds the shortName for a template with a given identity by searching + * through the provided nupkg files. + */ +export async function findShortNameByIdentity(nupkgPaths: string[], identity: string): Promise { + for (const nupkgPath of nupkgPaths) { + try { + const templates = await parseTemplatesFromNupkg(nupkgPath); + const match = templates.find(t => t.Identity === identity); + if (match) { + return match.ShortName; + } + } catch { + // continue to next nupkg + } + } + throw new Error(`Template with identity "${identity}" not found in any of the provided nupkg files.`); +} + +function convertToRawTemplate(templateJson: TemplateJson): RawTemplate { + const parameters: RawParameter[] = []; + + if (templateJson.symbols) { + for (const [name, symbol] of Object.entries(templateJson.symbols)) { + if (symbol.type === 'parameter') { + parameters.push({ + Documentation: symbol.description, + Name: name, + DefaultValue: symbol.defaultValue, + DataType: symbol.datatype ?? undefined, + Choices: convertChoices(symbol.choices), + }); + } + } + } + + return { + Identity: templateJson.identity, + Name: templateJson.name, + ShortName: templateJson.shortName, + DefaultName: templateJson.defaultName ?? templateJson.sourceName ?? templateJson.name, + Author: templateJson.author ?? '', + Classifications: templateJson.classifications ?? [], + GroupIdentity: templateJson.groupIdentity ?? '', + Parameters: parameters, + }; +} + +function convertChoices(choices?: TemplateJsonChoice[] | Record): Record | undefined { + if (!choices) { + return undefined; + } + + // Handle array format: [{ choice: "X", description: "Y" }] + if (Array.isArray(choices)) { + const dict: Record = {}; + for (const choice of choices) { + dict[choice.choice] = choice.description; + } + return dict; + } + + // Handle dict format: { "X": "Y" } + return choices; +} + +async function findTemplateJsonFiles(dir: string): Promise { + const results: string[] = []; + + async function walk(currentDir: string): Promise { + const entries = await fs.promises.readdir(currentDir, { withFileTypes: true }); + for (const entry of entries) { + const fullPath = path.join(currentDir, entry.name); + if (entry.isDirectory()) { + await walk(fullPath); + } else if (entry.name === 'template.json' && path.basename(path.dirname(fullPath)) === '.template.config') { + results.push(fullPath); + } + } + } + + await walk(dir); + return results; +} diff --git a/tools/JsonCli/.azure-pipelines/1esmain.yml b/tools/JsonCli/.azure-pipelines/1esmain.yml deleted file mode 100644 index f5e399f46..000000000 --- a/tools/JsonCli/.azure-pipelines/1esmain.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Trigger the build whenever `main` or `rel/*` is updated -trigger: - - main - - rel/* - -# Disable PR trigger -pr: none - -# Scheduled nightly build of `main` -schedules: - - cron: "0 0 * * *" - displayName: Nightly scheduled build - always: false # Don't rebuild if there haven't been changes - branches: - include: - - main - -# Note: not using template outlined in https://github.com/microsoft/vscode-azuretools/blob/main/azure-pipelines/README.md -# so that we can customize sdl parameters. -# -# Instead, the rest of this is based on https://github.com/microsoft/vscode-azuretools/blob/main/azure-pipelines/1esmain.yml - -# `resources` specifies the location of templates to pick up, use it to get 1ES templates -resources: - repositories: - # get 1es template from here - - repository: 1esPipelines - type: git - name: 1ESPipelineTemplates/1ESPipelineTemplates - ref: refs/tags/release - -variables: - Codeql.BuildIdentifier: JsonCli - # Local analysis is only enabled on PR branches - Codeql.AnalyzeInPipeline: $[startsWith(variables['Build.SourceBranch'], 'refs/pull/')] - -extends: - template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines - parameters: - sdl: - credscan: - suppressionsFile: $(Build.SourcesDirectory)/.azure-pipelines/compliance/CredScanSuppressions.json - codeql: - language: csharp # only build a codeql database for csharp, since the pipeline at the root handles javascript - # enabled: true # TODO: would like to enable only on scheduled builds but CodeQL cannot currently be disabled per https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/codeql/1es-codeql - pool: - name: VSEngSS-MicroBuild2022-1ES # Name of your hosted pool - image: server2022-microbuildVS2022-1es # Name of the image in your pool. If not specified, first image of the pool is used - os: windows # OS of the image. Allowed values: windows, linux, macOS - stages: - # Execute stages from the AzExt stages template - - template: main.yml@self diff --git a/tools/JsonCli/.azure-pipelines/main.yml b/tools/JsonCli/.azure-pipelines/main.yml deleted file mode 100644 index 860d51c9f..000000000 --- a/tools/JsonCli/.azure-pipelines/main.yml +++ /dev/null @@ -1,138 +0,0 @@ -stages: - - stage: DotNet_JsonCli_Stage - jobs: - - job: DotNet_JsonCli_Job - steps: - - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@2 - displayName: 'Install Signing Plugin' - inputs: - signType: 'Test' - env: - TeamName: 'AzureTools' - - - task: UseDotNet@2 - displayName: 'Use .NET sdk 6.0.x' - inputs: - version: 6.0.x - - - task: UseDotNet@2 - displayName: 'Use .NET sdk 7.0.x' - inputs: - version: 7.0.x - - - task: UseDotNet@2 - displayName: 'Use .NET sdk 8.0.x' - inputs: - version: 8.0.x - - - task: DotNetCoreCLI@2 - displayName: 'dotnet restore' - inputs: - command: restore - projects: 'tools/JsonCli/src/Microsoft.TemplateEngine.JsonCli.csproj' - feedsToUse: config - nugetConfigPath: 'tools/JsonCli/src/nuget.config' - - - task: DotNetCoreCLI@2 - displayName: 'dotnet build' - inputs: - projects: 'tools/JsonCli/src/Microsoft.TemplateEngine.JsonCli.csproj' - arguments: '--configuration Release' - - - task: DotNetCoreCLI@2 - displayName: 'dotnet publish 6.0' - inputs: - command: publish - publishWebProjects: false - projects: 'tools/JsonCli/src/Microsoft.TemplateEngine.JsonCli.csproj' - arguments: '--configuration Release --framework net6.0 --no-build' - zipAfterPublish: false - modifyOutputPath: false - - - task: DotNetCoreCLI@2 - displayName: 'dotnet publish 7.0' - inputs: - command: publish - publishWebProjects: false - projects: 'tools/JsonCli/src/Microsoft.TemplateEngine.JsonCli.csproj' - arguments: '--configuration Release --framework net7.0 --no-build' - zipAfterPublish: false - modifyOutputPath: false - - - task: DeleteFiles@1 - displayName: 'Delete unneeded publish files' - inputs: - SourceFolder: 'tools/JsonCli/src' - Contents: | - bin/**/publish/**/*.exe - bin/**/publish/**/*.pdb - - # Run before we build the signing project, because we don't want to analyze that - - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3 - displayName: 'Run Roslyn Analyzers' - continueOnError: true - condition: eq(variables['ENABLE_COMPLIANCE'], 'true') - inputs: - msBuildCommandline: '$(Agent.ToolsDirectory)\dotnet\dotnet.exe build "$(Build.SourcesDirectory)\tools/JsonCli/src/Microsoft.TemplateEngine.JsonCli.csproj" --configuration Release' - - - task: DotNetCoreCLI@2 - displayName: 'dotnet restore signing' - inputs: - command: restore - projects: 'tools/JsonCli/src/Signing.csproj' - feedsToUse: config - nugetConfigPath: 'tools/JsonCli/src/nuget.config' - - # - task: DotNetCoreCLI@2 - # displayName: 'dotnet build signing' - # inputs: - # projects: 'tools/JsonCli/src/Signing.csproj' - # arguments: '--configuration Release' - - - task: CopyFiles@2 - displayName: 'Copy Files to Staging' - inputs: - SourceFolder: '$(system.defaultworkingdirectory)/tools/JsonCli/src/' - Contents: 'bin/**/publish/**' - TargetFolder: '$(build.artifactstagingdirectory)/drop' - condition: succeededOrFailed() - - # - task: PublishBuildArtifacts@1 - # displayName: 'Publish Artifact: drop' - # inputs: - # PathtoPublish: '$(build.artifactstagingdirectory)/drop' - # condition: succeededOrFailed() - - # - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3 - # displayName: 'Run BinSkim' - # inputs: - # InputType: Basic - # AnalyzeTarget: '$(build.artifactstagingdirectory)/drop\*.dll;$(build.artifactstagingdirectory)/drop\*.exe' - # continueOnError: true - # condition: eq(variables['ENABLE_COMPLIANCE'], 'true') - - # - task: ms-vseng.MicroBuildShipTasks.7c429315-71ba-4cb3-94bb-f829c95f7915.MicroBuildCodesignVerify@2 - # displayName: 'Verify Signed Files' - # inputs: - # TargetFolders: '$(build.artifactstagingdirectory)/drop' - - # - task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2 - # displayName: 'Publish Security Analysis Logs' - # condition: eq(variables['ENABLE_COMPLIANCE'], 'true') - - # - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1 - # displayName: 'Post Analysis' - # inputs: - # AllTools: true - # condition: eq(variables['ENABLE_COMPLIANCE'], 'true') - - # - task: ComponentGovernanceComponentDetection@0 - # displayName: 'Component Detection' - # condition: eq(variables['ENABLE_COMPLIANCE'], 'true') - # inputs: - # sourceScanPath: tools/JsonCli # Scope only to the JSON CLI tool, since that's all this build is for - # templateContext: - # outputs: - # - output: pipelineArtifact - # path: $(build.artifactstagingdirectory)/drop - # artifact: drop diff --git a/tools/JsonCli/.vscode/extensions.json b/tools/JsonCli/.vscode/extensions.json deleted file mode 100644 index 5b7a98f4b..000000000 --- a/tools/JsonCli/.vscode/extensions.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "recommendations": [ - "ms-dotnettools.csharp" - ] -} diff --git a/tools/JsonCli/.vscode/launch.json b/tools/JsonCli/.vscode/launch.json deleted file mode 100644 index ce77a8a60..000000000 --- a/tools/JsonCli/.vscode/launch.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": ".NET Core Launch (list templates)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceFolder}/src/bin/Debug/net7.0/Microsoft.TemplateEngine.JsonCli.dll", - "args": [ - "--templateDir", - "${workspaceFolder}/../../resources/backupTemplates/dotnet/~3/netcoreapp3.1/", - "--operation", - "list" - ], - "cwd": "${workspaceFolder}", - "console": "internalConsole", - "stopAtEntry": false, - "internalConsoleOptions": "openOnSessionStart" - }, - { - "name": ".NET Core Launch (create function)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceFolder}/src/bin/Debug/net7.0/Microsoft.TemplateEngine.JsonCli.dll", - "args": [ - "--templateDir", - "${workspaceFolder}/../../resources/backupTemplates/dotnet/~3/netcoreapp3.1/", - "--operation", - "create", - "--identity", - "Azure.Function.CSharp.HttpTrigger.2.x", - "--arg:name HttpTriggerCSharp2", - "--arg:namespace Company.Function", - "--arg:AccessRights \"Anonymous\"" - ], - "cwd": "${workspaceFolder}", - "console": "internalConsole", - "stopAtEntry": false, - "internalConsoleOptions": "openOnSessionStart" - }, - { - "name": ".NET Core Launch (create project)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - "program": "${workspaceFolder}/src/bin/Debug/net7.0/Microsoft.TemplateEngine.JsonCli.dll", - "args": [ - "--templateDir", - "${workspaceFolder}/../../resources/backupTemplates/dotnet/~3/netcoreapp3.1/", - "--operation", - "create", - "--identity", - "Microsoft.AzureFunctions.ProjectTemplate.CSharp.3.x", - "--arg:name", - "testProj", - "--arg:AzureFunctionsVersion", - "v3" - ], - "cwd": "${workspaceFolder}", - "console": "internalConsole", - "stopAtEntry": false, - "internalConsoleOptions": "openOnSessionStart" - } - ] -} diff --git a/tools/JsonCli/.vscode/settings.json b/tools/JsonCli/.vscode/settings.json deleted file mode 100644 index 57be026ed..000000000 --- a/tools/JsonCli/.vscode/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "editor.formatOnSave": true, - "editor.insertSpaces": true, - "editor.tabSize": 4, - "files.insertFinalNewline": true, - "files.trimTrailingWhitespace": true, - "search.exclude": { - "bin": true, - "obj": true - } -} diff --git a/tools/JsonCli/.vscode/tasks.json b/tools/JsonCli/.vscode/tasks.json deleted file mode 100644 index 664a69f4c..000000000 --- a/tools/JsonCli/.vscode/tasks.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "command": "dotnet", - "type": "process", - "args": [ - "build", - "${workspaceFolder}/src/Microsoft.TemplateEngine.JsonCli.csproj" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "publish (6.0)", - "command": "dotnet", - "type": "process", - "args": [ - "publish", - "--configuration", - "Release", - "--framework", - "net6.0", - "--output", - "${workspaceFolder}/../../resources/dotnetJsonCli/net6.0/", - "${workspaceFolder}/src/Microsoft.TemplateEngine.JsonCli.csproj" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "publish (7.0)", - "command": "dotnet", - "type": "process", - "args": [ - "publish", - "--configuration", - "Release", - "--framework", - "net7.0", - "--output", - "${workspaceFolder}/../../resources/dotnetJsonCli/net7.0/", - "${workspaceFolder}/src/Microsoft.TemplateEngine.JsonCli.csproj" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "publish (8.0)", - "command": "dotnet", - "type": "process", - "args": [ - "publish", - "--configuration", - "Release", - "--framework", - "net8.0", - "--output", - "${workspaceFolder}/../../resources/dotnetJsonCli/net8.0/", - "${workspaceFolder}/src/Microsoft.TemplateEngine.JsonCli.csproj" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "publish (9.0)", - "command": "dotnet", - "type": "process", - "args": [ - "publish", - "--configuration", - "Release", - "--framework", - "net9.0", - "--output", - "${workspaceFolder}/../../resources/dotnetJsonCli/net9.0/", - "${workspaceFolder}/src/Microsoft.TemplateEngine.JsonCli.csproj" - ], - "problemMatcher": "$msCompile" - } - ] -} diff --git a/tools/JsonCli/README.md b/tools/JsonCli/README.md deleted file mode 100644 index 17ca04a47..000000000 --- a/tools/JsonCli/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# .NET Template JSON CLI - -[![Build Status](https://devdiv.visualstudio.com/DevDiv/_apis/build/status/Azure%20Tools/vscode-azurefunctions-jsoncli?branchName=main)](https://devdiv.visualstudio.com/DevDiv/_build/latest?definitionId=13600&branchName=main) - -This tool is leveraged by the Functions extension at the root of this repo. It provides a JSON-based way to interact with .NET Templates. It also allows us to use templates directly from a nuget package, rather than forcing the user to install the templates machine-wide. - -> NOTE: This tool assumes the user already has the .NET CLI installed on their machine, but that means we have to ship multiple target frameworks with the extension to work with whatever they have installed. One alternative would be to leverage the [.NET Install Tool](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscode-dotnet-runtime) to install a specific version of .NET and then the extension would only need to ship that target framework. - -## Prerequisites - -[.NET CLI](https://docs.microsoft.com/dotnet/core/tools/) - -## Example Usage - -### List - -```bash -dotnet --templateDir ./../../resources/backupTemplates/dotnet/~3/netcoreapp3.1/ --operation list -``` - -This will list all templates based on the `templateDir` parameter. The template directory should have an "item.nupkg" for item templates and a "project.nupkg" for project templates. Example output: - -```json -[ - { - "Author": "Microsoft", - "Classifications": [ - "Azure Function" - ], - "DefaultName": "TimerTriggerCSharp", - "Identity": "Azure.Function.CSharp.TimerTrigger.1.x", - "GroupIdentity": "Azure.Function.TimerTrigger", - "Name": "TimerTrigger", - "ShortName": "Timer", - "Parameters": [ - { - "Documentation": "Enter a cron expression of the format '{second} {minute} {hour} {day} {month} {day of week}' to specify the schedule.", - "Name": "Schedule", - "Priority": 0, - "Type": null, - "IsName": false, - "DefaultValue": "0 */5 * * * *", - "DataType": null, - "Choices": null - } - ] - } -] -``` - -### Create - -```bash -dotnet --templateDir ./../../resources/backupTemplates/dotnet/~3/netcoreapp3.1/ --operation create --identity Azure.Function.CSharp.TimerTrigger.1.x --arg:name TimerTriggerCSharp1 --arg:namespace Company.Function --arg:Schedule "0 */5 * * * *" -``` - -This will create the template with the specified identity. The `templateDir` parameter is the same as used above. The `identity` and `arg` parameters can be retrieved from the result of a list operation, shown above. The `name` and `namespace` args apply to all templates. - -## Contributing - -In order to work on this tool, make sure to install the [VS Code Debugger for C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp). You must also make sure to open the `JsonCli` folder _and only_ the `JsonCli` folder in VS Code. The source code has been excluded from VS Code when the root of this repo is open so that it doesn't display a bunch of warnings/errors/notifications while working on the extension itself. - -### Debug - -1. When prompted, make sure to restore NuGet packages -1. From the debug window, select either the 'create function', 'create project', or 'list templates' option based on what you want to test -1. Start debugging! - -### Publish - -In order to update the dll's shipped with the extension, you need to [run a build](https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_build?definitionId=13600) with `SignType` set to `Real` and download those bits into the `resources/dotnetJsonCli` folder as appropriate. - -With new Secure Supply Chain Analysis, you will need to publish the any new dependencies to the [Azure Artifact feed] -(https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_artifacts/feed/vscode-azurefunctions-jsonclitool). - -The easiest way to do this is by `Searching Upstream Sources` through the feed portal. If the package can't be found (private packages), then you can upload the nuget package locally by running the following command from the src folder of this repo: - -```bash -dotnet restore -dotnet nuget push --source "vscode-azurefunctions-jsonclitool" --api-key az "C:\Users\_username_\.nuget\packages\_packagename_\_version_\_packagename_.nupkg" --interactive diff --git a/tools/JsonCli/resources/FinalPublicKey.snk b/tools/JsonCli/resources/FinalPublicKey.snk deleted file mode 100644 index 110b59c7b..000000000 Binary files a/tools/JsonCli/resources/FinalPublicKey.snk and /dev/null differ diff --git a/tools/JsonCli/src/CommandLineParser.cs b/tools/JsonCli/src/CommandLineParser.cs deleted file mode 100644 index 53948156f..000000000 --- a/tools/JsonCli/src/CommandLineParser.cs +++ /dev/null @@ -1,196 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Microsoft.TemplateEngine.JsonCli -{ - public class CommandLineParser - { - private readonly HashSet _consumedPositions = new HashSet(); - private readonly Dictionary _formCanonicalizations = new Dictionary(StringComparer.Ordinal); - private readonly Dictionary> _values = new Dictionary>(StringComparer.Ordinal); - private readonly HashSet _specifiedOptions = new HashSet(StringComparer.Ordinal); - - public bool TryGetSingleValue(string key, out string value) - { - if (!TryGetValues(key, out IReadOnlyList values) || values.Count != 1) - { - value = null; - return false; - } - - value = values[0]; - return true; - } - - public bool TryGetValues(string key, out IReadOnlyList values) - { - if (!_values.TryGetValue(key, out List rawValues)) - { - values = null; - return false; - } - - values = rawValues; - return true; - } - - public IReadOnlyList Args { get; } - - public CommandLineParser(IReadOnlyList args) - { - Args = args; - } - - private CommandLineParser Clone() - { - CommandLineParser parser = new CommandLineParser(Args); - parser._consumedPositions.UnionWith(_consumedPositions); - - foreach (KeyValuePair canonicalization in _formCanonicalizations) - { - parser._formCanonicalizations[canonicalization.Key] = canonicalization.Value; - } - - foreach (KeyValuePair> valuePair in _values) - { - parser._values[valuePair.Key] = new List(valuePair.Value); - } - - parser._specifiedOptions.UnionWith(_specifiedOptions); - return parser; - } - - public CommandLineParser AddOptionWithValue(string basicForm, params string[] additionalForms) - { - CommandLineParser parser = Clone(); - parser._formCanonicalizations.Remove(basicForm); - - foreach (string form in additionalForms) - { - parser._formCanonicalizations[form] = basicForm; - } - - for (int i = 0; i < Args.Count; ++i) - { - if (parser._consumedPositions.Contains(i) - || i == Args.Count - 1 - || parser._consumedPositions.Contains(i + 1)) - { - continue; - } - - if (string.Equals(Args[i], basicForm, StringComparison.Ordinal) - || additionalForms.Any(x => string.Equals(Args[i], x, StringComparison.Ordinal))) - { - if (!parser._values.TryGetValue(basicForm, out List bag)) - { - bag = parser._values[basicForm] = new List(); - } - - bag.Add(Args[i + 1]); - - parser._specifiedOptions.Add(basicForm); - parser._consumedPositions.Add(i); - parser._consumedPositions.Add(i + 1); - } - } - - return parser; - } - - public CommandLineParser AddOptionWithoutValue(string basicForm, string valueIfPresent, params string[] additionalForms) - { - CommandLineParser parser = Clone(); - parser._formCanonicalizations.Remove(basicForm); - - foreach (string form in additionalForms) - { - parser._formCanonicalizations[form] = basicForm; - } - - for (int i = 0; i < Args.Count; ++i) - { - if (parser._consumedPositions.Contains(i)) - { - continue; - } - - if (string.Equals(Args[i], basicForm, StringComparison.Ordinal) - || additionalForms.Any(x => string.Equals(Args[i], x, StringComparison.Ordinal))) - { - if (!parser._values.TryGetValue(basicForm, out List bag)) - { - bag = parser._values[basicForm] = new List(); - } - - bag.Add(valueIfPresent); - parser._specifiedOptions.Add(basicForm); - parser._consumedPositions.Add(i); - } - } - - return parser; - } - - public CommandLineParser AddOptionWithBooleanValue(string basicForm, bool trueIfPresent, params string[] additionalForms) - { - return AddOptionWithConstrainedValue(basicForm, new[] - { - "true", - "false" - }, additionalForms) - .AddOptionWithoutValue(basicForm, trueIfPresent - ? "true" - : "false", additionalForms); - } - - public CommandLineParser AddOptionWithConstrainedValue(string basicForm, IReadOnlyCollection allowedValues, params string[] additionalForms) - { - CommandLineParser parser = Clone(); - parser._formCanonicalizations.Remove(basicForm); - - foreach (string form in additionalForms) - { - parser._formCanonicalizations[form] = basicForm; - } - - for (int i = 0; i < Args.Count; ++i) - { - if (parser._consumedPositions.Contains(i) - || i == Args.Count - 1 - || parser._consumedPositions.Contains(i + 1)) - { - continue; - } - - if (string.Equals(Args[i], basicForm, StringComparison.Ordinal) - || additionalForms.Any(x => string.Equals(Args[i], x, StringComparison.Ordinal))) - { - if (!allowedValues.Contains(Args[i + 1])) - { - continue; - } - - if (!parser._values.TryGetValue(basicForm, out List bag)) - { - bag = parser._values[basicForm] = new List(); - } - - bag.Add(Args[i + 1]); - - parser._specifiedOptions.Add(basicForm); - parser._consumedPositions.Add(i); - parser._consumedPositions.Add(i + 1); - } - } - - return parser; - } - } -} diff --git a/tools/JsonCli/src/Installer.cs b/tools/JsonCli/src/Installer.cs deleted file mode 100644 index 8d42b670d..000000000 --- a/tools/JsonCli/src/Installer.cs +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -// Copied from https://github.com/dotnet/templating/blob/3ec3eddbce3bf78bfec680be1e3178885bc413a3/src/Microsoft.TemplateEngine.Cli/Installer.cs -// Only change is to use our namespace (Microsoft.TemplateEngine.JsonCli) and import theirs (Microsoft.TemplateEngine.Cli) - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using Microsoft.TemplateEngine.Abstractions; -using Microsoft.TemplateEngine.Abstractions.Mount; -using Microsoft.TemplateEngine.Cli; -using Microsoft.TemplateEngine.Abstractions.TemplateUpdates; -using Microsoft.TemplateEngine.Edge; -using Microsoft.TemplateEngine.Edge.Settings; - -namespace Microsoft.TemplateEngine.JsonCli -{ - internal class Installer : IInstaller - { - private readonly IEngineEnvironmentSettings _environmentSettings; - private readonly Paths _paths; - - public Installer(IEngineEnvironmentSettings environmentSettings) - { - _environmentSettings = environmentSettings; - _paths = new Paths(environmentSettings); - } - - public void AddInstallDescriptorForLocation(Guid mountPointId, out IReadOnlyList descriptorList) - { - ((SettingsLoader)(_environmentSettings.SettingsLoader)).InstallUnitDescriptorCache.TryAddDescriptorForLocation(mountPointId, out descriptorList); - } - - public void InstallPackages(IEnumerable installationRequests) => InstallPackages(installationRequests, null, false, false); - - public void InstallPackages(IEnumerable installationRequests, IList nuGetSources) => InstallPackages(installationRequests, nuGetSources, false, false); - - public void InstallPackages(IEnumerable installationRequests, IList nuGetSources, bool debugAllowDevInstall) => InstallPackages(installationRequests, nuGetSources, debugAllowDevInstall, false); - - public void InstallPackages(IEnumerable installationRequests, IList nuGetSources, bool debugAllowDevInstall, bool interactive) - { - List localSources = new List(); - List packages = new List(); - - foreach (string request in installationRequests) - { - string req = request; - - //If the request string doesn't have any wild cards or probable path indicators, - // and doesn't have a "::" delimiter either, try to convert it to "latest package" - // form - if (OriginalRequestIsImplicitPackageVersionSyntax(request)) - { - req += "::*"; - } - - if (Package.TryParse(req, out Package package)) - { - packages.Add(package); - } - else - { - localSources.Add(request); - } - } - - if (localSources.Count > 0) - { - InstallLocalPackages(localSources, debugAllowDevInstall); - } - - if (packages.Count > 0) - { - IList additionalDotNetArguments = (interactive) ? new string[] { "--interactive" } : null; - InstallRemotePackages(packages, nuGetSources, additionalDotNetArguments); - } - - _environmentSettings.SettingsLoader.Save(); - } - - private bool OriginalRequestIsImplicitPackageVersionSyntax(string req) - { - if (req.IndexOfAny(new[] { '*', '?', '/', '\\' }) < 0 && req.IndexOf("::", StringComparison.Ordinal) < 0) - { - bool localFileSystemEntryExists = false; - - try - { - localFileSystemEntryExists = _environmentSettings.Host.FileSystem.FileExists(req) - || _environmentSettings.Host.FileSystem.DirectoryExists(req); - } - catch - { - } - - return !localFileSystemEntryExists; - } - - return false; - } - - private void UninstallOtherVersionsOfSamePackage(IInstallUnitDescriptor descriptor) - { - IReadOnlyList allDescriptors = ((SettingsLoader)(_environmentSettings.SettingsLoader)).InstallUnitDescriptorCache.Descriptors.Values.ToList(); - - foreach (IInstallUnitDescriptor testDescriptor in allDescriptors) - { - if (string.Equals(descriptor.Identifier, testDescriptor.Identifier, StringComparison.OrdinalIgnoreCase) - && descriptor.FactoryId == testDescriptor.FactoryId - && descriptor.DescriptorId != testDescriptor.DescriptorId) - { - if (descriptor.MountPointId != testDescriptor.MountPointId) - { - // Uninstalls the mount point and the descriptor(s) for packs that were installed under that mount point. - UninstallMountPoint(testDescriptor.MountPointId); - } - else - { - // The new install is in the same place as the old install. Don't remove the mount point, just the old descriptor. - // This is for when the exact same pack is installed over-the-top of an existing install of it. - // Works for both zip/nupkg and for local file sources. - ((SettingsLoader)(_environmentSettings.SettingsLoader)).InstallUnitDescriptorCache.RemoveDescriptor(testDescriptor); - } - } - } - } - - public IEnumerable Uninstall(IEnumerable uninstallRequestList) - { - List uninstallFailures = new List(); - - Dictionary descriptorsById = ((SettingsLoader)(_environmentSettings.SettingsLoader)).InstallUnitDescriptorCache.Descriptors - .ToDictionary(x => x.Value.Identifier, x => x.Value); - - foreach (string uninstallRequest in uninstallRequestList) - { - // TODO - possible match on other than the exact identifier - if (descriptorsById.TryGetValue(uninstallRequest, out IInstallUnitDescriptor installDescriptor)) - { - UninstallMountPoint(installDescriptor.MountPointId); - } - else - { - uninstallFailures.Add(uninstallRequest); - } - } - - return uninstallFailures; - } - - private bool UninstallMountPoint(Guid mountPointId) - { - if (!_environmentSettings.SettingsLoader.TryGetMountPointInfo(mountPointId, out MountPointInfo mountPoint)) - { - return false; - } - - IReadOnlyCollection mountPointFamily = GetDescendantMountPointsFromParent(mountPointId); - - //Find all of the things that refer to any of the mount points we've got - _environmentSettings.SettingsLoader.RemoveMountPoints(mountPointFamily); - ((SettingsLoader)(_environmentSettings.SettingsLoader)).InstallUnitDescriptorCache.RemoveDescriptorsForLocationList(mountPointFamily); - _environmentSettings.SettingsLoader.Save(); - - if (mountPoint.Place.StartsWith(_paths.User.Packages, StringComparison.OrdinalIgnoreCase)) - { - try - { - _environmentSettings.Host.FileSystem.FileDelete(mountPoint.Place); - } - catch - { - return false; - } - } - - return true; - } - - private IReadOnlyCollection GetDescendantMountPointsFromParent(Guid parent) - { - HashSet mountPoints = new HashSet { parent }; - bool anyFound = true; - - while (anyFound) - { - anyFound = false; - - foreach (MountPointInfo possibleChild in _environmentSettings.SettingsLoader.MountPoints) - { - if (mountPoints.Contains(possibleChild.ParentMountPointId)) - { - anyFound |= mountPoints.Add(possibleChild.MountPointId); - } - } - } - - return mountPoints; - } - - private void InstallRemotePackages(List packages, IList nuGetSources, IList additionalDotNetArguments) - { - const string packageRef = @" "; - const string projectFile = @" - - netcoreapp1.0 - - - - -{0} - -"; - - _paths.CreateDirectory(_paths.User.ScratchDir); - string proj = Path.Combine(_paths.User.ScratchDir, "restore.csproj"); - StringBuilder references = new StringBuilder(); - - foreach (Package pkg in packages) - { - references.AppendLine(string.Format(packageRef, pkg.Name, pkg.Version)); - } - - string content = string.Format(projectFile, references.ToString()); - _paths.WriteAllText(proj, content); - - string restored = Path.Combine(_paths.User.ScratchDir, "Packages"); - - List restoreArgsList = new List(); - restoreArgsList.Add(proj); - restoreArgsList.Add("--packages"); - restoreArgsList.Add(restored); - - if (nuGetSources != null) - { - foreach (string nuGetSource in nuGetSources) - { - restoreArgsList.Add("--source"); - restoreArgsList.Add(nuGetSource); - } - } - - if (additionalDotNetArguments != null) - { - restoreArgsList.AddRange(additionalDotNetArguments); - } - - var restoreArgs = restoreArgsList.ToArray(); - - Dotnet.Restore(restoreArgs).ForwardStdOut().ForwardStdErr().Execute(); - string stagingDir = Path.Combine(_paths.User.ScratchDir, "Staging"); - _paths.CreateDirectory(stagingDir); - - List newLocalPackages = new List(); - foreach (string packagePath in _paths.EnumerateFiles(restored, "*.nupkg", SearchOption.AllDirectories)) - { - string stagingPathForPackage = Path.Combine(stagingDir, Path.GetFileName(packagePath)); - _paths.Copy(packagePath, stagingPathForPackage); - newLocalPackages.Add(stagingPathForPackage); - } - - InstallLocalPackages(newLocalPackages, false); - _paths.DeleteDirectory(_paths.User.ScratchDir); - } - - private void InstallLocalPackages(IReadOnlyList packageNames, bool debugAllowDevInstall) - { - foreach (string package in packageNames) - { - if (package == null) - { - continue; - } - - string pkg = package.Trim(); - pkg = _environmentSettings.Environment.ExpandEnvironmentVariables(pkg); - string pattern = null; - - int wildcardIndex = pkg.IndexOfAny(new[] { '*', '?' }); - - if (wildcardIndex > -1) - { - int lastSlashBeforeWildcard = pkg.LastIndexOfAny(new[] { '\\', '/' }); - if (lastSlashBeforeWildcard >= 0) - { - pattern = pkg.Substring(lastSlashBeforeWildcard + 1); - pkg = pkg.Substring(0, lastSlashBeforeWildcard); - } - } - - try - { - string installString = null; - - if (pattern != null) - { - string fullDirectory = new DirectoryInfo(pkg).FullName; - installString = Path.Combine(fullDirectory, pattern); - } - else if (_environmentSettings.Host.FileSystem.DirectoryExists(pkg) || _environmentSettings.Host.FileSystem.FileExists(pkg)) - { - installString = new DirectoryInfo(pkg).FullName; - } - else - { - _environmentSettings.Host.OnNonCriticalError("InvalidPackageSpecification", string.Format(LocalizableStrings.CouldNotFindItemToInstall, pkg), null, 0); - } - - if (installString != null) - { - ((SettingsLoader)(_environmentSettings.SettingsLoader)).UserTemplateCache.Scan(installString, out IReadOnlyList contentMountPointIds, debugAllowDevInstall); - - foreach (Guid mountPointId in contentMountPointIds) - { - AddInstallDescriptorForLocation(mountPointId, out IReadOnlyList descriptorList); - - foreach (IInstallUnitDescriptor descriptor in descriptorList) - { - UninstallOtherVersionsOfSamePackage(descriptor); - } - } - } - } - catch (Exception ex) - { - _environmentSettings.Host.OnNonCriticalError("InvalidPackageSpecification", string.Format(LocalizableStrings.BadPackageSpec, pkg), null, 0); - - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_NEW_DEBUG"))) - { - _environmentSettings.Host.OnNonCriticalError("InvalidPackageSpecificationDetails", ex.ToString(), null, 0); - } - else - { - _environmentSettings.Host.OnNonCriticalError("InvalidPackageSpecificationDetails", ex.Message, null, 0); - } - } - } - } - } -} diff --git a/tools/JsonCli/src/Microsoft.TemplateEngine.JsonCli.csproj b/tools/JsonCli/src/Microsoft.TemplateEngine.JsonCli.csproj deleted file mode 100644 index 5055f8f8b..000000000 --- a/tools/JsonCli/src/Microsoft.TemplateEngine.JsonCli.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - Exe - net6.0;net7.0;net8.0 - true - ..\resources\FinalPublicKey.snk - true - - - - - - - - diff --git a/tools/JsonCli/src/Models/Models.cs b/tools/JsonCli/src/Models/Models.cs deleted file mode 100644 index 8cd3656a8..000000000 --- a/tools/JsonCli/src/Models/Models.cs +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace Microsoft.TemplateEngine.JsonCli.Models -{ - public class TemplateDescriptor - { - [JsonProperty("id")] - public string Id { get; set; } - - [JsonProperty("isTemplateEngineTemplate")] - public bool IsTemplateEngineTemplate { get; } = true; - - [JsonProperty("metadata")] - public Metadata Metadata { get; set; } - - [JsonProperty("runtime")] - public string Runtime { get; set; } - } - - public class Metadata - { - [JsonProperty("defaultFunctionName")] - public string DefaultFunctionName { get; set; } - - [JsonProperty("description")] - public string Description { get; set; } - - [JsonProperty("name")] - public string Name { get; set; } - - [JsonProperty("language")] - public string Language { get; set; } - - [JsonProperty("category")] - public List Category { get; set; } - - [JsonProperty("categoryStyle")] - public string CategoryStyle { get; set; } - - [JsonProperty("enabledInTryMode")] - public bool EnabledInTryMode { get; set; } - - [JsonProperty("userPrompt")] - public List UserPrompt { get; set; } - } - - public class FunctionDescriptor - { - - } -} diff --git a/tools/JsonCli/src/Package.cs b/tools/JsonCli/src/Package.cs deleted file mode 100644 index fb2379adb..000000000 --- a/tools/JsonCli/src/Package.cs +++ /dev/null @@ -1,38 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -using System; - -namespace Microsoft.TemplateEngine.JsonCli -{ - internal class Package - { - public string Name { get; } - - public string Version { get; } - - public Package(string name, string version) - { - Name = name; - Version = version; - } - - public static bool TryParse(string spec, out Package package) - { - int index; - if (string.IsNullOrEmpty(spec) || (index = spec.IndexOf("::", StringComparison.Ordinal)) < 0 || index == spec.Length - 1) - { - package = null; - return false; - } - - string name = spec.Substring(0, index); - string version = spec.Substring(index + 2); - - package = new Package(name, version); - return true; - } - } -} diff --git a/tools/JsonCli/src/Program.cs b/tools/JsonCli/src/Program.cs deleted file mode 100644 index 5cbe539d9..000000000 --- a/tools/JsonCli/src/Program.cs +++ /dev/null @@ -1,181 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Reflection; -using Microsoft.TemplateEngine.Abstractions; -using Microsoft.TemplateEngine.Cli; -using Microsoft.TemplateEngine.Cli.PostActionProcessors; -using Microsoft.TemplateEngine.Edge; -using Microsoft.TemplateEngine.Edge.Settings; -using Microsoft.TemplateEngine.Edge.Template; -using Microsoft.TemplateEngine.Edge.TemplateUpdates; -using Microsoft.TemplateEngine.Orchestrator.RunnableProjects; -using Microsoft.TemplateEngine.Utils; -using Newtonsoft.Json.Linq; - -namespace Microsoft.TemplateEngine.JsonCli -{ - internal class Program - { - private static IHostSpecificDataLoader _hostDataLoader; - private static TemplateCreator _templateCreator; - private static SettingsLoader _settingsLoader; - private static Paths _paths; - private const string DefaultLanguage = "C#"; - private const string HostName = "vscode-azurefunctions"; - private const string HostVersion = "1.0.0"; - - public static EngineEnvironmentSettings EnvironmentSettings { get; private set; } - - private static int Main(string[] args) - { - CommandLineParser parser = new CommandLineParser(args) - .AddOptionWithConstrainedValue("--operation", new[] - { - "list", - "create" - }) - .AddOptionWithValue("--templateDir"); - - if (!parser.TryGetSingleValue("--operation", out string operation) || !parser.TryGetSingleValue("--templateDir", out string templateDir)) - { - Console.SetOut(Console.Error); - Console.WriteLine("ERROR: Expected \"--operation\" and/or \"--templateDir\" parameter."); - return -1; - } - - ITemplateEngineHost host = CreateHost(HostName, HostVersion); - EnvironmentSettings = new EngineEnvironmentSettings(host, x => new SettingsLoader(x), Path.Combine(templateDir, "cache")); - EnvironmentSettings.SettingsLoader.Components.OfType().ToList(); - _paths = new Paths(EnvironmentSettings); - - //NOTE: With the base directory virtualized, packages cannot be installed from NuGet, - // only local packages and folders - EnvironmentSettings.Host.VirtualizeDirectory(_paths.User.Content); - EnvironmentSettings.Host.VirtualizeDirectory(_paths.User.Packages); - _settingsLoader = (SettingsLoader)EnvironmentSettings.SettingsLoader; - _hostDataLoader = new HostSpecificDataLoader(EnvironmentSettings.SettingsLoader); - - IInstaller installer = new Installer(EnvironmentSettings); - - installer.InstallPackages(new string[] { - Path.Combine(templateDir, "item.nupkg"), - Path.Combine(templateDir, "project.nupkg") - }); - - //All required templates/components/lang packs have now been configured - //Desired operation information starts at args[commandArgsStart] - - _templateCreator = new TemplateCreator(EnvironmentSettings); - IReadOnlyList rawTemplates = _settingsLoader.UserTemplateCache.TemplateInfo; - - var templates = new JArray(); - foreach (var rawTemplate in rawTemplates) - { - var template = JObject.FromObject(rawTemplate); - template.Add("Parameters", JArray.FromObject(rawTemplate.Parameters)); - templates.Add(template); - } - - - if (string.Equals(operation, "list")) - { - Console.WriteLine(templates); - return 0; - } - - parser = parser.AddOptionWithValue("--identity"); - - if (!parser.TryGetSingleValue("--identity", out string identity)) - { - Console.SetOut(Console.Error); - Console.WriteLine("ERROR: Expected \"--identity\" parameter."); - return -1; - } - - TemplateInfo info = rawTemplates.FirstOrDefault(x => string.Equals(x.Identity, identity, StringComparison.Ordinal)); - - if (info == null) - { - Console.SetOut(Console.Error); - Console.WriteLine("ERROR: Failed to find template with identity \"{0}\".", identity); - return -1; - } - - if (string.Equals(operation, "create")) - { - Dictionary templateArgs = new Dictionary(StringComparer.Ordinal); - - foreach (ITemplateParameter x in info.Parameters) - { - if (x.DataType != null && x.DataType.StartsWith("bool", StringComparison.OrdinalIgnoreCase)) - { - parser = parser.AddOptionWithBooleanValue($"--arg:{x.Name}", string.IsNullOrEmpty(x.DefaultValue) || string.Equals(x.DefaultValue, "true")); - } - else if (x.DataType != null && x.DataType.Equals("choice", StringComparison.OrdinalIgnoreCase)) - { - parser = parser.AddOptionWithConstrainedValue($"--arg:{x.Name}", x.Choices.Keys.ToList()); - } - else - { - parser = parser.AddOptionWithValue($"--arg:{x.Name}"); - } - - if (parser.TryGetSingleValue($"--arg:{x.Name}", out string val)) - { - templateArgs[x.Name] = val; - } - } - - TemplateCreationResult result = _templateCreator.InstantiateAsync(info, null, null, null, templateArgs, true, false, null).Result; - if (result.Status == CreationResultStatus.Success) - { - PostActionDispatcher postActionDispatcher = new PostActionDispatcher(EnvironmentSettings, new New3Callbacks(), result, AllowPostActionsSetting.Yes, false); - postActionDispatcher.Process(null); - } - - Console.WriteLine(JObject.FromObject(result)); - return (int)result.Status; - } - - return 0; - } - - private static string GetHomeDirectory() - { - string home = "%USERPROFILE%"; - - if (Path.DirectorySeparatorChar == '/') - { - home = "%HOME%"; - } - - string profileDir = Environment.ExpandEnvironmentVariables(home); - return profileDir; - } - - private static ITemplateEngineHost CreateHost(string hostIdentifier, string hostVersion) - { - Dictionary preferences = new Dictionary - { - { "prefs:language", DefaultLanguage } - }; - - AssemblyComponentCatalog builtIns = new AssemblyComponentCatalog(new[] - { - typeof(RunnableProjectGenerator).GetTypeInfo().Assembly, // for assembly: Microsoft.TemplateEngine.Orchestrator.RunnableProjects - typeof(NupkgInstallUnitDescriptorFactory).GetTypeInfo().Assembly, // for assembly: Microsoft.TemplateEngine.Edge - typeof(DotnetRestorePostActionProcessor).GetTypeInfo().Assembly // for assembly: Microsoft.TemplateEngine.Cli - }); - - return new DefaultTemplateEngineHost(hostIdentifier, hostVersion, CultureInfo.CurrentCulture.Name, preferences, builtIns, new[] { "dotnetcli" }); - } - } -} diff --git a/tools/JsonCli/src/Signing.csproj b/tools/JsonCli/src/Signing.csproj deleted file mode 100644 index edf8634ab..000000000 --- a/tools/JsonCli/src/Signing.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - - Library - net6.0;net7.0 - - $(DefaultItemExcludes);**/*.cs - - - - - - - - - - - Microsoft400 - StrongName - - - 3PartySHA2 - - - - diff --git a/tools/JsonCli/src/nuget.config b/tools/JsonCli/src/nuget.config deleted file mode 100644 index fa3077e03..000000000 --- a/tools/JsonCli/src/nuget.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/tools/JsonCli/src/src.sln b/tools/JsonCli/src/src.sln deleted file mode 100644 index 35aebbd32..000000000 --- a/tools/JsonCli/src/src.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.002.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TemplateEngine.JsonCli", "Microsoft.TemplateEngine.JsonCli.csproj", "{5BA9AEF9-30E9-404D-A10E-323AFABE6E9C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Signing", "Signing.csproj", "{E43DBE76-FC2D-4ACB-A657-7E42C074F233}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5BA9AEF9-30E9-404D-A10E-323AFABE6E9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5BA9AEF9-30E9-404D-A10E-323AFABE6E9C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5BA9AEF9-30E9-404D-A10E-323AFABE6E9C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5BA9AEF9-30E9-404D-A10E-323AFABE6E9C}.Release|Any CPU.Build.0 = Release|Any CPU - {E43DBE76-FC2D-4ACB-A657-7E42C074F233}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E43DBE76-FC2D-4ACB-A657-7E42C074F233}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E43DBE76-FC2D-4ACB-A657-7E42C074F233}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E43DBE76-FC2D-4ACB-A657-7E42C074F233}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {D82CD8F7-6A0F-4D71-834B-E173DB4632D1} - EndGlobalSection -EndGlobal