diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 4eea96ab69..0000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,17 +0,0 @@ -init: -- git config --global core.autocrlf true -branches: - only: - - dev - - /^release\/.*$/ - - /^(.*\/)?ci-.*$/ -build_script: -- ps: .\run.ps1 default-build -clone_depth: 1 -environment: - global: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - DOTNET_CLI_TELEMETRY_OPTOUT: 1 -test: 'off' -deploy: 'off' -os: Visual Studio 2017 diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index e2566a262e..0000000000 --- a/.editorconfig +++ /dev/null @@ -1,24 +0,0 @@ -# EditorConfig is awesome:http://EditorConfig.org - -# top-most EditorConfig file -root = true - -[*] -indent_style = space -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.cs] -indent_size = 4 -dotnet_sort_system_directives_first = true:warning - -# Xml files -[*.{csproj,config,props,targets,ruleset,config,resx,xml}] -indent_size = 2 - -[*.{json, yml}] -indent_size = 2 - -[*.{ps1,sh}] -indent_size = 4 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index c2f0f84273..0000000000 --- a/.gitattributes +++ /dev/null @@ -1,52 +0,0 @@ -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain - -*.jpg binary -*.png binary -*.gif binary - -*.cs text=auto diff=csharp -*.vb text=auto -*.resx text=auto -*.c text=auto -*.cpp text=auto -*.cxx text=auto -*.h text=auto -*.hxx text=auto -*.py text=auto -*.rb text=auto -*.java text=auto -*.html text=auto -*.htm text=auto -*.css text=auto -*.scss text=auto -*.sass text=auto -*.less text=auto -*.js text=auto -*.lisp text=auto -*.clj text=auto -*.sql text=auto -*.php text=auto -*.lua text=auto -*.m text=auto -*.asm text=auto -*.erl text=auto -*.fs text=auto -*.fsx text=auto -*.hs text=auto - -*.csproj text=auto -*.vbproj text=auto -*.fsproj text=auto -*.dbproj text=auto -*.sln text=auto eol=crlf - -*.sh eol=lf \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 01ed76be4f..0000000000 --- a/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -[Oo]bj/ -[Bb]in/ -TestResults/ -.nuget/ -_ReSharper.*/ -packages/ -artifacts/ -PublishProfiles/ -*.user -*.suo -*.cache -*.docstates -_ReSharper.* -nuget.exe -*net45.csproj -*net451.csproj -*k10.csproj -*.psess -*.vsp -*.pidb -*.userprefs -*DS_Store -*.ncrunchsolution -*.*sdf -*.ipch -*.sln.ide -project.lock.json -.testPublish/ -.build/ -/.vs/ -.vscode/ -*.nuget.props -*.nuget.targets -.idea/ -.dotnet/ -global.json -*.binlog diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 64bdbb4441..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: csharp -sudo: false -dist: trusty -env: - global: - - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - - DOTNET_CLI_TELEMETRY_OPTOUT: 1 -mono: none -os: -- linux -- osx -osx_image: xcode8.2 -addons: - apt: - packages: - - libunwind8 -branches: - only: - - dev - - /^release\/.*$/ - - /^(.*\/)?ci-.*$/ -before_install: -- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s - /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib - /usr/local/lib/; fi -script: -- ./build.sh diff --git a/.vsts-pipelines/builds/ci-internal.yml b/.vsts-pipelines/builds/ci-internal.yml deleted file mode 100644 index 3693598d93..0000000000 --- a/.vsts-pipelines/builds/ci-internal.yml +++ /dev/null @@ -1,13 +0,0 @@ -trigger: -- master -- release/* - -resources: - repositories: - - repository: buildtools - type: git - name: aspnet-BuildTools - ref: refs/heads/release/2.1 - -phases: -- template: .vsts-pipelines/templates/project-ci.yml@buildtools diff --git a/.vsts-pipelines/builds/ci-public.yml b/.vsts-pipelines/builds/ci-public.yml deleted file mode 100644 index c459e62eb6..0000000000 --- a/.vsts-pipelines/builds/ci-public.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: -- master -- release/* - -# See https://github.com/aspnet/BuildTools -resources: - repositories: - - repository: buildtools - type: github - endpoint: DotNet-Bot GitHub Connection - name: aspnet/BuildTools - ref: refs/heads/release/2.1 - -phases: -- template: .vsts-pipelines/templates/project-ci.yml@buildtools diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 64ff041d5c..0000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,4 +0,0 @@ -Contributing -====== - -Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md) in the Home repo. diff --git a/Directory.Build.props b/Directory.Build.props deleted file mode 100644 index 8c12d37b2d..0000000000 --- a/Directory.Build.props +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - Microsoft .NET - https://github.com/aspnet/DotNetTools - git - $(MSBuildThisFileDirectory) - $(MSBuildThisFileDirectory)build\Key.snk - true - true - - - false - $(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\ - $(MSBuildThisFileDirectory)bin\$(MSBuildProjectName)\ - - - diff --git a/Directory.Build.targets b/Directory.Build.targets deleted file mode 100644 index eb03b2565f..0000000000 --- a/Directory.Build.targets +++ /dev/null @@ -1,6 +0,0 @@ - - - $(MicrosoftNETCoreApp21PackageVersion) - $(NETStandardLibrary20PackageVersion) - - diff --git a/DotNetTools.sln b/DotNetTools.sln deleted file mode 100644 index 82fefe40d0..0000000000 --- a/DotNetTools.sln +++ /dev/null @@ -1,162 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27120.0 -MinimumVisualStudioVersion = 15.0.26730.03 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{66517987-2A5A-4330-B130-207039378FD4}" - ProjectSection(SolutionItems) = preProject - src\Directory.Build.props = src\Directory.Build.props - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-watch", "src\dotnet-watch\dotnet-watch.csproj", "{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8321E0D1-9A47-4D2F-AED8-3AE636D44E35}" - ProjectSection(SolutionItems) = preProject - .appveyor.yml = .appveyor.yml - .editorconfig = .editorconfig - .gitattributes = .gitattributes - .gitignore = .gitignore - .travis.yml = .travis.yml - build.cmd = build.cmd - build.ps1 = build.ps1 - build.sh = build.sh - CONTRIBUTING.md = CONTRIBUTING.md - build\dependencies.props = build\dependencies.props - Directory.Build.props = Directory.Build.props - Directory.Build.targets = Directory.Build.targets - LICENSE.txt = LICENSE.txt - NuGet.config = NuGet.config - NuGetPackageVerifier.json = NuGetPackageVerifier.json - README.md = README.md - build\sources.props = build\sources.props - version.props = version.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F5B382BC-258F-46E1-AC3D-10E5CCD55134}" - ProjectSection(SolutionItems) = preProject - test\Directory.Build.props = test\Directory.Build.props - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-watch.FunctionalTests", "test\dotnet-watch.FunctionalTests\dotnet-watch.FunctionalTests.csproj", "{16BADE2F-1184-4518-8A70-B68A19D0805B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-user-secrets", "src\dotnet-user-secrets\dotnet-user-secrets.csproj", "{8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-user-secrets.Tests", "test\dotnet-user-secrets.Tests\dotnet-user-secrets.Tests.csproj", "{7B331122-83B1-4F08-A119-DC846959844C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-watch.Tests", "test\dotnet-watch.Tests\dotnet-watch.Tests.csproj", "{8A2E6961-6B12-4A8E-8215-3E7301D52EAC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-sql-cache", "src\dotnet-sql-cache\dotnet-sql-cache.csproj", "{53F3B53D-303A-4DAA-9C38-4F55195FA5B9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-dev-certs", "src\dotnet-dev-certs\dotnet-dev-certs.csproj", "{4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.VisualStudio.SecretManager", "tooling\Microsoft.VisualStudio.SecretManager\Microsoft.VisualStudio.SecretManager.csproj", "{5E117F2E-7152-447F-BF47-59F759EEF3A7}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tooling", "tooling", "{62826851-7D74-4F1E-B7D1-12553B789CD8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.VisualStudio.SecretManager.TestExtension", "tooling\Microsoft.VisualStudio.SecretManager.TestExtension\Microsoft.VisualStudio.SecretManager.TestExtension.csproj", "{965F8820-F809-4081-9090-1AEC903F291B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.DeveloperCertificates.XPlat", "src\Microsoft.AspNetCore.DeveloperCertificates.XPlat\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj", "{96E71881-1465-44F5-B4B7-DF9B370FFD02}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - DebugNoVSIX|Any CPU = DebugNoVSIX|Any CPU - Release|Any CPU = Release|Any CPU - ReleaseNoVSIX|Any CPU = ReleaseNoVSIX|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.Release|Any CPU.Build.0 = Release|Any CPU - {8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {16BADE2F-1184-4518-8A70-B68A19D0805B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {16BADE2F-1184-4518-8A70-B68A19D0805B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {16BADE2F-1184-4518-8A70-B68A19D0805B}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {16BADE2F-1184-4518-8A70-B68A19D0805B}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {16BADE2F-1184-4518-8A70-B68A19D0805B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {16BADE2F-1184-4518-8A70-B68A19D0805B}.Release|Any CPU.Build.0 = Release|Any CPU - {16BADE2F-1184-4518-8A70-B68A19D0805B}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {16BADE2F-1184-4518-8A70-B68A19D0805B}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.Release|Any CPU.Build.0 = Release|Any CPU - {8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {7B331122-83B1-4F08-A119-DC846959844C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7B331122-83B1-4F08-A119-DC846959844C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7B331122-83B1-4F08-A119-DC846959844C}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {7B331122-83B1-4F08-A119-DC846959844C}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {7B331122-83B1-4F08-A119-DC846959844C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7B331122-83B1-4F08-A119-DC846959844C}.Release|Any CPU.Build.0 = Release|Any CPU - {7B331122-83B1-4F08-A119-DC846959844C}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {7B331122-83B1-4F08-A119-DC846959844C}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.Release|Any CPU.Build.0 = Release|Any CPU - {8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.Release|Any CPU.Build.0 = Release|Any CPU - {53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.Release|Any CPU.Build.0 = Release|Any CPU - {4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {5E117F2E-7152-447F-BF47-59F759EEF3A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5E117F2E-7152-447F-BF47-59F759EEF3A7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5E117F2E-7152-447F-BF47-59F759EEF3A7}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {5E117F2E-7152-447F-BF47-59F759EEF3A7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5E117F2E-7152-447F-BF47-59F759EEF3A7}.Release|Any CPU.Build.0 = Release|Any CPU - {5E117F2E-7152-447F-BF47-59F759EEF3A7}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {965F8820-F809-4081-9090-1AEC903F291B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {965F8820-F809-4081-9090-1AEC903F291B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {965F8820-F809-4081-9090-1AEC903F291B}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {965F8820-F809-4081-9090-1AEC903F291B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {965F8820-F809-4081-9090-1AEC903F291B}.Release|Any CPU.Build.0 = Release|Any CPU - {965F8820-F809-4081-9090-1AEC903F291B}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {96E71881-1465-44F5-B4B7-DF9B370FFD02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {96E71881-1465-44F5-B4B7-DF9B370FFD02}.Debug|Any CPU.Build.0 = Debug|Any CPU - {96E71881-1465-44F5-B4B7-DF9B370FFD02}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {96E71881-1465-44F5-B4B7-DF9B370FFD02}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {96E71881-1465-44F5-B4B7-DF9B370FFD02}.Release|Any CPU.ActiveCfg = Release|Any CPU - {96E71881-1465-44F5-B4B7-DF9B370FFD02}.Release|Any CPU.Build.0 = Release|Any CPU - {96E71881-1465-44F5-B4B7-DF9B370FFD02}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {96E71881-1465-44F5-B4B7-DF9B370FFD02}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {8A8CEABC-AC47-43FF-A5DF-69224F7E1F46} = {66517987-2A5A-4330-B130-207039378FD4} - {16BADE2F-1184-4518-8A70-B68A19D0805B} = {F5B382BC-258F-46E1-AC3D-10E5CCD55134} - {8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E} = {66517987-2A5A-4330-B130-207039378FD4} - {7B331122-83B1-4F08-A119-DC846959844C} = {F5B382BC-258F-46E1-AC3D-10E5CCD55134} - {8A2E6961-6B12-4A8E-8215-3E7301D52EAC} = {F5B382BC-258F-46E1-AC3D-10E5CCD55134} - {53F3B53D-303A-4DAA-9C38-4F55195FA5B9} = {66517987-2A5A-4330-B130-207039378FD4} - {4FED5119-EE5C-4753-88A4-D61BDEB4D6C8} = {66517987-2A5A-4330-B130-207039378FD4} - {5E117F2E-7152-447F-BF47-59F759EEF3A7} = {62826851-7D74-4F1E-B7D1-12553B789CD8} - {965F8820-F809-4081-9090-1AEC903F291B} = {62826851-7D74-4F1E-B7D1-12553B789CD8} - {96E71881-1465-44F5-B4B7-DF9B370FFD02} = {66517987-2A5A-4330-B130-207039378FD4} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {57C07F14-2EAC-44FF-A277-B9221B4B2BF7} - EndGlobalSection -EndGlobal diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 7b2956ecee..0000000000 --- a/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) .NET Foundation and Contributors - -All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. diff --git a/NuGet.config b/NuGet.config deleted file mode 100644 index 8c30f1c84e..0000000000 --- a/NuGet.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - diff --git a/README.md b/README.md deleted file mode 100644 index 0eb8eb3be8..0000000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -DotNetTools -=========== - -[![Travis build status](https://img.shields.io/travis/aspnet/DotNetTools.svg?label=travis-ci&branch=dev&style=flat-square)](https://travis-ci.org/aspnet/DotNetTools/branches) -[![AppVeyor build status](https://img.shields.io/appveyor/ci/aspnetci/DotNetTools/dev.svg?label=appveyor&style=flat-square)](https://ci.appveyor.com/project/aspnetci/DotNetTools/branch/dev) - -This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at . - -## Projects - -The repository contains command-line tools for ASP.NET Core that are bundled* in the .NET Core CLI. Follow the links below for more details on each tool. - - - [dotnet-watch](src/dotnet-watch/README.md) - - [dotnet-user-secrets](src/dotnet-user-secrets/README.md) - - [dotnet-sql-cache](src/dotnet-sql-cache/README.md) - - [dotnet-dev-certs](src/dotnet-dev-certs/README.md) - -*\*This applies to .NET Core CLI 2.1.300-preview2 and up. For earlier versions of the CLI, these tools must be installed separately.* - -*For 2.0 CLI and earlier, see for details.* - -*For 2.1.300-preview1 CLI, see for details.* - -## Usage - -The command line tools can be invoked as a subcommand of `dotnet`. - -```sh -dotnet watch -dotnet user-secrets -dotnet sql-cache -dotnet dev-certs -``` - -Add `--help` to see more details. For example, - -``` -dotnet watch --help -``` diff --git a/build.cmd b/build.cmd deleted file mode 100644 index c0050bda12..0000000000 --- a/build.cmd +++ /dev/null @@ -1,2 +0,0 @@ -@ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' default-build %*; exit $LASTEXITCODE" diff --git a/build.sh b/build.sh deleted file mode 100755 index 98a4b22765..0000000000 --- a/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs) -chmod +x "$DIR/run.sh"; sync -"$DIR/run.sh" default-build "$@" diff --git a/build/Key.snk b/build/Key.snk deleted file mode 100644 index e10e4889c1..0000000000 Binary files a/build/Key.snk and /dev/null differ diff --git a/build/VSIX.props b/build/VSIX.props deleted file mode 100644 index 9640955a99..0000000000 --- a/build/VSIX.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/build/VSIX.targets b/build/VSIX.targets deleted file mode 100644 index ccafe5bf76..0000000000 --- a/build/VSIX.targets +++ /dev/null @@ -1,120 +0,0 @@ - - - true - $(RestoreDependsOn);RestoreVSIX - $(PackageDependsOn);PackageVSIX - $(GetArtifactInfoDependsOn);GetVSIXArtifactInfo - Microsoft.VisualStudio.SecretManager - $(RepositoryRoot)tooling\$(VSIXName)\$(VSIXName).csproj - $(BuildDir)$(VSIXName).vsix - $(BuildDir)$(VSIXName).json - $(BuildDir)$(VSIXName).pdb - shipoob - - - - - - - - VsixPackage - $(PackageVersion) - $(VSIXArtifactCategory) - $(VSIXName) - - - - VsixPackageManifestFile - $(VSIXArtifactCategory) - $(VSIXName).vsix - $(VSIXName) - - - - SymbolsFile - $(VSIXArtifactCategory) - $(VSIXName).vsix - full - - - - - - - - - - - - - - $(LogOutputDir)vsix-restore.rsp - - - - - - - - - - - - - - - - - - - - - - $(LogOutputDir)vsix.log - $(LogOutputDir)vsix-build.rsp - - - - - - - - - - - - - - - diff --git a/build/dependencies.props b/build/dependencies.props deleted file mode 100644 index 2ffa03acd5..0000000000 --- a/build/dependencies.props +++ /dev/null @@ -1,29 +0,0 @@ - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - 2.1.3-rtm-15833 - 2.1.1 - 2.1.0 - 2.1.1 - 2.1.1 - 2.1.1 - 2.1.2 - 15.9.0 - 2.0.3 - 4.5.1 - 4.5.0 - 9.0.1 - 2.4.0 - 2.4.0 - - - - - - - - diff --git a/build/repo.props b/build/repo.props deleted file mode 100644 index 571c6712c0..0000000000 --- a/build/repo.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - Internal.AspNetCore.Universe.Lineup - 2.1.0-* - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json - - - diff --git a/build/repo.targets b/build/repo.targets deleted file mode 100644 index 1183428580..0000000000 --- a/build/repo.targets +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - Configuration=$(Configuration)NoVSIX - - - diff --git a/build/sources.props b/build/sources.props deleted file mode 100644 index cada42ba91..0000000000 --- a/build/sources.props +++ /dev/null @@ -1,18 +0,0 @@ - - - - - $(DotNetRestoreSources) - - $(RestoreSources); - https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; - https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; - https://vside.myget.org/F/vssdk/api/v3/index.json; - - - $(RestoreSources); - https://api.nuget.org/v3/index.json; - - - diff --git a/NuGetPackageVerifier.json b/eng/NuGetPackageVerifier.json similarity index 98% rename from NuGetPackageVerifier.json rename to eng/NuGetPackageVerifier.json index 3e59aeb910..4ce6d1a168 100644 --- a/NuGetPackageVerifier.json +++ b/eng/NuGetPackageVerifier.json @@ -1,102 +1,102 @@ -{ - "adx": { - "rules": [ - "AdxVerificationCompositeRule" - ], - "packages": { - "dotnet-watch": { - "packageTypes": [ - "DotnetTool" - ] - }, - "dotnet-sql-cache": { - "packageTypes": [ - "DotnetTool" - ], - "Exclusions": { - "NEUTRAL_RESOURCES_LANGUAGE": { - "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." - }, - "WRONG_PUBLICKEYTOKEN": { - "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.0/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg." - }, - "ASSEMBLY_INFORMATIONAL_VERSION_MISMATCH": { - "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.0/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg." - }, - "ASSEMBLY_FILE_VERSION_MISMATCH": { - "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.0/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg." - }, - "ASSEMBLY_VERSION_MISMATCH": { - "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.0/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg." - } - } - }, - "dotnet-user-secrets": { - "packageTypes": [ - "DotnetTool" - ], - "Exclusions": { - "NEUTRAL_RESOURCES_LANGUAGE": { - "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." - }, - "SERVICING_ATTRIBUTE": { - "tools/netcoreapp2.1/any/Newtonsoft.Json.dll": "Assembly is built by another project but bundled in our nupkg." - }, - "WRONG_PUBLICKEYTOKEN": { - "tools/netcoreapp2.1/any/Newtonsoft.Json.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." - }, - "ASSEMBLY_INFORMATIONAL_VERSION_MISMATCH": { - "tools/netcoreapp2.1/any/Newtonsoft.Json.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." - }, - "ASSEMBLY_FILE_VERSION_MISMATCH": { - "tools/netcoreapp2.1/any/Newtonsoft.Json.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." - }, - "ASSEMBLY_VERSION_MISMATCH": { - "tools/netcoreapp2.1/any/Newtonsoft.Json.dll": "Assembly is built by another project but bundled in our nupkg.", - "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." - } - } - }, - "dotnet-dev-certs": { - "packageTypes": [ - "DotnetTool" - ] - }, - "Microsoft.AspNetCore.DeveloperCertificates.XPlat": { - "Exclusions": { - "DOC_MISSING": { - "lib/netcoreapp2.1/Microsoft.AspNetCore.DeveloperCertificates.XPlat.dll": "Docs not required to shipoob package" - } - } - } - } - }, - "Default": { - "rules": [ - "DefaultCompositeRule" - ] - } -} +{ + "adx": { + "rules": [ + "AdxVerificationCompositeRule" + ], + "packages": { + "dotnet-watch": { + "packageTypes": [ + "DotnetTool" + ] + }, + "dotnet-sql-cache": { + "packageTypes": [ + "DotnetTool" + ], + "Exclusions": { + "NEUTRAL_RESOURCES_LANGUAGE": { + "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." + }, + "WRONG_PUBLICKEYTOKEN": { + "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.0/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg." + }, + "ASSEMBLY_INFORMATIONAL_VERSION_MISMATCH": { + "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.0/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg." + }, + "ASSEMBLY_FILE_VERSION_MISMATCH": { + "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.0/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg." + }, + "ASSEMBLY_VERSION_MISMATCH": { + "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.0/System.Text.Encoding.CodePages.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll": "Assembly is built by another project but bundled in our nupkg." + } + } + }, + "dotnet-user-secrets": { + "packageTypes": [ + "DotnetTool" + ], + "Exclusions": { + "NEUTRAL_RESOURCES_LANGUAGE": { + "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." + }, + "SERVICING_ATTRIBUTE": { + "tools/netcoreapp2.1/any/Newtonsoft.Json.dll": "Assembly is built by another project but bundled in our nupkg." + }, + "WRONG_PUBLICKEYTOKEN": { + "tools/netcoreapp2.1/any/Newtonsoft.Json.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." + }, + "ASSEMBLY_INFORMATIONAL_VERSION_MISMATCH": { + "tools/netcoreapp2.1/any/Newtonsoft.Json.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." + }, + "ASSEMBLY_FILE_VERSION_MISMATCH": { + "tools/netcoreapp2.1/any/Newtonsoft.Json.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." + }, + "ASSEMBLY_VERSION_MISMATCH": { + "tools/netcoreapp2.1/any/Newtonsoft.Json.dll": "Assembly is built by another project but bundled in our nupkg.", + "tools/netcoreapp2.1/any/System.Runtime.CompilerServices.Unsafe.dll": "Assembly is built by another project but bundled in our nupkg." + } + } + }, + "dotnet-dev-certs": { + "packageTypes": [ + "DotnetTool" + ] + }, + "Microsoft.AspNetCore.DeveloperCertificates.XPlat": { + "Exclusions": { + "DOC_MISSING": { + "lib/netcoreapp2.1/Microsoft.AspNetCore.DeveloperCertificates.XPlat.dll": "Docs not required to shipoob package" + } + } + } + } + }, + "Default": { + "rules": [ + "DefaultCompositeRule" + ] + } +} diff --git a/korebuild-lock.txt b/korebuild-lock.txt deleted file mode 100644 index 04cce2fca7..0000000000 --- a/korebuild-lock.txt +++ /dev/null @@ -1,2 +0,0 @@ -version:2.1.3-rtm-15833 -commithash:42bee65743476deedda53948fa3e84a0ac4c0360 diff --git a/korebuild.json b/korebuild.json deleted file mode 100644 index 196a3ca537..0000000000 --- a/korebuild.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/release/2.1/tools/korebuild.schema.json", - "channel": "release/2.1", - "toolsets": { - "visualstudio": { - "required": [ - "windows" - ], - "includePrerelease": true, - "minVersion": "15.0.26730.03", - "requiredWorkloads": [ - "Microsoft.VisualStudio.Component.VSSDK" - ] - } - } -} diff --git a/run.cmd b/run.cmd deleted file mode 100644 index d52d5c7e68..0000000000 --- a/run.cmd +++ /dev/null @@ -1,2 +0,0 @@ -@ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' %*; exit $LASTEXITCODE" diff --git a/run.ps1 b/run.ps1 deleted file mode 100644 index 2f892843e0..0000000000 --- a/run.ps1 +++ /dev/null @@ -1,210 +0,0 @@ -#!/usr/bin/env powershell -#requires -version 4 - -<# -.SYNOPSIS -Executes KoreBuild commands. - -.DESCRIPTION -Downloads korebuild if required. Then executes the KoreBuild command. To see available commands, execute with `-Command help`. - -.PARAMETER Command -The KoreBuild command to run. - -.PARAMETER Path -The folder to build. Defaults to the folder containing this script. - -.PARAMETER Channel -The channel of KoreBuild to download. Overrides the value from the config file. - -.PARAMETER DotNetHome -The directory where .NET Core tools will be stored. - -.PARAMETER ToolsSource -The base url where build tools can be downloaded. Overrides the value from the config file. - -.PARAMETER Update -Updates KoreBuild to the latest version even if a lock file is present. - -.PARAMETER Reinstall -Re-installs KoreBuild - -.PARAMETER ConfigFile -The path to the configuration file that stores values. Defaults to korebuild.json. - -.PARAMETER ToolsSourceSuffix -The Suffix to append to the end of the ToolsSource. Useful for query strings in blob stores. - -.PARAMETER CI -Sets up CI specific settings and variables. - -.PARAMETER Arguments -Arguments to be passed to the command - -.NOTES -This function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be. -When the lockfile is not present, KoreBuild will create one using latest available version from $Channel. - -The $ConfigFile is expected to be an JSON file. It is optional, and the configuration values in it are optional as well. Any options set -in the file are overridden by command line parameters. - -.EXAMPLE -Example config file: -```json -{ - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", - "channel": "master", - "toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools" -} -``` -#> -[CmdletBinding(PositionalBinding = $false)] -param( - [Parameter(Mandatory = $true, Position = 0)] - [string]$Command, - [string]$Path = $PSScriptRoot, - [Alias('c')] - [string]$Channel, - [Alias('d')] - [string]$DotNetHome, - [Alias('s')] - [string]$ToolsSource, - [Alias('u')] - [switch]$Update, - [switch]$Reinstall, - [string]$ToolsSourceSuffix, - [string]$ConfigFile = $null, - [switch]$CI, - [Parameter(ValueFromRemainingArguments = $true)] - [string[]]$Arguments -) - -Set-StrictMode -Version 2 -$ErrorActionPreference = 'Stop' - -# -# Functions -# - -function Get-KoreBuild { - - $lockFile = Join-Path $Path 'korebuild-lock.txt' - - if (!(Test-Path $lockFile) -or $Update) { - Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $lockFile $ToolsSourceSuffix - } - - $version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1 - if (!$version) { - Write-Error "Failed to parse version from $lockFile. Expected a line that begins with 'version:'" - } - $version = $version.TrimStart('version:').Trim() - $korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version) - - if ($Reinstall -and (Test-Path $korebuildPath)) { - Remove-Item -Force -Recurse $korebuildPath - } - - if (!(Test-Path $korebuildPath)) { - Write-Host -ForegroundColor Magenta "Downloading KoreBuild $version" - New-Item -ItemType Directory -Path $korebuildPath | Out-Null - $remotePath = "$ToolsSource/korebuild/artifacts/$version/korebuild.$version.zip" - - try { - $tmpfile = Join-Path ([IO.Path]::GetTempPath()) "KoreBuild-$([guid]::NewGuid()).zip" - Get-RemoteFile $remotePath $tmpfile $ToolsSourceSuffix - if (Get-Command -Name 'Microsoft.PowerShell.Archive\Expand-Archive' -ErrorAction Ignore) { - # Use built-in commands where possible as they are cross-plat compatible - Microsoft.PowerShell.Archive\Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath - } - else { - # Fallback to old approach for old installations of PowerShell - Add-Type -AssemblyName System.IO.Compression.FileSystem - [System.IO.Compression.ZipFile]::ExtractToDirectory($tmpfile, $korebuildPath) - } - } - catch { - Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore - throw - } - finally { - Remove-Item $tmpfile -ErrorAction Ignore - } - } - - return $korebuildPath -} - -function Join-Paths([string]$path, [string[]]$childPaths) { - $childPaths | ForEach-Object { $path = Join-Path $path $_ } - return $path -} - -function Get-RemoteFile([string]$RemotePath, [string]$LocalPath, [string]$RemoteSuffix) { - if ($RemotePath -notlike 'http*') { - Copy-Item $RemotePath $LocalPath - return - } - - $retries = 10 - while ($retries -gt 0) { - $retries -= 1 - try { - Invoke-WebRequest -UseBasicParsing -Uri $($RemotePath + $RemoteSuffix) -OutFile $LocalPath - return - } - catch { - Write-Verbose "Request failed. $retries retries remaining" - } - } - - Write-Error "Download failed: '$RemotePath'." -} - -# -# Main -# - -# Load configuration or set defaults - -$Path = Resolve-Path $Path -if (!$ConfigFile) { $ConfigFile = Join-Path $Path 'korebuild.json' } - -if (Test-Path $ConfigFile) { - try { - $config = Get-Content -Raw -Encoding UTF8 -Path $ConfigFile | ConvertFrom-Json - if ($config) { - if (!($Channel) -and (Get-Member -Name 'channel' -InputObject $config)) { [string] $Channel = $config.channel } - if (!($ToolsSource) -and (Get-Member -Name 'toolsSource' -InputObject $config)) { [string] $ToolsSource = $config.toolsSource} - } - } - catch { - Write-Host -ForegroundColor Red $Error[0] - Write-Error "$ConfigFile contains invalid JSON." - exit 1 - } -} - -if (!$DotNetHome) { - $DotNetHome = if ($env:DOTNET_HOME) { $env:DOTNET_HOME } ` - elseif ($CI) { Join-Path $PSScriptRoot '.dotnet' } ` - elseif ($env:USERPROFILE) { Join-Path $env:USERPROFILE '.dotnet'} ` - elseif ($env:HOME) {Join-Path $env:HOME '.dotnet'}` - else { Join-Path $PSScriptRoot '.dotnet'} -} - -if (!$Channel) { $Channel = 'master' } -if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' } - -# Execute - -$korebuildPath = Get-KoreBuild -Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') - -try { - Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile -CI:$CI - Invoke-KoreBuildCommand $Command @Arguments -} -finally { - Remove-Module 'KoreBuild' -ErrorAction Ignore -} diff --git a/run.sh b/run.sh deleted file mode 100755 index 129b0b9576..0000000000 --- a/run.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# -# variables -# - -RESET="\033[0m" -RED="\033[0;31m" -YELLOW="\033[0;33m" -MAGENTA="\033[0;95m" -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -verbose=false -update=false -reinstall=false -repo_path="$DIR" -channel='' -tools_source='' -tools_source_suffix='' -ci=false - -# -# Functions -# -__usage() { - echo "Usage: $(basename "${BASH_SOURCE[0]}") command [options] [[--] ...]" - echo "" - echo "Arguments:" - echo " command The command to be run." - echo " ... Arguments passed to the command. Variable number of arguments allowed." - echo "" - echo "Options:" - echo " --verbose Show verbose output." - echo " -c|--channel The channel of KoreBuild to download. Overrides the value from the config file.." - echo " --config-file The path to the configuration file that stores values. Defaults to korebuild.json." - echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet." - echo " --path The directory to build. Defaults to the directory containing the script." - echo " -s|--tools-source|-ToolsSource The base url where build tools can be downloaded. Overrides the value from the config file." - echo " --tools-source-suffix|-ToolsSourceSuffix The suffix to append to tools-source. Useful for query strings." - echo " -u|--update Update to the latest KoreBuild even if the lock file is present." - echo " --reinstall Reinstall KoreBuild." - echo " --ci Apply CI specific settings and environment variables." - echo "" - echo "Description:" - echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be." - echo " When the lockfile is not present, KoreBuild will create one using latest available version from \$channel." - - if [[ "${1:-}" != '--no-exit' ]]; then - exit 2 - fi -} - -get_korebuild() { - local version - local lock_file="$repo_path/korebuild-lock.txt" - if [ ! -f "$lock_file" ] || [ "$update" = true ]; then - __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" "$tools_source_suffix" - fi - version="$(grep 'version:*' -m 1 "$lock_file")" - if [[ "$version" == '' ]]; then - __error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'" - return 1 - fi - version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" - local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" - - if [ "$reinstall" = true ] && [ -d "$korebuild_path" ]; then - rm -rf "$korebuild_path" - fi - - { - if [ ! -d "$korebuild_path" ]; then - mkdir -p "$korebuild_path" - local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" - tmpfile="$(mktemp)" - echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" - if __get_remote_file "$remote_path" "$tmpfile" "$tools_source_suffix"; then - unzip -q -d "$korebuild_path" "$tmpfile" - fi - rm "$tmpfile" || true - fi - - source "$korebuild_path/KoreBuild.sh" - } || { - if [ -d "$korebuild_path" ]; then - echo "Cleaning up after failed installation" - rm -rf "$korebuild_path" || true - fi - return 1 - } -} - -__error() { - echo -e "${RED}error: $*${RESET}" 1>&2 -} - -__warn() { - echo -e "${YELLOW}warning: $*${RESET}" -} - -__machine_has() { - hash "$1" > /dev/null 2>&1 - return $? -} - -__get_remote_file() { - local remote_path=$1 - local local_path=$2 - local remote_path_suffix=$3 - - if [[ "$remote_path" != 'http'* ]]; then - cp "$remote_path" "$local_path" - return 0 - fi - - local failed=false - if __machine_has wget; then - wget --tries 10 --quiet -O "$local_path" "${remote_path}${remote_path_suffix}" || failed=true - else - failed=true - fi - - if [ "$failed" = true ] && __machine_has curl; then - failed=false - curl --retry 10 -sSL -f --create-dirs -o "$local_path" "${remote_path}${remote_path_suffix}" || failed=true - fi - - if [ "$failed" = true ]; then - __error "Download failed: $remote_path" 1>&2 - return 1 - fi -} - -# -# main -# - -command="${1:-}" -shift - -while [[ $# -gt 0 ]]; do - case $1 in - -\?|-h|--help) - __usage --no-exit - exit 0 - ;; - -c|--channel|-Channel) - shift - channel="${1:-}" - [ -z "$channel" ] && __usage - ;; - --config-file|-ConfigFile) - shift - config_file="${1:-}" - [ -z "$config_file" ] && __usage - if [ ! -f "$config_file" ]; then - __error "Invalid value for --config-file. $config_file does not exist." - exit 1 - fi - ;; - -d|--dotnet-home|-DotNetHome) - shift - DOTNET_HOME="${1:-}" - [ -z "$DOTNET_HOME" ] && __usage - ;; - --path|-Path) - shift - repo_path="${1:-}" - [ -z "$repo_path" ] && __usage - ;; - -s|--tools-source|-ToolsSource) - shift - tools_source="${1:-}" - [ -z "$tools_source" ] && __usage - ;; - --tools-source-suffix|-ToolsSourceSuffix) - shift - tools_source_suffix="${1:-}" - [ -z "$tools_source_suffix" ] && __usage - ;; - -u|--update|-Update) - update=true - ;; - --reinstall|-[Rr]einstall) - reinstall=true - ;; - --ci|-[Cc][Ii]) - ci=true - if [[ -z "${DOTNET_HOME:-}" ]]; then - DOTNET_HOME="$DIR/.dotnet" - fi - ;; - --verbose|-Verbose) - verbose=true - ;; - --) - shift - break - ;; - *) - break - ;; - esac - shift -done - -if ! __machine_has unzip; then - __error 'Missing required command: unzip' - exit 1 -fi - -if ! __machine_has curl && ! __machine_has wget; then - __error 'Missing required command. Either wget or curl is required.' - exit 1 -fi - -[ -z "${config_file:-}" ] && config_file="$repo_path/korebuild.json" -if [ -f "$config_file" ]; then - if __machine_has jq ; then - if jq '.' "$config_file" >/dev/null ; then - config_channel="$(jq -r 'select(.channel!=null) | .channel' "$config_file")" - config_tools_source="$(jq -r 'select(.toolsSource!=null) | .toolsSource' "$config_file")" - else - __error "$config_file contains invalid JSON." - exit 1 - fi - elif __machine_has python ; then - if python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then - config_channel="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" - config_tools_source="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" - else - __error "$config_file contains invalid JSON." - exit 1 - fi - elif __machine_has python3 ; then - if python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then - config_channel="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" - config_tools_source="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" - else - __error "$config_file contains invalid JSON." - exit 1 - fi - else - __error 'Missing required command: jq or python. Could not parse the JSON file.' - exit 1 - fi - - [ ! -z "${config_channel:-}" ] && channel="$config_channel" - [ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source" -fi - -[ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet" -[ -z "$channel" ] && channel='master' -[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' - -get_korebuild -set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" "$ci" -invoke_korebuild_command "$command" "$@" diff --git a/samples/dotnet-watch/Directory.Build.props b/samples/dotnet-watch/Directory.Build.props deleted file mode 100644 index 76c9003a6b..0000000000 --- a/samples/dotnet-watch/Directory.Build.props +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/samples/dotnet-watch/Directory.Build.targets b/samples/dotnet-watch/Directory.Build.targets deleted file mode 100644 index 76c9003a6b..0000000000 --- a/samples/dotnet-watch/Directory.Build.targets +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/samples/dotnet-watch/LaunchAnyCommand/LaunchAnyCommand.csproj b/samples/dotnet-watch/LaunchAnyCommand/LaunchAnyCommand.csproj deleted file mode 100644 index 1dc6efedd6..0000000000 --- a/samples/dotnet-watch/LaunchAnyCommand/LaunchAnyCommand.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - netcoreapp2.1 - - - - - - - - - - diff --git a/samples/dotnet-watch/LaunchAnyCommand/README.md b/samples/dotnet-watch/LaunchAnyCommand/README.md deleted file mode 100644 index fa52f4073e..0000000000 --- a/samples/dotnet-watch/LaunchAnyCommand/README.md +++ /dev/null @@ -1,17 +0,0 @@ -Launch any command with dotnet-watch -==================================== - -## Prerequisites - -1. Install .NET Core command line. -2. Install NodeJS. - -## Usage - -Open a terminal to the directory containing this project. - -``` -dotnet watch msbuild /t:RunMyNpmCommand -``` - -Changing the .csproj file, or the say-hello.js file will cause dotnet-watch to re-run the 'RunMyNpmCommand' target in MyApp.csproj. diff --git a/samples/dotnet-watch/LaunchAnyCommand/package.json b/samples/dotnet-watch/LaunchAnyCommand/package.json deleted file mode 100644 index 61e25fb082..0000000000 --- a/samples/dotnet-watch/LaunchAnyCommand/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "any-command", - "version": "0.0.0", - "private": true, - "scripts": { - "custom": "node say-hello.js" - } -} diff --git a/samples/dotnet-watch/LaunchAnyCommand/say-hello.js b/samples/dotnet-watch/LaunchAnyCommand/say-hello.js deleted file mode 100644 index c35728f5a1..0000000000 --- a/samples/dotnet-watch/LaunchAnyCommand/say-hello.js +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello from Javascript"); diff --git a/samples/dotnet-watch/README.md b/samples/dotnet-watch/README.md deleted file mode 100644 index 5988ab77ba..0000000000 --- a/samples/dotnet-watch/README.md +++ /dev/null @@ -1,5 +0,0 @@ -dotnet-watch samples -==================== - -The samples in this folder show some ways to customize dotnet-watch. For full details on -available settings and configuration, see the [README for the dotnet-watch](../../src/dotnet-watch/README.md) project. diff --git a/samples/dotnet-watch/WatchJavascriptFiles/Program.cs b/samples/dotnet-watch/WatchJavascriptFiles/Program.cs deleted file mode 100755 index f71a9e073d..0000000000 --- a/samples/dotnet-watch/WatchJavascriptFiles/Program.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.IO; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; - -namespace WatchJavascriptFiles -{ - public class Program - { - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .Configure(app => - app.Run(async (context) => - { - await context.Response.WriteAsync("Hello World!"); - })) - .Build(); - - host.Run(); - } - } -} diff --git a/samples/dotnet-watch/WatchJavascriptFiles/README.md b/samples/dotnet-watch/WatchJavascriptFiles/README.md deleted file mode 100644 index 3b0a148cd0..0000000000 --- a/samples/dotnet-watch/WatchJavascriptFiles/README.md +++ /dev/null @@ -1,16 +0,0 @@ -Watch JavaScript files with dotnet-watch -======================================== - -## Prerequisites - -Install .NET Core command line. - -## Usage - -Open a terminal to the directory containing this project. - -``` -dotnet watch run -``` - -Changing the .csproj file, or \*.js file in wwwroot, or any \*.cs file will cause dotnet-watch to restart the website. diff --git a/samples/dotnet-watch/WatchJavascriptFiles/WatchJavascriptFiles.csproj b/samples/dotnet-watch/WatchJavascriptFiles/WatchJavascriptFiles.csproj deleted file mode 100755 index 008b0322e6..0000000000 --- a/samples/dotnet-watch/WatchJavascriptFiles/WatchJavascriptFiles.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - netcoreapp2.1 - - - - - - - - - - - - diff --git a/samples/dotnet-watch/WatchJavascriptFiles/wwwroot/app.js b/samples/dotnet-watch/WatchJavascriptFiles/wwwroot/app.js deleted file mode 100644 index a94cbdc370..0000000000 --- a/samples/dotnet-watch/WatchJavascriptFiles/wwwroot/app.js +++ /dev/null @@ -1 +0,0 @@ -document.title = "My awesome website"; diff --git a/samples/dotnet-watch/WatchMultipleProjects/README.md b/samples/dotnet-watch/WatchMultipleProjects/README.md deleted file mode 100644 index 46d7a7904c..0000000000 --- a/samples/dotnet-watch/WatchMultipleProjects/README.md +++ /dev/null @@ -1,18 +0,0 @@ -Watch multiple projects with dotnet-watch -========================================= - -## Prerequisites - -Install .NET Core command line. - -## Usage - -Open a terminal to the directory containing this project. - -``` -dotnet watch msbuild /t:TestAndRun -``` - -The "TestAndRun" target in watch.proj will execute "dotnet test" on Test.csproj and then launch the website by calling "dotnet run" on Web.csproj. - -Changing any \*.cs file in Test/ or Web/, any \*.csproj file, or watch.proj, will cause dotnet-watch to relaunch the "TestAndRun" target from watch.proj. diff --git a/samples/dotnet-watch/WatchMultipleProjects/Test/Test.csproj b/samples/dotnet-watch/WatchMultipleProjects/Test/Test.csproj deleted file mode 100755 index 0ffd10766a..0000000000 --- a/samples/dotnet-watch/WatchMultipleProjects/Test/Test.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netcoreapp2.1 - - - - - - - - - diff --git a/samples/dotnet-watch/WatchMultipleProjects/Test/UnitTest1.cs b/samples/dotnet-watch/WatchMultipleProjects/Test/UnitTest1.cs deleted file mode 100755 index 0da9a7f234..0000000000 --- a/samples/dotnet-watch/WatchMultipleProjects/Test/UnitTest1.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Xunit; - -namespace Test -{ - public class UnitTest1 - { - [Fact] - public void Test1() - { - Assert.True(true); - } - } -} diff --git a/samples/dotnet-watch/WatchMultipleProjects/Web/Program.cs b/samples/dotnet-watch/WatchMultipleProjects/Web/Program.cs deleted file mode 100755 index 6a02b1f332..0000000000 --- a/samples/dotnet-watch/WatchMultipleProjects/Web/Program.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.IO; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Http; - -namespace Web -{ - public class Program - { - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .Configure(app => - app.Run(async (context) => - { - await context.Response.WriteAsync("Hello World!"); - })) - .Build(); - - host.Run(); - } - } -} diff --git a/samples/dotnet-watch/WatchMultipleProjects/Web/Web.csproj b/samples/dotnet-watch/WatchMultipleProjects/Web/Web.csproj deleted file mode 100755 index ec2a93ed3a..0000000000 --- a/samples/dotnet-watch/WatchMultipleProjects/Web/Web.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - netcoreapp2.1 - - - - - - - - - - - diff --git a/samples/dotnet-watch/WatchMultipleProjects/watch.csproj b/samples/dotnet-watch/WatchMultipleProjects/watch.csproj deleted file mode 100644 index d890295d39..0000000000 --- a/samples/dotnet-watch/WatchMultipleProjects/watch.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - netcoreapp2.1 - false - - - - - - - - - - - - - diff --git a/src/Directory.Build.props b/src/Directory.Build.props deleted file mode 100644 index 4b89a431e7..0000000000 --- a/src/Directory.Build.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets deleted file mode 100644 index c7b5f24861..0000000000 --- a/src/Directory.Build.targets +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/Tools/Directory.Build.targets b/src/Tools/Directory.Build.targets new file mode 100644 index 0000000000..3d2647b41b --- /dev/null +++ b/src/Tools/Directory.Build.targets @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat/CertificateGenerator.cs b/src/Tools/FirstRunCertGenerator/src/CertificateGenerator.cs similarity index 100% rename from src/Microsoft.AspNetCore.DeveloperCertificates.XPlat/CertificateGenerator.cs rename to src/Tools/FirstRunCertGenerator/src/CertificateGenerator.cs diff --git a/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj b/src/Tools/FirstRunCertGenerator/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj similarity index 65% rename from src/Microsoft.AspNetCore.DeveloperCertificates.XPlat/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj rename to src/Tools/FirstRunCertGenerator/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj index 81c90a297c..ce61b3ab62 100644 --- a/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj +++ b/src/Tools/FirstRunCertGenerator/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/Tools/README.md b/src/Tools/README.md new file mode 100644 index 0000000000..e13c6ec6e3 --- /dev/null +++ b/src/Tools/README.md @@ -0,0 +1,32 @@ +DotNetTools +=========== + +## Projects + +The folder contains command-line tools for ASP.NET Core that are bundled* in the .NET Core CLI. Follow the links below for more details on each tool. + + - [dotnet-watch](dotnet-watch/README.md) + - [dotnet-user-secrets](dotnet-user-secrets/README.md) + - [dotnet-sql-cache](dotnet-sql-cache/README.md) + - [dotnet-dev-certs](dotnet-dev-certs/README.md) + +*\*This applies to .NET Core CLI 2.1.300-preview2 and up. For earlier versions of the CLI, these tools must be installed separately.* + +*For 2.0 CLI and earlier, see for details.* + +## Usage + +The command line tools can be invoked as a subcommand of `dotnet`. + +```sh +dotnet watch +dotnet user-secrets +dotnet sql-cache +dotnet dev-certs +``` + +Add `--help` to see more details. For example, + +``` +dotnet watch --help +``` diff --git a/src/dotnet-dev-certs/README.md b/src/Tools/dotnet-dev-certs/README.md similarity index 100% rename from src/dotnet-dev-certs/README.md rename to src/Tools/dotnet-dev-certs/README.md diff --git a/src/dotnet-dev-certs/Program.cs b/src/Tools/dotnet-dev-certs/src/Program.cs similarity index 100% rename from src/dotnet-dev-certs/Program.cs rename to src/Tools/dotnet-dev-certs/src/Program.cs diff --git a/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj b/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj new file mode 100644 index 0000000000..1f0f906e50 --- /dev/null +++ b/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj @@ -0,0 +1,32 @@ + + + + netcoreapp2.1 + exe + Command line tool to generate certificates used in ASP.NET Core during development. + Microsoft.AspNetCore.DeveloperCertificates.Tools + dotnet;developercertificates + true + + win-x64;win-x86 + + + + + + + + + + + + + + + + + + + + + diff --git a/src/dotnet-sql-cache/README.md b/src/Tools/dotnet-sql-cache/README.md similarity index 100% rename from src/dotnet-sql-cache/README.md rename to src/Tools/dotnet-sql-cache/README.md diff --git a/src/dotnet-sql-cache/Program.cs b/src/Tools/dotnet-sql-cache/src/Program.cs similarity index 100% rename from src/dotnet-sql-cache/Program.cs rename to src/Tools/dotnet-sql-cache/src/Program.cs diff --git a/src/dotnet-sql-cache/SqlQueries.cs b/src/Tools/dotnet-sql-cache/src/SqlQueries.cs similarity index 100% rename from src/dotnet-sql-cache/SqlQueries.cs rename to src/Tools/dotnet-sql-cache/src/SqlQueries.cs diff --git a/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj b/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj new file mode 100644 index 0000000000..3856c4877c --- /dev/null +++ b/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj @@ -0,0 +1,30 @@ + + + + netcoreapp2.1 + exe + Command line tool to create tables and indexes in a Microsoft SQL Server database for distributed caching. + cache;distributedcache;sqlserver + true + + win-x64;win-x86 + + + + + + + + + + + + + + + + + + + + diff --git a/src/dotnet-user-secrets/README.md b/src/Tools/dotnet-user-secrets/README.md similarity index 100% rename from src/dotnet-user-secrets/README.md rename to src/Tools/dotnet-user-secrets/README.md diff --git a/src/dotnet-user-secrets/CommandLineOptions.cs b/src/Tools/dotnet-user-secrets/src/CommandLineOptions.cs similarity index 100% rename from src/dotnet-user-secrets/CommandLineOptions.cs rename to src/Tools/dotnet-user-secrets/src/CommandLineOptions.cs diff --git a/src/dotnet-user-secrets/Internal/ClearCommand.cs b/src/Tools/dotnet-user-secrets/src/Internal/ClearCommand.cs similarity index 100% rename from src/dotnet-user-secrets/Internal/ClearCommand.cs rename to src/Tools/dotnet-user-secrets/src/Internal/ClearCommand.cs diff --git a/src/dotnet-user-secrets/Internal/CommandContext.cs b/src/Tools/dotnet-user-secrets/src/Internal/CommandContext.cs similarity index 100% rename from src/dotnet-user-secrets/Internal/CommandContext.cs rename to src/Tools/dotnet-user-secrets/src/Internal/CommandContext.cs diff --git a/src/dotnet-user-secrets/Internal/ICommand.cs b/src/Tools/dotnet-user-secrets/src/Internal/ICommand.cs similarity index 100% rename from src/dotnet-user-secrets/Internal/ICommand.cs rename to src/Tools/dotnet-user-secrets/src/Internal/ICommand.cs diff --git a/src/dotnet-user-secrets/Internal/ListCommand.cs b/src/Tools/dotnet-user-secrets/src/Internal/ListCommand.cs similarity index 100% rename from src/dotnet-user-secrets/Internal/ListCommand.cs rename to src/Tools/dotnet-user-secrets/src/Internal/ListCommand.cs diff --git a/src/dotnet-user-secrets/Internal/MsBuildProjectFinder.cs b/src/Tools/dotnet-user-secrets/src/Internal/MsBuildProjectFinder.cs similarity index 100% rename from src/dotnet-user-secrets/Internal/MsBuildProjectFinder.cs rename to src/Tools/dotnet-user-secrets/src/Internal/MsBuildProjectFinder.cs diff --git a/src/dotnet-user-secrets/Internal/ProjectIdResolver.cs b/src/Tools/dotnet-user-secrets/src/Internal/ProjectIdResolver.cs similarity index 100% rename from src/dotnet-user-secrets/Internal/ProjectIdResolver.cs rename to src/Tools/dotnet-user-secrets/src/Internal/ProjectIdResolver.cs diff --git a/src/dotnet-user-secrets/Internal/ReadableJsonConfigurationSource.cs b/src/Tools/dotnet-user-secrets/src/Internal/ReadableJsonConfigurationSource.cs similarity index 100% rename from src/dotnet-user-secrets/Internal/ReadableJsonConfigurationSource.cs rename to src/Tools/dotnet-user-secrets/src/Internal/ReadableJsonConfigurationSource.cs diff --git a/src/dotnet-user-secrets/Internal/RemoveCommand.cs b/src/Tools/dotnet-user-secrets/src/Internal/RemoveCommand.cs similarity index 100% rename from src/dotnet-user-secrets/Internal/RemoveCommand.cs rename to src/Tools/dotnet-user-secrets/src/Internal/RemoveCommand.cs diff --git a/src/dotnet-user-secrets/Internal/SecretsStore.cs b/src/Tools/dotnet-user-secrets/src/Internal/SecretsStore.cs similarity index 100% rename from src/dotnet-user-secrets/Internal/SecretsStore.cs rename to src/Tools/dotnet-user-secrets/src/Internal/SecretsStore.cs diff --git a/src/dotnet-user-secrets/Internal/SetCommand.cs b/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs similarity index 100% rename from src/dotnet-user-secrets/Internal/SetCommand.cs rename to src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs diff --git a/src/dotnet-user-secrets/Program.cs b/src/Tools/dotnet-user-secrets/src/Program.cs similarity index 100% rename from src/dotnet-user-secrets/Program.cs rename to src/Tools/dotnet-user-secrets/src/Program.cs diff --git a/src/dotnet-user-secrets/Properties/AssemblyInfo.cs b/src/Tools/dotnet-user-secrets/src/Properties/AssemblyInfo.cs similarity index 100% rename from src/dotnet-user-secrets/Properties/AssemblyInfo.cs rename to src/Tools/dotnet-user-secrets/src/Properties/AssemblyInfo.cs diff --git a/src/dotnet-user-secrets/Properties/Resources.Designer.cs b/src/Tools/dotnet-user-secrets/src/Properties/Resources.Designer.cs similarity index 100% rename from src/dotnet-user-secrets/Properties/Resources.Designer.cs rename to src/Tools/dotnet-user-secrets/src/Properties/Resources.Designer.cs diff --git a/src/dotnet-user-secrets/Resources.resx b/src/Tools/dotnet-user-secrets/src/Resources.resx similarity index 100% rename from src/dotnet-user-secrets/Resources.resx rename to src/Tools/dotnet-user-secrets/src/Resources.resx diff --git a/src/dotnet-user-secrets/assets/SecretManager.targets b/src/Tools/dotnet-user-secrets/src/assets/SecretManager.targets similarity index 100% rename from src/dotnet-user-secrets/assets/SecretManager.targets rename to src/Tools/dotnet-user-secrets/src/assets/SecretManager.targets diff --git a/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj b/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj new file mode 100644 index 0000000000..a66a31dd7e --- /dev/null +++ b/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj @@ -0,0 +1,42 @@ + + + + netcoreapp2.1 + exe + Command line tool to manage user secrets for Microsoft.Extensions.Configuration. + false + Microsoft.Extensions.SecretManager.Tools + configuration;secrets;usersecrets + true + + win-x64;win-x86 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/dotnet-user-secrets.Tests/MsBuildProjectFinderTest.cs b/src/Tools/dotnet-user-secrets/test/MsBuildProjectFinderTest.cs similarity index 100% rename from test/dotnet-user-secrets.Tests/MsBuildProjectFinderTest.cs rename to src/Tools/dotnet-user-secrets/test/MsBuildProjectFinderTest.cs diff --git a/test/dotnet-user-secrets.Tests/SecretManagerTests.cs b/src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs similarity index 100% rename from test/dotnet-user-secrets.Tests/SecretManagerTests.cs rename to src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs diff --git a/test/dotnet-user-secrets.Tests/SetCommandTest.cs b/src/Tools/dotnet-user-secrets/test/SetCommandTest.cs similarity index 100% rename from test/dotnet-user-secrets.Tests/SetCommandTest.cs rename to src/Tools/dotnet-user-secrets/test/SetCommandTest.cs diff --git a/test/dotnet-user-secrets.Tests/TemporaryFileProvider.cs b/src/Tools/dotnet-user-secrets/test/TemporaryFileProvider.cs similarity index 100% rename from test/dotnet-user-secrets.Tests/TemporaryFileProvider.cs rename to src/Tools/dotnet-user-secrets/test/TemporaryFileProvider.cs diff --git a/test/dotnet-user-secrets.Tests/UserSecretsTestFixture.cs b/src/Tools/dotnet-user-secrets/test/UserSecretsTestFixture.cs similarity index 100% rename from test/dotnet-user-secrets.Tests/UserSecretsTestFixture.cs rename to src/Tools/dotnet-user-secrets/test/UserSecretsTestFixture.cs diff --git a/src/Tools/dotnet-user-secrets/test/dotnet-user-secrets.Tests.csproj b/src/Tools/dotnet-user-secrets/test/dotnet-user-secrets.Tests.csproj new file mode 100644 index 0000000000..0254a866e8 --- /dev/null +++ b/src/Tools/dotnet-user-secrets/test/dotnet-user-secrets.Tests.csproj @@ -0,0 +1,21 @@ + + + + netcoreapp2.1 + Microsoft.Extensions.SecretManager.Tools.Tests + + + + + + + + + + + + + + + + diff --git a/src/dotnet-watch/README.md b/src/Tools/dotnet-watch/README.md similarity index 100% rename from src/dotnet-watch/README.md rename to src/Tools/dotnet-watch/README.md diff --git a/src/dotnet-watch/CommandLineOptions.cs b/src/Tools/dotnet-watch/src/CommandLineOptions.cs similarity index 100% rename from src/dotnet-watch/CommandLineOptions.cs rename to src/Tools/dotnet-watch/src/CommandLineOptions.cs diff --git a/src/dotnet-watch/DotNetWatcher.cs b/src/Tools/dotnet-watch/src/DotNetWatcher.cs similarity index 100% rename from src/dotnet-watch/DotNetWatcher.cs rename to src/Tools/dotnet-watch/src/DotNetWatcher.cs diff --git a/src/dotnet-watch/IFileSet.cs b/src/Tools/dotnet-watch/src/IFileSet.cs similarity index 100% rename from src/dotnet-watch/IFileSet.cs rename to src/Tools/dotnet-watch/src/IFileSet.cs diff --git a/src/dotnet-watch/IFileSetFactory.cs b/src/Tools/dotnet-watch/src/IFileSetFactory.cs similarity index 100% rename from src/dotnet-watch/IFileSetFactory.cs rename to src/Tools/dotnet-watch/src/IFileSetFactory.cs diff --git a/src/dotnet-watch/Internal/FileSet.cs b/src/Tools/dotnet-watch/src/Internal/FileSet.cs similarity index 100% rename from src/dotnet-watch/Internal/FileSet.cs rename to src/Tools/dotnet-watch/src/Internal/FileSet.cs diff --git a/src/dotnet-watch/Internal/FileSetWatcher.cs b/src/Tools/dotnet-watch/src/Internal/FileSetWatcher.cs similarity index 100% rename from src/dotnet-watch/Internal/FileSetWatcher.cs rename to src/Tools/dotnet-watch/src/Internal/FileSetWatcher.cs diff --git a/src/dotnet-watch/Internal/FileWatcher.cs b/src/Tools/dotnet-watch/src/Internal/FileWatcher.cs similarity index 100% rename from src/dotnet-watch/Internal/FileWatcher.cs rename to src/Tools/dotnet-watch/src/Internal/FileWatcher.cs diff --git a/src/dotnet-watch/Internal/FileWatcher/DotnetFileWatcher.cs b/src/Tools/dotnet-watch/src/Internal/FileWatcher/DotnetFileWatcher.cs similarity index 100% rename from src/dotnet-watch/Internal/FileWatcher/DotnetFileWatcher.cs rename to src/Tools/dotnet-watch/src/Internal/FileWatcher/DotnetFileWatcher.cs diff --git a/src/dotnet-watch/Internal/FileWatcher/FileWatcherFactory.cs b/src/Tools/dotnet-watch/src/Internal/FileWatcher/FileWatcherFactory.cs similarity index 100% rename from src/dotnet-watch/Internal/FileWatcher/FileWatcherFactory.cs rename to src/Tools/dotnet-watch/src/Internal/FileWatcher/FileWatcherFactory.cs diff --git a/src/dotnet-watch/Internal/FileWatcher/IFileSystemWatcher.cs b/src/Tools/dotnet-watch/src/Internal/FileWatcher/IFileSystemWatcher.cs similarity index 100% rename from src/dotnet-watch/Internal/FileWatcher/IFileSystemWatcher.cs rename to src/Tools/dotnet-watch/src/Internal/FileWatcher/IFileSystemWatcher.cs diff --git a/src/dotnet-watch/Internal/FileWatcher/PollingFileWatcher.cs b/src/Tools/dotnet-watch/src/Internal/FileWatcher/PollingFileWatcher.cs similarity index 100% rename from src/dotnet-watch/Internal/FileWatcher/PollingFileWatcher.cs rename to src/Tools/dotnet-watch/src/Internal/FileWatcher/PollingFileWatcher.cs diff --git a/src/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/Tools/dotnet-watch/src/Internal/MsBuildFileSetFactory.cs similarity index 100% rename from src/dotnet-watch/Internal/MsBuildFileSetFactory.cs rename to src/Tools/dotnet-watch/src/Internal/MsBuildFileSetFactory.cs diff --git a/src/dotnet-watch/Internal/MsBuildProjectFinder.cs b/src/Tools/dotnet-watch/src/Internal/MsBuildProjectFinder.cs similarity index 100% rename from src/dotnet-watch/Internal/MsBuildProjectFinder.cs rename to src/Tools/dotnet-watch/src/Internal/MsBuildProjectFinder.cs diff --git a/src/dotnet-watch/Internal/OutputCapture.cs b/src/Tools/dotnet-watch/src/Internal/OutputCapture.cs similarity index 100% rename from src/dotnet-watch/Internal/OutputCapture.cs rename to src/Tools/dotnet-watch/src/Internal/OutputCapture.cs diff --git a/src/dotnet-watch/Internal/OutputSink.cs b/src/Tools/dotnet-watch/src/Internal/OutputSink.cs similarity index 100% rename from src/dotnet-watch/Internal/OutputSink.cs rename to src/Tools/dotnet-watch/src/Internal/OutputSink.cs diff --git a/src/dotnet-watch/Internal/ProcessRunner.cs b/src/Tools/dotnet-watch/src/Internal/ProcessRunner.cs similarity index 100% rename from src/dotnet-watch/Internal/ProcessRunner.cs rename to src/Tools/dotnet-watch/src/Internal/ProcessRunner.cs diff --git a/src/dotnet-watch/PrefixConsoleReporter.cs b/src/Tools/dotnet-watch/src/PrefixConsoleReporter.cs similarity index 100% rename from src/dotnet-watch/PrefixConsoleReporter.cs rename to src/Tools/dotnet-watch/src/PrefixConsoleReporter.cs diff --git a/src/dotnet-watch/ProcessSpec.cs b/src/Tools/dotnet-watch/src/ProcessSpec.cs similarity index 100% rename from src/dotnet-watch/ProcessSpec.cs rename to src/Tools/dotnet-watch/src/ProcessSpec.cs diff --git a/src/dotnet-watch/Program.cs b/src/Tools/dotnet-watch/src/Program.cs similarity index 100% rename from src/dotnet-watch/Program.cs rename to src/Tools/dotnet-watch/src/Program.cs diff --git a/src/dotnet-watch/Properties/AssemblyInfo.cs b/src/Tools/dotnet-watch/src/Properties/AssemblyInfo.cs similarity index 100% rename from src/dotnet-watch/Properties/AssemblyInfo.cs rename to src/Tools/dotnet-watch/src/Properties/AssemblyInfo.cs diff --git a/src/dotnet-watch/Properties/Resources.Designer.cs b/src/Tools/dotnet-watch/src/Properties/Resources.Designer.cs similarity index 100% rename from src/dotnet-watch/Properties/Resources.Designer.cs rename to src/Tools/dotnet-watch/src/Properties/Resources.Designer.cs diff --git a/src/dotnet-watch/Resources.resx b/src/Tools/dotnet-watch/src/Resources.resx similarity index 100% rename from src/dotnet-watch/Resources.resx rename to src/Tools/dotnet-watch/src/Resources.resx diff --git a/src/dotnet-watch/assets/DotNetWatch.targets b/src/Tools/dotnet-watch/src/assets/DotNetWatch.targets similarity index 100% rename from src/dotnet-watch/assets/DotNetWatch.targets rename to src/Tools/dotnet-watch/src/assets/DotNetWatch.targets diff --git a/src/dotnet-watch/dotnet-watch.csproj b/src/Tools/dotnet-watch/src/dotnet-watch.csproj similarity index 100% rename from src/dotnet-watch/dotnet-watch.csproj rename to src/Tools/dotnet-watch/src/dotnet-watch.csproj diff --git a/test/dotnet-watch.FunctionalTests/AppWithDepsTests.cs b/src/Tools/dotnet-watch/test/AppWithDepsTests.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/AppWithDepsTests.cs rename to src/Tools/dotnet-watch/test/AppWithDepsTests.cs diff --git a/test/dotnet-watch.Tests/AssertEx.cs b/src/Tools/dotnet-watch/test/AssertEx.cs similarity index 100% rename from test/dotnet-watch.Tests/AssertEx.cs rename to src/Tools/dotnet-watch/test/AssertEx.cs diff --git a/test/dotnet-watch.FunctionalTests/AwaitableProcess.cs b/src/Tools/dotnet-watch/test/AwaitableProcess.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/AwaitableProcess.cs rename to src/Tools/dotnet-watch/test/AwaitableProcess.cs diff --git a/test/dotnet-watch.Tests/CommandLineOptionsTests.cs b/src/Tools/dotnet-watch/test/CommandLineOptionsTests.cs similarity index 100% rename from test/dotnet-watch.Tests/CommandLineOptionsTests.cs rename to src/Tools/dotnet-watch/test/CommandLineOptionsTests.cs diff --git a/test/dotnet-watch.Tests/ConsoleReporterTests.cs b/src/Tools/dotnet-watch/test/ConsoleReporterTests.cs similarity index 100% rename from test/dotnet-watch.Tests/ConsoleReporterTests.cs rename to src/Tools/dotnet-watch/test/ConsoleReporterTests.cs diff --git a/test/dotnet-watch.FunctionalTests/DotNetWatcherTests.cs b/src/Tools/dotnet-watch/test/DotNetWatcherTests.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/DotNetWatcherTests.cs rename to src/Tools/dotnet-watch/test/DotNetWatcherTests.cs diff --git a/test/dotnet-watch.FunctionalTests/FileWatcherTests.cs b/src/Tools/dotnet-watch/test/FileWatcherTests.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/FileWatcherTests.cs rename to src/Tools/dotnet-watch/test/FileWatcherTests.cs diff --git a/test/dotnet-watch.FunctionalTests/GlobbingAppTests.cs b/src/Tools/dotnet-watch/test/GlobbingAppTests.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/GlobbingAppTests.cs rename to src/Tools/dotnet-watch/test/GlobbingAppTests.cs diff --git a/test/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs b/src/Tools/dotnet-watch/test/MsBuildFileSetFactoryTest.cs similarity index 100% rename from test/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs rename to src/Tools/dotnet-watch/test/MsBuildFileSetFactoryTest.cs diff --git a/test/dotnet-watch.FunctionalTests/NoDepsAppTests.cs b/src/Tools/dotnet-watch/test/NoDepsAppTests.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/NoDepsAppTests.cs rename to src/Tools/dotnet-watch/test/NoDepsAppTests.cs diff --git a/test/dotnet-watch.Tests/ProgramTests.cs b/src/Tools/dotnet-watch/test/ProgramTests.cs similarity index 100% rename from test/dotnet-watch.Tests/ProgramTests.cs rename to src/Tools/dotnet-watch/test/ProgramTests.cs diff --git a/test/dotnet-watch.FunctionalTests/Scenario/ProjectToolScenario.cs b/src/Tools/dotnet-watch/test/Scenario/ProjectToolScenario.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/Scenario/ProjectToolScenario.cs rename to src/Tools/dotnet-watch/test/Scenario/ProjectToolScenario.cs diff --git a/test/dotnet-watch.FunctionalTests/Scenario/WatchableApp.cs b/src/Tools/dotnet-watch/test/Scenario/WatchableApp.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/Scenario/WatchableApp.cs rename to src/Tools/dotnet-watch/test/Scenario/WatchableApp.cs diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/AppWithDeps/AppWithDeps.csproj b/src/Tools/dotnet-watch/test/TestProjects/AppWithDeps/AppWithDeps.csproj similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/AppWithDeps/AppWithDeps.csproj rename to src/Tools/dotnet-watch/test/TestProjects/AppWithDeps/AppWithDeps.csproj diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/AppWithDeps/Program.cs b/src/Tools/dotnet-watch/test/TestProjects/AppWithDeps/Program.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/AppWithDeps/Program.cs rename to src/Tools/dotnet-watch/test/TestProjects/AppWithDeps/Program.cs diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/Dependency/Dependency.csproj b/src/Tools/dotnet-watch/test/TestProjects/Dependency/Dependency.csproj similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/Dependency/Dependency.csproj rename to src/Tools/dotnet-watch/test/TestProjects/Dependency/Dependency.csproj diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/Dependency/Foo.cs b/src/Tools/dotnet-watch/test/TestProjects/Dependency/Foo.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/Dependency/Foo.cs rename to src/Tools/dotnet-watch/test/TestProjects/Dependency/Foo.cs diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/GlobbingApp/GlobbingApp.csproj b/src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/GlobbingApp.csproj similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/GlobbingApp/GlobbingApp.csproj rename to src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/GlobbingApp.csproj diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/GlobbingApp/Program.cs b/src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/Program.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/GlobbingApp/Program.cs rename to src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/Program.cs diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/GlobbingApp/exclude/Baz.cs b/src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/exclude/Baz.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/GlobbingApp/exclude/Baz.cs rename to src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/exclude/Baz.cs diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/GlobbingApp/include/Foo.cs b/src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/include/Foo.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/GlobbingApp/include/Foo.cs rename to src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/include/Foo.cs diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/KitchenSink/KitchenSink.csproj b/src/Tools/dotnet-watch/test/TestProjects/KitchenSink/KitchenSink.csproj similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/KitchenSink/KitchenSink.csproj rename to src/Tools/dotnet-watch/test/TestProjects/KitchenSink/KitchenSink.csproj diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/KitchenSink/Program.cs b/src/Tools/dotnet-watch/test/TestProjects/KitchenSink/Program.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/KitchenSink/Program.cs rename to src/Tools/dotnet-watch/test/TestProjects/KitchenSink/Program.cs diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/NoDepsApp/NoDepsApp.csproj b/src/Tools/dotnet-watch/test/TestProjects/NoDepsApp/NoDepsApp.csproj similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/NoDepsApp/NoDepsApp.csproj rename to src/Tools/dotnet-watch/test/TestProjects/NoDepsApp/NoDepsApp.csproj diff --git a/test/dotnet-watch.FunctionalTests/TestProjects/NoDepsApp/Program.cs b/src/Tools/dotnet-watch/test/TestProjects/NoDepsApp/Program.cs similarity index 100% rename from test/dotnet-watch.FunctionalTests/TestProjects/NoDepsApp/Program.cs rename to src/Tools/dotnet-watch/test/TestProjects/NoDepsApp/Program.cs diff --git a/test/dotnet-watch.Tests/Utilities/TemporaryCSharpProject.cs b/src/Tools/dotnet-watch/test/Utilities/TemporaryCSharpProject.cs similarity index 100% rename from test/dotnet-watch.Tests/Utilities/TemporaryCSharpProject.cs rename to src/Tools/dotnet-watch/test/Utilities/TemporaryCSharpProject.cs diff --git a/test/dotnet-watch.Tests/Utilities/TemporaryDirectory.cs b/src/Tools/dotnet-watch/test/Utilities/TemporaryDirectory.cs similarity index 100% rename from test/dotnet-watch.Tests/Utilities/TemporaryDirectory.cs rename to src/Tools/dotnet-watch/test/Utilities/TemporaryDirectory.cs diff --git a/test/dotnet-watch.Tests/Utilities/TestProjectGraph.cs b/src/Tools/dotnet-watch/test/Utilities/TestProjectGraph.cs similarity index 100% rename from test/dotnet-watch.Tests/Utilities/TestProjectGraph.cs rename to src/Tools/dotnet-watch/test/Utilities/TestProjectGraph.cs diff --git a/test/dotnet-watch.FunctionalTests/dotnet-watch.FunctionalTests.csproj b/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj similarity index 64% rename from test/dotnet-watch.FunctionalTests/dotnet-watch.FunctionalTests.csproj rename to src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj index d7c0a3fdac..ce23611f24 100644 --- a/test/dotnet-watch.FunctionalTests/dotnet-watch.FunctionalTests.csproj +++ b/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj @@ -2,23 +2,22 @@ netcoreapp2.1 + Microsoft.DotNet.Watcher.Tools.Tests $(DefaultItemExcludes);TestProjects\**\* - Microsoft.DotNet.Watcher.Tools.FunctionalTests - + - - + - - + + @@ -37,7 +36,7 @@ - diff --git a/shared/CliContext.cs b/src/Tools/shared/src/CliContext.cs similarity index 100% rename from shared/CliContext.cs rename to src/Tools/shared/src/CliContext.cs diff --git a/shared/CommandLineApplicationExtensions.cs b/src/Tools/shared/src/CommandLineApplicationExtensions.cs similarity index 100% rename from shared/CommandLineApplicationExtensions.cs rename to src/Tools/shared/src/CommandLineApplicationExtensions.cs diff --git a/shared/ConsoleReporter.cs b/src/Tools/shared/src/ConsoleReporter.cs similarity index 100% rename from shared/ConsoleReporter.cs rename to src/Tools/shared/src/ConsoleReporter.cs diff --git a/shared/DebugHelper.cs b/src/Tools/shared/src/DebugHelper.cs similarity index 100% rename from shared/DebugHelper.cs rename to src/Tools/shared/src/DebugHelper.cs diff --git a/shared/Ensure.cs b/src/Tools/shared/src/Ensure.cs similarity index 100% rename from shared/Ensure.cs rename to src/Tools/shared/src/Ensure.cs diff --git a/shared/IConsole.cs b/src/Tools/shared/src/IConsole.cs similarity index 100% rename from shared/IConsole.cs rename to src/Tools/shared/src/IConsole.cs diff --git a/shared/IReporter.cs b/src/Tools/shared/src/IReporter.cs similarity index 100% rename from shared/IReporter.cs rename to src/Tools/shared/src/IReporter.cs diff --git a/shared/NullReporter.cs b/src/Tools/shared/src/NullReporter.cs similarity index 100% rename from shared/NullReporter.cs rename to src/Tools/shared/src/NullReporter.cs diff --git a/shared/PhysicalConsole.cs b/src/Tools/shared/src/PhysicalConsole.cs similarity index 100% rename from shared/PhysicalConsole.cs rename to src/Tools/shared/src/PhysicalConsole.cs diff --git a/test/Shared/TestConsole.cs b/src/Tools/shared/test/TestConsole.cs similarity index 100% rename from test/Shared/TestConsole.cs rename to src/Tools/shared/test/TestConsole.cs diff --git a/test/Shared/TestReporter.cs b/src/Tools/shared/test/TestReporter.cs similarity index 100% rename from test/Shared/TestReporter.cs rename to src/Tools/shared/test/TestReporter.cs diff --git a/src/dotnet-dev-certs/dotnet-dev-certs.csproj b/src/dotnet-dev-certs/dotnet-dev-certs.csproj deleted file mode 100644 index 59dc5b5eab..0000000000 --- a/src/dotnet-dev-certs/dotnet-dev-certs.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - netcoreapp2.1 - exe - Command line tool to generate certificates used in ASP.NET Core during development. - Microsoft.AspNetCore.DeveloperCertificates.Tools - dotnet;developercertificates - true - - win-x64;win-x86 - - - - - - - - - - - - - - - - - - - - - diff --git a/src/dotnet-sql-cache/dotnet-sql-cache.csproj b/src/dotnet-sql-cache/dotnet-sql-cache.csproj deleted file mode 100644 index 15c3229544..0000000000 --- a/src/dotnet-sql-cache/dotnet-sql-cache.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - netcoreapp2.1 - exe - Command line tool to create tables and indexes in a Microsoft SQL Server database for distributed caching. - cache;distributedcache;sqlserver - true - - win-x64;win-x86 - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/dotnet-user-secrets/dotnet-user-secrets.csproj b/src/dotnet-user-secrets/dotnet-user-secrets.csproj deleted file mode 100644 index 99258ea0f6..0000000000 --- a/src/dotnet-user-secrets/dotnet-user-secrets.csproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - netcoreapp2.1 - exe - Command line tool to manage user secrets for Microsoft.Extensions.Configuration. - false - Microsoft.Extensions.SecretManager.Tools - configuration;secrets;usersecrets - true - - win-x64;win-x86 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/Directory.Build.props b/test/Directory.Build.props deleted file mode 100644 index c79812719a..0000000000 --- a/test/Directory.Build.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/test/dotnet-user-secrets.Tests/dotnet-user-secrets.Tests.csproj b/test/dotnet-user-secrets.Tests/dotnet-user-secrets.Tests.csproj deleted file mode 100644 index fd8be34db7..0000000000 --- a/test/dotnet-user-secrets.Tests/dotnet-user-secrets.Tests.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - netcoreapp2.1 - Microsoft.Extensions.SecretManager.Tools.Tests - - - - - - - - - - - - - - - - diff --git a/test/dotnet-watch.Tests/dotnet-watch.Tests.csproj b/test/dotnet-watch.Tests/dotnet-watch.Tests.csproj deleted file mode 100644 index ce5349ad3e..0000000000 --- a/test/dotnet-watch.Tests/dotnet-watch.Tests.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - netcoreapp2.1 - Microsoft.DotNet.Watcher.Tools.Tests - - - - - - - - - - - diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Key.snk b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Key.snk deleted file mode 100644 index 2181a1627b..0000000000 Binary files a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Key.snk and /dev/null differ diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Microsoft.VisualStudio.SecretManager.TestExtension.csproj b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Microsoft.VisualStudio.SecretManager.TestExtension.csproj deleted file mode 100644 index c51b275dfe..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Microsoft.VisualStudio.SecretManager.TestExtension.csproj +++ /dev/null @@ -1,149 +0,0 @@ - - - - 15.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - False - False - False - True - True - ..\..\build\Key.snk - True - - - - - - - Debug - AnyCPU - 2.0 - {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {965F8820-F809-4081-9090-1AEC903F291B} - Library - Properties - Microsoft.VisualStudio.SecretManager.TestExtension - Microsoft.VisualStudio.SecretManager.TestExtension - v4.6.1 - true - true - true - true - true - false - Program - $(DevEnvDir)devenv.exe - /rootsuffix Exp - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - SecretManagerTestControl.xaml - - - - - - - Designer - - - - - - - - - Designer - MSBuild:Compile - - - - - - - - False - - - - - - - - - - - - - - - - - - - 7.10.6071 - - - - - - 11.0.61030 - - - 12.0.30110 - - - 15.0.26606 - - - 8.0.50727 - - - 9.0.30729 - - - - 4.4.0 - - - - - - - Menus.ctmenu - - - - - true - VSPackage - - - - - - diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/NotifyPropertyChanged.cs b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/NotifyPropertyChanged.cs deleted file mode 100644 index 720593d469..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/NotifyPropertyChanged.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.ComponentModel; -using System.Runtime.CompilerServices; - -namespace Microsoft.VisualStudio.SecretManager.TestExtension -{ - public abstract class NotifyPropertyChanged : INotifyPropertyChanged - { - public event PropertyChangedEventHandler PropertyChanged; - - protected void OnPropertyChanged([CallerMemberName] string propertyName = null) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/ProjectViewModel.cs b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/ProjectViewModel.cs deleted file mode 100644 index f667db5267..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/ProjectViewModel.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.IO; -using Microsoft.VisualStudio.ProjectSystem; - -namespace Microsoft.VisualStudio.SecretManager.TestExtension -{ - public class ProjectViewModel : NotifyPropertyChanged - { - public ProjectViewModel(UnconfiguredProject project) - { - Project = project; - } - - internal UnconfiguredProject Project { get; } - - public string ProjectName => Path.GetFileNameWithoutExtension(Project.FullPath); - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Properties/AssemblyInfo.cs b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Properties/AssemblyInfo.cs deleted file mode 100644 index 9999a9ba7e..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Microsoft.VisualStudio.SecretManager.TestExtension")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Microsoft.VisualStudio.SecretManager.TestExtension")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/RelayCommand.cs b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/RelayCommand.cs deleted file mode 100644 index e12b2bd622..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/RelayCommand.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Windows.Input; - -namespace Microsoft.VisualStudio.SecretManager.TestExtension -{ - public class RelayCommand : ICommand - { - readonly Action _execute = null; - readonly Predicate _canExecute = null; - - public RelayCommand(Action execute) - : this(execute, null) - { - } - - public RelayCommand(Action execute, Predicate canExecute) - { - if (execute == null) - throw new ArgumentNullException("execute"); - - _execute = execute; - _canExecute = canExecute; - } - - public bool CanExecute(object parameter) - { - return _canExecute == null ? true : _canExecute((T)parameter); - } - - public event EventHandler CanExecuteChanged - { - add { CommandManager.RequerySuggested += value; } - remove { CommandManager.RequerySuggested -= value; } - } - - public void Execute(object parameter) - { - _execute((T)parameter); - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Resources/SecretManagerTestCommand.png b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Resources/SecretManagerTestCommand.png deleted file mode 100644 index b22d975cbf..0000000000 Binary files a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Resources/SecretManagerTestCommand.png and /dev/null differ diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Resources/SecretManagerTestPackage.ico b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Resources/SecretManagerTestPackage.ico deleted file mode 100644 index d323b07fb8..0000000000 Binary files a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/Resources/SecretManagerTestPackage.ico and /dev/null differ diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestCommand.cs b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestCommand.cs deleted file mode 100644 index e2729a214a..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestCommand.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.ComponentModel.Design; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; - -namespace Microsoft.VisualStudio.SecretManager.TestExtension -{ - internal sealed class SecretManagerTestCommand - { - /// - /// Command ID. - /// - public const int CommandId = 0x0100; - - /// - /// Command menu group (command set GUID). - /// - public static readonly Guid CommandSet = new Guid("e415a3f4-f2a8-4834-b7f7-f89844b2505c"); - - /// - /// VS Package that provides this command, not null. - /// - private readonly Package package; - - /// - /// Initializes a new instance of the class. - /// Adds our command handlers for menu (commands must exist in the command table file) - /// - /// Owner package, not null. - private SecretManagerTestCommand(Package package) - { - if (package == null) - { - throw new ArgumentNullException("package"); - } - - this.package = package; - - OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; - if (commandService != null) - { - var menuCommandID = new CommandID(CommandSet, CommandId); - var menuItem = new MenuCommand(this.ShowToolWindow, menuCommandID); - commandService.AddCommand(menuItem); - } - } - - /// - /// Gets the instance of the command. - /// - public static SecretManagerTestCommand Instance - { - get; - private set; - } - - /// - /// Gets the service provider from the owner package. - /// - private IServiceProvider ServiceProvider - { - get - { - return this.package; - } - } - - /// - /// Initializes the singleton instance of the command. - /// - /// Owner package, not null. - public static void Initialize(Package package) - { - Instance = new SecretManagerTestCommand(package); - } - - /// - /// Shows the tool window when the menu item is clicked. - /// - /// The event sender. - /// The event args. - private void ShowToolWindow(object sender, EventArgs e) - { - // Get the instance number 0 of this tool window. This window is single instance so this instance - // is actually the only one. - // The last flag is set to true so that if the tool window does not exists it will be created. - ToolWindowPane window = this.package.FindToolWindow(typeof(SecretManagerTestWindow), 0, true); - if ((null == window) || (null == window.Frame)) - { - throw new NotSupportedException("Cannot create tool window"); - } - - IVsWindowFrame windowFrame = (IVsWindowFrame)window.Frame; - Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(windowFrame.Show()); - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestControl.xaml b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestControl.xaml deleted file mode 100644 index 201144b7e1..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestControl.xaml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestControl.xaml.cs b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestControl.xaml.cs deleted file mode 100644 index b39c208ddf..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestControl.xaml.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -namespace Microsoft.VisualStudio.SecretManager.TestExtension -{ - using System.Diagnostics.CodeAnalysis; - using System.Windows; - using System.Windows.Controls; - - /// - /// Interaction logic for SecretManagerTestControl. - /// - public partial class SecretManagerTestControl : UserControl - { - /// - /// Initializes a new instance of the class. - /// - public SecretManagerTestControl() - { - this.InitializeComponent(); - } - - /// - /// Handles click on the button by displaying a message box. - /// - /// The event sender. - /// The event args. - [SuppressMessage("Microsoft.Globalization", "CA1300:SpecifyMessageBoxOptions", Justification = "Sample code")] - [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:ElementMustBeginWithUpperCaseLetter", Justification = "Default event handler naming pattern")] - private void button1_Click(object sender, RoutedEventArgs e) - { - MessageBox.Show( - string.Format(System.Globalization.CultureInfo.CurrentUICulture, "Invoked '{0}'", this.ToString()), - "SecretManagerTest"); - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestPackage.cs b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestPackage.cs deleted file mode 100644 index ada842d9cb..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestPackage.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; -using Microsoft.VisualStudio.Shell; - -namespace Microsoft.VisualStudio.SecretManager.TestExtension -{ - [PackageRegistration(UseManagedResourcesOnly = true)] - [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] // Info on this package for Help/About - [ProvideMenuResource("Menus.ctmenu", 1)] - [ProvideToolWindow(typeof(SecretManagerTestWindow))] - [Guid(SecretManagerTestPackage.PackageGuidString)] - [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")] - public sealed class SecretManagerTestPackage : Package - { - public const string PackageGuidString = "7b771e3e-f599-4fde-95a9-e35019e705f7"; - - protected override void Initialize() - { - SecretManagerTestCommand.Initialize(this); - base.Initialize(); - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestPackage.vsct b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestPackage.vsct deleted file mode 100644 index 554ae60164..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestPackage.vsct +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestWindow.cs b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestWindow.cs deleted file mode 100644 index 240a8fb935..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestWindow.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Runtime.InteropServices; -using Microsoft.VisualStudio.ComponentModelHost; -using Microsoft.VisualStudio.ProjectSystem; -using Microsoft.VisualStudio.Shell; - -namespace Microsoft.VisualStudio.SecretManager.TestExtension -{ - [Guid("6afffd63-17b6-4ef2-b515-fee22d767631")] - public class SecretManagerTestWindow : ToolWindowPane - { - public SecretManagerTestWindow() - : base(null) - { - this.Caption = "SecretManager Test Window"; - this.Content = new SecretManagerTestControl(); - } - - protected override void Initialize() - { - base.Initialize(); - - var component = (IComponentModel)GetService(typeof(SComponentModel)); - var projectService = component.GetService().GetProjectService(); - ((SecretManagerTestControl)Content).DataContext = new SecretManagerViewModel(projectService); - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerViewModel.cs b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerViewModel.cs deleted file mode 100644 index 3a4d5cbf61..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerViewModel.cs +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using System.Windows; -using Microsoft.VisualStudio.ProjectSystem; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.Threading; -using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; -using Task = System.Threading.Tasks.Task; - -namespace Microsoft.VisualStudio.SecretManager.TestExtension -{ - public class SecretManagerViewModel : NotifyPropertyChanged - { - private readonly IProjectService _projectService; - private readonly Random _rand; - private string _error; - private bool _isLoaded; - private ProjectViewModel _selectedProject; - - public SecretManagerViewModel(IProjectService projectService) - { - _projectService = projectService; - - RefreshCommand = new RelayCommand(Refresh, RefreshIsEnabled); - AddCommand = new RelayCommand(Add, IsProjectLoaded); - SaveCommand = new RelayCommand(Save, IsProjectLoaded); - Refresh(null); - _rand = new Random(); - } - - public RelayCommand RefreshCommand { get; } - - public RelayCommand AddCommand { get; } - public RelayCommand SaveCommand { get; } - - public ObservableCollection Projects { get; } = new ObservableCollection(); - - public ProjectViewModel SelectedProject - { - get => _selectedProject; - set - { - if (value == _selectedProject) - { - return; - } - - _selectedProject = value; - OnSelectedProjectChanged(); - OnPropertyChanged(); - } - } - - public bool IsLoaded - { - get => _isLoaded; - set - { - if (value == _isLoaded) - { - return; - } - - _isLoaded = value; - OnPropertyChanged(); - } - } - - public string Error - { - get => _error; - set - { - if (value == _error) - { - return; - } - - _error = value; - OnPropertyChanged(); - OnPropertyChanged(nameof(ErrorVisibility)); - } - } - - public Visibility ErrorVisibility => Error == null ? Visibility.Collapsed : Visibility.Visible; - - public ObservableCollection> Secrets { get; } = new ObservableCollection>(); - - private bool RefreshIsEnabled(object obj) => IsLoaded || SelectedProject == null; - - private void Refresh(object obj) - { - Projects.Clear(); - - foreach (var project in _projectService.LoadedUnconfiguredProjects) - { - Projects.Add(new ProjectViewModel(project)); - } - } - - private bool IsProjectLoaded(object obj) => IsLoaded && SelectedProject != null; - - private void Add(object obj) - { - Secrets.Add(new KeyValuePair("NewKey" + _rand.Next(10_000), "My new totally random and secret test value")); - } - - private async void Save(object obj) - { - Exception exception; - - try - { - IOleServiceProvider oleServices; - var project = (IVsProject)_selectedProject.Project.Services.HostObject; - Marshal.ThrowExceptionForHR(project.GetItemContext((uint)VSConstants.VSITEMID.Root, out oleServices)); - var services = new ServiceProvider(oleServices); - - var projectSecrets = (IVsProjectSecrets)services.GetService(typeof(SVsProjectLocalSecrets)); - await TaskScheduler.Default; - - if (projectSecrets == null) - { - exception = null; - } - else - { - foreach (var secret in Secrets) - { - await projectSecrets.SetSecretAsync(secret.Key, secret.Value).ConfigureAwait(false); - } - - exception = null; - } - } - catch (Exception ex) - { - exception = ex; - } - - if (exception != null) - { - Error = exception.ToString(); - } - } - - private async void OnSelectedProjectChanged() - { - Secrets.Clear(); - IsLoaded = false; - - if (_selectedProject == null) - { - return; - } - - KeyValuePair[] results; - Exception exception; - - try - { - IOleServiceProvider oleServices; - var project = (IVsProject)_selectedProject.Project.Services.HostObject; - Marshal.ThrowExceptionForHR(project.GetItemContext((uint)VSConstants.VSITEMID.Root, out oleServices)); - var services = new ServiceProvider(oleServices); - - var projectSecrets = (IVsProjectSecrets)services.GetService(typeof(SVsProjectLocalSecrets)); - await TaskScheduler.Default; - - if (projectSecrets == null) - { - results = null; - exception = null; - } - else - { - var secrets = await projectSecrets.GetSecretsAsync().ConfigureAwait(false); - - results = secrets.ToArray(); - exception = null; - } - } - catch (Exception ex) - { - results = null; - exception = ex; - } - - await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); - - if (exception != null) - { - Error = exception.ToString(); - } - else if (results != null) - { - for (var i = 0; i < results.Length; i++) - { - Secrets.Add(results[i]); - } - } - - IsLoaded = true; - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/VSPackage.resx b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/VSPackage.resx deleted file mode 100644 index ca1c752309..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/VSPackage.resx +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - SecretManagerTest Extension - - - SecretManagerTest Visual Studio Extension Detailed Info - - - Resources\SecretManagerTestPackage.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/app.config b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/app.config deleted file mode 100644 index 4bac29887b..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/app.config +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/source.extension.vsixmanifest b/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/source.extension.vsixmanifest deleted file mode 100644 index 3b8e971651..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager.TestExtension/source.extension.vsixmanifest +++ /dev/null @@ -1,21 +0,0 @@ - - - - - Microsoft.VisualStudio.SecretManager.TestExtension - A test extension for Microsoft.VisualStudio.TestExtension - - - - - - - - - - - - - - - diff --git a/tooling/Microsoft.VisualStudio.SecretManager/Microsoft.VisualStudio.SecretManager.csproj b/tooling/Microsoft.VisualStudio.SecretManager/Microsoft.VisualStudio.SecretManager.csproj deleted file mode 100644 index b178075251..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager/Microsoft.VisualStudio.SecretManager.csproj +++ /dev/null @@ -1,117 +0,0 @@ - - - - 15.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - CommonExtensions - Microsoft\ASP.NET Core\UserSecrets - true - - False - False - False - True - True - ..\..\build\Key.snk - True - - - - - - - Debug - AnyCPU - 2.0 - {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {5E117F2E-7152-447F-BF47-59F759EEF3A7} - Library - Properties - Microsoft.VisualStudio.SecretManager - Microsoft.VisualStudio.SecretManager - v4.6.1 - true - true - false - true - true - true - Program - $(DevEnvDir)devenv.exe - /rootsuffix Exp - - - true - full - false - bin\Debug\ - TRACE;DEBUG;EXTENSION_DEVELOPER_MODE - prompt - 4 - latest - - - true - full - true - bin\Release\ - TRACE - prompt - 4 - latest - - - - - - - - - - - - - - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - - - - - - - - diff --git a/tooling/Microsoft.VisualStudio.SecretManager/ProjectLocalSecretsManager.cs b/tooling/Microsoft.VisualStudio.SecretManager/ProjectLocalSecretsManager.cs deleted file mode 100644 index e516a85ffb..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager/ProjectLocalSecretsManager.cs +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.VisualStudio.ProjectSystem.Properties; -using Microsoft.VisualStudio.Threading; -using Task = System.Threading.Tasks.Task; - -namespace Microsoft.VisualStudio.SecretManager -{ - /// - /// Provides an thread-safe access the secrets.json file based on the UserSecretsId property in a configured project. - /// - internal class ProjectLocalSecretsManager : Shell.IVsProjectSecrets, Shell.SVsProjectLocalSecrets - { - private const string UserSecretsPropertyName = "UserSecretsId"; - - private readonly AsyncSemaphore _semaphore; - private readonly IProjectPropertiesProvider _propertiesProvider; - private readonly Lazy _services; - - public ProjectLocalSecretsManager(IProjectPropertiesProvider propertiesProvider, Lazy serviceProvider) - { - _propertiesProvider = propertiesProvider ?? throw new ArgumentNullException(nameof(propertiesProvider)); - _services = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); - _semaphore = new AsyncSemaphore(1); - } - - public string SanitizeName(string name) => name; - - public IReadOnlyCollection GetInvalidCharactersFrom(string name) => Array.Empty(); - - public async Task AddSecretAsync(string name, string value, CancellationToken cancellationToken = default) - { - EnsureKeyNameIsValid(name); - await TaskScheduler.Default; - - using (await _semaphore.EnterAsync(cancellationToken)) - using (var store = await GetOrCreateStoreAsync(cancellationToken)) - { - if (store.ContainsKey(name)) - { - throw new ArgumentException(Resources.Error_SecretAlreadyExists, nameof(name)); - } - - store.Set(name, value); - await store.SaveAsync(cancellationToken); - } - } - - public async Task SetSecretAsync(string name, string value, CancellationToken cancellationToken = default) - { - EnsureKeyNameIsValid(name); - await TaskScheduler.Default; - - using (await _semaphore.EnterAsync(cancellationToken)) - using (var store = await GetOrCreateStoreAsync(cancellationToken)) - { - store.Set(name, value); - await store.SaveAsync(cancellationToken); - } - } - - public async Task GetSecretAsync(string name, CancellationToken cancellationToken = default) - { - EnsureKeyNameIsValid(name); - await TaskScheduler.Default; - - using (await _semaphore.EnterAsync(cancellationToken)) - using (var store = await GetOrCreateStoreAsync(cancellationToken)) - { - return store.Get(name); - } - } - - public async Task> GetSecretNamesAsync(CancellationToken cancellationToken = default) - { - await TaskScheduler.Default; - - using (await _semaphore.EnterAsync(cancellationToken)) - using (var store = await GetOrCreateStoreAsync(cancellationToken)) - { - return store.ReadOnlyKeys; - } - } - - - public async Task> GetSecretsAsync(CancellationToken cancellationToken = default) - { - await TaskScheduler.Default; - - using (await _semaphore.EnterAsync(cancellationToken)) - using (var store = await GetOrCreateStoreAsync(cancellationToken)) - { - return store.Values; - } - } - - public async Task RemoveSecretAsync(string name, CancellationToken cancellationToken = default) - { - EnsureKeyNameIsValid(name); - await TaskScheduler.Default; - - using (await _semaphore.EnterAsync(cancellationToken)) - using (var store = await GetOrCreateStoreAsync(cancellationToken)) - { - if (store.Remove(name)) - { - await store.SaveAsync(cancellationToken); - return true; - } - - return false; - } - } - - private void EnsureKeyNameIsValid(string name) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - - if (name.Length == 0) - { - throw new ArgumentException(nameof(name)); - } - } - - private async Task GetOrCreateStoreAsync(CancellationToken cancellationToken) - { - var userSecretsId = await _propertiesProvider.GetCommonProperties().GetEvaluatedPropertyValueAsync(UserSecretsPropertyName); - - if (string.IsNullOrEmpty(userSecretsId)) - { - userSecretsId = Guid.NewGuid().ToString(); - await _propertiesProvider.GetCommonProperties().SetPropertyValueAsync(UserSecretsPropertyName, userSecretsId); - } - - var store = new SecretStore(userSecretsId); - await store.LoadAsync(cancellationToken); - return store; - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager/Properties/AssemblyInfo.cs b/tooling/Microsoft.VisualStudio.SecretManager/Properties/AssemblyInfo.cs deleted file mode 100644 index 56a9841165..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Reflection; -using Microsoft.VisualStudio.Shell; - -// required for VS to generate the pkgdef -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: ProvideCodeBase(CodeBase = @"$PackageFolder$\Microsoft.VisualStudio.SecretManager.dll")] -[assembly: ProvideBindingRedirection( - AssemblyName = "Microsoft.VisualStudio.SecretManager", - GenerateCodeBase = true, - PublicKeyToken = "adb9793829ddae60", - OldVersionLowerBound = "0.0.0.0", - OldVersionUpperBound = "1.0.0.0", - NewVersion = "1.0.0.0")] diff --git a/tooling/Microsoft.VisualStudio.SecretManager/Resources.Designer.cs b/tooling/Microsoft.VisualStudio.SecretManager/Resources.Designer.cs deleted file mode 100644 index bd79af4b8c..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager/Resources.Designer.cs +++ /dev/null @@ -1,140 +0,0 @@ -// -namespace Microsoft.VisualStudio.SecretManager -{ - using System.Globalization; - using System.Reflection; - using System.Resources; - - internal static class Resources - { - private static readonly ResourceManager _resourceManager - = new ResourceManager("Microsoft.VisualStudio.SecretManager.Resources", typeof(Resources).GetTypeInfo().Assembly); - - /// - /// A secret with this name already exists. - /// - internal static string Error_SecretAlreadyExists - { - get => GetString("Error_SecretAlreadyExists"); - } - - /// - /// Value cannot be null or an empty string. - /// - internal static string Common_StringNullOrEmpty - { - get => GetString("Common_StringNullOrEmpty"); - } - - /// - /// Value cannot be null or an empty string. - /// - internal static string FormatCommon_StringNullOrEmpty() - => GetString("Common_StringNullOrEmpty"); - - /// - /// Invalid character '{0}' found in the user secrets ID at index '{1}'. - /// - internal static string Error_Invalid_Character_In_UserSecrets_Id - { - get => GetString("Error_Invalid_Character_In_UserSecrets_Id"); - } - - /// - /// Invalid character '{0}' found in the user secrets ID at index '{1}'. - /// - internal static string FormatError_Invalid_Character_In_UserSecrets_Id(object p0, object p1) - => string.Format(CultureInfo.CurrentCulture, GetString("Error_Invalid_Character_In_UserSecrets_Id"), p0, p1); - - /// - /// Could not find 'UserSecretsIdAttribute' on assembly '{0}'. - /// Check that the project for '{0}' has set the 'UserSecretsId' build property. - /// If the 'UserSecretsId' property is already set then add a reference to the Microsoft.Extensions.Configuration.UserSecrets package. - /// - internal static string Error_Missing_UserSecretsIdAttribute - { - get => GetString("Error_Missing_UserSecretsIdAttribute"); - } - - /// - /// Could not find 'UserSecretsIdAttribute' on assembly '{0}'. - /// Check that the project for '{0}' has set the 'UserSecretsId' build property. - /// If the 'UserSecretsId' property is already set then add a reference to the Microsoft.Extensions.Configuration.UserSecrets package. - /// - internal static string FormatError_Missing_UserSecretsIdAttribute(object p0) - => string.Format(CultureInfo.CurrentCulture, GetString("Error_Missing_UserSecretsIdAttribute"), p0); - - /// - /// File path must be a non-empty string. - /// - internal static string Error_InvalidFilePath - { - get => GetString("Error_InvalidFilePath"); - } - - /// - /// File path must be a non-empty string. - /// - internal static string FormatError_InvalidFilePath() - => GetString("Error_InvalidFilePath"); - - /// - /// Could not parse the JSON file. Error on line number '{0}': '{1}'. - /// - internal static string Error_JSONParseError - { - get => GetString("Error_JSONParseError"); - } - - /// - /// Could not parse the JSON file. Error on line number '{0}': '{1}'. - /// - internal static string FormatError_JSONParseError(object p0, object p1) - => string.Format(CultureInfo.CurrentCulture, GetString("Error_JSONParseError"), p0, p1); - - /// - /// A duplicate key '{0}' was found. - /// - internal static string Error_KeyIsDuplicated - { - get => GetString("Error_KeyIsDuplicated"); - } - - /// - /// A duplicate key '{0}' was found. - /// - internal static string FormatError_KeyIsDuplicated(object p0) - => string.Format(CultureInfo.CurrentCulture, GetString("Error_KeyIsDuplicated"), p0); - - /// - /// Unsupported JSON token '{0}' was found. Path '{1}', line {2} position {3}. - /// - internal static string Error_UnsupportedJSONToken - { - get => GetString("Error_UnsupportedJSONToken"); - } - - /// - /// Unsupported JSON token '{0}' was found. Path '{1}', line {2} position {3}. - /// - internal static string FormatError_UnsupportedJSONToken(object p0, object p1, object p2, object p3) - => string.Format(CultureInfo.CurrentCulture, GetString("Error_UnsupportedJSONToken"), p0, p1, p2, p3); - - private static string GetString(string name, params string[] formatterNames) - { - var value = _resourceManager.GetString(name); - - System.Diagnostics.Debug.Assert(value != null); - - if (formatterNames != null) - { - for (var i = 0; i < formatterNames.Length; i++) - { - value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}"); - } - } - - return value; - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager/Resources.resx b/tooling/Microsoft.VisualStudio.SecretManager/Resources.resx deleted file mode 100644 index 1057cd7926..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager/Resources.resx +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - File path must be a non-empty string. - - - Could not parse the JSON file. Error on line number '{0}': '{1}'. - - - A duplicate key '{0}' was found. - - - Unsupported JSON token '{0}' was found. Path '{1}', line {2} position {3}. - - - Value cannot be null or an empty string. - - - Invalid character '{0}' found in the user secrets ID at index '{1}'. - - - Could not find 'UserSecretsIdAttribute' on assembly '{0}'. -Check that the project for '{0}' has set the 'UserSecretsId' build property. -If the 'UserSecretsId' property is already set then add a reference to the Microsoft.Extensions.Configuration.UserSecrets package. - - - A secret with this name already exists. - - \ No newline at end of file diff --git a/tooling/Microsoft.VisualStudio.SecretManager/SecretManagerFactory.cs b/tooling/Microsoft.VisualStudio.SecretManager/SecretManagerFactory.cs deleted file mode 100644 index b37212e23b..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager/SecretManagerFactory.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.ComponentModel.Composition; -using Microsoft.VisualStudio.ProjectSystem; -using Microsoft.VisualStudio.Shell; - -namespace Microsoft.VisualStudio.SecretManager -{ - internal class SecretManagerFactory - { - // This is capability is set in Microsoft.Extensions.Configuration.UserSecrets - private const string CapabilityName = "LocalUserSecrets"; - - private readonly Lazy _secretManager; - private readonly UnconfiguredProject _project; - - [ImportingConstructor] - public SecretManagerFactory(UnconfiguredProject project, SVsServiceProvider vsServiceProvider) - { - _project = project; - - var serviceProvider = new Lazy(() => vsServiceProvider); - - _secretManager = new Lazy(() => - { - var propertiesProvider = _project.Services.ActiveConfiguredProjectProvider.ActiveConfiguredProject.Services.ProjectPropertiesProvider; - return new ProjectLocalSecretsManager(propertiesProvider, serviceProvider); - }); - } - - [ExportVsProfferedProjectService(typeof(SVsProjectLocalSecrets))] - [AppliesTo(CapabilityName)] - public SVsProjectLocalSecrets ProjectLocalSecretsManager => _secretManager.Value; - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager/SecretStore.cs b/tooling/Microsoft.VisualStudio.SecretManager/SecretStore.cs deleted file mode 100644 index ee10d5069c..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager/SecretStore.cs +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Extensions.Configuration.Json; -using Microsoft.Extensions.Configuration.UserSecrets; -using Microsoft.VisualStudio.Threading; -using Newtonsoft.Json.Linq; -using Task = System.Threading.Tasks.Task; - -namespace Microsoft.VisualStudio.SecretManager -{ - /// - /// Provides read and write access to the secrets.json file for local user secrets. - /// This is not thread-safe. - /// This object is meant to have a short lifetime. - /// When calling , this will overwrite the secrets.json file. It does not check for concurrency issues if another process has edited this file. - /// - internal class SecretStore : IDisposable - { - private Dictionary _secrets; - private string _fileDir; - private string _filePath; - private bool _isDirty; - private volatile bool _disposed; - - public SecretStore(string userSecretsId) - { - _filePath = PathHelper.GetSecretsPathFromSecretsId(userSecretsId); - _fileDir = Path.GetDirectoryName(_filePath); - } - - public IReadOnlyCollection ReadOnlyKeys - { - get - { - EnsureNotDisposed(); - return _secrets.Keys; - } - } - - public IReadOnlyDictionary Values - { - get - { - EnsureNotDisposed(); - - return _secrets; - } - } - - public bool ContainsKey(string key) - { - EnsureNotDisposed(); - - return _secrets.ContainsKey(key); - } - - public string Get(string name) - { - EnsureNotDisposed(); - - return _secrets[name]; - } - - public void Set(string key, string value) - { - EnsureNotDisposed(); - - _isDirty = true; - _secrets[key] = value; - } - - public bool Remove(string key) - { - EnsureNotDisposed(); - _isDirty = true; - return _secrets.Remove(key); - } - - public async Task LoadAsync(CancellationToken cancellationToken) - { - cancellationToken.ThrowIfCancellationRequested(); - await TaskScheduler.Default; - - EnsureNotDisposed(); - - string text = null; - - if (File.Exists(_filePath)) - { - text = File.ReadAllText(_filePath); - } - - _secrets = DeserializeJson(text); - } - - public async Task SaveAsync(CancellationToken cancellationToken) - { - cancellationToken.ThrowIfCancellationRequested(); - await TaskScheduler.Default; - - EnsureNotDisposed(); - - if (!_isDirty) - { - return; - } - - Directory.CreateDirectory(_fileDir); - File.WriteAllText(_filePath, Stringify(_secrets), Encoding.UTF8); - - _isDirty = false; - } - - private void EnsureNotDisposed() - { - if (_disposed) - { - throw new ObjectDisposedException(nameof(SecretStore)); - } - } - - private static string Stringify(Dictionary secrets) - { - var contents = new JObject(); - if (secrets != null) - { - foreach (var secret in secrets) - { - contents[secret.Key] = secret.Value; - } - } - - return contents.ToString(); - } - - private static Dictionary DeserializeJson(string text) - { - if (string.IsNullOrEmpty(text)) - { - return new Dictionary(StringComparer.OrdinalIgnoreCase); - } - - using (var stream = new MemoryStream()) - { - var bytes = Encoding.UTF8.GetBytes(text); - stream.Write(bytes, 0, bytes.Length); - stream.Position = 0; - - // might throw FormatException if JSON is malformed. - var data = JsonConfigurationFileParser.Parse(stream); - - return new Dictionary(data, StringComparer.OrdinalIgnoreCase); - } - } - - public void Dispose() - { - if (_disposed) return; - _disposed = true; - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager/Sources/ConfigurationPath.cs b/tooling/Microsoft.VisualStudio.SecretManager/Sources/ConfigurationPath.cs deleted file mode 100644 index d4f277e0d1..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager/Sources/ConfigurationPath.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; - -namespace Microsoft.Extensions.Configuration -{ - /// - /// Utility methods and constants for manipulating Configuration paths - /// - internal static class ConfigurationPath - { - /// - /// The delimiter ":" used to separate individual keys in a path. - /// - public static readonly string KeyDelimiter = ":"; - - /// - /// Combines path segments into one path. - /// - /// The path segments to combine. - /// The combined path. - public static string Combine(params string[] pathSegments) - { - if (pathSegments == null) - { - throw new ArgumentNullException(nameof(pathSegments)); - } - return string.Join(KeyDelimiter, pathSegments); - } - - /// - /// Combines path segments into one path. - /// - /// The path segments to combine. - /// The combined path. - public static string Combine(IEnumerable pathSegments) - { - if (pathSegments == null) - { - throw new ArgumentNullException(nameof(pathSegments)); - } - return string.Join(KeyDelimiter, pathSegments); - } - - /// - /// Extracts the last path segment from the path. - /// - /// The path. - /// The last path segment of the path. - public static string GetSectionKey(string path) - { - if (string.IsNullOrEmpty(path)) - { - return path; - } - - var lastDelimiterIndex = path.LastIndexOf(KeyDelimiter, StringComparison.OrdinalIgnoreCase); - return lastDelimiterIndex == -1 ? path : path.Substring(lastDelimiterIndex + 1); - } - - /// - /// Extracts the path corresponding to the parent node for a given path. - /// - /// The path. - /// The original path minus the last individual segment found in it. Null if the original path corresponds to a top level node. - public static string GetParentPath(string path) - { - if (string.IsNullOrEmpty(path)) - { - return null; - } - - var lastDelimiterIndex = path.LastIndexOf(KeyDelimiter, StringComparison.OrdinalIgnoreCase); - return lastDelimiterIndex == -1 ? null : path.Substring(0, lastDelimiterIndex); - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager/Sources/JsonConfigurationFileParser.cs b/tooling/Microsoft.VisualStudio.SecretManager/Sources/JsonConfigurationFileParser.cs deleted file mode 100644 index 1cc65407c5..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager/Sources/JsonConfigurationFileParser.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. 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 Microsoft.VisualStudio.SecretManager; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Microsoft.Extensions.Configuration.Json -{ - internal class JsonConfigurationFileParser - { - private JsonConfigurationFileParser() { } - - private readonly IDictionary _data = new SortedDictionary(StringComparer.OrdinalIgnoreCase); - private readonly Stack _context = new Stack(); - private string _currentPath; - - private JsonTextReader _reader; - - public static IDictionary Parse(Stream input) - => new JsonConfigurationFileParser().ParseStream(input); - - private IDictionary ParseStream(Stream input) - { - _data.Clear(); - _reader = new JsonTextReader(new StreamReader(input)); - _reader.DateParseHandling = DateParseHandling.None; - - var jsonConfig = JObject.Load(_reader); - - VisitJObject(jsonConfig); - - return _data; - } - - private void VisitJObject(JObject jObject) - { - foreach (var property in jObject.Properties()) - { - EnterContext(property.Name); - VisitProperty(property); - ExitContext(); - } - } - - private void VisitProperty(JProperty property) - { - VisitToken(property.Value); - } - - private void VisitToken(JToken token) - { - switch (token.Type) - { - case JTokenType.Object: - VisitJObject(token.Value()); - break; - - case JTokenType.Array: - VisitArray(token.Value()); - break; - - case JTokenType.Integer: - case JTokenType.Float: - case JTokenType.String: - case JTokenType.Boolean: - case JTokenType.Bytes: - case JTokenType.Raw: - case JTokenType.Null: - VisitPrimitive(token.Value()); - break; - - default: - throw new FormatException(Resources.FormatError_UnsupportedJSONToken( - _reader.TokenType, - _reader.Path, - _reader.LineNumber, - _reader.LinePosition)); - } - } - - private void VisitArray(JArray array) - { - for (int index = 0; index < array.Count; index++) - { - EnterContext(index.ToString()); - VisitToken(array[index]); - ExitContext(); - } - } - - private void VisitPrimitive(JValue data) - { - var key = _currentPath; - - if (_data.ContainsKey(key)) - { - throw new FormatException(Resources.FormatError_KeyIsDuplicated(key)); - } - _data[key] = data.ToString(CultureInfo.InvariantCulture); - } - - private void EnterContext(string context) - { - _context.Push(context); - _currentPath = ConfigurationPath.Combine(_context.Reverse()); - } - - private void ExitContext() - { - _context.Pop(); - _currentPath = ConfigurationPath.Combine(_context.Reverse()); - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager/Sources/PathHelper.cs b/tooling/Microsoft.VisualStudio.SecretManager/Sources/PathHelper.cs deleted file mode 100644 index ae135cb5c4..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager/Sources/PathHelper.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.IO; -using Microsoft.VisualStudio.SecretManager; - -namespace Microsoft.Extensions.Configuration.UserSecrets -{ - /// - /// Provides paths for user secrets configuration files. - /// - internal class PathHelper - { - internal const string SecretsFileName = "secrets.json"; - - /// - /// - /// Returns the path to the JSON file that stores user secrets. - /// - /// - /// This uses the current user profile to locate the secrets file on disk in a location outside of source control. - /// - /// - /// The user secret ID. - /// The full path to the secret file. - public static string GetSecretsPathFromSecretsId(string userSecretsId) - { - if (string.IsNullOrEmpty(userSecretsId)) - { - throw new ArgumentException(Resources.Common_StringNullOrEmpty, nameof(userSecretsId)); - } - - var badCharIndex = userSecretsId.IndexOfAny(Path.GetInvalidFileNameChars()); - if (badCharIndex != -1) - { - throw new InvalidOperationException( - string.Format( - Resources.Error_Invalid_Character_In_UserSecrets_Id, - userSecretsId[badCharIndex], - badCharIndex)); - } - - var root = Environment.GetEnvironmentVariable("APPDATA") ?? // On Windows it goes to %APPDATA%\Microsoft\UserSecrets\ - Environment.GetEnvironmentVariable("HOME"); // On Mac/Linux it goes to ~/.microsoft/usersecrets/ - - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("APPDATA"))) - { - return Path.Combine(root, "Microsoft", "UserSecrets", userSecretsId, SecretsFileName); - } - else - { - return Path.Combine(root, ".microsoft", "usersecrets", userSecretsId, SecretsFileName); - } - } - } -} diff --git a/tooling/Microsoft.VisualStudio.SecretManager/source.extension.vsixmanifest b/tooling/Microsoft.VisualStudio.SecretManager/source.extension.vsixmanifest deleted file mode 100644 index 37bb50c5da..0000000000 --- a/tooling/Microsoft.VisualStudio.SecretManager/source.extension.vsixmanifest +++ /dev/null @@ -1,22 +0,0 @@ - - - - - ASP.NET Core User Secrets Extension - Microsoft.VisualStudio.SecretManager - Enables IVsProjectSecrets for ASP.NET Core projects that use Microsoft.Extensions.Configuration.UserSecrets. - - - - - - - - - - - - - - - diff --git a/version.props b/version.props deleted file mode 100644 index 4078cfc422..0000000000 --- a/version.props +++ /dev/null @@ -1,15 +0,0 @@ - - - 2.1.1 - 15.6 - rtm - $(VersionPrefix) - $(VersionPrefix)-$(VersionSuffix)-final - $(VsixVersion).$(BuildNumber) - $(VsixVersion).999999 - t000 - a- - $(FeatureBranchVersionPrefix)$(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) - $(VersionSuffix)-$(BuildNumber) - -