diff --git a/.sscignore b/.sscignore new file mode 100644 index 000000000000..532d7758ebd9 --- /dev/null +++ b/.sscignore @@ -0,0 +1,4 @@ +{ + "__comment": "CFS0013 intended for src\\Assets\\TestPackages\\dotnet-new\\test_templates\\TemplateWithConditions\\nuget.config", + "cfs" : ["CFS0013"] +} diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 5eee7dcb875e..495149976450 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -26,13 +26,17 @@ variables: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: _InternalRuntimeDownloadArgs value: '' + - name: _OfficialBuildArgs + value: '' - ${{ if ne(variables['System.TeamProject'], 'public') }}: - name: _DotNetPublishToBlobFeed value: true + - name: _OfficialBuildArgs + value: /p:OfficialBuilder=Microsoft - group: DotNetBuilds storage account read tokens - name: _InternalRuntimeDownloadArgs value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal - /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) + /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: DotNet-CLI-SDLValidation-Params diff --git a/Directory.Build.props b/Directory.Build.props index 8ee962ab1da8..1353696a295f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -21,6 +21,7 @@ $(DefineConstants);CI_BUILD + $(DefineConstants);MICROSOFT_ENABLE_TELEMETRY $(DefineConstants);DOT_NET_BUILD_FROM_SOURCE diff --git a/NuGet.config b/NuGet.config index 0815f41ac8a4..e42468650b96 100644 --- a/NuGet.config +++ b/NuGet.config @@ -20,6 +20,8 @@ + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d9120c14cba2..f7f339b39d14 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,236 +1,237 @@ - + https://github.com/dotnet/templating - 9ad0acac2a252764639134bb80ce7fc663bb8c9c + 4c20b92abdd5793182917a55114a19146a4aa4db + - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/msbuild - f2d13c6261c25bfdf53b29f3b0c4f38d7274fcc4 + 50f6081beda4c565252ff51be4ab1fe27005372b - + https://github.com/dotnet/msbuild - f2d13c6261c25bfdf53b29f3b0c4f38d7274fcc4 + 50f6081beda4c565252ff51be4ab1fe27005372b - + https://github.com/dotnet/fsharp - 02452432ce5180092438b17df9c5788f0c1ba9cf + ee745b0455fe651b6f5e5f9b85fc59a7b2574395 - + https://github.com/dotnet/fsharp - 02452432ce5180092438b17df9c5788f0c1ba9cf + ee745b0455fe651b6f5e5f9b85fc59a7b2574395 - + https://github.com/dotnet/format - 0b06c70c05030f4f10339b074758d8247f87cc30 + a4841cd2f1c9ccdb2c643e2faa61ba35dc2a8169 - + https://github.com/dotnet/roslyn - 83ae84b2a99a0bb1cb83525db21d467b99fd0159 + 65dc2845b5287ac972f7299616c13d3270720e44 - + https://github.com/dotnet/roslyn - 83ae84b2a99a0bb1cb83525db21d467b99fd0159 + 65dc2845b5287ac972f7299616c13d3270720e44 - + https://github.com/dotnet/roslyn - 83ae84b2a99a0bb1cb83525db21d467b99fd0159 + 65dc2845b5287ac972f7299616c13d3270720e44 - + https://github.com/dotnet/roslyn - 83ae84b2a99a0bb1cb83525db21d467b99fd0159 + 65dc2845b5287ac972f7299616c13d3270720e44 - + https://github.com/dotnet/roslyn - 83ae84b2a99a0bb1cb83525db21d467b99fd0159 + 65dc2845b5287ac972f7299616c13d3270720e44 - + https://github.com/dotnet/roslyn - 83ae84b2a99a0bb1cb83525db21d467b99fd0159 + 65dc2845b5287ac972f7299616c13d3270720e44 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/nuget/nuget.client - 3ec6f02943fa8e70ea224eb31dd94288dbf179d0 + 26a0cf27a2d4dcf52d19238606c269d6fed9ff66 - + https://github.com/microsoft/vstest - 63149fdc913835956b51759399e0d0ede3ad0ac3 + ef0aa102e9c7d5cf55af06c2747d11e07d12b69a - + https://github.com/dotnet/linker - f09bacf09ef10b61cf9f19825f8782171a816dab + 6252a2194dd32911db2c0669fc818555687d5570 - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/linker - f09bacf09ef10b61cf9f19825f8782171a816dab + 6252a2194dd32911db2c0669fc818555687d5570 - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/windowsdesktop - d5046afdd2d0e6234ae3fc5bd4ae878594079cc7 + 9a92628f9c13edd9caf29d8bb385ddb8acef3a65 - + https://github.com/dotnet/windowsdesktop - d5046afdd2d0e6234ae3fc5bd4ae878594079cc7 + 1ce737df56e7c14e2ba7adb308d9c045d6d67a8c - + https://github.com/dotnet/windowsdesktop - d5046afdd2d0e6234ae3fc5bd4ae878594079cc7 + 9a92628f9c13edd9caf29d8bb385ddb8acef3a65 - + https://github.com/dotnet/windowsdesktop - d5046afdd2d0e6234ae3fc5bd4ae878594079cc7 + 1ce737df56e7c14e2ba7adb308d9c045d6d67a8c - + https://github.com/dotnet/wpf - cd58f79f496337e608662e168c80ac8abd0d151b + d484acf21f04d612722a69026aa8e4efa584ea8e - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 77ea9ee147f495dd05a1d50906e3d455a5f4f2a0 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/razor-compiler - 44a2657f0dec50bc531f1d27b482057055a7ef92 + a41514681a4db83c7cae7e17debf668d12efc1bb - + https://github.com/dotnet/razor-compiler - 44a2657f0dec50bc531f1d27b482057055a7ef92 + a41514681a4db83c7cae7e17debf668d12efc1bb - + https://github.com/dotnet/razor-compiler - 44a2657f0dec50bc531f1d27b482057055a7ef92 + a41514681a4db83c7cae7e17debf668d12efc1bb - + https://github.com/dotnet/razor-compiler - 55e950892723d077c2707450ae8a8218bf4abc9c + a41514681a4db83c7cae7e17debf668d12efc1bb - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 - + https://github.com/dotnet/aspnetcore - 55616fa5b272d6d957d20059a681a68901807486 + 7662e32548923a93fdad61f96712471fd24ca8c5 https://github.com/aspnet/xdt @@ -254,37 +255,37 @@ 4b605851d45131db2374ba711f2443040521d702 - + https://github.com/dotnet/source-build-externals - 85d7e996e497861648ffbfd0e929b2b627ce7f46 + ee790b0477953dd30ea83e0e47af909a04fd0ca3 - + https://github.com/dotnet/arcade - 58aed6cc9fde5155c79cf706eeccf31b03e9a8a7 + 6a638cd0c13962ab2a1943cb1c878be5a41dd82e - + https://github.com/dotnet/arcade - 58aed6cc9fde5155c79cf706eeccf31b03e9a8a7 + 6a638cd0c13962ab2a1943cb1c878be5a41dd82e - + https://github.com/dotnet/arcade - 58aed6cc9fde5155c79cf706eeccf31b03e9a8a7 + 6a638cd0c13962ab2a1943cb1c878be5a41dd82e - + https://github.com/dotnet/arcade - 58aed6cc9fde5155c79cf706eeccf31b03e9a8a7 + 6a638cd0c13962ab2a1943cb1c878be5a41dd82e - + https://github.com/dotnet/runtime - e43e31527db9f1a2dde3095a1651279b272c8c09 + f52d8c59bb49360eb2cbeeb863c5856ebd62adda - + https://github.com/dotnet/xliff-tasks - eb60feba8e35109537c4059bf5131ea0d7ed24f3 + 8dfdebfefc8acef481f28edadbf7f75a8d6efde4 diff --git a/eng/Versions.props b/eng/Versions.props index 8de544bb25ec..6b72c9208f3d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -33,14 +33,14 @@ 6.0.0 4.0.0 6.0.0 - 7.0.0-beta.22405.6 + 7.0.0-beta.22411.2 3.1.0 - 7.0.0-rc.1.22406.5 + 7.0.0-rc.1.22411.12 4.3.0 4.3.0 4.0.5 6.0.0 - 7.0.0-rc.1.22406.5 + 7.0.0-rc.1.22411.12 4.6.0 2.0.0-beta4.22402.1 1.0.0-preview5.1.22263.1 @@ -48,20 +48,21 @@ - 7.0.0-rc.1.22406.5 - 7.0.0-rc.1.22406.5 - 7.0.0-rc.1.22406.5 + 7.0.0-rc.1.22411.12 + 7.0.0-rc.1.22411.12 + 7.0.0-rc.1.22411.12 $(MicrosoftNETCoreAppRuntimewinx64PackageVersion) - 7.0.0-rc.1.22406.5 - 7.0.0-rc.1.22406.5 - 7.0.0-rc.1.22406.5 + 7.0.0-rc.1.22411.12 + 7.0.0-rc.1.22411.12 + 7.0.0-rc.1.22411.12 6.0.0-preview.7.21363.9 $(MicrosoftExtensionsDependencyModelPackageVersion) + 6.0.0 7.0.0-preview.4.22201.3 - 6.4.0-preview.1.35 + 6.4.0-preview.1.45 $(NuGetBuildTasksPackageVersion) 6.0.0-rc.278 $(NuGetBuildTasksPackageVersion) @@ -78,25 +79,25 @@ - 17.4.0-preview-20220727-01 + 17.4.0-preview-20220813-01 $(MicrosoftNETTestSdkPackageVersion) $(MicrosoftNETTestSdkPackageVersion) - 7.0.100-1.22377.1 + 7.0.100-1.22415.4 $(MicrosoftNETILLinkTasksPackageVersion) - 7.0.0-rc.1.22406.5 - 7.0.0-rc.1.22406.5 - 7.0.0-rc.1.22406.5 - 7.0.0-rc.1.22406.5 + 7.0.0-rc.1.22411.12 + 7.0.0-rc.1.22411.12 + 7.0.0-rc.1.22411.12 + 7.0.0-rc.1.22411.12 - 7.0.340701 + 7.0.341201 @@ -104,7 +105,7 @@ - 17.4.0-preview-22405-01 + 17.4.0-preview-22414-01 - 7.0.100-rc.1.22406.1 + 8.0.100-alpha.1.22416.12 $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) @@ -132,37 +133,37 @@ - 12.0.6-beta.22404.7 + 12.0.6-beta.22414.2 - 4.4.0-1.22404.1 - 4.4.0-1.22404.1 - 4.4.0-1.22404.1 - 4.4.0-1.22404.1 - 4.4.0-1.22404.1 - 4.4.0-1.22404.1 + 4.4.0-2.22415.6 + 4.4.0-2.22415.6 + 4.4.0-2.22415.6 + 4.4.0-2.22415.6 + 4.4.0-2.22415.6 + 4.4.0-2.22415.6 $(MicrosoftNetCompilersToolsetPackageVersion) - 7.0.0-rc.1.22405.12 - 7.0.0-rc.1.22405.12 - 7.0.0-rc.1.22405.12 - 7.0.0-rc.1.22405.12 - 7.0.0-rc.1.22405.12 - 7.0.0-rc.1.22405.12 + 8.0.0-alpha.1.22416.14 + 8.0.0-alpha.1.22416.14 + 8.0.0-alpha.1.22416.14 + 8.0.0-alpha.1.22416.14 + 8.0.0-alpha.1.22416.14 + 8.0.0-alpha.1.22416.14 - 7.0.0-preview.5.22364.1 - 7.0.0-preview.5.22364.1 - 7.0.0-preview.5.22364.1 - 7.0.0-preview.5.22357.2 + 7.0.0-preview.5.22412.2 + 7.0.0-preview.5.22412.2 + 7.0.0-preview.5.22412.2 + 7.0.0-preview.5.22412.2 - 7.0.0-rc.1.22379.2 + 7.0.0-rc.2.22416.3 @@ -171,7 +172,7 @@ - 1.0.0-beta.22404.1 + 1.0.0-beta.22409.1 @@ -181,7 +182,7 @@ 4.19.2 4.19.0 - 7.0.0-beta.22405.6 + 7.0.0-beta.22411.2 4.8.2 6.0.0-beta.22262.1 diff --git a/eng/build.yml b/eng/build.yml index 335e8396b312..6fb25a126e73 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -15,14 +15,15 @@ parameters: timeoutInMinutes: 180 jobs: -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}: +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/main'), not(contains(parameters.agentOs, 'TemplateEngine'))) }}: - template: /eng/common/templates/job/onelocbuild.yml parameters: CreatePr: true LclSource: lclFilesfromPackage LclPackageId: 'LCL-JUNO-PROD-DOTNETSDK' - MirrorBranch: release/6.0.4xx + MirrorBranch: main MirrorRepo: sdk + - ${{ if not(contains(parameters.agentOs, 'TemplateEngine')) }}: - template: /eng/common/templates/job/job.yml parameters: @@ -73,6 +74,7 @@ jobs: $(_OfficialBuildIdArgs) /p:Test=false $(_InternalRuntimeDownloadArgs) + $(_OfficialBuildArgs) displayName: Build env: BuildConfig: $(_BuildConfig) @@ -479,4 +481,4 @@ jobs: ArtifactName: '$(_AgentOSName)_$(Agent.JobName)_$(Build.BuildNumber)' publishLocation: Container continueOnError: true - condition: always() \ No newline at end of file + condition: always() diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index f058c98763aa..d3b0ac3ba7b6 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -8,11 +8,13 @@ usage() echo "BuildArch can be: arm(default), arm64, armel, armv6, ppc64le, riscv64, s390x, x64, x86" echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.13 or alpine3.14. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen." echo " for FreeBSD can be: freebsd12, freebsd13" - echo " for illumos can be: illumos." + echo " for illumos can be: illumos" + echo " for Haiku can be: haiku." echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD" echo "llvmx[.y] - optional, LLVM version for LLVM related packages." echo "--skipunmount - optional, will skip the unmount of rootfs folder." echo "--use-mirror - optional, use mirror URL to fetch resources, when available." + echo "--jobs N - optional, restrict to N jobs." exit 1 } @@ -79,6 +81,17 @@ __IllumosPackages+=" mit-krb5-1.16.2nb4" __IllumosPackages+=" openssl-1.1.1e" __IllumosPackages+=" zlib-1.2.11" +__HaikuPackages="gmp" +__HaikuPackages+=" gmp_devel" +__HaikuPackages+=" krb5" +__HaikuPackages+=" krb5_devel" +__HaikuPackages+=" libiconv" +__HaikuPackages+=" libiconv_devel" +__HaikuPackages+=" llvm12_libunwind" +__HaikuPackages+=" llvm12_libunwind_devel" +__HaikuPackages+=" mpfr" +__HaikuPackages+=" mpfr_devel" + # ML.NET dependencies __UbuntuPackages+=" libomp5" __UbuntuPackages+=" libomp-dev" @@ -263,6 +276,11 @@ while :; do __CodeName=illumos __SkipUnmount=1 ;; + haiku) + __CodeName=haiku + __BuildArch=x64 + __SkipUnmount=1 + ;; --skipunmount) __SkipUnmount=1 ;; @@ -273,6 +291,10 @@ while :; do --use-mirror) __UseMirror=1 ;; + --use-jobs) + shift + MAXJOBS=$1 + ;; *) __UnprocessedBuildArgs="$__UnprocessedBuildArgs $1" ;; @@ -326,7 +348,7 @@ if [[ "$__CodeName" == "alpine" ]]; then rm -r "$__ApkToolsDir" elif [[ "$__CodeName" == "freebsd" ]]; then mkdir -p "$__RootfsDir"/usr/local/etc - JOBS="$(getconf _NPROCESSORS_ONLN)" + JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"} wget -O - "https://download.freebsd.org/ftp/releases/${__FreeBSDArch}/${__FreeBSDMachineArch}/${__FreeBSDBase}/base.txz" | tar -C "$__RootfsDir" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version echo "ABI = \"FreeBSD:${__FreeBSDABI}:${__FreeBSDMachineArch}\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > "${__RootfsDir}"/usr/local/etc/pkg.conf echo "FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly\", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > "${__RootfsDir}"/etc/pkg/FreeBSD.conf @@ -344,7 +366,7 @@ elif [[ "$__CodeName" == "freebsd" ]]; then elif [[ "$__CodeName" == "illumos" ]]; then mkdir "$__RootfsDir/tmp" pushd "$__RootfsDir/tmp" - JOBS="$(getconf _NPROCESSORS_ONLN)" + JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"} echo "Downloading sysroot." wget -O - https://github.com/illumos/sysroot/releases/download/20181213-de6af22ae73b-v1/illumos-sysroot-i386-20181213-de6af22ae73b-v1.tar.gz | tar -C "$__RootfsDir" -xzf - echo "Building binutils. Please wait.." @@ -386,6 +408,70 @@ elif [[ "$__CodeName" == "illumos" ]]; then wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/dlt.h wget -P "$__RootfsDir"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h wget -P "$__RootfsDir"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h +elif [[ "$__CodeName" == "haiku" ]]; then + JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"} + + echo "Building Haiku sysroot for x86_64" + mkdir -p "$__RootfsDir/tmp" + cd "$__RootfsDir/tmp" + git clone -b hrev56235 https://review.haiku-os.org/haiku + git clone -b btrev43195 https://review.haiku-os.org/buildtools + cd "$__RootfsDir/tmp/buildtools" && git checkout 7487388f5110021d400b9f3b88e1a7f310dc066d + + # Fetch some unmerged patches + cd "$__RootfsDir/tmp/haiku" + ## Add development build profile (slimmer than nightly) + git fetch origin refs/changes/64/4164/1 && git -c commit.gpgsign=false cherry-pick FETCH_HEAD + + # Build jam + cd "$__RootfsDir/tmp/buildtools/jam" + make + + # Configure cross tools + echo "Building cross-compiler" + mkdir -p "$__RootfsDir/generated" + cd "$__RootfsDir/generated" + "$__RootfsDir/tmp/haiku/configure" -j"$JOBS" --sysroot "$__RootfsDir" --cross-tools-source "$__RootfsDir/tmp/buildtools" --build-cross-tools x86_64 + + # Build Haiku packages + echo "Building Haiku" + echo 'HAIKU_BUILD_PROFILE = "development-raw" ;' > UserProfileConfig + "$__RootfsDir/tmp/buildtools/jam/jam0" -j"$JOBS" -q 'package' 'Haiku' + + BaseUrl="https://depot.haiku-os.org/__api/v2/pkg/get-pkg" + + # Download additional packages + echo "Downloading additional required packages" + read -ra array <<<"$__HaikuPackages" + for package in "${array[@]}"; do + echo "Downloading $package..." + # API documented here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L60 + # The schema here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L598 + hpkgDownloadUrl="$(wget -qO- --post-data='{"name":"'"$package"'","repositorySourceCode":"haikuports_x86_64","versionType":"LATEST","naturalLanguageCode":"en"}' \ + --header='Content-Type:application/json' "$BaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')" + wget -P "$__RootfsDir/generated/download" "$hpkgDownloadUrl" + done + + # Setup the sysroot + echo "Setting up sysroot and extracting needed packages" + mkdir -p "$__RootfsDir/boot/system" + for file in "$__RootfsDir/generated/objects/haiku/x86_64/packaging/packages/"*.hpkg; do + "$__RootfsDir/generated/objects/linux/x86_64/release/tools/package/package" extract -C "$__RootfsDir/boot/system" "$file" + done + for file in "$__RootfsDir/generated/download/"*.hpkg; do + "$__RootfsDir/generated/objects/linux/x86_64/release/tools/package/package" extract -C "$__RootfsDir/boot/system" "$file" + done + + # Cleaning up temporary files + echo "Cleaning up temporary files" + rm -rf "$__RootfsDir/tmp" + for name in "$__RootfsDir/generated/"*; do + if [[ "$name" =~ "cross-tools-" ]]; then + : # Keep the cross-compiler + else + rm -rf "$name" + fi + done elif [[ -n "$__CodeName" ]]; then qemu-debootstrap $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo" cp "$__CrossDir/$__BuildArch/sources.list.$__CodeName" "$__RootfsDir/etc/apt/sources.list" diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 909117759e61..561576be97c2 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -7,6 +7,8 @@ if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version) elseif(EXISTS ${CROSS_ROOTFS}/usr/platform/i86pc) set(CMAKE_SYSTEM_NAME SunOS) set(ILLUMOS 1) +elseif(EXISTS ${CROSS_ROOTFS}/boot/system/develop/headers/config/HaikuConfig.h) + set(CMAKE_SYSTEM_NAME Haiku) else() set(CMAKE_SYSTEM_NAME Linux) set(LINUX 1) @@ -76,6 +78,8 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") set(triple "x86_64-unknown-freebsd12") elseif(ILLUMOS) set(TOOLCHAIN "x86_64-illumos") + elseif(HAIKU) + set(TOOLCHAIN "x64_64-unknown-haiku") endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") set(CMAKE_SYSTEM_PROCESSOR i686) @@ -170,6 +174,41 @@ elseif(ILLUMOS) set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp") set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp") +elseif(HAIKU) + set(CMAKE_SYSROOT "${CROSS_ROOTFS}") + + set(TOOLSET_PREFIX ${TOOLCHAIN}-) + function(locate_toolchain_exec exec var) + string(TOUPPER ${exec} EXEC_UPPERCASE) + if(NOT "$ENV{CLR_${EXEC_UPPERCASE}}" STREQUAL "") + set(${var} "$ENV{CLR_${EXEC_UPPERCASE}}" PARENT_SCOPE) + return() + endif() + + set(SEARCH_PATH "${CROSS_ROOTFS}/generated/cross-tools-x86_64/bin") + + find_program(EXEC_LOCATION_${exec} + PATHS ${SEARCH_PATH} + NAMES + "${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}" + "${TOOLSET_PREFIX}${exec}") + + if (EXEC_LOCATION_${exec} STREQUAL "EXEC_LOCATION_${exec}-NOTFOUND") + message(FATAL_ERROR "Unable to find toolchain executable. Name: ${exec}, Prefix: ${TOOLSET_PREFIX}.") + endif() + set(${var} ${EXEC_LOCATION_${exec}} PARENT_SCOPE) + endfunction() + + set(CMAKE_SYSTEM_PREFIX_PATH "${CROSS_ROOTFS}") + + locate_toolchain_exec(gcc CMAKE_C_COMPILER) + locate_toolchain_exec(g++ CMAKE_CXX_COMPILER) + + set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp") + set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp") + + # let CMake set up the correct search paths + include(Platform/Haiku) else() set(CMAKE_SYSROOT "${CROSS_ROOTFS}") @@ -229,7 +268,7 @@ endif() # Specify compile options -if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS) +if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU) set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN}) set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN}) set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN}) diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 index 8d48ec5680fc..7428ef88084f 100644 --- a/eng/common/init-tools-native.ps1 +++ b/eng/common/init-tools-native.ps1 @@ -201,4 +201,4 @@ catch { Write-Host $_.ScriptStackTrace Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_ ExitWithExitCode 1 -} +} \ No newline at end of file diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index 24cec0424e5d..9ff6a10a682c 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -54,7 +54,7 @@ jobs: # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: name: NetCore1ESPool-Internal - demands: ImageOverride -equals Build.Server.Amd64.VS2019 + demands: ImageOverride -equals windows.vs2019.amd64 steps: - checkout: self clean: true diff --git a/eng/common/templates/job/onelocbuild.yml b/eng/common/templates/job/onelocbuild.yml index 3bcd243c46b6..6c523b714f40 100644 --- a/eng/common/templates/job/onelocbuild.yml +++ b/eng/common/templates/job/onelocbuild.yml @@ -41,7 +41,7 @@ jobs: # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: name: NetCore1ESPool-Internal - demands: ImageOverride -equals Build.Server.Amd64.VS2019 + demands: ImageOverride -equals windows.vs2019.amd64 variables: - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 4e37210857d1..c85044a68490 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -29,10 +29,10 @@ jobs: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: NetCore1ESPool-Public - demands: ImageOverride -equals Build.Server.Amd64.VS2019.Open + demands: ImageOverride -equals windows.vs2019.amd64.open ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: NetCore1ESPool-Internal - demands: ImageOverride -equals Build.Server.Amd64.VS2019 + demands: ImageOverride -equals windows.vs2019.amd64 steps: - ${{ each preStep in parameters.preSteps }}: diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml index 2cca53c2d1d5..64e5929f2216 100644 --- a/eng/common/templates/jobs/jobs.yml +++ b/eng/common/templates/jobs/jobs.yml @@ -96,7 +96,7 @@ jobs: # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: name: NetCore1ESPool-Internal - demands: ImageOverride -equals Build.Server.Amd64.VS2019 + demands: ImageOverride -equals windows.vs2019.amd64 runAsPublic: ${{ parameters.runAsPublic }} publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index e0beb25d4e76..87fcae940cff 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -107,7 +107,7 @@ stages: # If it's not devdiv, it's dnceng ${{ else }}: name: NetCore1ESPool-Internal - demands: ImageOverride -equals Build.Server.Amd64.VS2019 + demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml @@ -144,7 +144,7 @@ stages: # If it's not devdiv, it's dnceng ${{ else }}: name: NetCore1ESPool-Internal - demands: ImageOverride -equals Build.Server.Amd64.VS2019 + demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml parameters: @@ -204,7 +204,7 @@ stages: # If it's not devdiv, it's dnceng ${{ else }}: name: NetCore1ESPool-Internal - demands: ImageOverride -equals Build.Server.Amd64.VS2019 + demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml parameters: @@ -263,7 +263,7 @@ stages: # If it's not devdiv, it's dnceng ${{ else }}: name: NetCore1ESPool-Internal - demands: ImageOverride -equals Build.Server.Amd64.VS2019 + demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml parameters: diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 9638c63c7258..f83a748c37e9 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -368,7 +368,14 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = # https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet-eng&package=RoslynTools.MSBuild&protocolType=NuGet&version=17.1.0&view=overview $defaultXCopyMSBuildVersion = '17.1.0' - if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs } + if (!$vsRequirements) { + if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') { + $vsRequirements = $GlobalJson.tools.vs + } + else { + $vsRequirements = New-Object PSObject -Property @{ version = $vsMinVersionReqdStr } + } + } $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { $vsMinVersionReqdStr } $vsMinVersion = [Version]::new($vsMinVersionStr) diff --git a/global.json b/global.json index 4736a5072564..35e1e944169e 100644 --- a/global.json +++ b/global.json @@ -11,7 +11,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22405.6", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22405.6" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22411.2", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22411.2" } } diff --git a/source-build.slnf b/source-build.slnf index 4bd6e994b414..664ec75c76f6 100644 --- a/source-build.slnf +++ b/source-build.slnf @@ -2,6 +2,10 @@ "solution": { "path": "sdk.sln", "projects": [ + "src\\ApiCompat\\Microsoft.DotNet.ApiCompat.Shared\\Microsoft.DotNet.ApiCompat.Shared.shproj", + "src\\ApiCompat\\Microsoft.DotNet.ApiCompat.Task\\Microsoft.DotNet.ApiCompat.Task.csproj", + "src\\ApiCompat\\Microsoft.DotNet.ApiCompatibility\\Microsoft.DotNet.ApiCompatibility.csproj", + "src\\ApiCompat\\Microsoft.DotNet.PackageValidation\\Microsoft.DotNet.PackageValidation.csproj", "src\\BlazorWasmSdk\\Tasks\\Microsoft.NET.Sdk.BlazorWebAssembly.Tasks.csproj", "src\\BlazorWasmSdk\\Tool\\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.csproj", "src\\BuiltInTools\\BrowserRefresh\\Microsoft.AspNetCore.Watch.BrowserRefresh.csproj", @@ -12,11 +16,8 @@ "src\\Cli\\Microsoft.DotNet.Cli.Utils\\Microsoft.DotNet.Cli.Utils.csproj", "src\\Cli\\Microsoft.DotNet.Configurer\\Microsoft.DotNet.Configurer.csproj", "src\\Cli\\Microsoft.DotNet.InternalAbstractions\\Microsoft.DotNet.InternalAbstractions.csproj", + "src\\Cli\\Microsoft.TemplateEngine.Cli\\Microsoft.TemplateEngine.Cli.csproj", "src\\Cli\\dotnet\\dotnet.csproj", - "src\\ApiCompat\\Microsoft.DotNet.ApiCompat.Shared\\Microsoft.DotNet.ApiCompat.Shared.shproj", - "src\\ApiCompat\\Microsoft.DotNet.ApiCompat.Task\\Microsoft.DotNet.ApiCompat.Task.csproj", - "src\\ApiCompat\\Microsoft.DotNet.ApiCompatibility\\Microsoft.DotNet.ApiCompatibility.csproj", - "src\\ApiCompat\\Microsoft.DotNet.PackageValidation\\Microsoft.DotNet.PackageValidation.csproj", "src\\Layout\\redist\\redist.csproj", "src\\Layout\\tool_fsharp\\tool_fsc.csproj", "src\\Layout\\tool_msbuild\\tool_msbuild.csproj", @@ -37,7 +38,9 @@ "src\\WebSdk\\ProjectSystem\\Tasks\\Microsoft.NET.Sdk.Web.ProjectSystem.Tasks.csproj", "src\\WebSdk\\Publish\\Tasks\\Microsoft.NET.Sdk.Publish.Tasks.csproj", "src\\WebSdk\\Web\\Tasks\\Microsoft.NET.Sdk.Web.Tasks.csproj", - "src\\WebSdk\\Worker\\Tasks\\Microsoft.NET.Sdk.Worker.Tasks.csproj" + "src\\WebSdk\\Worker\\Tasks\\Microsoft.NET.Sdk.Worker.Tasks.csproj", + "template_feed\\Microsoft.DotNet.Common.ItemTemplates\\Microsoft.DotNet.Common.ItemTemplates.csproj", + "template_feed\\Microsoft.DotNet.Common.ProjectTemplates.7.0\\Microsoft.DotNet.Common.ProjectTemplates.7.0.csproj" ] } } \ No newline at end of file diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/IApiCompatServiceProviderModule.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/IApiCompatServiceProviderModule.cs new file mode 100644 index 000000000000..9d907cc07d4b --- /dev/null +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/IApiCompatServiceProviderModule.cs @@ -0,0 +1,30 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using Jab; +using Microsoft.DotNet.ApiCompatibility; +using Microsoft.DotNet.ApiCompatibility.Abstractions; +using Microsoft.DotNet.ApiCompatibility.Logging; +using Microsoft.DotNet.ApiCompatibility.Rules; +using Microsoft.DotNet.ApiCompatibility.Runner; + +namespace Microsoft.DotNet.ApiCompat +{ + [ServiceProviderModule] + [Singleton(typeof(ISuppressionEngine), Factory = nameof(SuppressionEngineFactory))] + [Singleton(typeof(ICompatibilityLogger), Factory = nameof(LogFactory))] + [Singleton(typeof(IRuleFactory), Instance = nameof(RuleFactory))] + [Singleton(typeof(IApiComparerFactory), typeof(ApiComparerFactory))] + [Singleton(typeof(IAssemblySymbolLoaderFactory), typeof(AssemblySymbolLoaderFactory))] + [Singleton(typeof(IMetadataStreamProvider), typeof(MetadataStreamProvider))] + [Singleton(typeof(IApiCompatRunner), typeof(ApiCompatRunner))] + internal interface IApiCompatServiceProviderModule + { + Func SuppressionEngineFactory { get; } + + Func LogFactory { get; } + + RuleFactory RuleFactory { get; } + } +} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/Microsoft.DotNet.ApiCompat.Shared.projitems b/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/Microsoft.DotNet.ApiCompat.Shared.projitems index 9f35c6a3e4dc..68c43c896c6d 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/Microsoft.DotNet.ApiCompat.Shared.projitems +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/Microsoft.DotNet.ApiCompat.Shared.projitems @@ -9,6 +9,7 @@ Microsoft.DotNet.ApiCompat + diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidateAssemblies.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidateAssemblies.cs index 502163d8974b..71edcfdd1b6b 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidateAssemblies.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidateAssemblies.cs @@ -2,35 +2,35 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using System.Collections.Generic; using System.IO; using Jab; -using Microsoft.DotNet.ApiCompatibility; using Microsoft.DotNet.ApiCompatibility.Abstractions; using Microsoft.DotNet.ApiCompatibility.Logging; +using Microsoft.DotNet.ApiCompatibility.Rules; using Microsoft.DotNet.ApiCompatibility.Runner; namespace Microsoft.DotNet.ApiCompat { - [ServiceProvider] - [Singleton(typeof(ISuppressionEngine), Factory = nameof(SuppressionEngineFactory))] - [Singleton(typeof(ICompatibilityLogger), Factory = nameof(LogFactory))] - [Singleton(typeof(IApiComparerFactory), typeof(ApiComparerFactory))] - [Singleton(typeof(IAssemblySymbolLoaderFactory), typeof(AssemblySymbolLoaderFactory))] - [Singleton(typeof(IMetadataStreamProvider), typeof(MetadataStreamProvider))] - [Singleton(typeof(IApiCompatRunner), typeof(ApiCompatRunner))] - internal partial class ValidateAssembliesServiceProvider + [ServiceProvider(RootServices = new[] { typeof(IEnumerable) })] + [Import(typeof(IApiCompatServiceProviderModule))] + internal partial class ValidateAssembliesServiceProvider : IApiCompatServiceProviderModule { public Func LogFactory { get; } public Func SuppressionEngineFactory { get; } + public RuleFactory RuleFactory { get; } + public ValidateAssembliesServiceProvider(Func logFactory, - Func suppressionEngineFactory) + Func suppressionEngineFactory, + RuleFactory ruleFactory) { // It's important to use GetService here instead of directly invoking the factory - // to avoid two suppression engine being created. + // to avoid two instances being created when retrieving a singleton. LogFactory = () => logFactory(GetService()); SuppressionEngineFactory = suppressionEngineFactory; + RuleFactory = ruleFactory; } } @@ -51,10 +51,11 @@ public static void Run(Func logFactory { // Configure the suppression engine. Ignore the passed in suppression file if it should be generated and doesn't yet exist. string? suppressionFileForEngine = generateSuppressionFile && !File.Exists(suppressionFile) ? null : suppressionFile; - Func suppressionEngineFactory = () => new SuppressionEngine(suppressionFileForEngine, noWarn, generateSuppressionFile); // Initialize the service provider - ValidateAssembliesServiceProvider serviceProvider = new(logFactory, suppressionEngineFactory); + ValidateAssembliesServiceProvider serviceProvider = new(logFactory, + () => new SuppressionEngine(suppressionFileForEngine, noWarn, generateSuppressionFile), + new RuleFactory()); IApiCompatRunner apiCompatRunner = serviceProvider.GetService(); ApiCompatRunnerOptions apiCompatOptions = new(enableStrictMode); diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidatePackage.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidatePackage.cs index 235eee7c9f98..273e5d60e747 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidatePackage.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompat.Shared/ValidatePackage.cs @@ -6,37 +6,35 @@ using System.IO; using Jab; using Microsoft.DotNet.ApiCompatibility.Logging; +using Microsoft.DotNet.ApiCompatibility.Rules; using Microsoft.DotNet.ApiCompatibility.Runner; using Microsoft.DotNet.PackageValidation; using Microsoft.DotNet.PackageValidation.Validators; -using Microsoft.DotNet.ApiCompatibility; -using Microsoft.DotNet.ApiCompatibility.Abstractions; namespace Microsoft.DotNet.ApiCompat { - [ServiceProvider] - [Singleton(typeof(ISuppressionEngine), Factory = nameof(SuppressionEngineFactory))] - [Singleton(typeof(ICompatibilityLogger), Factory = nameof(LogFactory))] - [Singleton(typeof(IApiComparerFactory), typeof(ApiComparerFactory))] - [Singleton(typeof(IAssemblySymbolLoaderFactory), typeof(AssemblySymbolLoaderFactory))] - [Singleton(typeof(IMetadataStreamProvider), typeof(MetadataStreamProvider))] - [Singleton(typeof(IApiCompatRunner), typeof(ApiCompatRunner))] + [ServiceProvider(RootServices = new[] { typeof(IEnumerable) })] + [Import(typeof(IApiCompatServiceProviderModule))] [Singleton(typeof(CompatibleFrameworkInPackageValidator))] [Singleton(typeof(CompatibleTfmValidator))] [Singleton(typeof(BaselinePackageValidator))] - internal partial class ValidatePackageServiceProvider + internal partial class ValidatePackageServiceProvider : IApiCompatServiceProviderModule { public Func LogFactory { get; } public Func SuppressionEngineFactory { get; } + public RuleFactory RuleFactory { get; } + public ValidatePackageServiceProvider(Func logFactory, - Func suppressionEngineFactory) + Func suppressionEngineFactory, + RuleFactory ruleFactory) { // It's important to use GetService here instead of directly invoking the factory - // to avoid two suppression engine being created. + // to avoid two instances being created when retrieving a singleton. LogFactory = () => logFactory(GetService()); SuppressionEngineFactory = suppressionEngineFactory; + RuleFactory = ruleFactory; } } @@ -58,10 +56,11 @@ public static void Run(Func logFactory { // Configure the suppression engine. Ignore the passed in suppression file if it should be generated and doesn't yet exist. string? suppressionFileForEngine = generateSuppressionFile && !File.Exists(suppressionFile) ? null : suppressionFile; - Func suppressionEngineFactory = () => new SuppressionEngine(suppressionFileForEngine, noWarn, generateSuppressionFile); // Initialize the service provider - ValidatePackageServiceProvider serviceProvider = new(logFactory, suppressionEngineFactory); + ValidatePackageServiceProvider serviceProvider = new(logFactory, + () => new SuppressionEngine(suppressionFileForEngine, noWarn, generateSuppressionFile), + new RuleFactory()); // If a runtime graph is provided, parse and use it for asset selection during the in-memory package construction. if (runtimeGraph != null) diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/CompatDifference.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/CompatDifference.cs index ae843522c4f0..4825c7fbb717 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/CompatDifference.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/CompatDifference.cs @@ -10,27 +10,21 @@ namespace Microsoft.DotNet.ApiCompatibility.Abstractions /// /// Class representing a difference of compatibility, containing detailed information about it. /// - public class CompatDifference : IDiagnostic, IEquatable + public readonly struct CompatDifference : IDiagnostic, IEquatable { - /// - /// The Diagnostic ID for this difference. - /// - public string DiagnosticId { get; } + /// + public readonly string DiagnosticId { get; } /// /// The . /// - public DifferenceType Type { get; } + public readonly DifferenceType Type { get; } - /// - /// A diagnostic message for the difference. - /// - public virtual string Message { get; } + /// + public readonly string Message { get; } - /// - /// A unique ID in order to identify the API that the difference was raised for. - /// - public string? ReferenceId { get; } + /// + public readonly string? ReferenceId { get; } /// /// Instantiate a new object representing the compatibility difference. @@ -65,13 +59,16 @@ public CompatDifference(string diagnosticId, string message, DifferenceType type /// describing the difference. public override string ToString() => $"{DiagnosticId} : {Message}"; - public bool Equals(CompatDifference? other) => other != null && + /// + public bool Equals(CompatDifference other) => DiagnosticId.Equals(other.DiagnosticId, StringComparison.InvariantCultureIgnoreCase) && Type.Equals(other.Type) && string.Equals(ReferenceId, other.ReferenceId, StringComparison.InvariantCultureIgnoreCase); + /// public override bool Equals(object? obj) => obj is CompatDifference difference && Equals(difference); + /// public override int GetHashCode() { int hashCode = 1447485498; @@ -84,5 +81,11 @@ public override int GetHashCode() return hashCode; } + + /// + public static bool operator ==(CompatDifference left, CompatDifference right) => left.Equals(right); + + /// + public static bool operator !=(CompatDifference left, CompatDifference right) => !(left == right); } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/ElementContainer.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/ElementContainer.cs index c303ae7d3dd9..729061db693a 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/ElementContainer.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/ElementContainer.cs @@ -14,12 +14,12 @@ public class ElementContainer where T : ISymbol /// /// The element that the container is holding. /// - public T Element { get; private set; } + public readonly T Element; /// /// The metadata associated to the element. /// - public MetadataInformation MetadataInformation { get; private set; } + public readonly MetadataInformation MetadataInformation; /// /// Instantiates a new object with the and used. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IDiagnostic.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IDiagnostic.cs index 1dfc53c62687..6dece78f6ffe 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IDiagnostic.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IDiagnostic.cs @@ -14,13 +14,13 @@ public interface IDiagnostic string DiagnosticId { get; } /// - /// String representing the ID for the object that the diagnostic was created for. + /// A diagnostic message for the difference. /// - string? ReferenceId { get; } + string Message { get; } /// - /// String describing the diagnostic. + /// A unique ID in order to identify the API that the difference was raised for. /// - string Message { get; } + string? ReferenceId { get; } } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/MapperVisitor.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/MapperVisitor.cs deleted file mode 100644 index f046666faa1e..000000000000 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/MapperVisitor.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.DotNet.ApiCompatibility.Abstractions -{ - /// - /// Class that implements a visitor pattern to visit the tree for a given mapper. - /// - public class MapperVisitor - { - /// - /// Visits the tree for the given . - /// - /// Underlying type for the objects that the mapper holds. - /// to visit. - public void Visit(ElementMapper mapper) - { - if (mapper is AssemblySetMapper assemblySetMapper) - { - Visit(assemblySetMapper); - } - else if (mapper is AssemblyMapper assemblyMapper) - { - Visit(assemblyMapper); - } - else if (mapper is NamespaceMapper nsMapper) - { - Visit(nsMapper); - } - else if (mapper is TypeMapper typeMapper) - { - Visit(typeMapper); - } - else if (mapper is MemberMapper memberMapper) - { - Visit(memberMapper); - } - } - - /// - /// Visits the and visits each in the mapper. - /// - /// The to visit. - public virtual void Visit(AssemblySetMapper mapper) - { - foreach (AssemblyMapper assembly in mapper.GetAssemblies()) - { - Visit(assembly); - } - } - - /// - /// Visits the and visits each in the mapper. - /// - /// The to visit. - public virtual void Visit(AssemblyMapper mapper) - { - foreach (NamespaceMapper nsMapper in mapper.GetNamespaces()) - { - Visit(nsMapper); - } - } - - /// - /// Visits the and visits each in the mapper. - /// - /// The to visit. - public virtual void Visit(NamespaceMapper mapper) - { - foreach (TypeMapper type in mapper.GetTypes()) - { - Visit(type); - } - } - - /// - /// Visits the and visits the nested types and members in the mapper. - /// - /// The to visit. - public virtual void Visit(TypeMapper mapper) - { - foreach (TypeMapper type in mapper.GetNestedTypes()) - { - Visit(type); - } - - foreach (MemberMapper member in mapper.GetMembers()) - { - Visit(member); - } - } - - /// - /// Visits the . - /// - /// The to visit. - public virtual void Visit(MemberMapper mapper) { } - } -} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/AssemblyMapper.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/AssemblyMapper.cs index e36c8de89210..a1cd6bf78c41 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/AssemblyMapper.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/AssemblyMapper.cs @@ -1,29 +1,49 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#nullable disable - -using Microsoft.CodeAnalysis; using System.Collections.Generic; +using Microsoft.CodeAnalysis; +using Microsoft.DotNet.ApiCompatibility.Rules; namespace Microsoft.DotNet.ApiCompatibility.Abstractions { /// - /// Object that represents a mapping between two objects. + /// Object that represents a mapping between multiple objects. /// This also holds a list of to represent the mapping of namespaces in between /// and . /// - public class AssemblyMapper : ElementMapper + public class AssemblyMapper : ElementMapper> { - private Dictionary _namespaces; + private Dictionary? _namespaces; + private readonly List[] _assemblyLoadErrors; + + /// + /// The containing assembly set of this assembly. Null if the assembly is not part of a set. + /// + public AssemblySetMapper? ContainingAssemblySet { get; } + + /// + /// Gets the assembly load errors that happened when trying to follow type forwards. + /// + public IReadOnlyList> AssemblyLoadErrors => _assemblyLoadErrors; /// /// Instantiates an object with the provided . /// /// The settings used to diff the elements in the mapper. /// The number of elements in the right set to compare. - public AssemblyMapper(ComparingSettings settings, int rightSetSize = 1) - : base(settings, rightSetSize) { } + /// The containing assembly set. Null, if the assembly isn't part of a set. + public AssemblyMapper(IRuleRunner ruleRunner, + MapperSettings settings = default, + int rightSetSize = 1, + AssemblySetMapper? containingAssemblySet = null) + : base(ruleRunner, settings, rightSetSize) + { + ContainingAssemblySet = containingAssemblySet; + _assemblyLoadErrors = new List[rightSetSize]; + for (int i = 0; i < rightSetSize; i++) + _assemblyLoadErrors[i] = new List(); + } /// /// Gets the mappers for the namespaces contained in and @@ -36,33 +56,27 @@ public IEnumerable GetNamespaces() _namespaces = new Dictionary(Settings.EqualityComparer); AddOrCreateMappers(Left, ElementSide.Left); - if (Right.Length == 1) + for (int i = 0; i < Right.Length; i++) { - AddOrCreateMappers(Right[0], ElementSide.Right); - } - else - { - for (int i = 0; i < Right.Length; i++) - { - AddOrCreateMappers(Right[i], ElementSide.Right, i); - } + AddOrCreateMappers(Right[i], ElementSide.Right, i); } - void AddOrCreateMappers(IAssemblySymbol symbol, ElementSide side, int setIndex = 0) + void AddOrCreateMappers(ElementContainer? assemblyContainer, ElementSide side, int setIndex = 0) { - if (symbol == null) + // Silently return if the element hasn't been added yet. + if (assemblyContainer == null) { return; } - Dictionary> typeForwards = ResolveTypeForwards(symbol, Settings.EqualityComparer, setIndex); + Dictionary> typeForwards = ResolveTypeForwards(assemblyContainer.Element, Settings.EqualityComparer, setIndex); Stack stack = new(); - stack.Push(symbol.GlobalNamespace); + stack.Push(assemblyContainer.Element.GlobalNamespace); while (stack.Count > 0) { INamespaceSymbol nsSymbol = stack.Pop(); - bool hasTypeForwards = typeForwards.TryGetValue(nsSymbol, out List types); + bool hasTypeForwards = typeForwards.TryGetValue(nsSymbol, out List? types); if (hasTypeForwards || nsSymbol.GetTypeMembers().Length > 0) { NamespaceMapper mapper = AddMapper(nsSymbol); @@ -93,9 +107,9 @@ void AddOrCreateMappers(IAssemblySymbol symbol, ElementSide side, int setIndex = NamespaceMapper AddMapper(INamespaceSymbol ns, bool checkIfExists = false, bool typeforwardsOnly = false) { - if (!_namespaces.TryGetValue(ns, out NamespaceMapper mapper)) + if (!_namespaces.TryGetValue(ns, out NamespaceMapper? mapper)) { - mapper = new NamespaceMapper(Settings, Right.Length, typeforwardsOnly: typeforwardsOnly); + mapper = new NamespaceMapper(RuleRunner, this, Settings, Right.Length, typeforwardsOnly: typeforwardsOnly); _namespaces.Add(ns, mapper); } else if (checkIfExists && mapper.GetElement(side, setIndex) != null) @@ -115,7 +129,7 @@ Dictionary> ResolveTypeForwards(IAssemb { if (symbol.TypeKind != TypeKind.Error) { - if (!typeForwards.TryGetValue(symbol.ContainingNamespace, out List types)) + if (!typeForwards.TryGetValue(symbol.ContainingNamespace, out List? types)) { types = new List(); typeForwards.Add(symbol.ContainingNamespace, types); diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/AssemblySetMapper.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/AssemblySetMapper.cs index aa7fd752bf8e..fa1efbdd6c37 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/AssemblySetMapper.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/AssemblySetMapper.cs @@ -1,27 +1,28 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#nullable disable - -using Microsoft.CodeAnalysis; using System.Collections.Generic; +using Microsoft.CodeAnalysis; +using Microsoft.DotNet.ApiCompatibility.Rules; namespace Microsoft.DotNet.ApiCompatibility.Abstractions { /// /// Object that represents a mapping between two lists of . /// - public class AssemblySetMapper : ElementMapper> + public class AssemblySetMapper : ElementMapper>> { - private Dictionary _assemblies; + private Dictionary? _assemblies; /// /// Instantiates an object with the provided . /// /// The settings used to diff the elements in the mapper. /// The number of elements in the right set to compare. - public AssemblySetMapper(ComparingSettings settings, int rightSetSize = 1) - : base(settings, rightSetSize) { } + public AssemblySetMapper(IRuleRunner ruleRunner, + MapperSettings settings = default, + int rightSetSize = 1) + : base(ruleRunner, settings, rightSetSize) { } /// /// Gets the assembly mappers built from the provided lists of . @@ -33,34 +34,28 @@ public IEnumerable GetAssemblies() _assemblies = new Dictionary(Settings.EqualityComparer); AddOrCreateMappers(Left, ElementSide.Left); - if (Right.Length == 1) + for (int i = 0; i < Right.Length; i++) { - AddOrCreateMappers(Right[0], ElementSide.Right); - } - else - { - for (int i = 0; i < Right.Length; i++) - { - AddOrCreateMappers(Right[i], ElementSide.Right, i); - } + AddOrCreateMappers(Right[i], ElementSide.Right, i); } - void AddOrCreateMappers(IEnumerable symbols, ElementSide side, int setIndex = 0) + void AddOrCreateMappers(IEnumerable>? assemblyContainers, ElementSide side, int setIndex = 0) { - if (symbols == null) + // Silently return if the element hasn't been added yet. + if (assemblyContainers == null) { return; } - foreach (IAssemblySymbol assembly in symbols) + foreach (ElementContainer assemblyContainer in assemblyContainers) { - if (!_assemblies.TryGetValue(assembly, out AssemblyMapper mapper)) + if (!_assemblies.TryGetValue(assemblyContainer.Element, out AssemblyMapper? mapper)) { - mapper = new AssemblyMapper(Settings, Right.Length); - _assemblies.Add(assembly, mapper); + mapper = new AssemblyMapper(RuleRunner, Settings, Right.Length, this); + _assemblies.Add(assemblyContainer.Element, mapper); } - mapper.AddElement(assembly, side, setIndex); + mapper.AddElement(assemblyContainer, side, setIndex); } } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/ElementMapper.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/ElementMapper.cs index 51f90826844c..99b42fda3cd1 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/ElementMapper.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/ElementMapper.cs @@ -1,67 +1,63 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#nullable disable - using System; using System.Collections.Generic; +using Microsoft.DotNet.ApiCompatibility.Rules; namespace Microsoft.DotNet.ApiCompatibility.Abstractions { /// /// Class that represents a mapping in between two objects of type . /// - public class ElementMapper + public abstract class ElementMapper { - private IReadOnlyList> _differences; - protected IList[] _assemblyLoadErrors; + private IReadOnlyList>? _differences; /// /// Property representing the Left hand side of the mapping. /// - public T Left { get; private set; } + public T? Left { get; private set; } /// /// Property representing the Right hand side element(s) of the mapping. /// - public T[] Right { get; private set; } + public T?[] Right { get; private set; } + + /// + /// The used to diff and . + /// + public MapperSettings Settings { get; } /// - /// The used to diff and . + /// The rule runner to perform api comparison checks. /// - public ComparingSettings Settings { get; internal set; } + protected IRuleRunner RuleRunner { get; } /// /// Instantiates an object with the provided . /// /// The settings used to diff the elements in the mapper. /// The number of elements in the right set to compare. - public ElementMapper(ComparingSettings settings, int rightSetSize) + public ElementMapper(IRuleRunner ruleRunner, + MapperSettings settings = default, + int rightSetSize = 1) { - if (rightSetSize <= 0) + if (rightSetSize < 1) throw new ArgumentOutOfRangeException(nameof(rightSetSize), Resources.ShouldBeGreaterThanZero); - Settings = settings ?? throw new ArgumentNullException(nameof(settings)); + RuleRunner = ruleRunner; + Settings = settings; Right = new T[rightSetSize]; - _assemblyLoadErrors = new IList[rightSetSize]; - for (int i = 0; i < rightSetSize; i++) - _assemblyLoadErrors[i] = new List(); } - /// - /// Adds an element to the given using the index 0 for . - /// - /// The element to add. - /// Value representing the side of the mapping. - public virtual void AddElement(T element, ElementSide side) => AddElement(element, side, 0); - /// /// Adds an element to the mapping given the and the . /// /// The element to add to the mapping. /// Value representing the side of the mapping. /// Value representing the index the element is added. Only used when adding to . - public virtual void AddElement(T element, ElementSide side, int setIndex) + public virtual void AddElement(T element, ElementSide side, int setIndex = 0) { if (side == ElementSide.Left) { @@ -77,23 +73,12 @@ public virtual void AddElement(T element, ElementSide side, int setIndex) } /// - /// Runs the rules found by the rule driver on the element mapper and returns a list of differences. + /// Returns the element from the specified and index. /// - /// A list containing the list of differences for each possible combination of - /// (, ). - /// One list of per the number of right elements that the contains. - public IReadOnlyList> GetDifferences() - { - return _differences ??= Settings.RuleRunnerFactory.GetRuleRunner().Run(this); - } - - /// - /// Gets the assembly load errors that happened when trying to follow type forwards. - /// - /// A list containing the assembly load errors that ocurred when following type forwards. - public IList[] GetAssemblyLoadErrors() => _assemblyLoadErrors; - - internal T GetElement(ElementSide side, int setIndex) + /// Value representing the side of the mapping. + /// Value representing the index the element is retrieved. Only used when adding to . + /// + public T? GetElement(ElementSide side, int setIndex) { if (side == ElementSide.Left) { @@ -102,5 +87,16 @@ internal T GetElement(ElementSide side, int setIndex) return Right[setIndex]; } + + /// + /// Runs the rules found by the rule driver on the element mapper and returns a list of differences. + /// + /// A list containing the list of differences for each possible combination of + /// (, ). + /// One list of per the number of right elements that the contains. + public IReadOnlyList> GetDifferences() + { + return _differences ??= RuleRunner.Run(this); + } } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/MemberMapper.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/MemberMapper.cs index da3dd49bbb45..53864e2729c3 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/MemberMapper.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/MemberMapper.cs @@ -1,9 +1,8 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#nullable disable - using Microsoft.CodeAnalysis; +using Microsoft.DotNet.ApiCompatibility.Rules; namespace Microsoft.DotNet.ApiCompatibility.Abstractions { @@ -12,19 +11,25 @@ namespace Microsoft.DotNet.ApiCompatibility.Abstractions /// public class MemberMapper : ElementMapper { + /// + /// The containg type of this member. + /// + public TypeMapper ContainingType { get; } + /// /// Instantiates an object with the provided . /// /// The settings used to diff the elements in the mapper. /// The number of elements in the right set to compare. - public MemberMapper(ComparingSettings settings, TypeMapper containingType, int rightSetSize = 1) - : base(settings, rightSetSize) + public MemberMapper(IRuleRunner ruleRunner, + TypeMapper containingType, + MapperSettings settings = default, + int rightSetSize = 1) + : base(ruleRunner, settings, rightSetSize) { ContainingType = containingType; } - internal TypeMapper ContainingType { get; } - // If we got to this point it means that ContainingType.Left is not null. // Because of that we can only check ContainingType.Right. internal bool ShouldDiffElement(int rightIndex) => diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/NamespaceMapper.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/NamespaceMapper.cs index 4b0b79d0ed9e..b54d3730e07b 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/NamespaceMapper.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/NamespaceMapper.cs @@ -1,11 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#nullable disable - -using Microsoft.CodeAnalysis; -using System; using System.Collections.Generic; +using Microsoft.CodeAnalysis; +using Microsoft.DotNet.ApiCompatibility.Rules; namespace Microsoft.DotNet.ApiCompatibility.Abstractions { @@ -16,19 +14,30 @@ namespace Microsoft.DotNet.ApiCompatibility.Abstractions /// public class NamespaceMapper : ElementMapper { - private Dictionary _types; + private readonly Dictionary _types; private bool _expandedTree = false; private readonly bool _typeforwardsOnly; + /// + /// The containing assembly of this namespace. + /// + public AssemblyMapper ContainingAssembly { get; } + /// /// Instantiates an object with the provided . /// /// The settings used to diff the elements in the mapper. /// The number of elements in the right set to compare. /// Indicates if should only return typeforwards. - public NamespaceMapper(ComparingSettings settings, int rightSetSize = 1, bool typeforwardsOnly = false) - : base(settings, rightSetSize) + public NamespaceMapper(IRuleRunner ruleRunner, + AssemblyMapper containingAssembly, + MapperSettings settings = default, + int rightSetSize = 1, + bool typeforwardsOnly = false) + : base(ruleRunner, settings, rightSetSize) { + ContainingAssembly = containingAssembly; + _types = new Dictionary(Settings.EqualityComparer); _typeforwardsOnly = typeforwardsOnly; } @@ -40,8 +49,6 @@ public IEnumerable GetTypes() { if (!_expandedTree) { - EnsureTypesInitialized(); - // if the typeforwardsOnly flag is specified it means this namespace is already // populated with the resolved typeforwards by the assembly mapper and that we // didn't find this namespace in the initial assembly. So we avoid getting the types @@ -50,17 +57,9 @@ public IEnumerable GetTypes() if (!_typeforwardsOnly) { AddOrCreateMappers(Left, ElementSide.Left); - - if (Right.Length == 1) - { - AddOrCreateMappers(Right[0], ElementSide.Right); - } - else + for (int i = 0; i < Right.Length; i++) { - for (int i = 0; i < Right.Length; i++) - { - AddOrCreateMappers(Right[i], ElementSide.Right, i); - } + AddOrCreateMappers(Right[i], ElementSide.Right, i); } } @@ -76,19 +75,12 @@ public IEnumerable GetTypes() /// List containing the that represents the forwarded types. /// Side to add the forwarded types into, 0 (Left) or 1 (Right). /// Value representing the index on the set of elements corresponding to the compared side. - public void AddForwardedTypes(IEnumerable forwardedTypes, ElementSide side, int setIndex) + public void AddForwardedTypes(IEnumerable? forwardedTypes, ElementSide side, int setIndex) { - EnsureTypesInitialized(); AddOrCreateMappers(forwardedTypes, side, setIndex); } - private void EnsureTypesInitialized() - { - if (_types == null) - _types = new Dictionary(Settings.EqualityComparer); - } - - private void AddOrCreateMappers(INamespaceSymbol symbol, ElementSide side, int setIndex = 0) + private void AddOrCreateMappers(INamespaceSymbol? symbol, ElementSide side, int setIndex = 0) { if (symbol == null) { @@ -98,8 +90,9 @@ private void AddOrCreateMappers(INamespaceSymbol symbol, ElementSide side, int s AddOrCreateMappers(symbol.GetTypeMembers(), side, setIndex); } - private void AddOrCreateMappers(IEnumerable types, ElementSide side, int setIndex) + private void AddOrCreateMappers(IEnumerable? types, ElementSide side, int setIndex) { + // Silently return if the element hasn't been added yet. if (types == null) return; @@ -107,9 +100,9 @@ private void AddOrCreateMappers(IEnumerable types, ElementSide side { if (Settings.Filter.Include(type)) { - if (!_types.TryGetValue(type, out TypeMapper mapper)) + if (!_types.TryGetValue(type, out TypeMapper? mapper)) { - mapper = new TypeMapper(Settings, null, Right.Length); + mapper = new TypeMapper(RuleRunner, this, Settings, null, Right.Length); _types.Add(type, mapper); } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/TypeMapper.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/TypeMapper.cs index 30504a5dcc90..e9023772ad3b 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/TypeMapper.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/Mappers/TypeMapper.cs @@ -1,13 +1,11 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#nullable disable - -using Microsoft.CodeAnalysis; -using Microsoft.DotNet.ApiCompatibility.Extensions; -using System; using System.Collections.Generic; using System.Diagnostics; +using Microsoft.CodeAnalysis; +using Microsoft.DotNet.ApiCompatibility.Extensions; +using Microsoft.DotNet.ApiCompatibility.Rules; namespace Microsoft.DotNet.ApiCompatibility.Abstractions { @@ -18,31 +16,45 @@ namespace Microsoft.DotNet.ApiCompatibility.Abstractions /// public class TypeMapper : ElementMapper { - private readonly TypeMapper _containingType; - private Dictionary _nestedTypes; - private Dictionary _members; + private Dictionary? _nestedTypes; + private Dictionary? _members; + + /// + /// The containg namespace of this type. + /// + public NamespaceMapper ContainingNamespace { get; } + + /// + /// The containing type of this type. Null if the type isn't nested. + /// + internal TypeMapper? ContainingType { get; } /// /// Instantiates an object with the provided . /// /// The settings used to diff the elements in the mapper. /// The number of elements in the right set to compare. - public TypeMapper(ComparingSettings settings, TypeMapper containingType = null, int rightSetSize = 1) - : base(settings, rightSetSize) + public TypeMapper(IRuleRunner ruleRunner, + NamespaceMapper containingNamespace, + MapperSettings settings = default, + TypeMapper? containingType = null, + int rightSetSize = 1) + : base(ruleRunner, settings, rightSetSize) { - _containingType = containingType; + ContainingNamespace = containingNamespace; + ContainingType = containingType; } internal bool ShouldDiffElement(int rightIndex) { - if (IsNested) + if (ContainingType != null) { - Debug.Assert(_containingType.ShouldDiffMembers); + Debug.Assert(ContainingType.ShouldDiffMembers); // This should only be called at a point where containingType.ShouldDiffMembers is true // So that means that containingType.Left is not null and we don't need to check. // If containingType.Right only contains one element, we can assume it is not null. - return _containingType.Right.Length == 1 || _containingType.Right[rightIndex] != null; + return ContainingType.Right.Length == 1 || ContainingType.Right[rightIndex] != null; } return true; @@ -73,11 +85,6 @@ public bool ShouldDiffMembers } } - /// - /// Indicates whether a type is nested or not. - /// - public bool IsNested => _containingType != null; - /// /// Gets the nested types within the mapped types. /// @@ -89,21 +96,14 @@ public IEnumerable GetNestedTypes() _nestedTypes = new Dictionary(Settings.EqualityComparer); AddOrCreateMappers(Left, ElementSide.Left); - - if (Right.Length == 1) - { - AddOrCreateMappers(Right[0], ElementSide.Right); - } - else + for (int i = 0; i < Right.Length; i++) { - for (int i = 0; i < Right.Length; i++) - { - AddOrCreateMappers(Right[i], ElementSide.Right, i); - } + AddOrCreateMappers(Right[i], ElementSide.Right, i); } - void AddOrCreateMappers(ITypeSymbol symbol, ElementSide side, int setIndex = 0) + void AddOrCreateMappers(ITypeSymbol? symbol, ElementSide side, int setIndex = 0) { + // Silently return if the element hasn't been added yet. if (symbol == null) { return; @@ -113,9 +113,9 @@ void AddOrCreateMappers(ITypeSymbol symbol, ElementSide side, int setIndex = 0) { if (Settings.Filter.Include(nestedType)) { - if (!_nestedTypes.TryGetValue(nestedType, out TypeMapper mapper)) + if (!_nestedTypes.TryGetValue(nestedType, out TypeMapper? mapper)) { - mapper = new TypeMapper(Settings, this, Right.Length); + mapper = new TypeMapper(RuleRunner, ContainingNamespace, Settings, this, Right.Length); _nestedTypes.Add(nestedType, mapper); } mapper.AddElement(nestedType, side, setIndex); @@ -138,21 +138,14 @@ public IEnumerable GetMembers() _members = new Dictionary(Settings.EqualityComparer); AddOrCreateMappers(Left, ElementSide.Left); - - if (Right.Length == 1) - { - AddOrCreateMappers(Right[0], ElementSide.Right); - } - else + for (int i = 0; i < Right.Length; i++) { - for (int i = 0; i < Right.Length; i++) - { - AddOrCreateMappers(Right[i], ElementSide.Right, i); - } + AddOrCreateMappers(Right[i], ElementSide.Right, i); } - void AddOrCreateMappers(ITypeSymbol symbol, ElementSide side, int setIndex = 0) + void AddOrCreateMappers(ITypeSymbol? symbol, ElementSide side, int setIndex = 0) { + // Silently return if the element hasn't been added yet. if (symbol == null) { return; @@ -166,9 +159,9 @@ void AddOrCreateMappers(ITypeSymbol symbol, ElementSide side, int setIndex = 0) // we would compare __value vs null and emit some warnings. if (Settings.Filter.Include(member) && member is not ITypeSymbol && !IsSpecialEnumField(member)) { - if (!_members.TryGetValue(member, out MemberMapper mapper)) + if (!_members.TryGetValue(member, out MemberMapper? mapper)) { - mapper = new MemberMapper(Settings, this, Right.Length); + mapper = new MemberMapper(RuleRunner, this, Settings, Right.Length); _members.Add(member, mapper); } mapper.AddElement(member, side, setIndex); diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/MetadataInformation.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/MetadataInformation.cs index ab8ec28fb7e1..206f3be786b2 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/MetadataInformation.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/MetadataInformation.cs @@ -62,10 +62,7 @@ public override int GetHashCode() int hashCode = 1447485498; hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(AssemblyName); hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(AssemblyId); - if (FullPath != null) - { - hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(FullPath); - } + hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(FullPath); return hashCode; } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ApiComparer.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ApiComparer.cs index edf50320551f..e91725daca35 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ApiComparer.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ApiComparer.cs @@ -1,11 +1,11 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Microsoft.CodeAnalysis; -using Microsoft.DotNet.ApiCompatibility.Abstractions; using System; using System.Collections.Generic; -using System.Linq; +using Microsoft.CodeAnalysis; +using Microsoft.DotNet.ApiCompatibility.Abstractions; +using Microsoft.DotNet.ApiCompatibility.Rules; namespace Microsoft.DotNet.ApiCompatibility { @@ -14,101 +14,106 @@ namespace Microsoft.DotNet.ApiCompatibility /// public class ApiComparer : IApiComparer { - /// - public bool IncludeInternalSymbols { get; set; } + private readonly IDifferenceVisitorFactory _differenceVisitorFactory; + private readonly IElementMapperFactory _elementMapperFactory; /// - public bool StrictMode { get; set; } + public ApiComparerSettings Settings { get; } + + public ApiComparer(IRuleFactory ruleFactory, + ApiComparerSettings? settings = null, + IDifferenceVisitorFactory? differenceVisitorFactory = null, + IRuleContext? ruleContext = null, + Func? ruleRunnerFactory = null, + Func? elementMapperFactory = null) + { + ruleContext ??= new RuleContext(); + IRuleRunner ruleRunner = ruleRunnerFactory?.Invoke(ruleFactory, ruleContext) ?? new RuleRunner(ruleFactory, ruleContext); + + _differenceVisitorFactory = differenceVisitorFactory ?? new DifferenceVisitorFactory(); + _elementMapperFactory = elementMapperFactory?.Invoke(ruleRunner) ?? new ElementMapperFactory(ruleRunner); + Settings = settings ?? new ApiComparerSettings(); + + ruleRunner.InitializeRules(Settings.ToRuleSettings()); + } /// - public bool WarnOnMissingReferences { get; set; } + public IEnumerable GetDifferences(IAssemblySymbol left, + IAssemblySymbol right) + { + return GetDifferences(new ElementContainer(left, new MetadataInformation()), + new ElementContainer(right, new MetadataInformation())); + } /// - public Func? GetComparingSettings { get; set; } + public IEnumerable GetDifferences(ElementContainer left, + ElementContainer right) + { + var mapper = _elementMapperFactory.CreateAssemblyMapper(Settings.ToMapperSettings()); + mapper.AddElement(left, ElementSide.Left); + mapper.AddElement(right, ElementSide.Right); + + IDifferenceVisitor visitor = _differenceVisitorFactory.Create(); + visitor.Visit(mapper); + + return visitor.DiagnosticCollections[0]; + } /// - public IEnumerable GetDifferences(IEnumerable left, - IEnumerable right, - string? leftName = null, - string? rightName = null) + public IEnumerable GetDifferences(IEnumerable> left, + IEnumerable> right) { - AssemblySetMapper mapper = new(GetComparingSettingsCore(leftName, rightName != null ? new[] { rightName } : null)); + var mapper = _elementMapperFactory.CreateAssemblySetMapper(Settings.ToMapperSettings()); mapper.AddElement(left, ElementSide.Left); mapper.AddElement(right, ElementSide.Right); - DifferenceVisitor visitor = new(); + IDifferenceVisitor visitor = _differenceVisitorFactory.Create(); visitor.Visit(mapper); - return visitor.DiagnosticCollections.First(); + + return visitor.DiagnosticCollections[0]; } /// - public IEnumerable GetDifferences(IAssemblySymbol left, - IAssemblySymbol right, - string? leftName = null, - string? rightName = null) + public IEnumerable GetDifferences(IEnumerable left, + IEnumerable right) { - if (left == null) + List> transformedLeft = new(); + foreach (IAssemblySymbol assemblySymbol in left) { - throw new ArgumentNullException(nameof(left)); + transformedLeft.Add(new ElementContainer(assemblySymbol, new MetadataInformation())); } - if (right == null) + List> transformedRight = new(); + foreach (IAssemblySymbol assemblySymbol in right) { - throw new ArgumentNullException(nameof(right)); + transformedRight.Add(new ElementContainer(assemblySymbol, new MetadataInformation())); } - AssemblyMapper mapper = new(GetComparingSettingsCore(leftName, rightName != null ? new[] { rightName } : null)); - mapper.AddElement(left, ElementSide.Left); - mapper.AddElement(right, ElementSide.Right); - - DifferenceVisitor visitor = new(); - visitor.Visit(mapper); - return visitor.DiagnosticCollections.First(); + return GetDifferences(transformedLeft, transformedRight); } /// public IEnumerable<(MetadataInformation left, MetadataInformation right, IEnumerable differences)> GetDifferences(ElementContainer left, - IList> right) + IReadOnlyList> right) { int rightCount = right.Count; - AssemblyMapper mapper = new(new ComparingSettings(), rightSetSize: rightCount); - mapper.AddElement(left.Element, ElementSide.Left); - - string[] rightNames = new string[rightCount]; + var mapper = _elementMapperFactory.CreateAssemblyMapper(Settings.ToMapperSettings(), rightCount); + mapper.AddElement(left, ElementSide.Left); for (int i = 0; i < rightCount; i++) { - ElementContainer element = right[i]; - rightNames[i] = element.MetadataInformation.DisplayString; - mapper.AddElement(element.Element, ElementSide.Right, i); + mapper.AddElement(right[i], ElementSide.Right, i); } - mapper.Settings = GetComparingSettingsCore(left.MetadataInformation.DisplayString, rightNames); - - DifferenceVisitor visitor = new(rightCount: rightCount); + IDifferenceVisitor visitor = _differenceVisitorFactory.Create(rightCount); visitor.Visit(mapper); - (MetadataInformation, MetadataInformation, IEnumerable)[] result = new(MetadataInformation, MetadataInformation, IEnumerable)[rightCount]; - - int count = 0; - foreach (IEnumerable collection in visitor.DiagnosticCollections) + var result = new(MetadataInformation, MetadataInformation, IEnumerable)[rightCount]; + for (int i = 0; i < visitor.DiagnosticCollections.Count; i++) { - result[count] = (left.MetadataInformation, right[count].MetadataInformation, collection); - count++; + result[i] = (left.MetadataInformation, right[i].MetadataInformation, visitor.DiagnosticCollections[i]); } return result; } - - private ComparingSettings GetComparingSettingsCore(string? leftName, string[]? rightNames) - { - if (GetComparingSettings != null) - return GetComparingSettings(leftName, rightNames); - - return new ComparingSettings(includeInternalSymbols: IncludeInternalSymbols, - strictMode: StrictMode, - leftName: leftName, - rightNames: rightNames, - warnOnMissingReferences: WarnOnMissingReferences); - } } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ApiComparerFactory.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ApiComparerFactory.cs index 4931df4df509..31c91dc202f9 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ApiComparerFactory.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ApiComparerFactory.cs @@ -1,14 +1,56 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System; +using Microsoft.DotNet.ApiCompatibility.Rules; + namespace Microsoft.DotNet.ApiCompatibility { /// - /// Factory to create an ApiComparer + /// Factory to create an IApiComparer instance. + /// + public interface IApiComparerFactory + { + /// + /// Creates an IApiComparer with optionally provided api copmarison settings. + /// + /// Returns an ApiComparer instance + IApiComparer Create(ApiComparerSettings? settings = null); + } + + /// + /// Factory to create an ApiComparer instance. /// public sealed class ApiComparerFactory : IApiComparerFactory { + private readonly IRuleFactory _ruleFactory; + private readonly IDifferenceVisitorFactory? _differenceVisitorFactory; + private readonly IRuleContext? _ruleContext; + private readonly Func? _ruleRunnerFactory; + private readonly Func? _elementMapperFactory; + + public ApiComparerFactory(IRuleFactory ruleFactory, + IDifferenceVisitorFactory? differenceVisitorFactory = null, + IRuleContext? ruleContext = null, + Func? ruleRunnerFactory = null, + Func? elementMapperFactory = null) + { + _ruleFactory = ruleFactory; + _differenceVisitorFactory = differenceVisitorFactory; + _ruleContext = ruleContext; + _ruleRunnerFactory = ruleRunnerFactory; + _elementMapperFactory = elementMapperFactory; + } + /// - public IApiComparer Create() => new ApiComparer(); + public IApiComparer Create(ApiComparerSettings? settings = null) + { + return new ApiComparer(_ruleFactory, + settings, + _differenceVisitorFactory, + _ruleContext, + _ruleRunnerFactory, + _elementMapperFactory); + } } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ApiComparerSettings.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ApiComparerSettings.cs new file mode 100644 index 000000000000..248ff6ceffee --- /dev/null +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ApiComparerSettings.cs @@ -0,0 +1,57 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using Microsoft.CodeAnalysis; +using Microsoft.DotNet.ApiCompatibility.Rules; + +namespace Microsoft.DotNet.ApiCompatibility +{ + /// + /// Settings for an ApiComparer instance. + /// + public readonly struct ApiComparerSettings + { + /// + /// Flag indicating whether api comparison should be performed in strict mode. + /// If true, the behavior of some rules will change and some other rules will be + /// executed when getting the differences. This is useful when both sides's surface area + /// which are compared, should not differ. + /// + public readonly bool StrictMode; + + /// + /// Determines if internal members should be validated. + /// + public readonly bool IncludeInternalSymbols; + + /// + /// If true, references are available. Necessary to know for following type forwards. + /// + public readonly bool WithReferences; + + public ApiComparerSettings(bool strictMode = false, + bool includeInternalSymbols = false, + bool withReferences = false, + IEqualityComparer? symbolComparer = null) + { + StrictMode = strictMode; + IncludeInternalSymbols = includeInternalSymbols; + WithReferences = withReferences; + } + + /// + /// Transforms the api comparer settings to rule settings. + /// + /// Returns the transformed settings as rule settings. + public RuleSettings ToRuleSettings() => + new(StrictMode, IncludeInternalSymbols, WithReferences); + + /// + /// Transforms the api comparer settings to mapper settings. + /// + /// Returns the transformed settings as mapper settings. + public MapperSettings ToMapperSettings() => + new(warnOnMissingReferences: WithReferences, includeInternalSymbols: IncludeInternalSymbols); + } +} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DifferenceVisitor.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DifferenceVisitor.cs index 490466e5776a..4c4f7a95cdfa 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DifferenceVisitor.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DifferenceVisitor.cs @@ -1,19 +1,22 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Microsoft.DotNet.ApiCompatibility.Abstractions; using System; using System.Collections.Generic; +using Microsoft.DotNet.ApiCompatibility.Abstractions; namespace Microsoft.DotNet.ApiCompatibility { /// /// The visitor that traverses the mappers' tree and gets it's differences in a . /// - public class DifferenceVisitor : MapperVisitor + public class DifferenceVisitor : IDifferenceVisitor { private readonly HashSet[] _diagnostics; + /// + public IReadOnlyList> DiagnosticCollections => _diagnostics; + /// /// Instantiates the visitor with the desired settings. /// @@ -26,69 +29,101 @@ public DifferenceVisitor(int rightCount = 1) } _diagnostics = new HashSet[rightCount]; - for (int i = 0; i < rightCount; i++) { _diagnostics[i] = new HashSet(); } } - /// - /// Visits an and adds it's differences to the . - /// - /// The mapper to visit. - public override void Visit(AssemblyMapper assembly) + /// + public void Visit(ElementMapper mapper) + { + if (mapper is AssemblySetMapper assemblySetMapper) + { + Visit(assemblySetMapper); + } + else if (mapper is AssemblyMapper assemblyMapper) + { + Visit(assemblyMapper); + } + else if (mapper is NamespaceMapper nsMapper) + { + Visit(nsMapper); + } + else if (mapper is TypeMapper typeMapper) + { + Visit(typeMapper); + } + else if (mapper is MemberMapper memberMapper) + { + Visit(memberMapper); + } + } + + /// + public void Visit(AssemblySetMapper mapper) + { + foreach (AssemblyMapper assembly in mapper.GetAssemblies()) + { + Visit(assembly); + } + } + + /// + public void Visit(AssemblyMapper assembly) { AddDifferences(assembly); - base.Visit(assembly); + + foreach (NamespaceMapper @namespace in assembly.GetNamespaces()) + { + Visit(@namespace); + } + // After visiting the assembly, the assembly mapper will contain any assembly load errors that happened // when trying to resolve typeforwarded types. If there were any, we add them to the diagnostic bag next. - AddAssemblyLoadErrors(assembly); + AddToDiagnosticCollections(assembly.AssemblyLoadErrors); } - /// - /// Visits an and adds it's differences to the . - /// - /// The mapper to visit. - public override void Visit(TypeMapper type) + /// + public void Visit(NamespaceMapper @namespace) + { + foreach (TypeMapper type in @namespace.GetTypes()) + { + Visit(type); + } + } + + /// + public void Visit(TypeMapper type) { AddDifferences(type); if (type.ShouldDiffMembers) { - base.Visit(type); + foreach (TypeMapper nestedType in type.GetNestedTypes()) + { + Visit(nestedType); + } + + foreach (MemberMapper member in type.GetMembers()) + { + Visit(member); + } } } - /// - /// Visits an and adds it's differences to the . - /// - /// The mapper to visit. - public override void Visit(MemberMapper member) + /// + public void Visit(MemberMapper member) { AddDifferences(member); } - /// - /// A list of . - /// One per element compared in the right hand side. - /// - public IEnumerable> DiagnosticCollections => _diagnostics; - private void AddDifferences(ElementMapper mapper) { IReadOnlyList> differences = mapper.GetDifferences(); - AddToDiagnosticCollections(differences); } - private void AddAssemblyLoadErrors(ElementMapper mapper) - { - IReadOnlyList> assemblyLoadErrors = mapper.GetAssemblyLoadErrors(); - - AddToDiagnosticCollections(assemblyLoadErrors); - } - private void AddToDiagnosticCollections(IReadOnlyList> diagnosticsToAdd) { if (_diagnostics.Length != diagnosticsToAdd.Count) diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DifferenceVisitorFactory.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DifferenceVisitorFactory.cs new file mode 100644 index 000000000000..e561500e0c4c --- /dev/null +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/DifferenceVisitorFactory.cs @@ -0,0 +1,27 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.DotNet.ApiCompatibility +{ + /// + /// Factory to create an IDifferenceVisitor instance. + /// + public interface IDifferenceVisitorFactory + { + /// + /// Creates an IDifferenceVisitor with an optionally provided count of the right elements that are compared. + /// + /// The number of rights that are compared against a left. + /// + IDifferenceVisitor Create(int rightCount = 1); + } + + /// + /// Factory to create an DifferenceVisitor instance. + /// + public sealed class DifferenceVisitorFactory : IDifferenceVisitorFactory + { + /// + public IDifferenceVisitor Create(int rightCount = 1) => new DifferenceVisitor(rightCount); + } +} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ElementMapperFactory.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ElementMapperFactory.cs new file mode 100644 index 000000000000..a6de536c414b --- /dev/null +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ElementMapperFactory.cs @@ -0,0 +1,53 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using Microsoft.CodeAnalysis; +using Microsoft.DotNet.ApiCompatibility.Abstractions; +using Microsoft.DotNet.ApiCompatibility.Rules; + +namespace Microsoft.DotNet.ApiCompatibility +{ + /// + /// Factory to create an IElementMapper instance. + /// + public interface IElementMapperFactory + { + /// + /// Creates an AssemblySetMapper instance with optional given mapper settings and the count of the rights that are compared. + /// + /// The mapper settings. + /// The number of rights that are compared. + /// Returns an AssemblySetMapper based on the given inputs. + ElementMapper>> CreateAssemblySetMapper(MapperSettings settings = default, int rightCount = 1); + + /// + /// Creates an AssemblyMapper instance with optional given mapper assetings and the count of the rights that are compared. + /// + /// The mapper settings. + /// The number of rights that are compared. + /// Returns an AssemblyMapper based on the given inputs. + ElementMapper> CreateAssemblyMapper(MapperSettings settings = default, int rightCount = 1); + } + + /// + /// Factory to create an ElementMapper instance. + /// + public sealed class ElementMapperFactory : IElementMapperFactory + { + private readonly IRuleRunner _ruleRunner; + + public ElementMapperFactory(IRuleRunner ruleRunner) + { + _ruleRunner = ruleRunner; + } + + /// + public ElementMapper>> CreateAssemblySetMapper(MapperSettings settings = default, int rightCount = 1) => + new AssemblySetMapper(_ruleRunner, settings, rightCount); + + /// + public ElementMapper> CreateAssemblyMapper(MapperSettings settings = default, int rightCount = 1) => + new AssemblyMapper(_ruleRunner, settings, rightCount); + } +} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IApiComparer.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IApiComparer.cs index a34aabbfd3b6..298b653e30b7 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IApiComparer.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IApiComparer.cs @@ -1,12 +1,10 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#nullable enable - +using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.DotNet.ApiCompatibility.Abstractions; -using System; -using System.Collections.Generic; +using Microsoft.DotNet.ApiCompatibility.Rules; namespace Microsoft.DotNet.ApiCompatibility { @@ -16,48 +14,45 @@ namespace Microsoft.DotNet.ApiCompatibility public interface IApiComparer { /// - /// Flag indicating whether internal symbols should be included in the comparisons or not. - /// - bool IncludeInternalSymbols { get; set; } - - /// - /// Flag indicating whether we should run on strict mode or not. - /// If StrictMode is set, the behavior of some rules will change and some other rules will be - /// executed when getting the differences. This is useful when you want both sides we are comparing - /// to be strictly the same on their surface area. + /// to be used when creating the mapping and getting the differences. /// - bool StrictMode { get; set; } + ApiComparerSettings Settings { get; } /// - /// Flag indicating whether the ApiComparison will warn if there are missing references + /// Get's the differences when comparing a left assembly against a right based on the comparison settings. + /// It compares two symbols. /// - bool WarnOnMissingReferences { get; set; } + /// Left assembly symbol to compare against. + /// Right assembly symbol to compare against. + /// List of found differences. + IEnumerable GetDifferences(IAssemblySymbol left, IAssemblySymbol right); /// - /// Callback function to get the to be used when creating the settings to get the differences. - /// The callback takes a string leftName and string[] rightNames parameters to indicate API Compat via the settings what the - /// name for the left and right the user specified. - /// This callback is called at the beginning of every overload. + /// Get's the differences when comparing a left assembly against a right based on the comparison settings. + /// It compares two symbols. /// - Func? GetComparingSettings { get; set; } + /// Left assembly symbol including metadata to compare against. + /// Right assembly symbol including metadata to compare against. + /// List of found differences. + IEnumerable GetDifferences(ElementContainer left, ElementContainer right); /// - /// Get's the differences when comparing Left vs Right based on the settings at the moment this method is called. - /// It compares two lists of symbols. + /// Get's the differences when comparing a left assembly set against a right set based on the comparison settings. + /// It compares two symbol sets. /// - /// Left symbols to compare against. - /// Right symbols to compare against. + /// Left assembly symbols to compare against. + /// Right assembly symbols to compare against. /// List of found differences. - IEnumerable GetDifferences(IEnumerable left, IEnumerable right, string? leftName = null, string? rightName = null); + IEnumerable GetDifferences(IEnumerable left, IEnumerable right); /// - /// Get's the differences when comparing Left vs Right based on the settings at the moment this method is called. - /// It compares two symbols. + /// Get's the differences when comparing a left assembly set against a right set based on the comparison settings. + /// It compares two symbol sets. /// - /// Left symbol to compare against. - /// Right symbol to compare against. + /// Left assembly symbols including metadata to compare against. + /// Right assembly symbols including metadata to compare against. /// List of found differences. - IEnumerable GetDifferences(IAssemblySymbol left, IAssemblySymbol right, string? leftName = null, string? rightName = null); + IEnumerable GetDifferences(IEnumerable> left, IEnumerable> right); /// /// Get the differences for all the combinations of against each @@ -67,6 +62,6 @@ public interface IApiComparer /// Return a list containing the (left, right) tuple and it's list of . /// The returning list contains one element per (left, right) combination, which is the same length as . /// - IEnumerable<(MetadataInformation left, MetadataInformation right, IEnumerable differences)> GetDifferences(ElementContainer left, IList> right); + IEnumerable<(MetadataInformation left, MetadataInformation right, IEnumerable differences)> GetDifferences(ElementContainer left, IReadOnlyList> right); } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IApiComparerFactory.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IApiComparerFactory.cs deleted file mode 100644 index 49ad58ee4068..000000000000 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IApiComparerFactory.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.DotNet.ApiCompatibility -{ - /// - /// Factory to create an ApiComparer - /// - public interface IApiComparerFactory - { - /// - /// Create an ApiComparer - /// - /// Returns an ApiComparer instance - IApiComparer Create(); - } -} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IDifferenceVisitor.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IDifferenceVisitor.cs new file mode 100644 index 000000000000..f3a0b42c12f0 --- /dev/null +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/IDifferenceVisitor.cs @@ -0,0 +1,57 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using Microsoft.DotNet.ApiCompatibility.Abstractions; + +namespace Microsoft.DotNet.ApiCompatibility +{ + /// + /// The visitor that traverses the mappers' tree and gets it's differences in a . + /// + public interface IDifferenceVisitor + { + /// + /// A list of . + /// One per element compared in the right hand side. + /// + IReadOnlyList> DiagnosticCollections { get; } + + /// + /// Visits the tree for the given . + /// + /// Underlying type for the objects that the mapper holds. + /// to visit. + void Visit(ElementMapper mapper); + + /// + /// Visits the and visits each in the mapper. + /// + /// The to visit. + void Visit(AssemblySetMapper mapper); + + /// + /// Visits an and adds it's differences to the . + /// + /// The mapper to visit. + void Visit(AssemblyMapper assembly); + + /// + /// Visits the and visits each in the mapper. + /// + /// The to visit. + void Visit(NamespaceMapper @namespace); + + /// + /// Visits an and adds it's differences to the . + /// + /// The mapper to visit. + void Visit(TypeMapper type); + + /// + /// Visits an and adds it's differences to the . + /// + /// The mapper to visit. + void Visit(MemberMapper member); + } +} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ComparingSettings.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/MapperSettings.cs similarity index 55% rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ComparingSettings.cs rename to src/ApiCompat/Microsoft.DotNet.ApiCompatibility/MapperSettings.cs index 6ed2d051551d..1ada316017c6 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/ComparingSettings.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/MapperSettings.cs @@ -1,56 +1,45 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.DotNet.ApiCompatibility.Abstractions; -using Microsoft.DotNet.ApiCompatibility.Rules; -using System.Collections.Generic; namespace Microsoft.DotNet.ApiCompatibility { /// /// Class that contains all the settings used to filter metadata, compare symbols and run rules. /// - public class ComparingSettings + public readonly struct MapperSettings { - /// - /// The factory to get the . - /// - public RuleRunnerFactory RuleRunnerFactory { get; } - /// /// The metadata filter to use when creating the . /// - public ISymbolFilter Filter { get; } + public readonly ISymbolFilter Filter; /// /// The comparer to map metadata. /// - public IEqualityComparer EqualityComparer { get; } + public readonly IEqualityComparer EqualityComparer; /// /// Indicates if we should warn on missing references. /// - public bool WarnOnMissingReferences { get; } + public readonly bool WarnOnMissingReferences; /// - /// Instantiate an object with the desired settings. + /// Instantiate an object with the desired comparison settings. /// - /// The factory to create a + /// The rule runner. /// The symbol filter. /// The comparer to map metadata. - public ComparingSettings(RuleRunnerFactory? ruleRunnerFactory = null, - ISymbolFilter? filter = null, + public MapperSettings(ISymbolFilter? filter = null, IEqualityComparer? equalityComparer = null, - bool includeInternalSymbols = false, - bool strictMode = false, bool warnOnMissingReferences = false, - string? leftName = null, - string[]? rightNames = null) + bool includeInternalSymbols = false) { - Filter = filter ?? new SymbolAccessibilityBasedFilter(includeInternalSymbols: includeInternalSymbols); + Filter = filter ?? new SymbolAccessibilityBasedFilter(includeInternalSymbols); EqualityComparer = equalityComparer ?? new DefaultSymbolsEqualityComparer(); - RuleRunnerFactory = ruleRunnerFactory ?? new RuleRunnerFactory(leftName, rightNames, EqualityComparer, includeInternalSymbols, strictMode, warnOnMissingReferences); WarnOnMissingReferences = warnOnMissingReferences; } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj index d875a6a5a43a..7b8569a72b51 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Microsoft.DotNet.ApiCompatibility.csproj @@ -13,7 +13,6 @@ - diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AssemblyIdentityMustMatch.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AssemblyIdentityMustMatch.cs index 4a538c6f81a8..bb93fe1f3999 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AssemblyIdentityMustMatch.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/AssemblyIdentityMustMatch.cs @@ -13,7 +13,7 @@ public class AssemblyIdentityMustMatch : IRule { private readonly RuleSettings _settings; - public AssemblyIdentityMustMatch(RuleSettings settings, RuleRunnerContext context) + public AssemblyIdentityMustMatch(RuleSettings settings, IRuleRegistrationContext context) { _settings = settings; context.RegisterOnAssemblySymbolAction(RunOnAssemblySymbol); @@ -23,13 +23,21 @@ private void RunOnAssemblySymbol(IAssemblySymbol? left, IAssemblySymbol? right, { if (left == null && right != null) { - differences.Add(new CompatDifference(DiagnosticIds.MatchingAssemblyDoesNotExist, string.Format(Resources.AssemblyNameDoesNotExist, leftName, right.Identity.Name), DifferenceType.Removed, right.Identity.GetDisplayName())); + differences.Add(new CompatDifference( + DiagnosticIds.MatchingAssemblyDoesNotExist, + string.Format(Resources.AssemblyNameDoesNotExist, leftName, right.Identity.Name), + DifferenceType.Removed, + right.Identity.GetDisplayName())); return; } if (left != null && right == null) { - differences.Add(new CompatDifference(DiagnosticIds.MatchingAssemblyDoesNotExist, string.Format(Resources.AssemblyNameDoesNotExist, rightName, left.Identity.Name), DifferenceType.Added, left.Identity.GetDisplayName())); + differences.Add(new CompatDifference( + DiagnosticIds.MatchingAssemblyDoesNotExist, + string.Format(Resources.AssemblyNameDoesNotExist, rightName, left.Identity.Name), + DifferenceType.Added, + left.Identity.GetDisplayName())); return; } @@ -49,21 +57,45 @@ private void RunOnAssemblySymbol(IAssemblySymbol? left, IAssemblySymbol? right, if (leftAssemblyName != rightAssemblyName) { - differences.Add(CreateIdentityDifference(Resources.AssemblyNameDoesNotMatch, leftAssemblyName, rightAssemblyName, leftName, rightName, rightIdentity)); + differences.Add(CreateIdentityDifference( + Resources.AssemblyNameDoesNotMatch, + leftAssemblyName, + rightAssemblyName, + leftName, + rightName, + rightIdentity)); } if (leftAssemblyCulture != rightAssemblyCulture) { - differences.Add(CreateIdentityDifference(Resources.AssembyCultureDoesNotMatch, leftAssemblyCulture, rightAssemblyCulture, leftName, rightName, rightIdentity)); + differences.Add(CreateIdentityDifference( + Resources.AssembyCultureDoesNotMatch, + leftAssemblyCulture, + rightAssemblyCulture, + leftName, + rightName, + rightIdentity)); } if (rightAssemblyVersion < leftAssemblyVersion) { - differences.Add(CreateIdentityDifference(Resources.AssembyVersionIsNotCompatible, rightAssemblyVersion.ToString(), leftAssemblyVersion.ToString(), rightName, leftName, rightIdentity)); + differences.Add(CreateIdentityDifference( + Resources.AssembyVersionIsNotCompatible, + rightAssemblyVersion.ToString(), + leftAssemblyVersion.ToString(), + rightName, + leftName, + rightIdentity)); } else if (_settings.StrictMode && leftAssemblyVersion < rightAssemblyVersion) { - differences.Add(CreateIdentityDifference(Resources.AssembyVersionDoesNotMatch, leftAssemblyVersion.ToString(), rightAssemblyVersion.ToString(), leftName, rightName, leftIdentity)); + differences.Add(CreateIdentityDifference( + Resources.AssembyVersionDoesNotMatch, + leftAssemblyVersion.ToString(), + rightAssemblyVersion.ToString(), + leftName, + rightName, + leftIdentity)); } if (!leftAssemblyPublicKeyToken.IsEmpty && !leftIdentity.IsRetargetable && !leftAssemblyPublicKeyToken.SequenceEqual(rightAssemblyPublicKeyToken)) @@ -102,6 +134,9 @@ private static string GetStringRepresentation(ReadOnlySpan publicKeyToken) } private static CompatDifference CreateIdentityDifference(string format, string leftProperty, string rightProperty, string leftName, string rightName, AssemblyIdentity identity) => - new(DiagnosticIds.AssemblyIdentityMustMatch, string.Format(format, leftProperty, rightProperty, leftName, rightName), DifferenceType.Changed, identity.GetDisplayName()); + new(DiagnosticIds.AssemblyIdentityMustMatch, + string.Format(format, leftProperty, rightProperty, leftName, rightName), + DifferenceType.Changed, + identity.GetDisplayName()); } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddAbstractMember.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddAbstractMember.cs index ab6f31b2181d..f9aeacbb10e1 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddAbstractMember.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddAbstractMember.cs @@ -15,7 +15,7 @@ public class CannotAddAbstractMember : IRule { private readonly RuleSettings _settings; - public CannotAddAbstractMember(RuleSettings settings, RuleRunnerContext context) + public CannotAddAbstractMember(RuleSettings settings, IRuleRegistrationContext context) { _settings = settings; // This rule should only run when not in strict mode. @@ -35,7 +35,11 @@ private void RunOnMemberMapperAction(ISymbol? left, ISymbol? right, ITypeSymbol // checking for member additions on interfaces is checked on its own rule. if (leftContainingType.TypeKind != TypeKind.Interface && !leftContainingType.IsEffectivelySealed(_settings.IncludeInternalSymbols)) { - differences.Add(new CompatDifference(DiagnosticIds.CannotAddAbstractMember, string.Format(Resources.CannotAddAbstractMember, right.ToDisplayString(), rightName, leftName), DifferenceType.Added, right)); + differences.Add(new CompatDifference( + DiagnosticIds.CannotAddAbstractMember, + string.Format(Resources.CannotAddAbstractMember, right.ToDisplayString(), rightName, leftName), + DifferenceType.Added, + right)); } } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddMemberToInterface.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddMemberToInterface.cs index 0a7620d30c61..a58650e6bcac 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddMemberToInterface.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddMemberToInterface.cs @@ -9,9 +9,9 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules { public class CannotAddMemberToInterface : IRule { - public CannotAddMemberToInterface(RuleSettings settings, RuleRunnerContext context) + public CannotAddMemberToInterface(RuleSettings settings, IRuleRegistrationContext context) { - // StrictMode scenario should be handled by MembersMustExist rule. + // StrictMode scenario are handled by the MembersMustExist rule. if (!settings.StrictMode) { context.RegisterOnMemberSymbolAction(RunOnMemberSymbol); @@ -34,7 +34,11 @@ private void RunOnMemberSymbol(ISymbol? left, ISymbol? right, string leftName, s // If there is a default implementation provided is not a breaking change to add an interface member. if (right.ContainingType.FindImplementationForInterfaceMember(right) == null) { - differences.Add(new CompatDifference(DiagnosticIds.CannotAddMemberToInterface, string.Format(Resources.CannotAddMemberToInterface, right.ToDisplayString(), rightName, leftName), DifferenceType.Added, right)); + differences.Add(new CompatDifference( + DiagnosticIds.CannotAddMemberToInterface, + string.Format(Resources.CannotAddMemberToInterface, right.ToDisplayString(), rightName, leftName), + DifferenceType.Added, + right)); } } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs index 1928aa384586..81f922b84a4f 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotAddOrRemoveVirtualKeyword.cs @@ -15,7 +15,7 @@ public class CannotAddOrRemoveVirtualKeyword : IRule { private readonly RuleSettings _settings; - public CannotAddOrRemoveVirtualKeyword(RuleSettings settings, RuleRunnerContext context) + public CannotAddOrRemoveVirtualKeyword(RuleSettings settings, IRuleRegistrationContext context) { _settings = settings; context.RegisterOnMemberSymbolAction(RunOnMemberSymbol); @@ -43,8 +43,10 @@ private void RunOnMemberSymbol(ISymbol? left, ISymbol? right, ITypeSymbol leftCo if (!right.IsVirtual) { differences.Add(new CompatDifference( - DiagnosticIds.CannotRemoveVirtualFromMember, string.Format( - Resources.CannotRemoveVirtualFromMember, left), DifferenceType.Removed, right)); + DiagnosticIds.CannotRemoveVirtualFromMember, + string.Format(Resources.CannotRemoveVirtualFromMember, left), + DifferenceType.Removed, + right)); } } // If the left member is not virtual, ensure that we're in strict mode. @@ -57,8 +59,10 @@ private void RunOnMemberSymbol(ISymbol? left, ISymbol? right, ITypeSymbol leftCo if (right.IsVirtual) { differences.Add(new CompatDifference( - DiagnosticIds.CannotAddVirtualToMember, string.Format( - Resources.CannotAddVirtualToMember, right), DifferenceType.Added, right)); + DiagnosticIds.CannotAddVirtualToMember, + string.Format(Resources.CannotAddVirtualToMember, right), + DifferenceType.Added, + right)); } } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotRemoveBaseTypeOrInterface.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotRemoveBaseTypeOrInterface.cs index f7598986eb2c..d09691755c8b 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotRemoveBaseTypeOrInterface.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotRemoveBaseTypeOrInterface.cs @@ -12,7 +12,7 @@ public class CannotRemoveBaseTypeOrInterface : IRule { private readonly RuleSettings _settings; - public CannotRemoveBaseTypeOrInterface(RuleSettings settings, RuleRunnerContext context) + public CannotRemoveBaseTypeOrInterface(RuleSettings settings, IRuleRegistrationContext context) { _settings = settings; context.RegisterOnTypeSymbolAction(RunOnTypeSymbol); @@ -68,10 +68,10 @@ private void ValidateBaseTypeNotRemoved(ITypeSymbol left, ITypeSymbol right, str } differences.Add(new CompatDifference( - DiagnosticIds.CannotRemoveBaseType, - string.Format(Resources.CannotRemoveBaseType, left.ToDisplayString(), leftBaseType.ToDisplayString(), rightName, leftName), - DifferenceType.Changed, - right)); + DiagnosticIds.CannotRemoveBaseType, + string.Format(Resources.CannotRemoveBaseType, left.ToDisplayString(), leftBaseType.ToDisplayString(), rightName, leftName), + DifferenceType.Changed, + right)); } private void ValidateInterfaceNotRemoved(ITypeSymbol left, ITypeSymbol right, string leftName, string rightName, IList differences) @@ -95,10 +95,10 @@ private void ValidateInterfaceNotRemoved(ITypeSymbol left, ITypeSymbol right, st if (!rightInterfaces.Contains(leftInterface)) { differences.Add(new CompatDifference( - DiagnosticIds.CannotRemoveBaseInterface, - string.Format(Resources.CannotRemoveBaseInterface, left.ToDisplayString(), leftInterface.ToDisplayString(), rightName, leftName), - DifferenceType.Changed, - right)); + DiagnosticIds.CannotRemoveBaseInterface, + string.Format(Resources.CannotRemoveBaseInterface, left.ToDisplayString(), leftInterface.ToDisplayString(), rightName, leftName), + DifferenceType.Changed, + right)); return; } } @@ -115,10 +115,10 @@ private void ValidateInterfaceNotRemoved(ITypeSymbol left, ITypeSymbol right, st private static void AddAssemblyLoadError(IList differences, ITypeSymbol type) { differences.Add(new CompatDifference( - DiagnosticIds.AssemblyReferenceNotFound, - string.Format(Resources.MatchingAssemblyNotFound, $"{type.ContainingAssembly.Name}.dll"), - DifferenceType.Changed, - string.Empty)); + DiagnosticIds.AssemblyReferenceNotFound, + string.Format(Resources.MatchingAssemblyNotFound, $"{type.ContainingAssembly.Name}.dll"), + DifferenceType.Changed, + string.Empty)); } } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotSealType.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotSealType.cs index aba573301d59..c5367304a9e7 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotSealType.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/CannotSealType.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; -using System.Runtime.CompilerServices; using Microsoft.CodeAnalysis; using Microsoft.DotNet.ApiCompatibility.Abstractions; using Microsoft.DotNet.ApiCompatibility.Extensions; @@ -13,7 +12,7 @@ public class CannotSealType : IRule { private readonly RuleSettings _settings; - public CannotSealType(RuleSettings settings, RuleRunnerContext context) + public CannotSealType(RuleSettings settings, IRuleRegistrationContext context) { _settings = settings; context.RegisterOnTypeSymbolAction(RunOnTypeSymbol); @@ -29,19 +28,23 @@ private void RunOnTypeSymbol(ITypeSymbol? left, ITypeSymbol? right, string leftN if (!isLeftSealed && isRightSealed) { - differences.Add(CreateDifference(right, leftName, rightName)); + differences.Add(new CompatDifference( + DiagnosticIds.CannotSealType, + string.Format(GetResourceStringForTypeState(right), right.ToDisplayString(), rightName, leftName), + DifferenceType.Changed, + right)); } else if (_settings.StrictMode && !isRightSealed && isLeftSealed) { - differences.Add(CreateDifference(left, rightName, leftName)); + differences.Add(new CompatDifference( + DiagnosticIds.CannotSealType, + string.Format(GetResourceStringForTypeState(left), left.ToDisplayString(), leftName, rightName), + DifferenceType.Changed, + left)); } } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private CompatDifference CreateDifference(ISymbol symbol, string leftName, string rightName) => - new(DiagnosticIds.CannotSealType, - string.Format(symbol.IsSealed ? Resources.TypeIsActuallySealed : Resources.TypeIsEffectivelySealed, symbol.ToDisplayString(), rightName, leftName), - DifferenceType.Changed, - symbol); + private static string GetResourceStringForTypeState(ISymbol symbol) => + symbol.IsSealed ? Resources.TypeIsActuallySealed : Resources.TypeIsEffectivelySealed; } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/EnumsMustMatch.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/EnumsMustMatch.cs index 50f77e7d3dbd..3bb80a7732be 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/EnumsMustMatch.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/EnumsMustMatch.cs @@ -15,7 +15,7 @@ public class EnumsMustMatch : IRule { private readonly RuleSettings _settings; - public EnumsMustMatch(RuleSettings settings, RuleRunnerContext context) + public EnumsMustMatch(RuleSettings settings, IRuleRegistrationContext context) { _settings = settings; context.RegisterOnTypeSymbolAction(RunOnTypeSymbol); @@ -41,40 +41,45 @@ private void RunOnTypeSymbol(ITypeSymbol? left, ITypeSymbol? right, string leftN return; } - // Check that the underlying types are equal. - if (_settings.SymbolComparer.Equals(leftType, rightType)) + // Check that the underlying types are equal and if not, emit a diagnostic. + if (!_settings.SymbolComparer.Equals(leftType, rightType)) { - // If so, compare their fields. - // Build a map of the enum's fields, keyed by the field names. - Dictionary leftMembers = left.GetMembers() - .Where(a => a.Kind == SymbolKind.Field) - .Select(a => (IFieldSymbol)a) - .ToDictionary(a => a.Name); - Dictionary rightMembers = right.GetMembers() - .Where(a => a.Kind == SymbolKind.Field) - .Select(a => (IFieldSymbol)a) - .ToDictionary(a => a.Name); + differences.Add(new CompatDifference( + DiagnosticIds.EnumTypesMustMatch, + string.Format(Resources.EnumTypesMustMatch, left.Name, leftType, rightType), + DifferenceType.Changed, + right)); + return; + } + + // If so, compare their fields. + // Build a map of the enum's fields, keyed by the field names. + Dictionary leftMembers = left.GetMembers() + .Where(a => a.Kind == SymbolKind.Field) + .Select(a => (IFieldSymbol)a) + .ToDictionary(a => a.Name); + Dictionary rightMembers = right.GetMembers() + .Where(a => a.Kind == SymbolKind.Field) + .Select(a => (IFieldSymbol)a) + .ToDictionary(a => a.Name); - // For each field that is present in the left and right, check that their constant values match. - // Otherwise, emit a diagnostic. - foreach (KeyValuePair lEntry in leftMembers) + // For each field that is present in the left and right, check that their constant values match. + // Otherwise, emit a diagnostic. + foreach (KeyValuePair lEntry in leftMembers) + { + if (!rightMembers.TryGetValue(lEntry.Key, out IFieldSymbol? rField)) { - if (!rightMembers.TryGetValue(lEntry.Key, out IFieldSymbol? rField)) - { - continue; - } - if (lEntry.Value.ConstantValue is not object lval || rField.ConstantValue is not object rval || !lval.Equals(rval)) - { - string msg = string.Format(Resources.EnumValuesMustMatch, left.Name, lEntry.Key, lEntry.Value.ConstantValue, rField.ConstantValue); - differences.Add(new CompatDifference(DiagnosticIds.EnumValuesMustMatch, msg, DifferenceType.Changed, rField)); - } + continue; + } + + if (lEntry.Value.ConstantValue is not object lval || rField.ConstantValue is not object rval || !lval.Equals(rval)) + { + differences.Add(new CompatDifference( + DiagnosticIds.EnumValuesMustMatch, + string.Format(Resources.EnumValuesMustMatch, left.Name, lEntry.Key, lEntry.Value.ConstantValue, rField.ConstantValue), + DifferenceType.Changed, + rField)); } - } - else - { - // Otherwise, emit a diagnostic. - string msg = string.Format(Resources.EnumTypesMustMatch, left.Name, leftType, rightType); - differences.Add(new CompatDifference(DiagnosticIds.EnumTypesMustMatch, msg, DifferenceType.Changed, right)); } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IRule.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRule.cs similarity index 67% rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IRule.cs rename to src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRule.cs index dfa3c7bcb1d1..f48a58f6534d 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IRule.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRule.cs @@ -1,12 +1,10 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Microsoft.DotNet.ApiCompatibility.Rules; - -namespace Microsoft.DotNet.ApiCompatibility.Abstractions +namespace Microsoft.DotNet.ApiCompatibility.Rules { /// - /// Interface for Rules to use in order to be discovered and instantiated by the + /// Interface for Rules to use in order to be discovered and instantiated by the /// public interface IRule { diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRuleContext.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRuleContext.cs new file mode 100644 index 000000000000..c17f07816778 --- /dev/null +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRuleContext.cs @@ -0,0 +1,62 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using Microsoft.CodeAnalysis; +using Microsoft.DotNet.ApiCompatibility.Abstractions; + +namespace Microsoft.DotNet.ApiCompatibility.Rules +{ + /// + /// Interface representing the context of the used to register and run rule actions. + /// + public interface IRuleContext : IRuleRegistrationContext, IRuleRunnerContext + { + } + + /// + /// Interface representing the context of the used to register rule actions. + /// This is provided to each rule when instantiating them to add events for the rules to be invoked. + /// + public interface IRuleRegistrationContext + { + /// + /// Registers a callback to invoke when two are compared. + /// + /// The action to invoke. + void RegisterOnAssemblySymbolAction(Action> action); + + /// + /// Registers a callback to invoke when two are compared. + /// + /// The action to invoke. + void RegisterOnTypeSymbolAction(Action> action); + + /// + /// Registers a callback to invoke when two members of a are compared. + /// + /// The action to invoke. + void RegisterOnMemberSymbolAction(Action> action); + + /// + /// Register a callback to invoke when two members of a + /// The action to register is invoked with the containing types for left and right. Sometimes this information + /// is needed by some rules regardless of left or right being null. + /// + /// The action to invoke + void RegisterOnMemberSymbolAction(Action> action); + } + + /// + /// Interface representing the context of the used to run registered rule actions. + /// + public interface IRuleRunnerContext + { + void RunOnAssemblySymbolActions(IAssemblySymbol? left, IAssemblySymbol? right, string leftName, string rightName, IList differences); + + void RunOnTypeSymbolActions(ITypeSymbol? left, ITypeSymbol? right, string leftName, string rightName, IList differences); + + void RunOnMemberSymbolActions(ISymbol? left, ISymbol? right, ITypeSymbol leftContainingType, ITypeSymbol rightContainingType, string leftName, string rightName, IList differences); + } +} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRuleFactory.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRuleFactory.cs new file mode 100644 index 000000000000..2199fe903554 --- /dev/null +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRuleFactory.cs @@ -0,0 +1,21 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; + +namespace Microsoft.DotNet.ApiCompatibility.Rules +{ + /// + /// Factory to create api comparison rules. + /// + public interface IRuleFactory + { + /// + /// Creates api copmarison rules based on the given settings and registers actions via the provided context. + /// + /// The rule settings. + /// The rule registration context that allows rules to register actions. + /// + IRule[] CreateRules(RuleSettings settings, IRuleRegistrationContext context); + } +} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IRuleRunner.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRuleRunner.cs similarity index 67% rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IRuleRunner.cs rename to src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRuleRunner.cs index d56d766ed0ae..bd0ed5759c45 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Abstractions/IRuleRunner.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/IRuleRunner.cs @@ -2,14 +2,21 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information.s using System.Collections.Generic; +using Microsoft.DotNet.ApiCompatibility.Abstractions; -namespace Microsoft.DotNet.ApiCompatibility.Abstractions +namespace Microsoft.DotNet.ApiCompatibility.Rules { /// - /// Interface for rule drivers to implement in order to be used returned by the + /// Rule runner interface that exposes functionality to initialize rules and run element mapper objects. /// public interface IRuleRunner { + /// + /// Initializes the rules provided by the based on given rule settings. + /// + /// The rule settings. + void InitializeRules(RuleSettings settings); + /// /// Runs the registered rules on the mapper. /// diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/MembersMustExist.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/MembersMustExist.cs index c7e5cd3918b2..010c7ad080b4 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/MembersMustExist.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/MembersMustExist.cs @@ -1,11 +1,10 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.DotNet.ApiCompatibility.Abstractions; using Microsoft.DotNet.ApiCompatibility.Extensions; -using System.Collections.Generic; -using System.Runtime.CompilerServices; namespace Microsoft.DotNet.ApiCompatibility.Rules { @@ -17,7 +16,7 @@ public class MembersMustExist : IRule { private readonly RuleSettings _settings; - public MembersMustExist(RuleSettings settings, RuleRunnerContext context) + public MembersMustExist(RuleSettings settings, IRuleRegistrationContext context) { _settings = settings; context.RegisterOnTypeSymbolAction(RunOnTypeSymbol); @@ -33,11 +32,19 @@ private void RunOnTypeSymbol(ITypeSymbol? left, ITypeSymbol? right, string leftN { if (left != null && right == null) { - differences.Add(CreateDifference(left, DiagnosticIds.TypeMustExist, DifferenceType.Removed, Resources.TypeExistsOnLeft, leftName, rightName)); + differences.Add(new CompatDifference( + DiagnosticIds.TypeMustExist, + string.Format(Resources.TypeExistsOnLeft, left.ToDisplayString(), leftName, rightName), + DifferenceType.Removed, + left)); } else if (_settings.StrictMode && left == null && right != null) { - differences.Add(CreateDifference(right, DiagnosticIds.TypeMustExist, DifferenceType.Added, Resources.TypeExistsOnRight, leftName, rightName)); + differences.Add(new CompatDifference( + DiagnosticIds.TypeMustExist, + string.Format(Resources.TypeExistsOnRight, right.ToDisplayString(), leftName, rightName), + DifferenceType.Added, + right)); } } @@ -52,22 +59,26 @@ private void RunOnMemberSymbol(ISymbol? left, ISymbol? right, ITypeSymbol leftCo { if (ShouldReportMissingMember(left, rightContainingType)) { - differences.Add(CreateDifference(left, DiagnosticIds.MemberMustExist, DifferenceType.Removed, Resources.MemberExistsOnLeft, leftName, rightName)); + differences.Add(new CompatDifference( + DiagnosticIds.MemberMustExist, + string.Format(Resources.MemberExistsOnLeft, left.ToDisplayString(), leftName, rightName), + DifferenceType.Removed, + left)); } } else if (_settings.StrictMode && left == null && right != null) { if (ShouldReportMissingMember(right, leftContainingType)) { - differences.Add(CreateDifference(right, DiagnosticIds.MemberMustExist, DifferenceType.Added, Resources.MemberExistsOnRight, leftName, rightName)); + differences.Add(new CompatDifference( + DiagnosticIds.MemberMustExist, + string.Format(Resources.MemberExistsOnRight, right.ToDisplayString(), leftName, rightName), + DifferenceType.Added, + right)); } } } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static CompatDifference CreateDifference(ISymbol symbol, string id, DifferenceType type, string format, string leftName, string rightName) => - new(id, string.Format(format, symbol.ToDisplayString(), leftName, rightName), type, symbol); - private static bool ShouldReportMissingMember(ISymbol symbol, ITypeSymbol containingType) { // Events and properties are handled via their accessors. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleRunnerContext.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleContext.cs similarity index 62% rename from src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleRunnerContext.cs rename to src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleContext.cs index 3725880a0c31..a01f64c76c57 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleRunnerContext.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleContext.cs @@ -9,54 +9,41 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules { /// - /// Class representing the context of the used to run the rules. - /// This is provided to each rule when initializing them to add events for the rules to be invoked. + /// Class representing the context of the used to register and run rule actions. /// - public class RuleRunnerContext + public class RuleContext : IRuleContext { private readonly List>> _onAssemblySymbolActions = new(); private readonly List>> _onTypeSymbolActions = new(); private readonly List>> _onMemberSymbolActions = new(); private readonly List>> _onMemberSymbolWithContainingTypeActions = new(); - /// - /// Registers a callback to invoke when two are compared. - /// - /// The action to invoke. + /// /> public void RegisterOnAssemblySymbolAction(Action> action) { _onAssemblySymbolActions.Add(action); } - /// - /// Registers a callback to invoke when two are compared. - /// - /// The action to invoke. + /// /> public void RegisterOnTypeSymbolAction(Action> action) { _onTypeSymbolActions.Add(action); } - /// - /// Registers a callback to invoke when two members of a are compared. - /// - /// The action to invoke. + /// /> public void RegisterOnMemberSymbolAction(Action> action) { _onMemberSymbolActions.Add(action); } - /// - /// Register a callback to invoke when two members of a - /// The action to register is invoked with the containing types for left and right. Sometimes this information - /// is needed by some rules regardless of left or right being null. - /// - /// The action to invoke + + /// /> public void RegisterOnMemberSymbolAction(Action> action) { _onMemberSymbolWithContainingTypeActions.Add(action); } - internal void RunOnAssemblySymbolActions(IAssemblySymbol? left, IAssemblySymbol? right, string leftName, string rightName, List differences) + /// /> + public void RunOnAssemblySymbolActions(IAssemblySymbol? left, IAssemblySymbol? right, string leftName, string rightName, IList differences) { foreach (Action> action in _onAssemblySymbolActions) { @@ -64,7 +51,8 @@ internal void RunOnAssemblySymbolActions(IAssemblySymbol? left, IAssemblySymbol? } } - internal void RunOnTypeSymbolActions(ITypeSymbol? left, ITypeSymbol? right, string leftName, string rightName, List differences) + /// /> + public void RunOnTypeSymbolActions(ITypeSymbol? left, ITypeSymbol? right, string leftName, string rightName, IList differences) { foreach (Action> action in _onTypeSymbolActions) { @@ -72,7 +60,8 @@ internal void RunOnTypeSymbolActions(ITypeSymbol? left, ITypeSymbol? right, stri } } - internal void RunOnMemberSymbolActions(ISymbol? left, ISymbol? right, ITypeSymbol leftContainingType, ITypeSymbol rightContainingType, string leftName, string rightName, List differences) + /// /> + public void RunOnMemberSymbolActions(ISymbol? left, ISymbol? right, ITypeSymbol leftContainingType, ITypeSymbol rightContainingType, string leftName, string rightName, IList differences) { foreach (Action> action in _onMemberSymbolActions) { diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleFactory.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleFactory.cs new file mode 100644 index 000000000000..a4dd2d3d0c80 --- /dev/null +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleFactory.cs @@ -0,0 +1,27 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.DotNet.ApiCompatibility.Rules +{ + /// + /// The default rule factory that returns all available rules with the given input settings. + /// + public class RuleFactory : IRuleFactory + { + /// + public IRule[] CreateRules(RuleSettings settings, IRuleRegistrationContext context) + { + return new IRule[] + { + new AssemblyIdentityMustMatch(settings, context), + new CannotAddAbstractMember(settings, context), + new CannotAddMemberToInterface(settings, context), + new CannotAddOrRemoveVirtualKeyword(settings, context), + new CannotRemoveBaseTypeOrInterface(settings, context), + new CannotSealType(settings, context), + new EnumsMustMatch(settings, context), + new MembersMustExist(settings, context) + }; + } + } +} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleLocator.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleLocator.cs deleted file mode 100644 index c76cca26a979..000000000000 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleLocator.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System.Collections.Generic; -using Jab; -using Microsoft.DotNet.ApiCompatibility.Abstractions; - -namespace Microsoft.DotNet.ApiCompatibility.Rules -{ - [ServiceProvider(RootServices = new[] { typeof(IEnumerable) })] - [Singleton(typeof(RuleSettings), Instance = nameof(RuleSettings))] - [Singleton(typeof(RuleRunnerContext), Instance = nameof(RuleRunnerContext))] - [Singleton(typeof(IRule), typeof(AssemblyIdentityMustMatch))] - [Singleton(typeof(IRule), typeof(CannotAddAbstractMember))] - [Singleton(typeof(IRule), typeof(CannotAddMemberToInterface))] - [Singleton(typeof(IRule), typeof(CannotAddOrRemoveVirtualKeyword))] - [Singleton(typeof(IRule), typeof(CannotRemoveBaseTypeOrInterface))] - [Singleton(typeof(IRule), typeof(CannotSealType))] - [Singleton(typeof(IRule), typeof(EnumsMustMatch))] - [Singleton(typeof(IRule), typeof(MembersMustExist))] - internal partial class RuleLocator - { - public readonly RuleRunnerContext RuleRunnerContext; - public readonly RuleSettings RuleSettings; - - public RuleLocator(RuleRunnerContext ruleRunnerContext, RuleSettings ruleSettings) - { - RuleRunnerContext = ruleRunnerContext; - RuleSettings = ruleSettings; - } - } -} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleRunner.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleRunner.cs index ac1fc95d1c6e..81df8a613b2a 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleRunner.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleRunner.cs @@ -1,32 +1,38 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information.s +using System; +using System.Collections.Generic; +using System.Diagnostics; using Microsoft.CodeAnalysis; using Microsoft.DotNet.ApiCompatibility.Abstractions; -using System.Collections.Generic; namespace Microsoft.DotNet.ApiCompatibility.Rules { + /// + /// Rule runner that exposes functionality to initialize rules and run element mapper objects. + /// public class RuleRunner : IRuleRunner { - private readonly RuleRunnerContext _context; - private readonly RuleSettings _settings; - private readonly string _leftName; - private readonly string[] _rightNames; - internal const string DEFAULT_LEFT_NAME = "left"; - internal const string DEFAULT_RIGHT_NAME = "right"; + private readonly IRuleContext _context; + private readonly IRuleFactory _ruleFactory; + private const string DEFAULT_LEFT_NAME = "left"; + private const string DEFAULT_RIGHT_NAME = "right"; - internal RuleRunner(string leftName, string[] rightNames, bool strictMode, IEqualityComparer symbolComparer, bool includeInternalSymbols, bool withReferences) + public RuleRunner(IRuleFactory ruleFactory, IRuleContext context) { - _context = new RuleRunnerContext(); - _settings = new RuleSettings(strictMode, symbolComparer, includeInternalSymbols, withReferences); - _leftName = leftName; - _rightNames = rightNames; + _ruleFactory = ruleFactory; + _context = context; + } - // Initialize registered rules but don't invoke anything on them as they register themselves on "events" inside their constructor. - new RuleLocator(_context, _settings).GetService>(); + /// + public void InitializeRules(RuleSettings settings) + { + // Instantiate the rules but don't invoke anything on them as they register themselves on "events" inside their constructor. + _ = _ruleFactory.CreateRules(settings, _context); } + /// public IReadOnlyList> Run(ElementMapper mapper) { int rightLength = mapper.Right.Length; @@ -34,30 +40,48 @@ public IReadOnlyList> Run(ElementMapper mapp for (int rightIndex = 0; rightIndex < rightLength; rightIndex++) { - string leftName = _leftName; - string rightName = rightIndex < _rightNames.Length ? _rightNames[rightIndex] : DEFAULT_RIGHT_NAME; List differences = new(); if (mapper is AssemblyMapper am) { - _context.RunOnAssemblySymbolActions(am.Left, am.Right[rightIndex], leftName, rightName, differences); + _context.RunOnAssemblySymbolActions(am.Left?.Element, + am.Right[rightIndex]?.Element, + GetAssemblyName(am.Left, ElementSide.Left), + GetAssemblyName(am.Right[rightIndex], ElementSide.Right), + differences); } else if (mapper is TypeMapper tm) { if (tm.ShouldDiffElement(rightIndex)) - _context.RunOnTypeSymbolActions(tm.Left, tm.Right[rightIndex], leftName, rightName, differences); + { + _context.RunOnTypeSymbolActions(tm.Left, + tm.Right[rightIndex], + GetAssemblyName(tm.ContainingNamespace.ContainingAssembly.Left, ElementSide.Left), + GetAssemblyName(tm.ContainingNamespace.ContainingAssembly.Right[rightIndex], ElementSide.Right), + differences); + } } else if (mapper is MemberMapper mm) { if (mm.ShouldDiffElement(rightIndex)) + { + // ContainingType Left and Right cannot be null, as otherwise, the above condition would be false. + Debug.Assert(mm.ContainingType.Left != null); + Debug.Assert(mm.ContainingType.Right[rightIndex] != null); + _context.RunOnMemberSymbolActions( mm.Left, mm.Right[rightIndex], - mm.ContainingType.Left, - mm.ContainingType.Right[rightIndex], - leftName, - rightName, + mm.ContainingType.Left!, + mm.ContainingType.Right[rightIndex]!, + GetAssemblyName(mm.ContainingType.ContainingNamespace.ContainingAssembly.Left, ElementSide.Left), + GetAssemblyName(mm.ContainingType.ContainingNamespace.ContainingAssembly.Right[rightIndex], ElementSide.Right), differences); + } + } + else + { + throw new ArgumentOutOfRangeException(nameof(mapper)); } result[rightIndex] = differences; @@ -65,5 +89,17 @@ public IReadOnlyList> Run(ElementMapper mapp return result; } + + private static string GetAssemblyName(ElementContainer? assemblyContainer, ElementSide side) => + side switch + { + ElementSide.Left => string.IsNullOrEmpty(assemblyContainer?.MetadataInformation.DisplayString) ? + DEFAULT_LEFT_NAME : + assemblyContainer!.MetadataInformation.DisplayString, + ElementSide.Right => string.IsNullOrEmpty(assemblyContainer?.MetadataInformation.DisplayString) ? + DEFAULT_RIGHT_NAME : + assemblyContainer!.MetadataInformation.DisplayString, + _ => throw new ArgumentOutOfRangeException(nameof(side)), + }; } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleRunnerFactory.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleRunnerFactory.cs deleted file mode 100644 index 932d9ff48383..000000000000 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleRunnerFactory.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information.s - -using System; -using System.Collections.Generic; -using Microsoft.CodeAnalysis; -using Microsoft.DotNet.ApiCompatibility.Abstractions; - -namespace Microsoft.DotNet.ApiCompatibility.Rules -{ - public class RuleRunnerFactory - { - private readonly Lazy _runner; - - public RuleRunnerFactory(string? leftName, string[]? rightNames, IEqualityComparer equalityComparer, bool includeInternalSymbols, bool strictMode, bool withReferences) - { - if (string.IsNullOrEmpty(leftName)) - leftName = RuleRunner.DEFAULT_LEFT_NAME; - - rightNames ??= new string[] { RuleRunner.DEFAULT_RIGHT_NAME }; - if (rightNames.Length == 0) - { - throw new ArgumentException(Resources.RightNamesAtLeastOne, nameof(rightNames)); - } - - for (int i = 0; i < rightNames.Length; i++) - { - if (string.IsNullOrEmpty(rightNames[i])) - { - rightNames[i] = RuleRunner.DEFAULT_RIGHT_NAME; - } - } - - _runner = new Lazy(() => new RuleRunner(leftName!, rightNames, strictMode, equalityComparer, includeInternalSymbols, withReferences)); - } - - public virtual IRuleRunner GetRuleRunner() - { - return _runner.Value; - } - } -} diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleSettings.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleSettings.cs index a223190fa6e0..05b21b5a963a 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleSettings.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules/RuleSettings.cs @@ -6,22 +6,43 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules { - public class RuleSettings + /// + /// General rule settings that are passed to the rules. + /// + public readonly struct RuleSettings { - public bool StrictMode { get; } + /// + /// Flag indicating whether api comparison should be performed in strict mode. + /// If true, the behavior of some rules will change and some other rules will be + /// executed when getting the differences. This is useful when both sides's surface area + /// which are compared, should not differ. + /// + public readonly bool StrictMode; - public IEqualityComparer SymbolComparer { get; } + /// + /// Determines if internal members should be validated. + /// + public readonly bool IncludeInternalSymbols; - public bool IncludeInternalSymbols { get; } + /// + /// If true, references are available. Necessary to know for following type forwards. + /// + public readonly bool WithReferences; - public bool WithReferences { get; } + /// + /// The symbol comparer to check for equality of a given left and right. + /// + public readonly IEqualityComparer SymbolComparer; - public RuleSettings(bool strictMode, IEqualityComparer symbolComparer, bool includeInternalSymbols, bool withReferences) + public RuleSettings(bool strictMode = false, + bool includeInternalSymbols = false, + bool withReferences = false, + IEqualityComparer? symbolComparer = null) { StrictMode = strictMode; - SymbolComparer = symbolComparer; IncludeInternalSymbols = includeInternalSymbols; WithReferences = withReferences; + SymbolComparer = symbolComparer ?? new DefaultSymbolsEqualityComparer(); } } } diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Runner/ApiCompatRunner.cs b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Runner/ApiCompatRunner.cs index 3b3dd3a3172f..0ccf88fbb8f8 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Runner/ApiCompatRunner.cs +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Runner/ApiCompatRunner.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; using System.Collections.Generic; using System.IO; using Microsoft.CodeAnalysis; using Microsoft.DotNet.ApiCompatibility.Abstractions; using Microsoft.DotNet.ApiCompatibility.Logging; +using Microsoft.DotNet.ApiCompatibility.Rules; namespace Microsoft.DotNet.ApiCompatibility.Runner { @@ -91,9 +91,9 @@ public void ExecuteWorkItems() continue; // Create and configure the work item specific api comparer - IApiComparer apiComparer = _apiComparerFactory.Create(); - apiComparer.StrictMode = workItem.Options.EnableStrictMode; - apiComparer.WarnOnMissingReferences = runWithReferences; + IApiComparer apiComparer = _apiComparerFactory.Create(new ApiComparerSettings( + strictMode: workItem.Options.EnableStrictMode, + withReferences: runWithReferences)); // TODO: Support passing in multiple lefts in ApiComparer: https://github.com/dotnet/sdk/issues/17364. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf index 27737962fda2..1d2b3e73d01b 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.cs.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + Spouští se pracovní položky ({0})... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + Provedlo se ověření rozhraní API pro {0} ({2}) a {1} ({3}). API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + Chyby kompatibility rozhraní API mezi {0} ({2}) a {1} ({3}): Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + Nepovedlo se načíst symboly sestavení pro {0}. Sestavení se přeskočí. @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + Do člena {0} nelze přidat virtuální klíčové slovo. @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + Nelze odebrat virtuální klíčové slovo ze člena {0}. @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + Element by neměl mít hodnotu null. V indexu byla nalezena hodnota null: {0}. Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + Základní typ výčtu{0}se změnil z {1} na {2}. Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + Hodnota pole {1} ve výčtu {0} se změnila z {2} na {3}. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf index 792822a102fd..a16a19b9c928 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.de.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + {0} Arbeitselement(e) wird/werden ausgeführt... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + API-Überprüfung für „{0}“ ({2}) und „{1}“ ({3}) wurde durchgeführt. API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + API-Kompatibilitätsfehler zwischen „{0}“ ({2}) und „{1}“ ({3}): Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + Die Assemblysymbole für „{0}“ konnten nicht geladen werden. Assembly wird übersprungen. @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + Das virtuelle Schlüsselwort kann dem Member „{0}“ nicht hinzugefügt werden. @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + Das virtuelle Schlüsselwort kann nicht aus dem Member „{0}“ entfernt werden. @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + Das Element darf nicht NULL sein. NULL gefunden bei Index: {0}. Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + Der zugrunde liegende Typ der Enumeration „{0}“ wurde von „{1}“ in „{2}“ geändert. Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + Wert des Felds „{1}2 in der Enumeration „{0}2 wurde von „{2}“ in „{3}“ geändert. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf index 40f6d2b16d2b..d548d015f6cc 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.es.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + Ejecutando {0} elemento(s) de trabajo.... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + Se realizó la validación de API en "{0}" ({2}) y "{1}" ({3}). API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + Errores de compatibilidad de API entre "{0}" ({2}) y "{1}" ({3}): Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + No se pudieron cargar los símbolos de ensamblado para "{0}". Omitiendo el ensamblado. @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + No se puede agregar la palabra clave virtual al miembro "{0}". @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + No se puede quitar la palabra clave virtual del miembro "{0}". @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + El elemento no debe ser nulo. Se encontró un valor nulo en el índice: {0}. Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + El tipo subyacente de la enumeración "{0}" ha cambiado de "{1}" a "{2}". Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + El valor del campo "{1}" en la enumeración "{0}" ha cambiado de "{2}" a "{3}". diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf index 17cd2a3b3880..907deea43ba9 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.fr.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + Exécution {0} d'élément(s) de travail... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + Validation de l’API effectuée sur '{0}' ({2}) et '{1}' ({3}) API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + Erreurs de compatibilité des API entre '{0}' ({2}) et '{1}' ({3}) : Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + Nous n’avons pas pu charger les symboles d’assembly pour '{0}'. Assembly ignoré. @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + Impossible d'ajouter le mot-clé virtuel au membre '{0}'. @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + Impossible de supprimer le mot-clé virtuel du membre '{0}'. @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + L’élément ne doit pas être null. Null trouvé à l’index : {0}. Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + Le type sous-jacent d'énumération '{0}' est passé de '{1}' à '{2}'. Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + La valeur du champ '{1}' dans l'énumération '{0}' est passée de '{2}' à '{3}'. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf index 179ddfe3273d..a70435d08fc1 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.it.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + Esecuzione {0} elementi di lavoro in corso... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + Convalida API eseguita su '{0}' ({2}) e '{1}' ({3}). API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + Errori di compatibilità dell'API tra '{0}' ({2}) e '{1}' ({3}): Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + Non è stato possibile caricare i simboli di assembly per '{0}'. L'assembly verrà ignorato. @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + Non è possibile aggiungere la parola chiave virtuale nel membro '{0}'. @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + Non è possibile rimuovere la parola chiave virtuale dal membro '{0}'. @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + L'elemento non deve essere null. Trovato valore null all'indice: {0}. Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + Il tipo sottostante dell'enumerazione '{0}' è stato modificato da '{1}' a '{2}'. Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + Il valore del campo '{1}' nell'enumerazione '{0}' è stato modificato da '{2}' a '{3}'. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf index 2c594e6571ce..bd60a75f06bc 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ja.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + {0} 件の作業項目を移動しています... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + '{0}' ({2}) と '{1}' ({3}) に API 検証を実行しました。 API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + '{0}' ({2}) と '{1}' ({3}) の API 互換性エラーは、以下のとおりです。 Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + '{0}' のアセンブリ シンボルを読み込めませんでした。アセンブリをスキップしています。 @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + メンバー '{0}' に仮想キーワードを追加できません。 @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + メンバー '{0}' から仮想キーワードを削除できません。 @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + 要素を null にすることはできません。インデックスに null が見つかりました: {0}。 Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + 基になる列挙型 '{0}' が '{1}' から '{2}' に変更されました。 Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + 列挙型 '{0}' のフィールド '{1}' の値が '{2}' から '{3}' に変更されました。 diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf index f5092d42a257..df5eba30ba8c 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ko.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + {0} 작업 항목을 실행하는 중... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + '{0}'({2}) 및 '{1}'({3})에서 API 유효성 검사를 수행했습니다. API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + '{0}'({2}) 및 '{1}'({3}) 사이의 API 호환성 오류: Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + '{0}'에 대한 어셈블리 기호를 로드할 수 없습니다. 어셈블리를 건너뛰는 중입니다. @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + '{0}' 구성원에 가상 키워드를 추가할 수 없습니다. @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + 구성원 '{0}'에서 가상 키워드를 제거할 수 없습니다. @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + 요소는 Null이 아니어야 합니다. 인덱스 {0}에 Null이 있습니다. Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + 열거형 '{0}'의 기본 유형이 '{1}'에서 '{2}'(으)로 변경되었습니다. Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + 열거형 '{0}'의 필드 '{1}' 값이 '{2}'에서 '{3}'(으)로 변경되었습니다. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf index d8d21a3b189a..2f4ec47daf8f 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pl.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + Trwa wykonywanie następującej liczby elementów roboczych: {0} Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + Wykonano weryfikację interfejsu API dla elementu „{0}” ({2}) i „{1}” ({3}). API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + Błędy zgodności interfejsu API między elementem „{0}” ({2}) i „{1}” ({3}): Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + Nie można załadować symboli zestawu dla elementu „{0}”. Pomijanie zestawu. @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + Nie można dodać wirtualnego słowa kluczowego do składowej „{0}”. @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + Nie można usunąć wirtualnego słowa kluczowego z składowej „{0}”. @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + Element nie może mieć wartości null. Znaleziono wartość null w indeksie: {0}. Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + Bazowy typ wyliczenia „{0}” został zmieniony z „{1}” na „{2}”. Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + Wartość pola „{1}” w wyliczeniu „{0}” zmieniona z „{2}” na „{3}”. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf index a01118deab47..c1ea8179ad40 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.pt-BR.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + Executando {0} item(ns) de trabalho... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + Validação de API realizada em '{0}' ({2}) e ​​'{1}' ({3}). API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + Erros de compatibilidade de API entre '{0}' ({2}) e ​​'{1}' ({3}): Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + Não foi possível carregar símbolos de montagem para '{0}'. Ignorando a montagem. @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + Não é possível adicionar palavra-chave virtual ao membro '{0}'. @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + Não é possível remover a palavra-chave virtual do membro '{0}'. @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + O elemento não deve ser nulo. Nulo encontrado no índice: {0}. Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + Tipo subjacente de enum '{0}' alterado de '{1}' para '{2}'. Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + Valor do campo '{1}' na enumeração '{0}' alterado de '{2}' para '{3}'. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf index 597ad3c1d415..0fb484adfc6b 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.ru.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + Выполнение рабочих элементов:{0}.... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + Выполнена проверка API для "{0}" ({2} ) и "{1}" ({3}). API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + Ошибки совместимости API между "{0}" ({2} >) и "{1}" ({3}): Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + Не удалось загрузить символы сборки для "{0}". Сборка пропускается. @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + Не удается добавить виртуальную клавиатуру в элемент "{0}". @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + Не удается удалить виртуальное ключевое слово из элемента "{0}". @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + Элемент не должен иметь значение NULL. Обнаружено значение NULL в индексе: {0}. Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + Базовый тип перечисления "{0}" изменен с "{1}" на "{2}". Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + Значение поля "{1}" в перечислении "{0}" изменено с "{2}" на "{3}". diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf index a74bba5fa961..989bbb9b9b08 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.tr.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + {0} iş öğesi yürütülüyor... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + '{0}' ({2}) ve '{1}' ({3}) üzerinde API doğrulaması gerçekleştirildi. API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + '{0}' ({2}) ile '{1}' ({3}) arasında API uyumluluğu hataları var: Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + '{0}' için bütünleştirilmiş kod sembolleri yüklenemedi. Bütünleştirilmiş kod atlanıyor. @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + Sanal anahtar sözcük, '{0}' üyesine eklenemiyor. @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + Sanal anahtar sözcük, '{0}' üyesinden kaldırılamıyor. @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + Öğe null olmamalıdır. Dizinde null bulundu: {0}. Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + Temel alınan '{0}' sabit listesi türü, '{1}' öğesinden '{2}' öğesine değiştirildi. Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + '{0}' sabit listesindeki '{1}' alan değeri, '{2}' öğesinden '{3}' öğesine değiştirildi. diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf index 95baa9a6028d..115cc2dc7e56 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hans.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + 正在执行 {0} 工作项... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + 已对“{0}”({2})和“{1}”({3})执行 API 验证。 API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + “{0}”({2})和“{1}”({3})之间的 API 兼容性错误: Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + 无法加载“{0}”的程序集符号。正在跳过程序集。 @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + 无法将虚拟关键字添加到成员“{0}”。 @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + 无法从成员“{0}”中删除虚拟关键字。 @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + 元素不应为 null。在索引 {0} 找到 null。 Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + 枚举“{0}”的基础类型已从“{1}”更改为“{2}”。 Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + 枚举“{0}”中字段“{1}”的值已从“{2}”更改为“{3}”。 diff --git a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf index 7c5e8fc01094..a689d16dddcd 100644 --- a/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf +++ b/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/xlf/Resources.zh-Hant.xlf @@ -4,22 +4,22 @@ Executing {0} work item(s)... - Executing {0} work item(s)... + 正在執行 {0} 工作項目... Performed api validation on '{0}' ({2}) and '{1}' ({3}). - Performed api validation on '{0}' ({2}) and '{1}' ({3}). + 已在 '{0}' ({2}) 與 '{1}' ({3}) 上執行 API 驗證。 API compatibility errors between '{0}' ({2}) and '{1}' ({3}): - API compatibility errors between '{0}' ({2}) and '{1}' ({3}): + '{0}' ({2}) 與 '{1}' ({3}) 之間的 API 相容性錯誤: Could not load assembly symbols for '{0}'. Skipping the assembly. - Could not load assembly symbols for '{0}'. Skipping the assembly. + 無法載入 '{0}' 的組件符號。正在略過組件。 @@ -69,7 +69,7 @@ Cannot add virtual keyword to member '{0}'. - Cannot add virtual keyword to member '{0}'. + 無法將虛擬關鍵字新增至成員 '{0}'。 @@ -84,7 +84,7 @@ Cannot remove virtual keyword from member '{0}'. - Cannot remove virtual keyword from member '{0}'. + 無法從成員 '{0}' 移除虛擬關鍵字。 @@ -94,17 +94,17 @@ Element should not be null. Found null at index: {0}. - Element should not be null. Found null at index: {0}. + 元素不應為 Null。在索引找到 Null: {0}。 Underlying type of enum '{0}' changed from '{1}' to '{2}'. - Underlying type of enum '{0}' changed from '{1}' to '{2}'. + 列舉 '{0}' 的基礎類型已從 '{1}' 變更為 '{2}'。 Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. - Value of field '{1}' in enum '{0}' changed from '{2}' to '{3}'. + 列舉 '{1}' 中的欄位 '{0}' 值已從 '{2}' 變更為 '{3}'。 diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.cs.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.cs.xlf index e21fc21e9f73..6722505270cc 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.cs.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.cs.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + Při načítání {1} se nepovedlo najít referenční adresář v zadaných adresářích pro TargetFramework {0}. Další informace najdete zde: https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.de.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.de.xlf index 02da4161767e..6688aea7a055 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.de.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.de.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + In den bereitgestellten Verzeichnissen für TargetFramework „{0}“ wurde beim Laden von „{1}“kein Referenzverzeichnis gefunden. Weitere Informationen finden Sie unter https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.es.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.es.xlf index 2115a81f6614..f686a822cc1f 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.es.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.es.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + No se ha encontrado un directorio de referencia en los directorios proporcionados para TargetFramework '{0}' al cargar '{1}'. Para obtener más información, consulte: https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.fr.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.fr.xlf index 86e6569e2915..822f0ba4ef79 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.fr.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.fr.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + Répertoire de référence introuvable dans les répertoires fournis pour le « {0} » pour le chargement de « {1} ». Pour plus d’informations, consultez : https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.it.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.it.xlf index 2b754f6a53dd..8232974176d0 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.it.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.it.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + Non è stato possibile trovare una directory di riferimento nelle directory fornite per TargetFramework '{0}' durante il caricamento di '{1}'. Per altre informazioni, vedere: https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ja.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ja.xlf index 8f63df3dda29..0afded39779e 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ja.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ja.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + '{1}' を読み込むときに、TargetFramework '{0}' 用に指定されたディレクトリで参照ディレクトリが見つかりませんでした。詳細については、以下を参照してください: https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ko.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ko.xlf index 22fee7182854..94a3a72703fe 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ko.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ko.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + '{1}'을(를) 로드할 때 TargetFramework '{0}'에 대해 제공된 디렉터리에서 참조 디렉터리를 찾을 수 없습니다. 자세한 내용은 다음을 참조하세요. https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.pl.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.pl.xlf index 470e5f7f5a96..a875ef83e2f5 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.pl.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.pl.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + Nie można odnaleźć katalogu referencyjnego w podanych katalogach dla elementu TargetFramework „{0}” podczas ładowania elementu „{1}”. Aby uzyskać więcej informacji, zobacz: https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.pt-BR.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.pt-BR.xlf index c5e19f8e29fe..7684ce0fe71e 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.pt-BR.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.pt-BR.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + Não foi possível encontrar um diretório de referência nos diretórios fornecidos para TargetFramework '{0}' ao carregar '{1}'. Para obter mais informações, consulte: https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ru.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ru.xlf index e8f7e2a67ab7..59825e7528bb 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ru.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.ru.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + Не удалось найти справочный каталог в указанных каталогах для TargetFramework "{0}" при загрузке "{1}". Дополнительные сведения см. по адресу: https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.tr.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.tr.xlf index ae92e1907e98..1fd09a60d13a 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.tr.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.tr.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + '{1}' yüklenirken '{0}' TargetFramework için sağlanan dizinlerde başvuru dizini bulunamadı. Daha fazla bilgi için bkz. https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.zh-Hans.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.zh-Hans.xlf index 005f3e2ed3ec..a4562f21cf38 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.zh-Hans.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.zh-Hans.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + 加载“{1}”时,在提供的目录中找不到 TargetFramework“{0}”的引用目录。有关详细信息,请参阅 https://aka.ms/dotnetpackagevalidation diff --git a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.zh-Hant.xlf b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.zh-Hant.xlf index f11909eb0e1a..a6f5bd734b89 100644 --- a/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.zh-Hant.xlf +++ b/src/ApiCompat/Microsoft.DotNet.PackageValidation/xlf/Resources.zh-Hant.xlf @@ -14,7 +14,7 @@ Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation - Could not find a reference directory in the provided directories for TargetFramework '{0}' when loading '{1}'. For more information see: https://aka.ms/dotnetpackagevalidation + 載入 '{1}' 時,無法在提供的 TargetFramework '{0}' 目錄中找到參考目錄。如需詳細資訊,請參閱: https://aka.ms/dotnetpackagevalidation diff --git a/src/Assets/TestPackages/dotnet-new/test_templates/TemplateWithConditions/nuget.config b/src/Assets/TestPackages/dotnet-new/test_templates/TemplateWithConditions/nuget.config index 70125a73910d..bd3045ae46ab 100644 --- a/src/Assets/TestPackages/dotnet-new/test_templates/TemplateWithConditions/nuget.config +++ b/src/Assets/TestPackages/dotnet-new/test_templates/TemplateWithConditions/nuget.config @@ -2,8 +2,12 @@ foo - + bar -#endif --> + baz + + + + diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/Interop.cs b/src/Cli/Microsoft.DotNet.Cli.Utils/Interop.cs index 3885bac59461..6986fca46489 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/Interop.cs +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/Interop.cs @@ -72,59 +72,4 @@ interface IEnumString [MethodImpl(MethodImplOptions.InternalCall)] void Clone([MarshalAs(UnmanagedType.Interface)] out IEnumString ppenum); } - - // Decompiled from WUA typelib - [ComImport] - [Guid("ADE87BF7-7B56-4275-8FAB-B9B0E591844B")] - [TypeLibType(4304)] - public interface ISystemInformation - { - [DispId(1610743809)] - string OemHardwareSupportLink - { - [MethodImpl(MethodImplOptions.InternalCall)] - [DispId(1610743809)] - [return: MarshalAs(UnmanagedType.BStr)] - get; - } - - [DispId(1610743810)] - bool RebootRequired - { - [MethodImpl(MethodImplOptions.InternalCall)] - [DispId(1610743810)] - get; - } - } - - [ComImport] - [Guid("ADE87BF7-7B56-4275-8FAB-B9B0E591844B")] - [CoClass(typeof(SystemInformationClass))] - public interface SystemInformation : ISystemInformation - { - } - - [ComImport] - [Guid("C01B9BA0-BEA7-41BA-B604-D0A36F469133")] - [TypeLibType(2)] - [ClassInterface(ClassInterfaceType.None)] - public class SystemInformationClass : ISystemInformation, SystemInformation - { - [DispId(1610743809)] - public extern virtual string OemHardwareSupportLink - { - [MethodImpl(MethodImplOptions.InternalCall)] - [DispId(1610743809)] - [return: MarshalAs(UnmanagedType.BStr)] - get; - } - - [DispId(1610743810)] - public extern virtual bool RebootRequired - { - [MethodImpl(MethodImplOptions.InternalCall)] - [DispId(1610743810)] - get; - } - } } diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildPropertyParser.cs b/src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildPropertyParser.cs new file mode 100644 index 000000000000..505178a7f58d --- /dev/null +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildPropertyParser.cs @@ -0,0 +1,93 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Text; + +#nullable enable + +namespace Microsoft.DotNet.Cli.Utils; + +public static class MSBuildPropertyParser { + public static IEnumerable<(string key, string value)> ParseProperties(string input) { + var currentPos = 0; + StringBuilder currentKey = new StringBuilder(); + StringBuilder currentValue = new StringBuilder(); + + (string key, string value) EmitAndReset() { + var key = currentKey.ToString(); + var value= currentValue.ToString(); + currentKey.Clear(); + currentValue.Clear(); + return (key, value); + } + + char? Peek() => currentPos < input.Length ? input[currentPos] : null; + + bool TryConsume(out char? consumed) { + if(input.Length > currentPos) { + consumed = input[currentPos]; + currentPos++; + return true; + } else { + consumed = null; + return false; + } + } + + void ParseKey() { + while (TryConsume(out var c) && c != '=') { + currentKey.Append(c); + } + } + + void ParseQuotedValue() { + TryConsume(out var leadingQuote); // consume the leading quote, which we know is there + currentValue.Append(leadingQuote); + while(TryConsume(out char? c)) { + currentValue.Append(c); + if (c == '"') { + // we're done + return; + } + if (c == '\\' && Peek() == '"') + { + // consume the escaped quote + TryConsume(out var c2); + currentValue.Append(c2); + } + } + } + + void ParseUnquotedValue() { + while(TryConsume(out char? c) && c != ';') { + currentValue.Append(c); + } + } + + void ParseValue() { + if (Peek() == '"') { + ParseQuotedValue(); + } else { + ParseUnquotedValue(); + } + } + + (string key, string value) ParseKeyValue() { + ParseKey(); + ParseValue(); + return EmitAndReset(); + } + + bool AtEnd() => currentPos == input.Length; + + while (!(AtEnd())) { + yield return ParseKeyValue(); + if (Peek() is char c && (c == ';' || c== ',')) { + TryConsume(out _); // swallow the next semicolon or comma delimiter + } + } + } +} diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/Windows.cs b/src/Cli/Microsoft.DotNet.Cli.Utils/Windows.cs index 5bdc5ee3bf96..4e2b74351554 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/Windows.cs +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/Windows.cs @@ -39,19 +39,6 @@ public static bool InstallRunning() return !Mutex.TryOpenExisting(@"Global\_MSIExecute", out _); } - /// - /// Queries the Windows Update Agent API to determine if there is a pending reboot. - /// - /// if there is a pending reboot; otherwise. - /// - /// See this - /// for more information. - /// - public static bool RebootRequired() - { - return new SystemInformationClass().RebootRequired; - } - /// /// Returns the commandline of the currently executing process. /// diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf index 21936ee731ca..f8c110d4f01a 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.cs.xlf @@ -77,7 +77,7 @@ Mezi možné příčiny patří toto: .NET SDK: - SADA .NET SDK: + SADA .NET SDK: diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf index 0e7254d3e262..f9afa89a6bf4 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.de.xlf @@ -77,7 +77,7 @@ Mögliche Ursachen: .NET SDK: - .NET SDK: + .NET SDK: diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf index 9a47b6e8b9ff..f77e887c2b58 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.es.xlf @@ -77,7 +77,7 @@ Algunas de las posibles causas son : .NET SDK: - SDK DE .NET: + SDK DE .NET: diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf index 18aa9d9403a3..6ceba12646e8 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.fr.xlf @@ -77,7 +77,7 @@ Raisons possibles : .NET SDK: - SDK .NET : + SDK .NET : diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf index 51795059416d..87ec2c18edf9 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.it.xlf @@ -77,7 +77,7 @@ Motivi possibili: .NET SDK: - .NET SDK: + .NET SDK: diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf index 28d6610ce095..5249c20c6cc5 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ja.xlf @@ -77,7 +77,7 @@ Possible reasons for this include: .NET SDK: - .NET SDK: + .NET SDK: diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf index 44dea377e04a..8b02bcda1534 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ko.xlf @@ -77,7 +77,7 @@ Possible reasons for this include: .NET SDK: - .NET SDK (reflecting any global.json): + .NET SDK: diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf index ef60a1d6ffa3..4449cff1052d 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pl.xlf @@ -77,7 +77,7 @@ Możliwe przyczyny: .NET SDK: - .NET SDK: + .NET SDK: diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf index 26ba7d54fb68..e085bb22e6e2 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.pt-BR.xlf @@ -77,7 +77,7 @@ Possíveis motivos para isso incluem: .NET SDK: - .NET SDK: + .NET SDK: diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf index f9e7e9c4acd4..0ebf4969bd2e 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.ru.xlf @@ -77,7 +77,7 @@ Possible reasons for this include: .NET SDK: - ПАКЕТ SDK ДЛЯ .NET: + ПАКЕТ SDK ДЛЯ .NET: diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf index f729be471002..5602fad87b49 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.tr.xlf @@ -77,7 +77,7 @@ Bunun nedeni şunlardan biri olabilir: .NET SDK: - .NET SDK: + .NET SDK: diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf index 48c1dad02399..50ab968bdd7e 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hans.xlf @@ -77,7 +77,7 @@ Possible reasons for this include: .NET SDK: - .NET SDK: + .NET SDK: diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf index 4bba6d947f3a..41d0a2a37613 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/xlf/LocalizableStrings.zh-Hant.xlf @@ -77,7 +77,7 @@ Possible reasons for this include: .NET SDK: - .NET SDK: + .NET SDK: diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/AnsiColorExtensions.cs b/src/Cli/Microsoft.TemplateEngine.Cli/AnsiColorExtensions.cs deleted file mode 100644 index 1877eee20974..000000000000 --- a/src/Cli/Microsoft.TemplateEngine.Cli/AnsiColorExtensions.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace Microsoft.TemplateEngine.Cli -{ - internal static class AnsiColorExtensions - { - internal static string Black(this string text) - { - return "\x1B[30m" + text + "\x1B[39m"; - } - - internal static string Red(this string text) - { - return "\x1B[31m" + text + "\x1B[39m"; - } - - internal static string Green(this string text) - { - return "\x1B[32m" + text + "\x1B[39m"; - } - - internal static string Yellow(this string text) - { - return "\x1B[33m" + text + "\x1B[39m"; - } - - internal static string Blue(this string text) - { - return "\x1B[34m" + text + "\x1B[39m"; - } - - internal static string Magenta(this string text) - { - return "\x1B[35m" + text + "\x1B[39m"; - } - - internal static string Cyan(this string text) - { - return "\x1B[36m" + text + "\x1B[39m"; - } - - internal static string White(this string text) - { - return "\x1B[37m" + text + "\x1B[39m"; - } - - internal static string Bold(this string text) - { - return "\x1B[1m" + text + "\x1B[22m"; - } - } -} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/AnsiConsole.cs b/src/Cli/Microsoft.TemplateEngine.Cli/AnsiConsole.cs deleted file mode 100644 index 9c0c04be6e06..000000000000 --- a/src/Cli/Microsoft.TemplateEngine.Cli/AnsiConsole.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace Microsoft.TemplateEngine.Cli -{ - internal class AnsiConsole - { - private int _boldRecursion; - - internal AnsiConsole(TextWriter writer) - { - Writer = writer; - - OriginalForegroundColor = Console.ForegroundColor; - } - - internal TextWriter Writer { get; } - - internal ConsoleColor OriginalForegroundColor { get; } - - internal static AnsiConsole GetOutput() - { - return new AnsiConsole(Console.Out); - } - - internal static AnsiConsole GetError() - { - return new AnsiConsole(Console.Error); - } - - internal void WriteLine(string message) - { - Write(message); - Writer.WriteLine(); - } - - internal void Write(string message) - { - var escapeScan = 0; - for (; ; ) - { - var escapeIndex = message.IndexOf("\x1b[", escapeScan, StringComparison.Ordinal); - if (escapeIndex == -1) - { - var text = message.Substring(escapeScan); - Writer.Write(text); - break; - } - else - { - var startIndex = escapeIndex + 2; - var endIndex = startIndex; - while (endIndex != message.Length && - message[endIndex] >= 0x20 && - message[endIndex] <= 0x3f) - { - endIndex += 1; - } - - var text = message.Substring(escapeScan, escapeIndex - escapeScan); - Writer.Write(text); - if (endIndex == message.Length) - { - break; - } - - switch (message[endIndex]) - { - case 'm': - int value; - if (int.TryParse(message.Substring(startIndex, endIndex - startIndex), out value)) - { - switch (value) - { - case 1: - SetBold(true); - break; - case 22: - SetBold(false); - break; - case 30: - SetColor(ConsoleColor.Black); - break; - case 31: - SetColor(ConsoleColor.Red); - break; - case 32: - SetColor(ConsoleColor.Green); - break; - case 33: - SetColor(ConsoleColor.Yellow); - break; - case 34: - SetColor(ConsoleColor.Blue); - break; - case 35: - SetColor(ConsoleColor.Magenta); - break; - case 36: - SetColor(ConsoleColor.Cyan); - break; - case 37: - SetColor(ConsoleColor.Gray); - break; - case 39: - Console.ForegroundColor = OriginalForegroundColor; - break; - } - } - break; - } - - escapeScan = endIndex + 1; - } - } - } - - private void SetColor(ConsoleColor color) - { - const int Light = 0x08; - int c = (int)color; - - Console.ForegroundColor = - c < 0 ? color : // unknown, just use it - _boldRecursion > 0 ? (ConsoleColor)(c | Light) : // ensure color is light - (ConsoleColor)(c & ~Light); // ensure color is dark - } - - private void SetBold(bool bold) - { - _boldRecursion += bold ? 1 : -1; - if (_boldRecursion > 1 || (_boldRecursion == 1 && !bold)) - { - return; - } - - // switches on _boldRecursion to handle boldness - SetColor(Console.ForegroundColor); - } - } -} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/BaseCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/BaseCommand.cs index 4ce95e23f1b6..475cb4146e2b 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/BaseCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/BaseCommand.cs @@ -6,12 +6,14 @@ using System.CommandLine.Invocation; using System.CommandLine.Parsing; using System.Reflection; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Abstractions.Mount; using Microsoft.TemplateEngine.Cli.TabularOutput; using Microsoft.TemplateEngine.Edge; using Microsoft.TemplateEngine.Edge.Settings; using Microsoft.TemplateEngine.Utils; +using Command = System.CommandLine.Command; namespace Microsoft.TemplateEngine.Cli.Commands { @@ -23,19 +25,14 @@ internal abstract class BaseCommand : Command protected BaseCommand( Func hostBuilder, Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks, string name, string description) : base(name, description) { _hostBuilder = hostBuilder; _telemetryLoggerBuilder = telemetryLoggerBuilder; - Callbacks = callbacks; - } - internal NewCommandCallbacks Callbacks { get; } - protected internal virtual IEnumerable GetCompletions(CompletionContext context, IEngineEnvironmentSettings environmentSettings) { return base.GetCompletions(context); @@ -82,10 +79,9 @@ internal abstract class BaseCommand : BaseCommand, ICommandHandler where internal BaseCommand( Func hostBuilder, Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks, string name, string description) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, name, description) + : base(hostBuilder, telemetryLoggerBuilder, name, description) { this.Handler = this; } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/NewCommand.Legacy.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/NewCommand.Legacy.cs index 9f51ad19c86b..0dd80b91233b 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/NewCommand.Legacy.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/NewCommand.Legacy.cs @@ -123,7 +123,7 @@ private static void ValidateArgumentUsage(CommandResult commandResult, params Ar } } - private void BuildLegacySymbols(Func hostBuilder, Func telemetryLoggerBuilder, NewCommandCallbacks callbacks) + private void BuildLegacySymbols(Func hostBuilder, Func telemetryLoggerBuilder) { this.AddArgument(ShortNameArgument); this.AddArgument(RemainingArguments); @@ -144,14 +144,14 @@ private void BuildLegacySymbols(Func hostBuild this.TreatUnmatchedTokensAsErrors = true; - this.Add(new LegacyInstallCommand(this, hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new LegacyUninstallCommand(this, hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new LegacyUpdateCheckCommand(this, hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new LegacyUpdateApplyCommand(this, hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new LegacySearchCommand(this, hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new LegacyListCommand(this, hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new LegacyAliasAddCommand(hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new LegacyAliasShowCommand(hostBuilder, telemetryLoggerBuilder, callbacks)); + this.Add(new LegacyInstallCommand(this, hostBuilder, telemetryLoggerBuilder)); + this.Add(new LegacyUninstallCommand(this, hostBuilder, telemetryLoggerBuilder)); + this.Add(new LegacyUpdateCheckCommand(this, hostBuilder, telemetryLoggerBuilder)); + this.Add(new LegacyUpdateApplyCommand(this, hostBuilder, telemetryLoggerBuilder)); + this.Add(new LegacySearchCommand(this, hostBuilder, telemetryLoggerBuilder)); + this.Add(new LegacyListCommand(this, hostBuilder, telemetryLoggerBuilder)); + this.Add(new LegacyAliasAddCommand(hostBuilder, telemetryLoggerBuilder)); + this.Add(new LegacyAliasShowCommand(hostBuilder, telemetryLoggerBuilder)); } } } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/NewCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/NewCommand.cs index a51a8c78f4c5..4c86841a2d4a 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/NewCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/NewCommand.cs @@ -15,22 +15,21 @@ internal partial class NewCommand : BaseCommand, ICustomHelp internal NewCommand( string commandName, Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, commandName, SymbolStrings.Command_New_Description) + Func telemetryLoggerBuilder) + : base(hostBuilder, telemetryLoggerBuilder, commandName, SymbolStrings.Command_New_Description) { this.TreatUnmatchedTokensAsErrors = true; //it is important that legacy commands are built before non-legacy, as non legacy commands are building validators that rely on legacy stuff - BuildLegacySymbols(hostBuilder, telemetryLoggerBuilder, callbacks); - - this.Add(new InstantiateCommand(hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new InstallCommand(this, hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new UninstallCommand(this, hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new UpdateCommand(this, hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new SearchCommand(this, hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new ListCommand(this, hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new AliasCommand(hostBuilder, telemetryLoggerBuilder, callbacks)); + BuildLegacySymbols(hostBuilder, telemetryLoggerBuilder); + + this.Add(new InstantiateCommand(hostBuilder, telemetryLoggerBuilder)); + this.Add(new InstallCommand(this, hostBuilder, telemetryLoggerBuilder)); + this.Add(new UninstallCommand(this, hostBuilder, telemetryLoggerBuilder)); + this.Add(new UpdateCommand(this, hostBuilder, telemetryLoggerBuilder)); + this.Add(new SearchCommand(this, hostBuilder, telemetryLoggerBuilder)); + this.Add(new ListCommand(this, hostBuilder, telemetryLoggerBuilder)); + this.Add(new AliasCommand(hostBuilder, telemetryLoggerBuilder)); this.AddGlobalOption(DebugCustomSettingsLocationOption); this.AddGlobalOption(DebugVirtualizeSettingsOption); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasAddCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasAddCommand.cs index 524af318ccdf..39e6f3bfc9a6 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasAddCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasAddCommand.cs @@ -11,9 +11,8 @@ internal class AliasAddCommand : BaseAliasAddCommand { internal AliasAddCommand( Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, "add") + Func telemetryLoggerBuilder) + : base(hostBuilder, telemetryLoggerBuilder, "add") { IsHidden = true; } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasCommand.cs index 9c0549646110..1b78b27a9c89 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasCommand.cs @@ -12,13 +12,12 @@ internal class AliasCommand : BaseCommand { internal AliasCommand( Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, "alias", SymbolStrings.Command_Alias_Description) + Func telemetryLoggerBuilder) + : base(hostBuilder, telemetryLoggerBuilder, "alias", SymbolStrings.Command_Alias_Description) { IsHidden = true; - this.Add(new AliasAddCommand(hostBuilder, telemetryLoggerBuilder, callbacks)); - this.Add(new AliasShowCommand(hostBuilder, telemetryLoggerBuilder, callbacks)); + this.Add(new AliasAddCommand(hostBuilder, telemetryLoggerBuilder)); + this.Add(new AliasShowCommand(hostBuilder, telemetryLoggerBuilder)); } protected override Task ExecuteAsync( diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasShowCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasShowCommand.cs index 648cdcd13fb3..70a2d636e9aa 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasShowCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/AliasShowCommand.cs @@ -11,9 +11,8 @@ internal class AliasShowCommand : BaseAliasShowCommand { internal AliasShowCommand( Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, "show") + Func telemetryLoggerBuilder) + : base(hostBuilder, telemetryLoggerBuilder, "show") { IsHidden = true; } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/BaseAliasAddCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/BaseAliasAddCommand.cs index d9c5a7320be3..e049515dd582 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/BaseAliasAddCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/BaseAliasAddCommand.cs @@ -13,9 +13,8 @@ internal class BaseAliasAddCommand : BaseCommand internal BaseAliasAddCommand( Func hostBuilder, Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks, string commandName) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, commandName, SymbolStrings.Command_AliasAdd_Description) { } + : base(hostBuilder, telemetryLoggerBuilder, commandName, SymbolStrings.Command_AliasAdd_Description) { } protected override Task ExecuteAsync( AliasAddCommandArgs args, diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/BaseAliasShowCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/BaseAliasShowCommand.cs index 4052b1027732..bea4f51a664a 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/BaseAliasShowCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/BaseAliasShowCommand.cs @@ -13,9 +13,8 @@ internal class BaseAliasShowCommand : BaseCommand internal BaseAliasShowCommand( Func hostBuilder, Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks, string commandName) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, commandName, SymbolStrings.Command_AliasShow_Description) { } + : base(hostBuilder, telemetryLoggerBuilder, commandName, SymbolStrings.Command_AliasShow_Description) { } protected override Task ExecuteAsync( AliasShowCommandArgs args, diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/LegacyAliasAddCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/LegacyAliasAddCommand.cs index e638191f641a..4e60732d963f 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/LegacyAliasAddCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/LegacyAliasAddCommand.cs @@ -11,9 +11,8 @@ internal class LegacyAliasAddCommand : BaseAliasAddCommand { internal LegacyAliasAddCommand( Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, "--alias") + Func telemetryLoggerBuilder) + : base(hostBuilder, telemetryLoggerBuilder, "--alias") { AddAlias("-a"); IsHidden = true; diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/LegacyAliasShowCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/LegacyAliasShowCommand.cs index bf92c1b4d502..e25c4405c2ae 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/LegacyAliasShowCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/alias/LegacyAliasShowCommand.cs @@ -11,9 +11,8 @@ internal class LegacyAliasShowCommand : BaseAliasShowCommand { internal LegacyAliasShowCommand( Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, "--show-alias") + Func telemetryLoggerBuilder) + : base(hostBuilder, telemetryLoggerBuilder, "--show-alias") { IsHidden = true; } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.Help.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.Help.cs index 58327684b1d3..401206a266d6 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.Help.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.Help.cs @@ -5,9 +5,11 @@ using System.CommandLine.Help; using System.CommandLine.Parsing; using System.Diagnostics.CodeAnalysis; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Edge.Settings; using Microsoft.TemplateEngine.Utils; +using Command = System.CommandLine.Command; namespace Microsoft.TemplateEngine.Cli.Commands { @@ -97,7 +99,7 @@ public IEnumerable CustomHelpLayout() internal static bool VerifyMatchingTemplates( IEngineEnvironmentSettings environmentSettings, IEnumerable matchingTemplates, - Reporter reporter, + IReporter reporter, [NotNullWhen(true)] out IEnumerable? filteredTemplates) { diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.NoMatchHandling.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.NoMatchHandling.cs index 221bf4141f2e..3364d7d0f201 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.NoMatchHandling.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.NoMatchHandling.cs @@ -4,8 +4,10 @@ using System.CommandLine; using System.CommandLine.Parsing; using System.Text; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Edge.Settings; +using Command = System.CommandLine.Command; namespace Microsoft.TemplateEngine.Cli.Commands { diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs index 9b69b55c3b11..7ed535027b6e 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.TabCompletion.cs @@ -4,6 +4,7 @@ using System.CommandLine; using System.CommandLine.Completions; using System.CommandLine.Parsing; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Edge; using Microsoft.TemplateEngine.Edge.Settings; diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs index c644bc676cc9..a725fedb08b1 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.CommandLine; -using System.CommandLine.Help; using System.CommandLine.Invocation; using System.CommandLine.Parsing; using System.Linq; +using Microsoft.DotNet.Cli.Utils; using Microsoft.Extensions.Logging; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Abstractions.TemplatePackage; @@ -19,9 +19,8 @@ internal partial class InstantiateCommand : BaseCommand, { internal InstantiateCommand( Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, "create", SymbolStrings.Command_Instantiate_Description) + Func telemetryLoggerBuilder) + : base(hostBuilder, telemetryLoggerBuilder, "create", SymbolStrings.Command_Instantiate_Description) { this.AddArgument(ShortNameArgument); this.AddArgument(RemainingArguments); @@ -227,7 +226,7 @@ private static async Task ExecuteIntAsync( private static NewCommandStatus HandleAmbiguousLanguage( IEngineEnvironmentSettings environmentSettings, IEnumerable templates, - Reporter reporter) + IReporter reporter) { reporter.WriteLine(HelpStrings.TableHeader_AmbiguousTemplatesList); TemplateGroupDisplay.DisplayTemplateList( @@ -242,7 +241,7 @@ private static NewCommandStatus HandleAmbiguousLanguage( private static NewCommandStatus HandleAmbiguousType( IEngineEnvironmentSettings environmentSettings, IEnumerable templates, - Reporter reporter) + IReporter reporter) { reporter.WriteLine(HelpStrings.TableHeader_AmbiguousTemplatesList); TemplateGroupDisplay.DisplayTemplateList( diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/TemplateCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/TemplateCommand.cs index ba8829ff4a5f..254a4eb67d86 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/TemplateCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/TemplateCommand.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.CommandLine; -using System.CommandLine.Invocation; -using System.CommandLine.Parsing; -using System.Threading; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Abstractions.Constraints; using Microsoft.TemplateEngine.Abstractions.Installer; @@ -12,6 +10,7 @@ using Microsoft.TemplateEngine.Edge; using Microsoft.TemplateEngine.Edge.Settings; using Microsoft.TemplateEngine.Utils; +using Command = System.CommandLine.Command; namespace Microsoft.TemplateEngine.Cli.Commands { @@ -174,7 +173,7 @@ internal static async Task> ValidateCons internal async Task InvokeAsync(ParseResult parseResult, ITelemetryLogger telemetryLogger, CancellationToken cancellationToken) { TemplateCommandArgs args = new TemplateCommandArgs(this, _instantiateCommand, parseResult); - TemplateInvoker invoker = new TemplateInvoker(_environmentSettings, telemetryLogger, () => Console.ReadLine() ?? string.Empty, _instantiateCommand.Callbacks); + TemplateInvoker invoker = new TemplateInvoker(_environmentSettings, telemetryLogger, () => Console.ReadLine() ?? string.Empty); TemplatePackageCoordinator packageCoordinator = new TemplatePackageCoordinator(telemetryLogger, _environmentSettings, _templatePackageManager); TemplateConstraintManager constraintManager = new TemplateConstraintManager(_environmentSettings); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/BaseInstallCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/BaseInstallCommand.cs index ff99d885b889..aee2d396d694 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/BaseInstallCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/BaseInstallCommand.cs @@ -15,9 +15,8 @@ internal BaseInstallCommand( NewCommand parentCommand, Func hostBuilder, Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks, string commandName) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, commandName, SymbolStrings.Command_Install_Description) + : base(hostBuilder, telemetryLoggerBuilder, commandName, SymbolStrings.Command_Install_Description) { ParentCommand = parentCommand; this.AddArgument(NameArgument); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/InstallCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/InstallCommand.cs index b064d627050c..392c730e8f7a 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/InstallCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/InstallCommand.cs @@ -12,9 +12,8 @@ internal class InstallCommand : BaseInstallCommand public InstallCommand( NewCommand parentCommand, Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(parentCommand, hostBuilder, telemetryLoggerBuilder, callbacks, "install") + Func telemetryLoggerBuilder) + : base(parentCommand, hostBuilder, telemetryLoggerBuilder, "install") { parentCommand.AddNoLegacyUsageValidators(this); } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/LegacyInstallCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/LegacyInstallCommand.cs index 5f69a8db509a..30b5f44df7bd 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/LegacyInstallCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/install/LegacyInstallCommand.cs @@ -10,8 +10,8 @@ namespace Microsoft.TemplateEngine.Cli.Commands { internal class LegacyInstallCommand : BaseInstallCommand { - public LegacyInstallCommand(NewCommand parentCommand, Func hostBuilder, Func telemetryLoggerBuilder, NewCommandCallbacks callbacks) - : base(parentCommand, hostBuilder, telemetryLoggerBuilder, callbacks, "--install") + public LegacyInstallCommand(NewCommand parentCommand, Func hostBuilder, Func telemetryLoggerBuilder) + : base(parentCommand, hostBuilder, telemetryLoggerBuilder, "--install") { this.IsHidden = true; this.AddAlias("-i"); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/BaseListCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/BaseListCommand.cs index 98ddf7a460f4..b3e62bf96be6 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/BaseListCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/BaseListCommand.cs @@ -24,9 +24,8 @@ internal BaseListCommand( NewCommand parentCommand, Func hostBuilder, Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks, string commandName) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, commandName, SymbolStrings.Command_List_Description) + : base(hostBuilder, telemetryLoggerBuilder, commandName, SymbolStrings.Command_List_Description) { ParentCommand = parentCommand; Filters = SetupFilterOptions(SupportedFilters); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/LegacyListCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/LegacyListCommand.cs index 2da044c278c5..b75cf009a075 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/LegacyListCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/LegacyListCommand.cs @@ -13,9 +13,8 @@ internal class LegacyListCommand : BaseListCommand public LegacyListCommand( NewCommand parentCommand, Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(parentCommand, hostBuilder, telemetryLoggerBuilder, callbacks, "--list") + Func telemetryLoggerBuilder) + : base(parentCommand, hostBuilder, telemetryLoggerBuilder, "--list") { this.IsHidden = true; this.AddAlias("-l"); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/ListCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/ListCommand.cs index 782a99e617fc..2f0756631af8 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/ListCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/list/ListCommand.cs @@ -12,9 +12,8 @@ internal class ListCommand : BaseListCommand public ListCommand( NewCommand parentCommand, Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(parentCommand, hostBuilder, telemetryLoggerBuilder, callbacks, "list") + Func telemetryLoggerBuilder) + : base(parentCommand, hostBuilder, telemetryLoggerBuilder, "list") { parentCommand.AddNoLegacyUsageValidators(this); } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/BaseSearchCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/BaseSearchCommand.cs index 701b5aab5ee8..31b1f12dee17 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/BaseSearchCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/BaseSearchCommand.cs @@ -26,9 +26,8 @@ internal BaseSearchCommand( NewCommand parentCommand, Func hostBuilder, Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks, string commandName) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, commandName, SymbolStrings.Command_Search_Description) + : base(hostBuilder, telemetryLoggerBuilder, commandName, SymbolStrings.Command_Search_Description) { ParentCommand = parentCommand; Filters = SetupFilterOptions(SupportedFilters); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/LegacySearchCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/LegacySearchCommand.cs index 6bb8d29c5fa0..766166245edb 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/LegacySearchCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/LegacySearchCommand.cs @@ -10,8 +10,8 @@ namespace Microsoft.TemplateEngine.Cli.Commands { internal class LegacySearchCommand : BaseSearchCommand { - public LegacySearchCommand(NewCommand parentCommand, Func hostBuilder, Func telemetryLoggerBuilder, NewCommandCallbacks callbacks) - : base(parentCommand, hostBuilder, telemetryLoggerBuilder, callbacks, "--search") + public LegacySearchCommand(NewCommand parentCommand, Func hostBuilder, Func telemetryLoggerBuilder) + : base(parentCommand, hostBuilder, telemetryLoggerBuilder, "--search") { this.IsHidden = true; AddValidator(ValidateParentCommandArguments); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/SearchCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/SearchCommand.cs index 5bc1f15c5554..57bb09c7f88b 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/SearchCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/search/SearchCommand.cs @@ -12,9 +12,8 @@ internal class SearchCommand : BaseSearchCommand public SearchCommand( NewCommand parentCommand, Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(parentCommand, hostBuilder, telemetryLoggerBuilder, callbacks, "search") + Func telemetryLoggerBuilder) + : base(parentCommand, hostBuilder, telemetryLoggerBuilder, "search") { parentCommand.AddNoLegacyUsageValidators(this); } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/BaseUninstallCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/BaseUninstallCommand.cs index ff76d6b87f95..7ae133314d22 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/BaseUninstallCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/BaseUninstallCommand.cs @@ -14,9 +14,8 @@ internal class BaseUninstallCommand : BaseCommand internal BaseUninstallCommand( Func hostBuilder, Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks, string commandName) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, commandName, SymbolStrings.Command_Uninstall_Description) + : base(hostBuilder, telemetryLoggerBuilder, commandName, SymbolStrings.Command_Uninstall_Description) { this.AddArgument(NameArgument); } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/LegacyUninstallCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/LegacyUninstallCommand.cs index a6ee4a01c9ee..14828e90c83a 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/LegacyUninstallCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/LegacyUninstallCommand.cs @@ -13,9 +13,8 @@ internal class LegacyUninstallCommand : BaseUninstallCommand public LegacyUninstallCommand( NewCommand parentCommand, Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, "--uninstall") + Func telemetryLoggerBuilder) + : base(hostBuilder, telemetryLoggerBuilder, "--uninstall") { this.IsHidden = true; this.AddAlias("-u"); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/UninstallCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/UninstallCommand.cs index 66351676caaf..068077e73029 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/UninstallCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/uninstall/UninstallCommand.cs @@ -12,9 +12,8 @@ internal class UninstallCommand : BaseUninstallCommand public UninstallCommand( NewCommand parentCommand, Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, "uninstall") + Func telemetryLoggerBuilder) + : base(hostBuilder, telemetryLoggerBuilder, "uninstall") { parentCommand.AddNoLegacyUsageValidators(this); } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/BaseUpdateCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/BaseUpdateCommand.cs index 29409ea78a1f..f905c14d1426 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/BaseUpdateCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/BaseUpdateCommand.cs @@ -15,10 +15,9 @@ internal BaseUpdateCommand( NewCommand parentCommand, Func hostBuilder, Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks, string commandName, string description) - : base(hostBuilder, telemetryLoggerBuilder, callbacks, commandName, description) + : base(hostBuilder, telemetryLoggerBuilder, commandName, description) { ParentCommand = parentCommand; this.AddOption(InteractiveOption); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/LegacyUpdateApplyCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/LegacyUpdateApplyCommand.cs index 1a90c359b63c..e45c96cb28e3 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/LegacyUpdateApplyCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/LegacyUpdateApplyCommand.cs @@ -13,9 +13,8 @@ internal class LegacyUpdateApplyCommand : BaseUpdateCommand public LegacyUpdateApplyCommand( NewCommand parentCommand, Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(parentCommand, hostBuilder, telemetryLoggerBuilder, callbacks, "--update-apply", SymbolStrings.Command_Legacy_Update_Check_Description) + Func telemetryLoggerBuilder) + : base(parentCommand, hostBuilder, telemetryLoggerBuilder, "--update-apply", SymbolStrings.Command_Legacy_Update_Check_Description) { this.IsHidden = true; parentCommand.AddNoLegacyUsageValidators(this, except: new Option[] { InteractiveOption, AddSourceOption }); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/LegacyUpdateCheckCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/LegacyUpdateCheckCommand.cs index 93abb10ed60f..7633c9db2dc5 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/LegacyUpdateCheckCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/LegacyUpdateCheckCommand.cs @@ -13,9 +13,8 @@ internal class LegacyUpdateCheckCommand : BaseUpdateCommand public LegacyUpdateCheckCommand( NewCommand parentCommand, Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(parentCommand, hostBuilder, telemetryLoggerBuilder, callbacks, "--update-check", SymbolStrings.Command_Update_Description) + Func telemetryLoggerBuilder) + : base(parentCommand, hostBuilder, telemetryLoggerBuilder, "--update-check", SymbolStrings.Command_Update_Description) { this.IsHidden = true; parentCommand.AddNoLegacyUsageValidators(this, except: new Option[] { InteractiveOption, AddSourceOption }); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/UpdateCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/UpdateCommand.cs index 37cafe42d4aa..7b60c802a91d 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/UpdateCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/update/UpdateCommand.cs @@ -12,9 +12,8 @@ internal class UpdateCommand : BaseUpdateCommand public UpdateCommand( NewCommand parentCommand, Func hostBuilder, - Func telemetryLoggerBuilder, - NewCommandCallbacks callbacks) - : base(parentCommand, hostBuilder, telemetryLoggerBuilder, callbacks, "update", SymbolStrings.Command_Update_Description) + Func telemetryLoggerBuilder) + : base(parentCommand, hostBuilder, telemetryLoggerBuilder, "update", SymbolStrings.Command_Update_Description) { parentCommand.AddNoLegacyUsageValidators(this); this.AddOption(CheckOnlyOption); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.cs.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.cs.xlf index 04d880e115e1..62e6743e33eb 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.cs.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.cs.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + Povoleno: *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + Povoleno, pokud: {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + Povinné, pokud: {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.de.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.de.xlf index 20b46864a8f0..ad5c0f736473 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.de.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.de.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + Aktiviert: *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + Aktiviert wenn: {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + Erforderlich wenn: {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.es.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.es.xlf index af5477163f7e..2dbaecdcf6fb 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.es.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.es.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + Habilitado: *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + Habilitado si: {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + Requerido si: {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.fr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.fr.xlf index b9d91cee314e..ec87577eff38 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.fr.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.fr.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + Activé : *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + Activé si : {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + Obligatoire si : {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.it.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.it.xlf index 9dd08917e572..88edb77e0805 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.it.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.it.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + Abilitato: *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + if abilitato: {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + if obbligatorio: {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ja.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ja.xlf index a6ce16827b8b..0b36b476f3a6 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ja.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ja.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + 有効: *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + 有効な場合: {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + 必須の場合: {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ko.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ko.xlf index 4f5222b41891..b0abc166e471 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ko.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ko.xlf @@ -24,7 +24,7 @@ This template contains technologies from parties other than Microsoft, see {0} for details. - 이 템플릿에는 Microsoft 이외의 타사 기술이 포함되어 있습니다. 자세한 내용은{0}를 참조하세요. + 이 템플릿에는 Microsoft 이외의 타사 기술이 포함되어 있습니다. 자세한 내용은{0}을(를) 참조하세요. @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + 사용 여부: *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + 다음 경우에 사용: {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + 다음 경우에 필요: {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pl.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pl.xlf index 7733c73ac51b..40d9b0ead732 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pl.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pl.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + Włączone: *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + Włączone, jeśli: {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + Wymagane, jeśli: {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pt-BR.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pt-BR.xlf index b11c92c75d4f..9daa4c299b40 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pt-BR.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.pt-BR.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + Habilitado: *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + Habilitado se: {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + Obrigatório se: {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ru.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ru.xlf index 4c9fa96d22c3..a70e69d88e31 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ru.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.ru.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + Включено: *ложь* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + Включено, если: {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + Требуется, если: {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.tr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.tr.xlf index ab753a97d9e5..56f78a1ce9f6 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.tr.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.tr.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + Etkin: *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + {0} ise etkin {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + {0} ise gerekli {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hans.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hans.xlf index 719313677d01..9f5e1df061b7 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hans.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hans.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + 已启用: *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + 启用条件: {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + 在此条件下必需: {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hant.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hant.xlf index 702bf0291277..2567e80e8c56 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hant.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/HelpStrings.zh-Hant.xlf @@ -74,12 +74,12 @@ Enabled: *false* - Enabled: *false* + 已啟用: *false* Indication that parameter is not enabled Enabled if: {0} - Enabled if: {0} + 啟用時間: {0} {0} is the condition expression @@ -89,7 +89,7 @@ Required if: {0} - Required if: {0} + 必要時間: {0} {0} is the condition expression diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.es.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.es.xlf index e4a5ce4ec827..373292cb21c8 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.es.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.es.xlf @@ -79,7 +79,7 @@ Para instalar el paquete NuGet de una versión determinada, use <package ID&g NuGet package ID (without version) or path to folder to uninstall. If command is specified without the argument, it lists all the template packages installed. - Identificador del paquete NuGet (sin versión) o ruta de acceso a la carpeta que se va a desinstalar. + Id. del paquete NuGet (sin versión) o ruta de acceso a la carpeta que se va a desinstalar. Si el comando se especifica sin el argumento, muestra todos los paquetes de plantillas instalados. diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.fr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.fr.xlf index ba0865a8a27e..13e8512b7292 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.fr.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.fr.xlf @@ -22,7 +22,7 @@ To install the NuGet package of certain version, use <package ID>::<version>. ID de package NuGet ou chemin d’accès au dossier ou au package NuGet à installer. -Pour installer le package NuGet d’une certaine version, utilisez <ID de package>::<version>. +Pour installer le package NuGet d’une certaine version, utilisez <package ID>::<version>. diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.it.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.it.xlf index ded9f3c6bb4e..9c960c9153e8 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.it.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.it.xlf @@ -80,7 +80,7 @@ Per installare il pacchetto NuGet di una determinata versione, usare <package NuGet package ID (without version) or path to folder to uninstall. If command is specified without the argument, it lists all the template packages installed. ID pacchetto NuGet (senza versione) o percorso della cartella da disinstallare. -Se il comando è specificato senza l'argomento, elenca tutti i pacchetti di modelli installati. +Se il comando è specificato senza l'argomento, vengono elencati tutti i pacchetti modello installati. diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.ja.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.ja.xlf index 6f6fa2b13c59..3acec543e797 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.ja.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.ja.xlf @@ -21,8 +21,8 @@ NuGet package ID or path to folder or NuGet package to install. To install the NuGet package of certain version, use <package ID>::<version>. - インストールする NuGet パッケージ ID、フォルダー、または NuGet パッケージへのパス。 -特定のバージョンの NuGet パッケージをインストールするには、<package ID>::<version> を使用します。 + NuGet パッケージ ID、フォルダーのパス、またはインストールする NuGet パッケージ。 + 特定のバージョンの NuGet パッケージをインストールするには、<package ID>::<version> を使用します。 @@ -80,7 +80,7 @@ To install the NuGet package of certain version, use <package ID>::<ver NuGet package ID (without version) or path to folder to uninstall. If command is specified without the argument, it lists all the template packages installed. NuGet パッケージ ID (バージョンなし) またはアンインストールするフォルダーへのパス。 -引数なしでコマンドを指定した場合、インストールされているすべてのテンプレート パッケージが一覧表示されます。 + 引数なしでコマンドを指定した場合、インストールされているすべてのテンプレート パッケージが一覧表示されます。 diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.pl.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.pl.xlf index ecd057eda3de..a1a4e1978ef1 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.pl.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.pl.xlf @@ -21,8 +21,8 @@ NuGet package ID or path to folder or NuGet package to install. To install the NuGet package of certain version, use <package ID>::<version>. - Identyfikator pakietu NuGet lub ścieżka do folderu albo pakietu NuGet do zainstalowania. -Aby zainstalować pakiet NuGet określonej wersji, użyj <package ID>::<version>. + Identyfikator pakietu NuGet lub ścieżka do folderu lub pakietu NuGet do zainstalowania. +Aby zainstalować pakiet NuGet określonej wersji, użyj <package ID>::<version>. @@ -80,7 +80,7 @@ Aby zainstalować pakiet NuGet określonej wersji, użyj <package ID>::< NuGet package ID (without version) or path to folder to uninstall. If command is specified without the argument, it lists all the template packages installed. Identyfikator pakietu NuGet (bez wersji) lub ścieżka do folderu do odinstalowania. -Jeśli polecenie jest określone bez argumentu, wyświetla wszystkie zainstalowane pakiety szablonów. +Jeśli polecenie zostanie określone bez argumentu, zostanie wyświetlona lista wszystkich zainstalowanych pakietów szablonów. diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.ru.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.ru.xlf index 9f2de7a56aa1..5f54eb48ac4e 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.ru.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.ru.xlf @@ -22,7 +22,7 @@ To install the NuGet package of certain version, use <package ID>::<version>. Идентификатор пакета NuGet или путь к папке или пакету NuGet для установки. -Чтобы установить пакет NuGet определенной версии, используйте <ИД пакета>::<версия>. +Чтобы установить пакет NuGet определенной версии, используйте <package ID>::<version> diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.tr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.tr.xlf index ae1b31494986..8912f7b8fc78 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.tr.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.tr.xlf @@ -80,7 +80,7 @@ Belirli bir sürümün NuGet paketini yüklemek için <package ID>::<ve NuGet package ID (without version) or path to folder to uninstall. If command is specified without the argument, it lists all the template packages installed. NuGet paket kimliği (sürüm olmadan) veya kaldırılacak klasörün yolu. -Eğer komut bağımsız değişken olmadan belirtilirse, yüklü tüm şablon paketlerini listeler. +Eğer komut bağımsız değişken olmadan belirtilirse yüklü tüm şablon paketlerini listeler. diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.zh-Hans.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.zh-Hans.xlf index adfb046567ea..9c8065f38ac8 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.zh-Hans.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.zh-Hans.xlf @@ -22,7 +22,7 @@ To install the NuGet package of certain version, use <package ID>::<version>. 要安装的文件夹或 NuGet 包的 NuGet 包 ID 或路径。 -若要安装特定版本的 NuGet 包,请使用 <package ID>::<version>。 +要安装特定版本的 NuGet 包,请使用 <package ID>::<version>。 @@ -79,7 +79,7 @@ To install the NuGet package of certain version, use <package ID>::<ver NuGet package ID (without version) or path to folder to uninstall. If command is specified without the argument, it lists all the template packages installed. - 要卸载的文件夹的 NuGet 包 ID (没有版本) 或路径。 + 要卸载的文件夹的 NuGet 包 ID (没有版本)或路径。 如果在不使用参数的情况下指定命令,则它将列出安装的所有模板包。 diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.zh-Hant.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.zh-Hant.xlf index 5e67e406b98d..3bfaf9501916 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.zh-Hant.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/xlf/SymbolStrings.zh-Hant.xlf @@ -22,7 +22,7 @@ To install the NuGet package of certain version, use <package ID>::<version>. 要安裝之資料夾或 NuGet 套件的 NuGet 套件識別碼或路徑。 -若要安裝特定版本的 NuGet 套件,請使用<套件識別碼>::<version>。 +若要安裝特定版本的 NuGet 套件,請使用 <package ID>::<version>。 @@ -79,8 +79,8 @@ To install the NuGet package of certain version, use <package ID>::<ver NuGet package ID (without version) or path to folder to uninstall. If command is specified without the argument, it lists all the template packages installed. - NuGet 套件識別碼(沒有要卸載的版本)或資料夾路徑。 -如果指定的命令沒有引數,它會列出所有已安裝的範本套件。 + 要解除安裝之資料夾的 NuGet 套件識別碼 (沒有版本) 或路徑。 +如果指定的命令沒有引數,則其會列出所有已安裝的範本套件。 diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Components.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Components.cs index f86d0b829ec0..3a219fb61d30 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Components.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Components.cs @@ -11,9 +11,6 @@ public static class Components public static IReadOnlyList<(Type Type, IIdentifiedComponent Instance)> AllComponents { get; } = new (Type Type, IIdentifiedComponent Instance)[] { - (typeof(IPostActionProcessor), new AddProjectsToSolutionPostAction()), - (typeof(IPostActionProcessor), new AddReferencePostActionProcessor()), - (typeof(IPostActionProcessor), new DotnetRestorePostActionProcessor()), (typeof(IPostActionProcessor), new ChmodPostActionProcessor()), (typeof(IPostActionProcessor), new InstructionDisplayPostActionProcessor()), (typeof(IPostActionProcessor), new ProcessStartPostActionProcessor()), diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs b/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs index 247ee07c480c..ee871c5ce107 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs @@ -1099,144 +1099,6 @@ internal static string PossibleValuesHeader { } } - /// - /// Looks up a localized string similar to Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add.. - /// - internal static string PostAction_AddProjToSln_Error_NoProjectsToAdd { - get { - return ResourceManager.GetString("PostAction_AddProjToSln_Error_NoProjectsToAdd", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unable to determine which solution file to add the reference to.. - /// - internal static string PostAction_AddProjToSln_Error_NoSolutionFile { - get { - return ResourceManager.GetString("PostAction_AddProjToSln_Error_NoSolutionFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Failed to add project(s) to a solution file.. - /// - internal static string PostAction_AddProjToSln_Failed { - get { - return ResourceManager.GetString("PostAction_AddProjToSln_Failed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Adding - /// project(s): {0} - /// to solution file: {1} - /// solution folder: {2}. - /// - internal static string PostAction_AddProjToSln_Running { - get { - return ResourceManager.GetString("PostAction_AddProjToSln_Running", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Successfully added project(s) to a solution file.. - /// - internal static string PostAction_AddProjToSln_Succeeded { - get { - return ResourceManager.GetString("PostAction_AddProjToSln_Succeeded", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Adding a package reference {0} to project file {1}:. - /// - internal static string PostAction_AddReference_AddPackageReference { - get { - return ResourceManager.GetString("PostAction_AddReference_AddPackageReference", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Adding a package reference {0} (version: {1}) to project file {2}:. - /// - internal static string PostAction_AddReference_AddPackageReference_WithVersion { - get { - return ResourceManager.GetString("PostAction_AddReference_AddPackageReference_WithVersion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Adding a project reference {0} to project file {1}:. - /// - internal static string PostAction_AddReference_AddProjectReference { - get { - return ResourceManager.GetString("PostAction_AddReference_AddProjectReference", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Add reference action is not configured correctly in the template.. - /// - internal static string PostAction_AddReference_Error_ActionMisconfigured { - get { - return ResourceManager.GetString("PostAction_AddReference_Error_ActionMisconfigured", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it.. - /// - internal static string PostAction_AddReference_Error_FrameworkNotSupported { - get { - return ResourceManager.GetString("PostAction_AddReference_Error_FrameworkNotSupported", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Project files found:. - /// - internal static string PostAction_AddReference_Error_ProjFileListHeader { - get { - return ResourceManager.GetString("PostAction_AddReference_Error_ProjFileListHeader", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unable to determine which project file to add the reference to.. - /// - internal static string PostAction_AddReference_Error_UnresolvedProjFile { - get { - return ResourceManager.GetString("PostAction_AddReference_Error_UnresolvedProjFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Adding reference type {0} is not supported.. - /// - internal static string PostAction_AddReference_Error_UnsupportedRefType { - get { - return ResourceManager.GetString("PostAction_AddReference_Error_UnsupportedRefType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Failed to add a reference to the project file.. - /// - internal static string PostAction_AddReference_Failed { - get { - return ResourceManager.GetString("PostAction_AddReference_Failed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Successfully added a reference to the project file.. - /// - internal static string PostAction_AddReference_Succeeded { - get { - return ResourceManager.GetString("PostAction_AddReference_Succeeded", resourceCulture); - } - } - /// /// Looks up a localized string similar to Failed to run the command: argument 'executable' is missing in post action configuration.. /// @@ -1246,51 +1108,6 @@ internal static string PostAction_ProcessStartProcessor_Error_ConfigMissingExecu } } - /// - /// Looks up a localized string similar to Couldn't determine files to restore.. - /// - internal static string PostAction_Restore_Error_FailedToDetermineProjectToRestore { - get { - return ResourceManager.GetString("PostAction_Restore_Error_FailedToDetermineProjectToRestore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No projects are configured to restore. Check primary outputs configuration in template.json.. - /// - internal static string PostAction_Restore_Error_NoProjectsToRestore { - get { - return ResourceManager.GetString("PostAction_Restore_Error_NoProjectsToRestore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Restore failed.. - /// - internal static string PostAction_Restore_Failed { - get { - return ResourceManager.GetString("PostAction_Restore_Failed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Restoring {0}:. - /// - internal static string PostAction_Restore_Running { - get { - return ResourceManager.GetString("PostAction_Restore_Running", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Restore succeeded.. - /// - internal static string PostAction_Restore_Succeeded { - get { - return ResourceManager.GetString("PostAction_Restore_Succeeded", resourceCulture); - } - } - /// /// Looks up a localized string similar to Actual command: {0}. /// diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx b/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx index e25a4ec970c7..46d86335b138 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx +++ b/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx @@ -220,9 +220,6 @@ An update for template package '{0}' is available. - - No projects are configured to restore. Check primary outputs configuration in template.json. - Command failed. @@ -232,16 +229,6 @@ Command succeeded. - - Restore failed. - - - Restore succeeded. - - - Restoring {0}: - {0} - path to a project to restore - Running command '{0}'... @@ -284,33 +271,9 @@ The default value '{1}' is not a valid value for {0}. - - Failed to add a reference to the project file. - - - Adding a project reference {0} to project file {1}: - - - Successfully added a reference to the project file. - Post action failed. - - Adding a package reference {0} to project file {1}: - - - Add reference action is not configured correctly in the template. - - - Adding reference type {0} is not supported. - - - Unable to determine which project file to add the reference to. - - - Project files found: - Alias Name @@ -362,27 +325,6 @@ Run 'dotnet {1} --show-aliases' with no args to show all aliases. Unable to remove alias '{0}'. It did not exist. - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - - - Failed to add project(s) to a solution file. - - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - - - Successfully added project(s) to a solution file. - - - Unable to determine which solution file to add the reference to. - Unable to apply permissions {0} to "{1}". @@ -419,9 +361,6 @@ Run 'dotnet {1} --show-aliases' with no args to show all aliases. Name cannot contain any of the following characters {0} or character codes {1} - - Couldn't determine files to restore. - Details: @@ -831,9 +770,6 @@ The header is followed by the list of parameters and their errors (might be seve No callback is configured. Running post action is not possible. - - Adding a package reference {0} (version: {1}) to project file {2}: - To install the template package, run: The sentence is followed by the command to run the action diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Microsoft.TemplateEngine.Cli.csproj b/src/Cli/Microsoft.TemplateEngine.Cli/Microsoft.TemplateEngine.Cli.csproj index f1555b12bacf..4b700e552547 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Microsoft.TemplateEngine.Cli.csproj +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Microsoft.TemplateEngine.Cli.csproj @@ -1,10 +1,9 @@ - + $(SdkTargetFramework) Template creation for the dotnet CLI true false - true true enable enable @@ -16,10 +15,14 @@ - + + + + + diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/NewCommandCallbacks.cs b/src/Cli/Microsoft.TemplateEngine.Cli/NewCommandCallbacks.cs deleted file mode 100644 index 7187029c74ee..000000000000 --- a/src/Cli/Microsoft.TemplateEngine.Cli/NewCommandCallbacks.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.TemplateEngine.Abstractions; - -namespace Microsoft.TemplateEngine.Cli -{ - /// - /// The set of callbacks that should be implemented by callers of New3Command.Run. - /// These callbacks provide a mechanism for the template engine to invoke these operations without - /// requiring a built-time dependency on the actual implementation. - /// - public sealed class NewCommandCallbacks - { - /// - /// Callback to be executed on first run of the template engine. - /// - public Action? OnFirstRun { get; init; } - - /// - /// Callback to be executed to restore a project. - /// Parameters:
- /// - path to project to restore (string) - absolute path.
- ///
- public Func? RestoreProject { get; init; } - - /// - /// Callback to be executed to add reference to a project. - /// Parameters:
- /// - path to project to add references to (string) - absolute path
- /// - paths to projects(s) to reference (IReadOnlyList<string>) - absolute paths. - ///
- public Func, bool>? AddProjectReference { get; init; } - - /// - /// Callback to be executed to add package reference to a project. - /// Parameters:
- /// - project path (string) - absolute path
- /// - package name (string)
- /// - package version (string, optional). - ///
- public Func? AddPackageReference { get; init; } - - /// - /// Callback to be executed to add projects to solution. - /// Parameters:
- /// - solution path (string) - absolute path
- /// - projects to add (IReadOnlyList<string>) - absolute paths
- /// - target folder in solution (string). - ///
- public Func, string?, bool>? AddProjectsToSolution { get; init; } - } -} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/NewCommandFactory.cs b/src/Cli/Microsoft.TemplateEngine.Cli/NewCommandFactory.cs index 23863be72650..9a85ea717c0b 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/NewCommandFactory.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/NewCommandFactory.cs @@ -10,7 +10,7 @@ namespace Microsoft.TemplateEngine.Cli { public static class NewCommandFactory { - public static Command Create(string commandName, Func hostBuilder, Func telemetryLoggerBuilder, NewCommandCallbacks callbacks) + public static Command Create(string commandName, Func hostBuilder, Func telemetryLoggerBuilder) { if (string.IsNullOrWhiteSpace(commandName)) { @@ -19,9 +19,8 @@ public static Command Create(string commandName, Func _inputGetter; /// /// Creates the instance. /// /// template engine environment settings. - /// callbacks that can be used for post actions. /// the predicate to get user input whether to run the post action. - internal PostActionDispatcher(IEngineEnvironmentSettings environment, NewCommandCallbacks callbacks, Func inputGetter) + internal PostActionDispatcher(IEngineEnvironmentSettings environment, Func inputGetter) { _environment = environment ?? throw new ArgumentNullException(nameof(environment)); - _callbacks = callbacks ?? throw new ArgumentNullException(nameof(callbacks)); _inputGetter = inputGetter ?? throw new ArgumentNullException(nameof(inputGetter)); } @@ -216,11 +214,6 @@ private PostActionExecutionStatus ProcessAction( IPostAction action, IPostActionProcessor actionProcessor) { - if (actionProcessor is PostActionProcessor2Base actionProcessor2Base) - { - actionProcessor2Base.Callbacks = _callbacks; - } - //catch all exceptions on post action execution //post actions can be added using components and it's not sure if they handle exceptions properly try diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/ChmodPostActionProcessor.cs b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/ChmodPostActionProcessor.cs index 656a2483c4e0..ce154079d0b1 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/ChmodPostActionProcessor.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/ChmodPostActionProcessor.cs @@ -2,12 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Newtonsoft.Json.Linq; namespace Microsoft.TemplateEngine.Cli.PostActionProcessors { - internal class ChmodPostActionProcessor : PostActionProcessor2Base + internal class ChmodPostActionProcessor : PostActionProcessorBase { private static readonly Guid ActionProcessorId = new Guid("cb9a6cf3-4f5c-4860-b9d2-03a574959774"); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/IPostActionProcessor.cs b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/IPostActionProcessor.cs index 3a2c65c7677b..186845e014bb 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/IPostActionProcessor.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/IPostActionProcessor.cs @@ -8,7 +8,7 @@ namespace Microsoft.TemplateEngine.Cli.PostActionProcessors /// /// The interface defining the post action processor supported by dotnet CLI. /// - internal interface IPostActionProcessor : IIdentifiedComponent + public interface IPostActionProcessor : IIdentifiedComponent { /// /// Processes the post action. diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/InstructionDisplayPostActionProcessor.cs b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/InstructionDisplayPostActionProcessor.cs index 2e890e5b9192..38910d223001 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/InstructionDisplayPostActionProcessor.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/InstructionDisplayPostActionProcessor.cs @@ -1,11 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; namespace Microsoft.TemplateEngine.Cli.PostActionProcessors { - internal class InstructionDisplayPostActionProcessor : PostActionProcessor2Base + internal class InstructionDisplayPostActionProcessor : PostActionProcessorBase { private static readonly Guid ActionProcessorId = new Guid("AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C"); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/PostActionProcessorBase.cs b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/PostActionProcessorBase.cs index 7ed87d34d6ad..394b00b96b49 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/PostActionProcessorBase.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/PostActionProcessorBase.cs @@ -1,20 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System; -using System.IO; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Utils; using Newtonsoft.Json.Linq; namespace Microsoft.TemplateEngine.Cli.PostActionProcessors { - internal abstract class PostActionProcessor2Base : IPostActionProcessor + public abstract class PostActionProcessorBase : IPostActionProcessor { public abstract Guid Id { get; } - protected internal NewCommandCallbacks? Callbacks { get; set; } - public bool Process( IEngineEnvironmentSettings environment, IPostAction action, @@ -36,7 +32,7 @@ public bool Process( protected static IReadOnlyList GetTargetForSource(ICreationEffects2 creationEffects, string sourcePathGlob, string outputBasePath) { Glob g = Glob.Parse(sourcePathGlob); - List results = new List(); + List results = new(); if (creationEffects.FileChanges != null) { @@ -85,7 +81,7 @@ protected static IReadOnlyList GetTargetForSource(ICreationEffects2 crea } else if (config is JArray arr) { - List parts = new List(); + List parts = new(); foreach (JToken token in arr) { @@ -107,10 +103,7 @@ protected static IReadOnlyList GetTargetForSource(ICreationEffects2 crea IReadOnlyList ProcessPaths(IReadOnlyList paths) { - if (matchCriteria == null) - { - matchCriteria = p => true; - } + matchCriteria ??= p => true; return paths .SelectMany(t => GetTargetForSource(creationEffects2, t, outputBasePath)) .Where(t => matchCriteria(t)) diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/ProcessStartPostActionProcessor.cs b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/ProcessStartPostActionProcessor.cs index 3bf8e5e0201c..2c014d44069a 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/ProcessStartPostActionProcessor.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/ProcessStartPostActionProcessor.cs @@ -2,12 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem; namespace Microsoft.TemplateEngine.Cli.PostActionProcessors { - internal class ProcessStartPostActionProcessor : PostActionProcessor2Base + internal class ProcessStartPostActionProcessor : PostActionProcessorBase { internal static readonly Guid ActionProcessorId = new Guid("3A7C4B45-1F5D-4A30-959A-51B88E82B5D2"); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PublicAPI.Shipped.txt b/src/Cli/Microsoft.TemplateEngine.Cli/PublicAPI.Shipped.txt deleted file mode 100644 index c98c3e798b3b..000000000000 --- a/src/Cli/Microsoft.TemplateEngine.Cli/PublicAPI.Shipped.txt +++ /dev/null @@ -1,19 +0,0 @@ -#nullable enable - -Microsoft.TemplateEngine.Cli.Components -Microsoft.TemplateEngine.Cli.HostSpecificDataLoader -Microsoft.TemplateEngine.Cli.HostSpecificDataLoader.HostSpecificDataLoader(Microsoft.TemplateEngine.Abstractions.IEngineEnvironmentSettings! engineEnvironment) -> void -Microsoft.TemplateEngine.Cli.HostSpecificDataLoader.ReadHostSpecificTemplateData(Microsoft.TemplateEngine.Abstractions.ITemplateInfo! templateInfo) -> Microsoft.TemplateEngine.Cli.HostSpecificTemplateData! -Microsoft.TemplateEngine.Cli.HostSpecificTemplateData -Microsoft.TemplateEngine.Cli.HostSpecificTemplateData.HiddenParameterNames.get -> System.Collections.Generic.HashSet! -Microsoft.TemplateEngine.Cli.HostSpecificTemplateData.IsHidden.get -> bool -Microsoft.TemplateEngine.Cli.HostSpecificTemplateData.LongNameOverrides.get -> System.Collections.Generic.Dictionary! -Microsoft.TemplateEngine.Cli.HostSpecificTemplateData.ParametersToAlwaysShow.get -> System.Collections.Generic.HashSet! -Microsoft.TemplateEngine.Cli.HostSpecificTemplateData.ShortNameOverrides.get -> System.Collections.Generic.Dictionary! -Microsoft.TemplateEngine.Cli.HostSpecificTemplateData.SymbolInfo.get -> System.Collections.Generic.IReadOnlyDictionary!>! -Microsoft.TemplateEngine.Cli.IHostSpecificDataLoader -Microsoft.TemplateEngine.Cli.IHostSpecificDataLoader.ReadHostSpecificTemplateData(Microsoft.TemplateEngine.Abstractions.ITemplateInfo! templateInfo) -> Microsoft.TemplateEngine.Cli.HostSpecificTemplateData! -Microsoft.TemplateEngine.Cli.ITelemetryLogger -Microsoft.TemplateEngine.Cli.TelemetryLogger -static Microsoft.TemplateEngine.Cli.Components.AllComponents.get -> System.Collections.Generic.IReadOnlyList<(System.Type! Type, Microsoft.TemplateEngine.Abstractions.IIdentifiedComponent! Instance)>! -Microsoft.TemplateEngine.Cli.HostSpecificTemplateData.UsageExamples.get -> System.Collections.Generic.IReadOnlyList! diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PublicAPI.Unshipped.txt b/src/Cli/Microsoft.TemplateEngine.Cli/PublicAPI.Unshipped.txt deleted file mode 100644 index 8bf5394ea606..000000000000 --- a/src/Cli/Microsoft.TemplateEngine.Cli/PublicAPI.Unshipped.txt +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft.TemplateEngine.Cli.Commands.ICustomHelp -Microsoft.TemplateEngine.Cli.Commands.ICustomHelp.CustomHelpLayout() -> System.Collections.Generic.IEnumerable! -Microsoft.TemplateEngine.Cli.ITelemetryLogger.TrackEvent(string! eventName, System.Collections.Generic.IDictionary? properties = null, System.Collections.Generic.IDictionary? measurements = null) -> void -Microsoft.TemplateEngine.Cli.NewCommandCallbacks -Microsoft.TemplateEngine.Cli.NewCommandCallbacks.AddPackageReference.get -> System.Func? -Microsoft.TemplateEngine.Cli.NewCommandCallbacks.AddPackageReference.init -> void -Microsoft.TemplateEngine.Cli.NewCommandCallbacks.AddProjectReference.get -> System.Func!, bool>? -Microsoft.TemplateEngine.Cli.NewCommandCallbacks.AddProjectReference.init -> void -Microsoft.TemplateEngine.Cli.NewCommandCallbacks.AddProjectsToSolution.get -> System.Func!, string?, bool>? -Microsoft.TemplateEngine.Cli.NewCommandCallbacks.AddProjectsToSolution.init -> void -Microsoft.TemplateEngine.Cli.NewCommandCallbacks.NewCommandCallbacks() -> void -Microsoft.TemplateEngine.Cli.NewCommandCallbacks.OnFirstRun.init -> void -Microsoft.TemplateEngine.Cli.NewCommandCallbacks.RestoreProject.init -> void -Microsoft.TemplateEngine.Cli.NewCommandFactory -Microsoft.TemplateEngine.Cli.TelemetryLogger.TelemetryLogger(System.Action?, System.Collections.Generic.IDictionary?>? trackEvent, bool writeToConsole = false) -> void -Microsoft.TemplateEngine.Cli.TelemetryLogger.TrackEvent(string! eventName, System.Collections.Generic.IDictionary? properties = null, System.Collections.Generic.IDictionary? measurements = null) -> void -static Microsoft.TemplateEngine.Cli.NewCommandFactory.Create(string! commandName, System.Func! hostBuilder, System.Func! telemetryLoggerBuilder, Microsoft.TemplateEngine.Cli.NewCommandCallbacks! callbacks) -> System.CommandLine.Command! -Microsoft.TemplateEngine.Cli.NewCommandCallbacks.OnFirstRun.get -> System.Action? -Microsoft.TemplateEngine.Cli.NewCommandCallbacks.RestoreProject.get -> System.Func? -const Microsoft.TemplateEngine.Cli.TemplateSearch.CliHostSearchCacheData.DataName = "cliHostData" -> string! -Microsoft.TemplateEngine.Cli.TemplateSearch.CliHostSearchCacheData -static Microsoft.TemplateEngine.Cli.TemplateSearch.CliHostSearchCacheData.Reader.get -> System.Func! diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Reporter.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Reporter.cs deleted file mode 100644 index b22d9be2685c..000000000000 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Reporter.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace Microsoft.TemplateEngine.Cli -{ - internal class Reporter - { - private static readonly Reporter NullReporter = new Reporter(console: null); - private static object _lock = new object(); - - private readonly AnsiConsole? _console; - - static Reporter() - { - lock (_lock) - { - Output = new Reporter(AnsiConsole.GetOutput()); - Error = new Reporter(AnsiConsole.GetError()); - Verbose = IsVerbose ? - new Reporter(AnsiConsole.GetOutput()) : - NullReporter; - } - } - - internal Reporter(AnsiConsole? console) - { - _console = console; - } - - internal static Reporter Output { get; private set; } - - internal static Reporter Error { get; private set; } - - internal static Reporter Verbose { get; private set; } - - private static bool IsVerbose - { - get { return bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_CONTEXT_VERBOSE") ?? "false", out bool value) && value; } - } - - private bool ShouldPassAnsiCodesThrough - { - get { return bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_CONTEXT_ANSI_PASS_THRU") ?? "false", out bool value) && value; } - } - - internal void WriteLine(string message) - { - lock (_lock) - { - if (ShouldPassAnsiCodesThrough) - { - _console?.Writer?.WriteLine(message); - } - else - { - _console?.WriteLine(message); - } - } - } - - internal void WriteLine() - { - lock (_lock) - { - _console?.Writer?.WriteLine(); - } - } - - internal void Write(string message) - { - lock (_lock) - { - if (ShouldPassAnsiCodesThrough) - { - _console?.Writer?.Write(message); - } - else - { - _console?.Write(message); - } - } - } - } -} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/ReporterExtensions.cs b/src/Cli/Microsoft.TemplateEngine.Cli/ReporterExtensions.cs index e83ea14fb082..dba91322b118 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/ReporterExtensions.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/ReporterExtensions.cs @@ -3,7 +3,7 @@ using System.Diagnostics; using System.Text; -using System.Text.RegularExpressions; +using Microsoft.DotNet.Cli.Utils; namespace Microsoft.TemplateEngine.Cli { diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/TabularOutput/TemplateGroupDisplay.cs b/src/Cli/Microsoft.TemplateEngine.Cli/TabularOutput/TemplateGroupDisplay.cs index 724d83d5c3bb..e5a4fab34511 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/TabularOutput/TemplateGroupDisplay.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/TabularOutput/TemplateGroupDisplay.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.IO; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Cli.Commands; using Microsoft.TemplateEngine.Utils; @@ -26,7 +27,7 @@ internal static void DisplayTemplateList( IEngineEnvironmentSettings engineEnvironmentSettings, IEnumerable templateGroups, TabularOutputSettings helpFormatterSettings, - Reporter reporter, + IReporter reporter, string? selectedLanguage = null) { IReadOnlyCollection groupsForDisplay = GetTemplateGroupsForListDisplay( @@ -53,7 +54,7 @@ internal static void DisplayTemplateList( IEngineEnvironmentSettings engineEnvironmentSettings, IEnumerable templates, TabularOutputSettings helpFormatterSettings, - Reporter reporter, + IReporter reporter, string? selectedLanguage = null) { IReadOnlyCollection groupsForDisplay = GetTemplateGroupsForListDisplay( @@ -149,7 +150,7 @@ private static IReadOnlyList GetTemplateGroupsForListDisp private static void DisplayTemplateList( IReadOnlyCollection groupsForDisplay, TabularOutputSettings tabularOutputSettings, - Reporter reporter) + IReporter reporter) { TabularOutput formatter = TabularOutput diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/TemplateInvoker.cs b/src/Cli/Microsoft.TemplateEngine.Cli/TemplateInvoker.cs index b73ba09b4348..e387229735cd 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/TemplateInvoker.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/TemplateInvoker.cs @@ -3,6 +3,7 @@ using System.IO; using System.Text.RegularExpressions; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem; using Microsoft.TemplateEngine.Abstractions.TemplatePackage; @@ -20,23 +21,20 @@ internal class TemplateInvoker private readonly IEngineEnvironmentSettings _environmentSettings; private readonly ITelemetryLogger _telemetryLogger; private readonly Func _inputGetter; - private readonly NewCommandCallbacks _callbacks; private readonly TemplateCreator _templateCreator; private readonly PostActionDispatcher _postActionDispatcher; internal TemplateInvoker( IEngineEnvironmentSettings environment, ITelemetryLogger telemetryLogger, - Func inputGetter, - NewCommandCallbacks callbacks) + Func inputGetter) { _environmentSettings = environment; _telemetryLogger = telemetryLogger; _inputGetter = inputGetter; - _callbacks = callbacks; _templateCreator = new TemplateCreator(_environmentSettings); - _postActionDispatcher = new PostActionDispatcher(_environmentSettings, _callbacks, _inputGetter); + _postActionDispatcher = new PostActionDispatcher(_environmentSettings, _inputGetter); } internal async Task InvokeTemplateAsync(TemplateCommandArgs templateArgs, CancellationToken cancellationToken) diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/TemplateListCoordinator.cs b/src/Cli/Microsoft.TemplateEngine.Cli/TemplateListCoordinator.cs index 9461fd5122d9..56d257027ff3 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/TemplateListCoordinator.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/TemplateListCoordinator.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Text; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Cli.Commands; using Microsoft.TemplateEngine.Cli.TabularOutput; diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/TemplatePackageCoordinator.cs b/src/Cli/Microsoft.TemplateEngine.Cli/TemplatePackageCoordinator.cs index d28b74f08343..d8f773a60fd2 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/TemplatePackageCoordinator.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/TemplatePackageCoordinator.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.CommandLine; -using System.CommandLine.Parsing; -using System.ComponentModel.DataAnnotations; -using System.Runtime.CompilerServices; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Abstractions.Constraints; using Microsoft.TemplateEngine.Abstractions.Installer; diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/TemplateSearch/CliHostSearchCacheData.cs b/src/Cli/Microsoft.TemplateEngine.Cli/TemplateSearch/CliHostSearchCacheData.cs index 5947b3735cc1..93b6ac4f8f2f 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/TemplateSearch/CliHostSearchCacheData.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/TemplateSearch/CliHostSearchCacheData.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Microsoft.DotNet.Cli.Utils; using Newtonsoft.Json.Linq; namespace Microsoft.TemplateEngine.Cli.TemplateSearch diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/TemplateSearch/CliTemplateSearchCoordinator.cs b/src/Cli/Microsoft.TemplateEngine.Cli/TemplateSearch/CliTemplateSearchCoordinator.cs index b38bce91feed..5e4c4fdaa96d 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/TemplateSearch/CliTemplateSearchCoordinator.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/TemplateSearch/CliTemplateSearchCoordinator.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Text; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Abstractions.TemplatePackage; using Microsoft.TemplateEngine.Cli.Commands; diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf index c1b1f3e7f3fd..3c2b198ea62c 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf @@ -651,117 +651,11 @@ The header is followed by the list of parameters and their errors (might be seve Chcete tuto akci spustit? [{0}(ano)|{1}(ne)] - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - Akce Přidat odkaz na projekt do řešení není v šabloně správně nakonfigurovaná. Nedají se určit soubory projektu, které se mají přidat. - - - - Unable to determine which solution file to add the reference to. - Nedá se určit, do kterého souboru řešení se má odkaz přidat. - - - - Failed to add project(s) to a solution file. - Přidání projektu/ů do souboru řešení se nezdařilo. - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - Přidávání - projektu/ů: {0} - do souboru řešení: {1} - složka řešení: {2} - - - - Successfully added project(s) to a solution file. - Projekt(y) se úspěšně přidal(y) do souboru řešení. - - - - Adding a package reference {0} to project file {1}: - Přidávání reference balíčku {0} do souboru projektu {1}: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - Přidávání reference balíčku {0} (verze: {1}) do souboru projektu {2}: - - - - Adding a project reference {0} to project file {1}: - Přidávání reference projektu {0} do souboru projektu {1}: - - - - Add reference action is not configured correctly in the template. - V šabloně není správně nakonfigurovaná akce pro přidání odkazu. - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - Do projektu se nedá automaticky přidat odkaz na rozhraní {0}. Pokud ho chcete přidat, upravte soubor projektu ručně. - - - - Project files found: - Nalezené soubory projektu: - - - - Unable to determine which project file to add the reference to. - Nepovedlo se určit, do kterého souboru projektu se má odkaz přidat. - - - - Adding reference type {0} is not supported. - Přidávání typu odkazu {0} se nepodporuje. - - - - Failed to add a reference to the project file. - Přidání reference do souboru projektu se nezdařilo. - - - - Successfully added a reference to the project file. - Reference se úspěšně přidala do souboru projektu. - - Failed to run the command: argument 'executable' is missing in post action configuration. Příkaz se nepodařilo spustit. V konfiguraci akce publikování chybí argument executable. - - Couldn't determine files to restore. - Soubory k obnovení se nepodařilo určit. - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - Nejsou nakonfigurovány žádné projekty k obnovení. Ověřte konfiguraci primárních výstupů v template.json. - - - - Restore failed. - Obnovení neproběhlo úspěšně. - - - - Restoring {0}: - Obnovování {0}: - {0} - path to a project to restore - - - Restore succeeded. - Obnovení proběhlo úspěšně. - - Processing post-creation actions... Zpracovávají se akce po vytvoření... @@ -824,22 +718,22 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + Nelze najít zadaný obsah šablony. Balíček šablony může být odebrán nebo poškozen. To install the template package, run: - To install the template package, run: + Balíček šablony nainstalujete spuštěním příkazu: The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + Pokud chcete znovu prohledat nainstalované balíčky šablon, spusťte: The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + Balíček šablony odinstalujete spuštěním příkazu: The sentence is followed by the command to run the action diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf index 9bcd7f41853d..2cd0450a3e95 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf @@ -26,7 +26,7 @@ Alias '{0}' is a template short name, and therefore cannot be aliased. - Der Alias \"{0}\" ist ein Kurzname für die Vorlage und kann daher nicht als Alias verwendet werden. + Der Alias "{0}" ist ein Kurzname für die Vorlage und kann daher nicht als Alias verwendet werden. @@ -38,7 +38,7 @@ Successfully created alias named '{0}' with value '{1}' - Der Alias mit dem Namen \"{0}\" wurde mit dem Wert \"{1}\" erfolgreich erstellt. + Der Alias mit dem Namen "{0}" wurde mit dem Wert "{1}" erfolgreich erstellt. @@ -73,12 +73,12 @@ Unable to remove alias '{0}'. It did not exist. - Der Alias \"{0}\" kann nicht entfernt werden. Es war nicht vorhanden. + Der Alias "{0}" kann nicht entfernt werden. Es war nicht vorhanden. Successfully removed alias named '{0}' whose value was '{1}'. - Der Alias mit dem Namen \"{0}\", dessen Wert \"{1}\" war, wurde erfolgreich entfernt. + Der Alias mit dem Namen "{0}", dessen Wert "{1}" war, wurde erfolgreich entfernt. @@ -89,13 +89,13 @@ Unknown alias name '{0}'. Run 'dotnet {1} --show-aliases' with no args to show all aliases. - Unbekannter Aliasname \"{0}\". -Führen Sie \"dotnet {1}--show-aliases\" ohne Argumente aus, um alle Aliase anzuzeigen. + Unbekannter Aliasname "{0}". +Führen Sie "dotnet {1}--show-aliases" ohne Argumente aus, um alle Aliase anzuzeigen. Successfully updated alias named '{0}' to value '{1}'. - Der Alias mit dem Namen \"{0}\" wurde erfolgreich auf den Wert \"{1}\" aktualisiert. + Der Alias mit dem Namen "{0}" wurde erfolgreich auf den Wert "{1}" aktualisiert. @@ -125,7 +125,7 @@ Führen Sie \"dotnet {1}--show-aliases\" ohne Argumente aus, um alle Aliase anzu The value '{1}' is ambiguous for option {0}. - Der Wert \"{1}\" ist für die Option \"{0}\" mehrdeutig. + Der Wert "{1}" ist für die Option "{0}" mehrdeutig. @@ -145,7 +145,7 @@ Führen Sie \"dotnet {1}--show-aliases\" ohne Argumente aus, um alle Aliase anzu The package {0} is not correct, uninstall it and report the issue to the package author. - Das Paket \"{0}\" ist falsch, deinstallieren Sie es, und melden Sie das Problem dem Paketautor. + Das Paket "{0}" ist falsch, deinstallieren Sie es, und melden Sie das Problem dem Paketautor. @@ -155,7 +155,7 @@ Führen Sie \"dotnet {1}--show-aliases\" ohne Argumente aus, um alle Aliase anzu Extra args file {0} is not formatted properly. - Die zusätzliche Argumentdateidatei \"{0}\" ist nicht ordnungsgemäß formatiert. + Die zusätzliche Argumentdateidatei "{0}" ist nicht ordnungsgemäß formatiert. @@ -195,7 +195,7 @@ Führen Sie \"dotnet {1}--show-aliases\" ohne Argumente aus, um alle Aliase anzu Template '{0}' was not found. - Vorlage \"{0}\" wurde nicht gefunden. + Vorlage "{0}" wurde nicht gefunden. @@ -450,17 +450,17 @@ The header is followed by the list of parameters and their errors (might be seve The default value '{1}' is not a valid value for {0}. - Der Standardwert \"{1}\" ist kein gültiger Wert für {0}. + Der Standardwert "{1}" ist kein gültiger Wert für {0}. '{1}' is not a valid value for {0}. - \"{1}\" ist kein gültiger Wert für {0}. + "{1}" ist kein gültiger Wert für {0}. '{0}' is not a valid option - \"{0}\" ist keine gültige Option + "{0}" ist keine gültige Option @@ -470,7 +470,7 @@ The header is followed by the list of parameters and their errors (might be seve Invalid command syntax: use '{0}' instead. - Ungültige Befehlssyntax: Verwenden Sie stattdessen \"{0}\". + Ungültige Befehlssyntax: Verwenden Sie stattdessen "{0}". {0} - command syntax, example: dotnet new [PARTIAL_NAME] --list [FILTER_OPTIONS]. @@ -505,7 +505,7 @@ The header is followed by the list of parameters and their errors (might be seve No templates found matching: {0}. - Keine Vorlagen gefunden, die \"{0}\" entsprechen. + Keine Vorlagen gefunden, die "{0}" entsprechen. @@ -623,7 +623,7 @@ The header is followed by the list of parameters and their errors (might be seve Execution of 'Run script' post action is not allowed. - Die Ausführung der nachfolgenden Aktion \"Skript ausführen\" ist nicht zulässig. + Die Ausführung der nachfolgenden Aktion "Skript ausführen" ist nicht zulässig. @@ -651,115 +651,9 @@ The header is followed by the list of parameters and their errors (might be seve Möchten Sie diese Aktion ausführen [{0} (ja) |{1} (nein)]? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - Die Aktion „Projektverweis zur Projektmappe hinzufügen“ ist in der Vorlage nicht ordnungsgemäß konfiguriert. Die hinzuzufügenden Projektdateien können nicht ermittelt werden. - - - - Unable to determine which solution file to add the reference to. - Es konnte nicht bestimmt werden, welcher Projektmappendatei der Verweis hinzugefügt werden soll. - - - - Failed to add project(s) to a solution file. - Projekt(e) konnten nicht zu einer Lösungsdatei hinzugefügt werden. - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - Projekte - hinzufügen: {0} - zur Lösungsdatei: {1} - Lösungsordner: {2} - - - - Successfully added project(s) to a solution file. - Projekt(e) erfolgreich zu einer Projektmappendatei hinzugefügt. - - - - Adding a package reference {0} to project file {1}: - Hinzufügen einer Paketreferenz {0} zur Projektdatei {1}: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - Hinzufügen einer Paketreferenz {0} (Version: {1}) zur Projektdatei {2}: - - - - Adding a project reference {0} to project file {1}: - Hinzufügen einer Projektreferenz {0} zur Projektdatei {1}: - - - - Add reference action is not configured correctly in the template. - Die Aktion zum Hinzufügen von Verweisen ist in der Vorlage nicht korrekt konfiguriert. - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - Der Framework-Verweis \"{0}\" konnte dem Projekt nicht automatisch hinzugefügt werden. Bearbeiten Sie die Projektdatei manuell, um sie hinzuzufügen. - - - - Project files found: - Gefundene Projektdateien: - - - - Unable to determine which project file to add the reference to. - Es konnte nicht bestimmt werden, welcher Projektdatei der Verweis hinzugefügt werden soll. - - - - Adding reference type {0} is not supported. - Das Hinzufügen des Verweistyps {0} wird nicht unterstützt. - - - - Failed to add a reference to the project file. - Fehler beim Hinzufügen einer Referenz zur Projektdatei. - - - - Successfully added a reference to the project file. - Der Projektdatei wurde erfolgreich ein Verweis hinzugefügt. - - Failed to run the command: argument 'executable' is missing in post action configuration. - Fehler beim Ausführen des Befehls: das Argument \"Ausführbare Datei\" fehlt in der Konfiguration der nachfolgenden Aktion. - - - - Couldn't determine files to restore. - Für die Wiederherstellung konnten keine Dateien ermittelt werden. - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - Es sind keine Projekte für die Wiederherstellung konfiguriert. Überprüfen Sie die primäre Ausgabekonfiguration in template.json. - - - - Restore failed. - Fehler beim Wiederherstellen. - - - - Restoring {0}: - Wiederherstellung {0}: - {0} - path to a project to restore - - - Restore succeeded. - Wiederherstellung erfolgreich. + Fehler beim Ausführen des Befehls: das Argument "Ausführbare Datei" fehlt in der Konfiguration der nachfolgenden Aktion. @@ -779,7 +673,7 @@ The header is followed by the list of parameters and their errors (might be seve Running command '{0}'... - Befehl \"{0}\" wird ausgeführt... + Befehl "{0}" wird ausgeführt... @@ -789,7 +683,7 @@ The header is followed by the list of parameters and their errors (might be seve Error reading the installed configuration, file may be corrupted. If this problem persists, try resetting with the `--debug:reinit' flag - Fehler beim Lesen der installierten Konfiguration, die Datei ist möglicherweise beschädigt. Wenn dieses Problem weiterhin besteht, versuchen Sie dies mit dem Flag \"--debug:reinit\" zurückzusetzen. + Fehler beim Lesen der installierten Konfiguration, die Datei ist möglicherweise beschädigt. Wenn dieses Problem weiterhin besteht, versuchen Sie dies mit dem Flag "--debug:reinit" zurückzusetzen. @@ -824,27 +718,27 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + Der angegebene Vorlageninhalt wurde nicht gefunden. Möglicherweise wurde das Vorlagenpaket entfernt oder beschädigt. To install the template package, run: - To install the template package, run: + Führen Sie zum Installieren des Vorlagenpakets Folgendes aus: The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + Führen Sie zum erneuten Überprüfen der installierten Vorlagenpakete Folgendes aus: The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + Führen Sie zum Deinstallieren des Vorlagenpakets Folgendes aus: The sentence is followed by the command to run the action The '{0}' command creates a .NET project based on a template. - Mit dem Befehl \"{0}\" wird ein NET-Projekt basierend auf einer Vorlage erstellt. + Mit dem Befehl "{0}" wird ein NET-Projekt basierend auf einer Vorlage erstellt. @@ -895,7 +789,7 @@ The header is followed by the list of parameters and their errors (might be seve Could not find the template package containing template '{0}' - Das Vorlagenpaket mit der Vorlage \"{0}\" wurde nicht gefunden. + Das Vorlagenpaket mit der Vorlage "{0}" wurde nicht gefunden. @@ -905,12 +799,12 @@ The header is followed by the list of parameters and their errors (might be seve The template package '{0}' is not found. - Das Vorlagenpaket \"{0}\" wurde nicht gefunden. + Das Vorlagenpaket "{0}" wurde nicht gefunden. The template '{0}' is included to the packages: - Die Vorlage \"{0}\" ist in die Pakete enthalten: + Die Vorlage "{0}" ist in die Pakete enthalten: @@ -925,7 +819,7 @@ The header is followed by the list of parameters and their errors (might be seve The command is attempting to install the template package '{0}' twice, check the arguments and retry. - Der Befehl versucht, das Vorlagenpaket \"{0}\" zweimal zu installieren, überprüfen Sie die Argumente, und versuchen Sie es noch mal. + Der Befehl versucht, das Vorlagenpaket "{0}" zweimal zu installieren, überprüfen Sie die Argumente, und versuchen Sie es noch mal. @@ -1020,7 +914,7 @@ The header is followed by the list of parameters and their errors (might be seve An update for template package '{0}' is available. - Ein Update für das Vorlagenpaket \"{0}\" ist verfügbar. + Ein Update für das Vorlagenpaket "{0}" ist verfügbar. @@ -1050,32 +944,32 @@ The header is followed by the list of parameters and their errors (might be seve {0} could not be installed, download failed. - \"{0}\" konnte nicht installiert werden: Fehler beim Download. + "{0}" konnte nicht installiert werden: Fehler beim Download. {0} could not be installed. - \"{0}\" konnte nicht installiert werden. + "{0}" konnte nicht installiert werden. {0} could not be installed, no NuGet feeds are configured or they are invalid. - \"{0}\" konnte nicht installiert werden: Es sind keine NuGet-Feeds konfiguriert, oder die Feeds sind ungültig. + "{0}" konnte nicht installiert werden: Es sind keine NuGet-Feeds konfiguriert, oder die Feeds sind ungültig. Failed to install {0}, failed to uninstall previous version of the template package. - Fehler beim Installieren von \"{0}\": Die vorherige Version des Vorlagenpakets konnte nicht deinstalliert werden. + Fehler beim Installieren von "{0}": Die vorherige Version des Vorlagenpakets konnte nicht deinstalliert werden. {0} could not be installed, the package does not exist. - \"{0}\" konnte nicht installiert werden, das Paket ist nicht vorhanden. + "{0}" konnte nicht installiert werden, das Paket ist nicht vorhanden. Failed to install {0}, the template package is invalid. - Fehler beim Installieren von \"{0}\": Das Vorlagenpaket ist ungültig. + Fehler beim Installieren von "{0}": Das Vorlagenpaket ist ungültig. @@ -1090,7 +984,7 @@ The header is followed by the list of parameters and their errors (might be seve No templates were found in the package {0}. - Im Pakt \"{0}\" wurden keine Vorlagen gefunden. + Im Pakt "{0}" wurden keine Vorlagen gefunden. diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf index 95b346ba84b0..bb1a0e7db02b 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf @@ -26,7 +26,7 @@ Alias '{0}' is a template short name, and therefore cannot be aliased. - El alias \"{0}\" es un nombre corto de plantilla y, por lo tanto, no puede tener alias. + El alias "{0}" es un nombre corto de plantilla y, por lo tanto, no puede tener alias. @@ -38,7 +38,7 @@ Successfully created alias named '{0}' with value '{1}' - Se creó correctamente el alias denominado \"{0}\" con el valor \"{1}\" + Se creó correctamente el alias denominado "{0}" con el valor "{1}" @@ -73,12 +73,12 @@ Unable to remove alias '{0}'. It did not exist. - No se puede quitar el alias \"{0}\". No existe. + No se puede quitar el alias "{0}". No existe. Successfully removed alias named '{0}' whose value was '{1}'. - Se quitó correctamente el alias denominado \"{0}\" cuyo valor era \"{1}\". + Se quitó correctamente el alias denominado "{0}" cuyo valor era "{1}". @@ -89,13 +89,13 @@ Unknown alias name '{0}'. Run 'dotnet {1} --show-aliases' with no args to show all aliases. - Nombre de alias desconocido \"{0}\". -Ejecute \"dotnet {1} --show-aliases\" sin argumentos para mostrar todos los alias. + Nombre de alias desconocido "{0}". +Ejecute "dotnet {1} --show-aliases" sin argumentos para mostrar todos los alias. Successfully updated alias named '{0}' to value '{1}'. - El alias denominado \"{0}\" se actualizó correctamente al valor \"{1}\". + El alias denominado "{0}" se actualizó correctamente al valor "{1}". @@ -125,7 +125,7 @@ Ejecute \"dotnet {1} --show-aliases\" sin argumentos para mostrar todos los alia The value '{1}' is ambiguous for option {0}. - El valor \"{1}\" es ambiguo para la opción {0}. + El valor "{1}" es ambiguo para la opción {0}. @@ -195,7 +195,7 @@ Ejecute \"dotnet {1} --show-aliases\" sin argumentos para mostrar todos los alia Template '{0}' was not found. - No se encontró la plantilla \"{0}\". + No se encontró la plantilla "{0}". @@ -450,17 +450,17 @@ The header is followed by the list of parameters and their errors (might be seve The default value '{1}' is not a valid value for {0}. - El valor predeterminado \"{1}\" no es un valor válido para {0}. + El valor predeterminado "{1}" no es un valor válido para {0}. '{1}' is not a valid value for {0}. - \"{1}\" no es un valor válido para \"{0}\". + "{1}" no es un valor válido para "{0}". '{0}' is not a valid option - \"{0}\" no es una opción válida + "{0}" no es una opción válida @@ -470,7 +470,7 @@ The header is followed by the list of parameters and their errors (might be seve Invalid command syntax: use '{0}' instead. - Sintaxis de comando no válida: utilice \"{0}\" en su lugar. + Sintaxis de comando no válida: utilice "{0}" en su lugar. {0} - command syntax, example: dotnet new [PARTIAL_NAME] --list [FILTER_OPTIONS]. @@ -623,7 +623,7 @@ The header is followed by the list of parameters and their errors (might be seve Execution of 'Run script' post action is not allowed. - No se permite la ejecución de la acción posterior \"Ejecutar el script\". + No se permite la ejecución de la acción posterior "Ejecutar el script". @@ -651,115 +651,9 @@ The header is followed by the list of parameters and their errors (might be seve ¿Quiere ejecutar esta acción [{0}(yes)|{1}(no)]? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - La acción de agregar una referencia de proyecto a la solución no está configurada correctamente en la plantilla. No se pueden determinar los archivos de proyecto que se van a agregar. - - - - Unable to determine which solution file to add the reference to. - No se puede determinar a qué archivo de solución debe agregarse la referencia. - - - - Failed to add project(s) to a solution file. - No se pudieron agregar proyectos a un archivo de solución. - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - Agregando - proyectos: {0} - al archivo de solución: {1} - carpeta de la solución: {2} - - - - Successfully added project(s) to a solution file. - Los proyectos se agregaron correctamente a un archivo de solución. - - - - Adding a package reference {0} to project file {1}: - Agregando un paquete de referencia {0} al archivo de proyecto {1}: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - Agregando una referencia de paquete {0} (versión: {1}) al archivo de proyecto {2}: - - - - Adding a project reference {0} to project file {1}: - Agregando un proyecto de referencia {0} al archivo de proyecto {1}: - - - - Add reference action is not configured correctly in the template. - La acción Agregar referencia no está bien configurada en la plantilla. - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - No se puede agregar automáticamente la referencia de marco {0} al proyecto. Edite manualmente el archivo del proyecto para agregarla. - - - - Project files found: - Archivos de proyecto encontrados: - - - - Unable to determine which project file to add the reference to. - No se puede determinar a qué archivo de proyecto debe agregarse la referencia. - - - - Adding reference type {0} is not supported. - No se puede agregar el tipo de referencia {0}. - - - - Failed to add a reference to the project file. - No se pudo agregar una referencia al archivo de proyecto. - - - - Successfully added a reference to the project file. - Se agregó correctamente una referencia al archivo de proyecto. - - Failed to run the command: argument 'executable' is missing in post action configuration. - No se pudo ejecutar el comando: falta el argumento \"executable\" en la configuración de la acción posterior. - - - - Couldn't determine files to restore. - No se pudieron determinar los archivos que se van a restaurar. - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - No hay ningún proyecto configurado para restaurar. Compruebe la configuración de las salidas principales en template.json. - - - - Restore failed. - Error en la restauración. - - - - Restoring {0}: - Restaurando {0}: - {0} - path to a project to restore - - - Restore succeeded. - Restauración realizada correctamente. + No se pudo ejecutar el comando: falta el argumento "executable" en la configuración de la acción posterior. @@ -779,7 +673,7 @@ The header is followed by the list of parameters and their errors (might be seve Running command '{0}'... - Ejecutando comando \"{0}\"... + Ejecutando comando "{0}"... @@ -789,7 +683,7 @@ The header is followed by the list of parameters and their errors (might be seve Error reading the installed configuration, file may be corrupted. If this problem persists, try resetting with the `--debug:reinit' flag - Error al leer la configuración instalada, es posible que el archivo esté dañado. Si el problema persiste, pruebe a restablecer con la marca \"--debug:reinit\" + Error al leer la configuración instalada, es posible que el archivo esté dañado. Si el problema persiste, pruebe a restablecer con la marca "--debug:reinit" @@ -824,22 +718,22 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + No se encuentra el contenido de la plantilla especificada. Es posible que el paquete de plantillas se haya quitado o esté dañado. To install the template package, run: - To install the template package, run: + Para instalar el paquete de plantillas, ejecute: The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + Para volver a examinar los paquetes de plantillas instalados, ejecute: The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + Para desinstalar el paquete de plantillas, ejecute: The sentence is followed by the command to run the action @@ -895,7 +789,7 @@ The header is followed by the list of parameters and their errors (might be seve Could not find the template package containing template '{0}' - No encontró el paquete de plantillas que contiene la plantilla \"{0}\" + No encontró el paquete de plantillas que contiene la plantilla "{0}" @@ -905,12 +799,12 @@ The header is followed by the list of parameters and their errors (might be seve The template package '{0}' is not found. - No se encuentra el paquete de plantillas \"{0}\". + No se encuentra el paquete de plantillas "{0}". The template '{0}' is included to the packages: - La plantilla \"{0}\" se incluye en los paquetes: + La plantilla "{0}" se incluye en los paquetes: @@ -925,7 +819,7 @@ The header is followed by the list of parameters and their errors (might be seve The command is attempting to install the template package '{0}' twice, check the arguments and retry. - El comando está intentando instalar el paquete de plantillas \"{0}\" dos veces, compruebe los argumentos y vuelva a intentarlo. + El comando está intentando instalar el paquete de plantillas "{0}" dos veces, compruebe los argumentos y vuelva a intentarlo. @@ -1020,7 +914,7 @@ The header is followed by the list of parameters and their errors (might be seve An update for template package '{0}' is available. - Hay disponible una actualización para el paquete de plantillas \"{0}\". + Hay disponible una actualización para el paquete de plantillas "{0}". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf index 5964dc6a4f5f..e21f029e647f 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf @@ -651,117 +651,11 @@ The header is followed by the list of parameters and their errors (might be seve Voulez-vous exécuter cette action [{0} (yes) |{1} (no)] ? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - L’ajout d’une référence de projet à l’action de solution n’est pas configuré correctement dans le modèle. Impossible de déterminer les fichiers de projet à ajouter. - - - - Unable to determine which solution file to add the reference to. - Impossible de déterminer le fichier solution auquel ajouter la référence. - - - - Failed to add project(s) to a solution file. - Échec de l’ajout du ou des projets à un fichier solution. - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - Ajout - du ou des projets : {0} - au fichier de solution : {1} - Dossier de solution : {2} - - - - Successfully added project(s) to a solution file. - Projet(s) ajouté(s) à un fichier solution. - - - - Adding a package reference {0} to project file {1}: - Ajout d’une référence de package {0} au fichier projet {1} : - - - - Adding a package reference {0} (version: {1}) to project file {2}: - Ajout d’une référence de package {0} (version : {1}) au fichier projet {2} : - - - - Adding a project reference {0} to project file {1}: - Ajout d’une référence de projet {0} au fichier projet {1} : - - - - Add reference action is not configured correctly in the template. - L'action d'ajout d'une référence n'est pas configurée correctement dans le modèle. - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - Impossible d’ajouter automatiquement la référence d’infrastructure {0} au projet. Modifiez manuellement le fichier projet pour l’ajouter. - - - - Project files found: - Fichiers projet trouvés : - - - - Unable to determine which project file to add the reference to. - Impossible de déterminer le fichier projet auquel ajouter la référence. - - - - Adding reference type {0} is not supported. - L'ajout du type de référence {0} n'est pas pris en charge. - - - - Failed to add a reference to the project file. - Échec de l’ajout d’une référence au fichier projet. - - - - Successfully added a reference to the project file. - Une référence au fichier projet a été ajoutée. - - Failed to run the command: argument 'executable' is missing in post action configuration. Échec de l’exécution de la commande : l’argument « Exécutable » est manquant dans la configuration de l’action de publication. - - Couldn't determine files to restore. - Impossible de déterminer les fichiers à restaurer. - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - Aucun projet n’est configuré pour la restauration. Vérifiez la configuration des sorties principales dans template.json. - - - - Restore failed. - Échec de la restauration. - - - - Restoring {0}: - Restauration de {0} : - {0} - path to a project to restore - - - Restore succeeded. - Restauration réussie. - - Processing post-creation actions... Traitement des actions postérieures à la création en cours... Merci de patienter. @@ -824,22 +718,22 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + Le contenu du modèle spécifié est introuvable. Le package de modèles est peut-être supprimé ou endommagé. To install the template package, run: - To install the template package, run: + Pour installer le package de modèles, exécutez : The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + Pour relancer l’analyse des packages de modèles installés, exécutez : The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + Pour désinstaller le package de modèles, exécutez : The sentence is followed by the command to run the action diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf index 9f02e515ff86..b68834205f29 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf @@ -623,7 +623,7 @@ The header is followed by the list of parameters and their errors (might be seve Execution of 'Run script' post action is not allowed. - L'esecuzione dell'azione post \"Esegui script\" non è consentita. + L'esecuzione dell'azione post "Esegui script" non è consentita. @@ -651,115 +651,9 @@ The header is followed by the list of parameters and their errors (might be seve Eseguire questa azione [{0} (sì) |{1} (no)]? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - L'aggiunta del riferimento al progetto all'azione della soluzione non è configurata correttamente nel modello. Non è possibile determinare i file di progetto da aggiungere. - - - - Unable to determine which solution file to add the reference to. - Non è possibile determinare il file di soluzione a cui aggiungere il riferimento. - - - - Failed to add project(s) to a solution file. - Non è stato possibile aggiungere il/i progetto/i a un file di soluzione. - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - Aggiunta di - progetti: {0} - al file della soluzione: {1} - cartella della soluzione: {2} - - - - Successfully added project(s) to a solution file. - I progetti sono stati aggiunti a un file di soluzione. - - - - Adding a package reference {0} to project file {1}: - Aggiunta di un riferimento al pacchetto {0} al file di progetto {1}: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - Aggiunta di un riferimento al pacchetto {0} (versione: {1}) al file di progetto {2}: - - - - Adding a project reference {0} to project file {1}: - Aggiunta di un riferimento al progetto {0} al file di progetto {1}: - - - - Add reference action is not configured correctly in the template. - L'azione di aggiunta del riferimento non è configurata correttamente nel modello. - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - Non è possibile aggiungere automaticamente il riferimento framework {0} al progetto. Modificare manualmente il file di progetto per aggiungerlo. - - - - Project files found: - File di progetto trovati: - - - - Unable to determine which project file to add the reference to. - Non è possibile determinare il file di progetto a cui aggiungere il riferimento. - - - - Adding reference type {0} is not supported. - L'aggiunta del tipo riferimento {0} non è supportata. - - - - Failed to add a reference to the project file. - Non è stato possibile aggiungere un riferimento al file di progetto. - - - - Successfully added a reference to the project file. - Aggiunta di un riferimento al file di progetto completata. - - Failed to run the command: argument 'executable' is missing in post action configuration. - Non è stato possibile eseguire il comando: argomento \"eseguibile\" mancante nella configurazione dell'azione post. - - - - Couldn't determine files to restore. - Non è stato possibile determinare i file da ripristinare. - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - Nessun progetto configurato per il ripristino. Controllare la configurazione degli output in template.json. - - - - Restore failed. - Il ripristino non è riuscito. - - - - Restoring {0}: - Ripristino di {0}: - {0} - path to a project to restore - - - Restore succeeded. - Il ripristino è riuscito. + Non è stato possibile eseguire il comando: argomento "eseguibile" mancante nella configurazione dell'azione post. @@ -824,22 +718,22 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + Impossibile individuare il contenuto del modello specificato. Il pacchetto di modelli potrebbe essere stato rimosso o danneggiato. To install the template package, run: - To install the template package, run: + Per installare il pacchetto di modelli, usare: The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + Per ripetere l'analisi dei pacchetti di modelli installati, eseguire: The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + Per disinstallare il pacchetto di modelli, usare: The sentence is followed by the command to run the action diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf index 15a83b252f9a..142d957026c8 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf @@ -651,117 +651,11 @@ The header is followed by the list of parameters and their errors (might be seve このアクションを実行しますか[{0} (はい) |{1} (いいえ)] ですか? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - ソリューションへのプロジェクト参照追加のアクションがテンプレートで正しく構成されていません。追加するプロジェクトファイルを特定できません。 - - - - Unable to determine which solution file to add the reference to. - 参照の追加先となるソリューション ファイルを特定できませんでした。 - - - - Failed to add project(s) to a solution file. - プロジェクトをソリューション ファイルに追加できませんでした。 - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - 追加しています - プロジェクト: {0} - ターゲットのソリューション ファイル: {1} - ソリューション フォルダー: {2} - - - - Successfully added project(s) to a solution file. - プロジェクトがソリューション ファイルに正常に追加されました。 - - - - Adding a package reference {0} to project file {1}: - パッケージ参照 {0} をプロジェクト ファイル {1} に追加しています: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - パッケージ参照 {0} (バージョン: {1}) をプロジェクト ファイル {2} に追加しています: - - - - Adding a project reference {0} to project file {1}: - プロジェクト参照 {0} をプロジェクト ファイル {1} に追加しています: - - - - Add reference action is not configured correctly in the template. - 参照の追加アクションがテンプレートに正しく構成されていません。 - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - フレームワーク参照 {0} をプロジェクトに自動的に追加できません。プロジェクト ファイルを手動で編集して追加します。 - - - - Project files found: - 見つかったプロジェクト ファイル: - - - - Unable to determine which project file to add the reference to. - 参照の追加先となるプロジェクト ファイルを特定できませんでした。 - - - - Adding reference type {0} is not supported. - 参照型 {0} の追加はサポートされていません。 - - - - Failed to add a reference to the project file. - 参照をプロジェクト ファイルに追加できませんでした。 - - - - Successfully added a reference to the project file. - 参照がプロジェクトファイルに正常に追加されました。 - - Failed to run the command: argument 'executable' is missing in post action configuration. コマンドの実行は失敗しました: 引数 'executable' がPOST アクションの構成に存在しません。 - - Couldn't determine files to restore. - 復元するファイルを特定できませんでした。 - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - 復元するように構成されているプロジェクトはありません。template.json のプライマリ出力構成を確認してください。 - - - - Restore failed. - 復元に失敗しました。 - - - - Restoring {0}: - {0} を復元しています: - {0} - path to a project to restore - - - Restore succeeded. - 正常に復元されました。 - - Processing post-creation actions... 作成後の操作を処理しています... @@ -824,22 +718,22 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + 指定されたテンプレート コンテンツが見つかりません。テンプレート パッケージが削除されたか、破損している可能性があります。 To install the template package, run: - To install the template package, run: + テンプレート パッケージをインストールするには、次を実行します: The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + インストールされているテンプレート パッケージを再スキャンするには、次を実行します: The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + テンプレート パッケージをアンインストールするには、次を実行します: The sentence is followed by the command to run the action diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf index 35f28c5489f9..9a8e4f7585da 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf @@ -445,7 +445,7 @@ The header is followed by the list of parameters and their errors (might be seve Name cannot contain any of the following characters {0} or character codes {1} - 이름은 다음 문자 {0} 또는 문자 코드{1}를 포함할 수 없습니다. + 이름은 다음 문자 {0} 또는 문자 코드{1}을(를) 포함할 수 없습니다. @@ -651,117 +651,11 @@ The header is followed by the list of parameters and their errors (might be seve 이 작업을 실행하시겠어요 [{0} (예) |{1} (아니요)]? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - 솔루션 작업에 프로젝트 참조 추가가 템플릿에서 올바르게 구성되지 않았습니다. 추가할 프로젝트 파일을 확인할 수 없습니다. - - - - Unable to determine which solution file to add the reference to. - 참조를 추가할 솔루션 파일을 확인할 수 없습니다. - - - - Failed to add project(s) to a solution file. - 솔루션 파일에 프로젝트를 추가하지 못했습니다. - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - - 프로젝트 추가: {0} - 대상 솔루션 파일: {1} - 솔루션 폴더: {2} - - - - Successfully added project(s) to a solution file. - 솔루션 파일에 프로젝트를 추가했습니다. - - - - Adding a package reference {0} to project file {1}: - {1} 프로젝트 파일에 {0} 패키지 참조를 추가하는 중: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - {2} 프로젝트 파일에 {0} 패키지 참조(버전: {1})를 추가하는 중: - - - - Adding a project reference {0} to project file {1}: - {1} 프로젝트 파일에 {0} 프로젝트 참조를 추가하는 중: - - - - Add reference action is not configured correctly in the template. - 템플릿에서 참조 추가 작업이 올바르게 구성되지 않았습니다. - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - 프레임워크 참조 {0}을(를) 프로젝트에 자동으로 추가할 수 없습니다. 프로젝트 파일을 수동으로 편집하여 추가하세요. - - - - Project files found: - 찾은 프로젝트 파일 : - - - - Unable to determine which project file to add the reference to. - 참조를 추가할 프로젝트 파일을 확인할 수 없습니다. - - - - Adding reference type {0} is not supported. - 참조 형식 {0} 추가는 지원되지 않습니다. - - - - Failed to add a reference to the project file. - 프로젝트 파일에 참조를 추가하지 못했습니다. - - - - Successfully added a reference to the project file. - 프로젝트 파일에 참조를 추가했습니다. - - Failed to run the command: argument 'executable' is missing in post action configuration. 명령을 실행하지 못했습니다. 게시 작업 구성에 'executable' 인수가 없습니다. - - Couldn't determine files to restore. - 복원할 파일을 확인할 수 없습니다. - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - 복원하도록 구성된 프로젝트가 없습니다. template.json에서 기본 출력 구성을 확인하세요. - - - - Restore failed. - 복원하지 못했습니다. - - - - Restoring {0}: - {0} 복원 중: - {0} - path to a project to restore - - - Restore succeeded. - 복원에 성공했습니다. - - Processing post-creation actions... 생성 후 작업 처리 중... @@ -824,22 +718,22 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + 지정된 템플릿 콘텐츠를 찾을 수 없습니다. 템플릿 패키지가 제거되었거나 손상되었을 수 있습니다. To install the template package, run: - To install the template package, run: + 템플릿 패키지를 설치하려면 다음을 실행합니다. The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + 설치된 템플릿 패키지를 다시 검사하려면 다음을 실행합니다. The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + 템플릿 패키지를 제거하려면 다음을 실행합니다. The sentence is followed by the command to run the action @@ -1115,7 +1009,7 @@ The header is followed by the list of parameters and their errors (might be seve This template contains technologies from parties other than Microsoft, see {0} for details. - 이 템플릿에는 Microsoft 이외의 타사 기술이 포함되어 있습니다. 자세한 내용은{0}를 참조하세요. + 이 템플릿에는 Microsoft 이외의 타사 기술이 포함되어 있습니다. 자세한 내용은{0}을(를) 참조하세요. diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf index 335377cb80fe..fda7b2e7b6fc 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf @@ -26,7 +26,7 @@ Alias '{0}' is a template short name, and therefore cannot be aliased. - Alias \"{0}\" jest nazwą skróconą szablonu i dlatego nie może być aliasowana. + Alias "{0}" jest nazwą skróconą szablonu i dlatego nie może być aliasowana. @@ -38,7 +38,7 @@ Successfully created alias named '{0}' with value '{1}' - Pomyślnie utworzono alias o nazwie \"{0}\" z wartością \"{1}\" + Pomyślnie utworzono alias o nazwie "{0}" z wartością "{1}" @@ -73,12 +73,12 @@ Unable to remove alias '{0}'. It did not exist. - Nie można usunąć aliasu \"{0}\". Nie istnieje. + Nie można usunąć aliasu "{0}". Nie istnieje. Successfully removed alias named '{0}' whose value was '{1}'. - Pomyślnie usunięto alias o nazwie \"{0}\", którego wartość to \"{1}\". + Pomyślnie usunięto alias o nazwie "{0}", którego wartość to "{1}". @@ -89,13 +89,13 @@ Unknown alias name '{0}'. Run 'dotnet {1} --show-aliases' with no args to show all aliases. - Nieznana nazwa aliasu \"{0}\". -Uruchom polecenie \"dotnet {1}--show-aliases\" bez argumentów, aby wyświetlić wszystkie aliasy. + Nieznana nazwa aliasu "{0}". +Uruchom polecenie "dotnet {1}--show-aliases" bez argumentów, aby wyświetlić wszystkie aliasy. Successfully updated alias named '{0}' to value '{1}'. - Pomyślnie zaktualizowano alias o nazwie \"{0}\" do wartości \"{1}\". + Pomyślnie zaktualizowano alias o nazwie "{0}" do wartości "{1}". @@ -125,7 +125,7 @@ Uruchom polecenie \"dotnet {1}--show-aliases\" bez argumentów, aby wyświetlić The value '{1}' is ambiguous for option {0}. - Wartość \"{1}\" jest niejednoznaczna dla opcji {0}. + Wartość "{1}" jest niejednoznaczna dla opcji {0}. @@ -195,7 +195,7 @@ Uruchom polecenie \"dotnet {1}--show-aliases\" bez argumentów, aby wyświetlić Template '{0}' was not found. - Nie znaleziono szablonu \"{0}\". + Nie znaleziono szablonu "{0}". @@ -450,17 +450,17 @@ The header is followed by the list of parameters and their errors (might be seve The default value '{1}' is not a valid value for {0}. - Wartość domyślna \"{1}\" nie jest prawidłową wartością dla {0}. + Wartość domyślna "{1}" nie jest prawidłową wartością dla {0}. '{1}' is not a valid value for {0}. - \"{1}\" nie jest prawidłową wartością dla {0}. + "{1}" nie jest prawidłową wartością dla {0}. '{0}' is not a valid option - \"{0}\" nie jest prawidłową opcją + "{0}" nie jest prawidłową opcją @@ -470,7 +470,7 @@ The header is followed by the list of parameters and their errors (might be seve Invalid command syntax: use '{0}' instead. - Nieprawidłowa składnia polecenia: zamiast tego użyj \"{0}\". + Nieprawidłowa składnia polecenia: zamiast tego użyj "{0}". {0} - command syntax, example: dotnet new [PARTIAL_NAME] --list [FILTER_OPTIONS]. @@ -623,7 +623,7 @@ The header is followed by the list of parameters and their errors (might be seve Execution of 'Run script' post action is not allowed. - Wykonanie akcji post \"Run script\" jest niedozwolone. + Wykonanie akcji post "Run script" jest niedozwolone. @@ -651,115 +651,9 @@ The header is followed by the list of parameters and their errors (might be seve Chcesz uruchomić tę akcję [{0}(tak)|{1}(nie)]? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - Dodawanie odwołania projektu do akcji rozwiązania nie jest poprawnie skonfigurowane w szablonie. Nie można określić plików projektu do dodania. - - - - Unable to determine which solution file to add the reference to. - Nie można ustalić, do którego pliku projektu należy dodać odwołanie. - - - - Failed to add project(s) to a solution file. - Nie można dodać projektów do pliku rozwiązania. - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - Dodawanie - projektów: {0} - do pliku rozwiązania: {1} - w folderze rozwiązania: {2} - - - - Successfully added project(s) to a solution file. - Pomyślnie dodano projekty do pliku rozwiązania. - - - - Adding a package reference {0} to project file {1}: - Dodawanie odwołania do pakietu {0} do pliku projektu {1}: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - Dodawanie odwołania do pakietu {0} (wersja: {1}) do pliku projektu {2}: - - - - Adding a project reference {0} to project file {1}: - Dodawanie odwołania do projektu {0} do pliku projektu {1}: - - - - Add reference action is not configured correctly in the template. - Akcja dodania odwołania nie jest poprawnie skonfigurowana w tym szablonie. - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - Nie można automatycznie dodać odwołania platformy {0} do projektu. Edytuj ręcznie plik projektu, aby go dodać. - - - - Project files found: - Znaleziono pliki projektu: - - - - Unable to determine which project file to add the reference to. - Nie można ustalić, do którego pliku projektu należy dodać odwołanie. - - - - Adding reference type {0} is not supported. - Dodawanie odwołania typu {0} nie jest obsługiwane. - - - - Failed to add a reference to the project file. - Nie można dodać odwołania do pliku projektu. - - - - Successfully added a reference to the project file. - Pomyślnie dodano odwołanie do pliku projektu. - - Failed to run the command: argument 'executable' is missing in post action configuration. - Nie można uruchomić polecenia: brak argumentu \"executable\" w konfiguracji akcji post. - - - - Couldn't determine files to restore. - Nie można ustalić plików do przywrócenia. - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - Żadne projekty nie są skonfigurowane do przywracania. Sprawdź konfigurację podstawowych danych wyjściowych w pliku template.json. - - - - Restore failed. - Błąd przywracania. - - - - Restoring {0}: - Przywracanie pakietu {0}: - {0} - path to a project to restore - - - Restore succeeded. - Przywracanie powiodło się. + Nie można uruchomić polecenia: brak argumentu "executable" w konfiguracji akcji post. @@ -779,7 +673,7 @@ The header is followed by the list of parameters and their errors (might be seve Running command '{0}'... - Trwa uruchamianie polecenia \"{0}\"... + Trwa uruchamianie polecenia "{0}"... @@ -789,7 +683,7 @@ The header is followed by the list of parameters and their errors (might be seve Error reading the installed configuration, file may be corrupted. If this problem persists, try resetting with the `--debug:reinit' flag - Błąd podczas odczytywania zainstalowanej konfiguracji, ponieważ plik może być uszkodzony. Jeśli ten problem będzie się powtarzać, spróbuj zresetować ustawienia przy użyciu flagi \"--debug:reinit\" + Błąd podczas odczytywania zainstalowanej konfiguracji, ponieważ plik może być uszkodzony. Jeśli ten problem będzie się powtarzać, spróbuj zresetować ustawienia przy użyciu flagi "--debug:reinit" @@ -824,27 +718,27 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + Nie można zlokalizować określonej zawartości szablonu. Pakiet szablonu może zostać usunięty lub uszkodzony. To install the template package, run: - To install the template package, run: + Aby zainstalować pakiet szablonu, uruchom polecenie: The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + Aby ponownie przeskanować zainstalowane pakiety szablonów, uruchom polecenie: The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + Aby odinstalować pakiet szablonów, użyj: The sentence is followed by the command to run the action The '{0}' command creates a .NET project based on a template. - Polecenie \"{0}\" tworzy projekt .NET na podstawie szablonu. + Polecenie "{0}" tworzy projekt .NET na podstawie szablonu. @@ -895,7 +789,7 @@ The header is followed by the list of parameters and their errors (might be seve Could not find the template package containing template '{0}' - Nie można znaleźć pakietu szablonów zawierającego szablon \"{0}\" + Nie można znaleźć pakietu szablonów zawierającego szablon "{0}" @@ -910,7 +804,7 @@ The header is followed by the list of parameters and their errors (might be seve The template '{0}' is included to the packages: - Szablon \"{0}\" jest uwzględniony w pakietach: + Szablon "{0}" jest uwzględniony w pakietach: @@ -925,7 +819,7 @@ The header is followed by the list of parameters and their errors (might be seve The command is attempting to install the template package '{0}' twice, check the arguments and retry. - Polecenie próbuje zainstalować pakiet szablonów \"{0}\" dwa razy. Sprawdź argumenty i ponów próbę. + Polecenie próbuje zainstalować pakiet szablonów "{0}" dwa razy. Sprawdź argumenty i ponów próbę. @@ -1020,7 +914,7 @@ The header is followed by the list of parameters and their errors (might be seve An update for template package '{0}' is available. - Dostępna jest aktualizacja pakietu szablonów \"{0}\". + Dostępna jest aktualizacja pakietu szablonów "{0}". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf index 55fd87f3c02d..35a2d60e80ee 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf @@ -651,117 +651,11 @@ The header is followed by the list of parameters and their errors (might be seve Deseja executar esta ação [{0}(yes)|{1}(no)]? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - A adição de referência de projeto à ação de solução não está configurada corretamente no modelo. Não é possível determinar os arquivos de projeto a serem adicionados. - - - - Unable to determine which solution file to add the reference to. - Não foi possível determinar o arquivo de projeto ao qual adicionar a referência. - - - - Failed to add project(s) to a solution file. - Falha ao adicionar projeto(s) a um arquivo de solução. - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - Adicionando - projeto(s): {0} - ao arquivo de solução: {1} - pasta de solução: {2} - - - - Successfully added project(s) to a solution file. - Projeto(s) adicionado(s) com sucesso a um arquivo de solução. - - - - Adding a package reference {0} to project file {1}: - Adicionando uma referência de pacote {0} ao arquivo de projeto {1}: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - Adicionando uma referência de pacote {0} (versão: {1}) ao arquivo de projeto {2}: - - - - Adding a project reference {0} to project file {1}: - Adicionando uma referência de projeto {0} ao arquivo de projeto {1}: - - - - Add reference action is not configured correctly in the template. - A ação de referência Adicionar não está configurada corretamente no modelo. - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - Não é possível adicionar automaticamente a referência de estrutura {0} ao projeto. Edite manualmente o arquivo de projeto para adicioná-lo. - - - - Project files found: - Arquivos de projeto encontrados: - - - - Unable to determine which project file to add the reference to. - Não foi possível determinar o arquivo de projeto ao qual adicionar a referência. - - - - Adding reference type {0} is not supported. - Não há suporte para adicionar o tipo de referência {0}. - - - - Failed to add a reference to the project file. - Falha ao adicionar uma referência ao arquivo de projeto. - - - - Successfully added a reference to the project file. - Adicionada com sucesso uma referência ao arquivo de projeto. - - Failed to run the command: argument 'executable' is missing in post action configuration. Falha ao executar o comando: o argumento 'executável' está ausente na configuração pós-ação. - - Couldn't determine files to restore. - Não foi possível determinar os arquivos a serem restaurados. - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - Nenhum projeto está configurado para restauração. Verifique a configuração das saídas primárias em template.json. - - - - Restore failed. - Falha na restauração. - - - - Restoring {0}: - Restaurando {0}: - {0} - path to a project to restore - - - Restore succeeded. - A restauração foi bem-sucedida. - - Processing post-creation actions... Processando ações pós-criação... @@ -824,22 +718,22 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + Não foi possível localizar o conteúdo do modelo especificado, o pacote de modelo pode ter sido removido ou corrompido. To install the template package, run: - To install the template package, run: + Para instalar o pacote de modelo, execute: The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + Para verificar novamente os pacotes de modelo instalados, execute: The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + Para desinstalar o pacote de modelo, execute: The sentence is followed by the command to run the action diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf index ec25c5fc0f72..73004606066b 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf @@ -26,7 +26,7 @@ Alias '{0}' is a template short name, and therefore cannot be aliased. - Псевдоним \"{0}\" является коротким именем шаблона и поэтому не может быть псевдонимом. + Псевдоним "{0}" является коротким именем шаблона и поэтому не может быть псевдонимом. @@ -38,7 +38,7 @@ Successfully created alias named '{0}' with value '{1}' - Псевдоним с именем \"{0}\" со значением \"{1}\" успешно создан + Псевдоним с именем "{0}" со значением "{1}" успешно создан @@ -73,12 +73,12 @@ Unable to remove alias '{0}'. It did not exist. - Не удалось удалить псевдоним \"{0}\". Он не существовал. + Не удалось удалить псевдоним "{0}". Он не существовал. Successfully removed alias named '{0}' whose value was '{1}'. - Псевдоним с именем \"{0}\", значение которого равно \"{1}\", успешно удален. + Псевдоним с именем "{0}", значение которого равно "{1}", успешно удален. @@ -89,13 +89,13 @@ Unknown alias name '{0}'. Run 'dotnet {1} --show-aliases' with no args to show all aliases. - Неизвестное имя псевдонима \"{0}\". -Запустите \"dotnet {1} --show-aliases\" без аргументов для отображения всех псевдонимов. + Неизвестное имя псевдонима "{0}". +Запустите "dotnet {1} --show-aliases" без аргументов для отображения всех псевдонимов. Successfully updated alias named '{0}' to value '{1}'. - Псевдоним с именем \"{0}\" успешно обновлен до значения \"{1}\". + Псевдоним с именем "{0}" успешно обновлен до значения "{1}". @@ -125,7 +125,7 @@ Run 'dotnet {1} --show-aliases' with no args to show all aliases. The value '{1}' is ambiguous for option {0}. - Значение \"{1}\" для параметра {0} является неоднозначным. + Значение "{1}" для параметра {0} является неоднозначным. @@ -195,7 +195,7 @@ Run 'dotnet {1} --show-aliases' with no args to show all aliases. Template '{0}' was not found. - Шаблон \"{0}\" не найден. + Шаблон "{0}" не найден. @@ -450,17 +450,17 @@ The header is followed by the list of parameters and their errors (might be seve The default value '{1}' is not a valid value for {0}. - Значение по умолчанию \"{1}\" не является допустимым значением для {0}. + Значение по умолчанию "{1}" не является допустимым значением для {0}. '{1}' is not a valid value for {0}. - \"{1}\" не является допустимым значением для {0}. + "{1}" не является допустимым значением для {0}. '{0}' is not a valid option - \"{0}\" не является допустимым параметром + "{0}" не является допустимым параметром @@ -470,7 +470,7 @@ The header is followed by the list of parameters and their errors (might be seve Invalid command syntax: use '{0}' instead. - Недопустимый синтаксис команды: используйте \"{0}\" вместо ранее использованного. + Недопустимый синтаксис команды: используйте "{0}" вместо ранее использованного. {0} - command syntax, example: dotnet new [PARTIAL_NAME] --list [FILTER_OPTIONS]. @@ -623,7 +623,7 @@ The header is followed by the list of parameters and their errors (might be seve Execution of 'Run script' post action is not allowed. - Выполнение действия публикации \"Выполнить сценарий\" запрещено. + Выполнение действия публикации "Выполнить сценарий" запрещено. @@ -651,117 +651,11 @@ The header is followed by the list of parameters and their errors (might be seve Вы хотите выполнить это действие [{0}(да)|{1}(нет)]? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - Добавить ссылку на проект в решение. Действие в шаблоне настроено неправильно. Не удалось определить файлы проекта для добавления. - - - - Unable to determine which solution file to add the reference to. - Не удается определить файл решения для добавления ссылки. - - - - Failed to add project(s) to a solution file. - Не удалось добавить проект (ы) в файл решения. - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - Добавление - проекта: {0} - в файл решения: {1} - папка решения: {2} - - - - Successfully added project(s) to a solution file. - Проект успешно добавлен в файл решения. - - - - Adding a package reference {0} to project file {1}: - Добавление ссылки на пакет {0} в файл проекта {1}: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - Добавление ссылки на пакет {0} (версия: {1}) в файл проекта {2}: - - - - Adding a project reference {0} to project file {1}: - Добавление ссылки на проект{0} в файл проекта {1}: - - - - Add reference action is not configured correctly in the template. - Действие добавления ссылки неправильно настроено в шаблоне. - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - Не удалось автоматически добавить ссылку на платформу {0} в проект. Измените вручную файл проекта, чтобы добавить его. - - - - Project files found: - Найдено файлов проекта: - - - - Unable to determine which project file to add the reference to. - Не удается определить файл проекта для добавления ссылки. - - - - Adding reference type {0} is not supported. - Добавление ссылки типа {0} не поддерживается. - - - - Failed to add a reference to the project file. - Не удалось добавить ссылку на файл проекта. - - - - Successfully added a reference to the project file. - Ссылка на файл проекта успешно добавлена. - - Failed to run the command: argument 'executable' is missing in post action configuration. Не удалось выполнить команду: аргумент executable отсутствует в конфигурации действия публикации. - - Couldn't determine files to restore. - Не удалось определить файлы для восстановления. - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - Нет проектов, настроенных для восстановления. Проверьте конфигурацию основных выходных данных в template.json. - - - - Restore failed. - Сбой восстановления. - - - - Restoring {0}: - Восстановление {0}: - {0} - path to a project to restore - - - Restore succeeded. - Восстановление выполнено. - - Processing post-creation actions... Идет обработка действий после создания... @@ -779,7 +673,7 @@ The header is followed by the list of parameters and their errors (might be seve Running command '{0}'... - Запуск команды: \"{0}\"... + Запуск команды: "{0}"... @@ -789,7 +683,7 @@ The header is followed by the list of parameters and their errors (might be seve Error reading the installed configuration, file may be corrupted. If this problem persists, try resetting with the `--debug:reinit' flag - Ошибка при чтении установленной конфигурации, возможно, файл поврежден. Если проблема сохраняется, попробуйте выполнить сброс с помощью флага \"--debug:reinit\" + Ошибка при чтении установленной конфигурации, возможно, файл поврежден. Если проблема сохраняется, попробуйте выполнить сброс с помощью флага "--debug:reinit" @@ -824,27 +718,27 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + Не удается найти содержимое указанного шаблона, возможно, пакет шаблона удален или поврежден. To install the template package, run: - To install the template package, run: + Для установки пакета шаблона запустите: The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + Для повторного сканирования установленных пакетов шаблонов запустите: The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + Для удаления пакета шаблона запустите: The sentence is followed by the command to run the action The '{0}' command creates a .NET project based on a template. - Команда \"{0}\" создает проект .NET на основе шаблона. + Команда "{0}" создает проект .NET на основе шаблона. @@ -895,7 +789,7 @@ The header is followed by the list of parameters and their errors (might be seve Could not find the template package containing template '{0}' - Не удалось найти пакет шаблона, содержащий шаблон \"{0}\" + Не удалось найти пакет шаблона, содержащий шаблон "{0}" @@ -905,12 +799,12 @@ The header is followed by the list of parameters and their errors (might be seve The template package '{0}' is not found. - Пакет шаблона \"{0}\" не найден. + Пакет шаблона "{0}" не найден. The template '{0}' is included to the packages: - Шаблон \"{0}\" включен в пакеты: + Шаблон "{0}" включен в пакеты: @@ -925,7 +819,7 @@ The header is followed by the list of parameters and their errors (might be seve The command is attempting to install the template package '{0}' twice, check the arguments and retry. - Команда пытается установить пакет шаблона \"{0}\" дважды. Проверьте аргументы и повторите попытку. + Команда пытается установить пакет шаблона "{0}" дважды. Проверьте аргументы и повторите попытку. @@ -980,7 +874,7 @@ The header is followed by the list of parameters and their errors (might be seve Uninstall Command: - Команда \"Удалить\": + Команда "Удалить": @@ -1020,7 +914,7 @@ The header is followed by the list of parameters and their errors (might be seve An update for template package '{0}' is available. - Доступно обновление для пакета шаблона \"{0}\". + Доступно обновление для пакета шаблона "{0}". diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf index 899f1b699db1..22a1f6a42f00 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf @@ -651,117 +651,11 @@ The header is followed by the list of parameters and their errors (might be seve Bu eylemi çalıştırmak istiyor musunuz [{0}(evet)|{1}(hayır)]? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - Çözüme proje başvurusu ekleme eylemi şablonda doğru şekilde yapılandırılmadı. Eklenecek proje dosyaları belirlenemiyor. - - - - Unable to determine which solution file to add the reference to. - Başvurunun hangi çözüm dosyasına ekleneceği belirlenemiyor. - - - - Failed to add project(s) to a solution file. - Bir çözüm dosyasına proje(ler) eklenemedi. - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - - projeler: {0} - şu çözüm dosyasına: {1} - şu çözüm klasörüne: {2} ekleniyor - - - - Successfully added project(s) to a solution file. - Proje(ler) bir çözüm dosyasına başarıyla eklendi. - - - - Adding a package reference {0} to project file {1}: - {0} paket başvurusu {1} proje dosyasına ekleniyor: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - {2} proje dosyasına, {0} paket başvurusu (sürüm: {1}) ekleniyor: - - - - Adding a project reference {0} to project file {1}: - {0} proje başvurusu {1} proje dosyasına ekleniyor: - - - - Add reference action is not configured correctly in the template. - Add reference eylemi şablonda doğru yapılandırılmamış. - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - {0} çerçeve başvurusu projeye otomatik olarak eklenemiyor. Proje dosyasını el ile düzenleyerek ekleyin. - - - - Project files found: - Bulunan proje dosyaları: - - - - Unable to determine which project file to add the reference to. - Başvurunun hangi proje dosyasına ekleneceği belirlenemiyor. - - - - Adding reference type {0} is not supported. - {0} başvuru türünün eklenmesi desteklenmiyor. - - - - Failed to add a reference to the project file. - Proje dosyasına başvuru eklenemedi. - - - - Successfully added a reference to the project file. - Proje dosyasına bir referans başarıyla eklendi. - - Failed to run the command: argument 'executable' is missing in post action configuration. Komut çalıştırılamadı: Gönderme eylemi yapılandırmasında 'executable' bağımsız değişkeni eksik. - - Couldn't determine files to restore. - Geri yüklenecek dosyalar belirlenemedi. - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - Geri yüklenecek hiçbir proje yapılandırılmadı. Template.json'da birincil çıktı yapılandırmasını kontrol edin. - - - - Restore failed. - Geri yükleme başarısız oldu. - - - - Restoring {0}: - {0} geri yükleniyor: - {0} - path to a project to restore - - - Restore succeeded. - Geri yükleme başarılı oldu. - - Processing post-creation actions... Oluşturma sonrası eylemleri işleniyor... @@ -824,22 +718,22 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + Belirtilen şablon içeriği bulunamıyor. Şablon paketi kaldırılmış veya bozulmuş olabilir. To install the template package, run: - To install the template package, run: + Şablon paketini yüklemek için şunu çalıştırın: The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + Yüklü şablon paketlerini yeniden taramak için şunu çalıştırın: The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + Şablon paketini kaldırmak için şunu çalıştırın: The sentence is followed by the command to run the action diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf index 0f2b443fc74b..40d89e7cea36 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf @@ -470,7 +470,7 @@ The header is followed by the list of parameters and their errors (might be seve Invalid command syntax: use '{0}' instead. - 命令语法无效: 请改用 “{0}”。 + 命令语法无效: 请改用 "{0}"。 {0} - command syntax, example: dotnet new [PARTIAL_NAME] --list [FILTER_OPTIONS]. @@ -651,117 +651,11 @@ The header is followed by the list of parameters and their errors (might be seve 是否要运行此操作 [{0}(是)|{1}(否)]? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - 模板中未正确配置将项目引用添加到解决方案操作。无法确定要添加的项目文件。 - - - - Unable to determine which solution file to add the reference to. - 无法确定向哪一个解决方案文件添加引用。 - - - - Failed to add project(s) to a solution file. - 无法将项目添加到解决方案文件。 - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - 添加 - 项目: {0} - 到解决方案文件: {1} - 解决方案文件夹: {2} - - - - Successfully added project(s) to a solution file. - 已成功将项目添加到解决方案文件。 - - - - Adding a package reference {0} to project file {1}: - 将包引用 {0} 添加到项目文件 {1}: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - 将包引用 {0}(版本: {1})添加到项目文件 {2}: - - - - Adding a project reference {0} to project file {1}: - 将项目引用 {0} 添加到项目文件 {1}: - - - - Add reference action is not configured correctly in the template. - 模板中未正确配置添加引用操作。 - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - 无法将框架引用 {0} 自动添加到项目中。请手动编辑项目文件以添加它。 - - - - Project files found: - 已找到项目文件: - - - - Unable to determine which project file to add the reference to. - 无法确定哪一个项目文件要添加引用。 - - - - Adding reference type {0} is not supported. - 不支持添加引用类型 {0}。 - - - - Failed to add a reference to the project file. - 无法添加对项目文件的引用。 - - - - Successfully added a reference to the project file. - 已成功添加对项目文件的引用。 - - Failed to run the command: argument 'executable' is missing in post action configuration. 无法运行命令: 在发布操作配置中缺少参数“可执行”。 - - Couldn't determine files to restore. - 无法确定要还原的文件。 - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - 未将任何项目配置为还原。检查 template.json 中的主输出配置。 - - - - Restore failed. - 还原失败。 - - - - Restoring {0}: - 正在还原 {0}: - {0} - path to a project to restore - - - Restore succeeded. - 已成功还原。 - - Processing post-creation actions... 正在处理创建后操作... @@ -824,22 +718,22 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + 找不到指定的模板内容,模板包可能已被删除或损坏。 To install the template package, run: - To install the template package, run: + 若要安装模板包,请运行: The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + 若要重新扫描已安装的模板包,请运行: The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + 要卸载模板包,请运行: The sentence is followed by the command to run the action diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf index e447f160cc0e..27c52a45d0fa 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf @@ -9,7 +9,7 @@ Failed to assign long option alias for parameter '{0}', tried: '{1}'; '{2}'. - 無法為參數 '{0}' 指派長選項別名,已嘗試: '{1}';'{2}'。 + 無法為參數 '{0}' 指派長選項別名,已嘗試: '{1}';'{2}'。 {0} is parameter name, {1} and {2} are attempted option aliases for the parameter. {0}, {1}, {2} should have no whitespaces. @@ -20,7 +20,7 @@ Failed to assign short option alias for parameter '{0}', tried: '{1}'; '{2}'. - 無法為參數 '{0}' 指派短選項別名,已嘗試: '{1}';'{2}'。 + 無法為參數 '{0}' 指派短選項別名,已嘗試: '{1}';'{2}'。 {0} is parameter name, {1} and {2} are attempted option aliases for the parameter. {0}, {1}, {2} should have no whitespaces. @@ -372,7 +372,7 @@ Run 'dotnet {1} --show-aliases' with no args to show all aliases. Template {0} ({1}) is malformed. The following template parameters are invalid: - 範本{0} ({1})格式錯誤。下列範本參數無效: + 範本 {0} ({1}) 格式錯誤。下列範本參數無效: {0} is template identity, {1} is template short name. The header is followed by the list of parameters and their errors (might be several for one parameter). @@ -525,7 +525,7 @@ The header is followed by the list of parameters and their errors (might be seve value '{0}' is not allowed, allowed values are: {1} - 不允許值 '{0}',允許的值為: {1} + 不允許值 '{0}',允許的值為: {1} the error message is part of other sentence, no punctuation is needed {0} is a value given by user / configuration, {1} is comma separated list of possible values(each value is in quotes). @@ -536,7 +536,7 @@ The header is followed by the list of parameters and their errors (might be seve Cannot parse argument '{0}' for option '{1}' as expected type '{2}': {3}. - 無法如預期的類型'{0}'剖析選項 '{1}' 的引數'{2}': {3}。 + 無法如預期的類型 '{2}' 剖析選項 '{1}' 的引數 '{0}': {3}。 {0} - value that is given by used for option {1} {1} - option name {2} - type of the value (string, choice, etc). @@ -544,7 +544,7 @@ The header is followed by the list of parameters and their errors (might be seve Cannot parse default if option without value '{0}' for option '{1}' as expected type '{2}': {3}. - 如果選項沒有值'{0}'的選項'{1}'如預期般'{2}',則無法剖析預設值: {3}。 + 如果選項沒有如預期類型 '{2}' 針對選項 '{1}' 擁有數值 '{0}',則無法剖析預設值: {3}。 {0} - default value for option {1} in case no argument is given {1} - option name {2} - type of the value (string, choice, etc). @@ -552,7 +552,7 @@ The header is followed by the list of parameters and their errors (might be seve Cannot parse default value '{0}' for option '{1}' as expected type '{2}': {3}. - 值'{0}'的選項'{1}'如預期般'{2}',則無法剖析預設值: {3}。 + 無法如預期類型 '{2}' 剖析選項 '{1}' 的預設值 '{0}': {3}。 {0} - default value for option {1} {1} - option name {2} - type of the value (string, choice, etc). @@ -567,7 +567,7 @@ The header is followed by the list of parameters and their errors (might be seve Using more than 1 argument is not allowed for '{0}', used: {1}. - '{0}'不允許使用 1 個以上的引數,已使用: {1}。 + '{0}' 不允許使用 1 個以上的引數,已使用: {1}。 {0} - option name, {1} - count of arguments used @@ -593,7 +593,7 @@ The header is followed by the list of parameters and their errors (might be seve Default value for argument missing for option: '{0}'. - 選項的引數遺漏預設值: '{0}'。 + 選項的引數遺漏預設值: '{0}'。 {0} - option name @@ -651,117 +651,11 @@ The header is followed by the list of parameters and their errors (might be seve 是否要執行此動作 [{0}(是)|{1}(否)]? - - Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. - 範本中未正確設定將專案參考新增至方案動作。無法判斷要新增的專案檔案。 - - - - Unable to determine which solution file to add the reference to. - 無法判斷要將參考新增到哪一個解決方案檔。 - - - - Failed to add project(s) to a solution file. - 無法將專案新增至方案檔。 - - - - Adding - project(s): {0} - to solution file: {1} - solution folder: {2} - 正在將 - 專案 {0} - 新增至方案檔: {1} - 方案資料夾: {2} - - - - Successfully added project(s) to a solution file. - 成功將專案新增至方案檔。 - - - - Adding a package reference {0} to project file {1}: - 正在將套件參考 {0} 新增至專案檔 {1}: - - - - Adding a package reference {0} (version: {1}) to project file {2}: - 正在將套件參考 {0} (版本: {1}) 新增至專案檔 {2}: - - - - Adding a project reference {0} to project file {1}: - 正在將專案參考 {0} 新增至專案檔 {1}: - - - - Add reference action is not configured correctly in the template. - 範本中的新增參考動作設定不正確。 - - - - Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. - 無法將架構參考 {0} 自動新增到專案。手動編輯專案檔案以新增。 - - - - Project files found: - 找到的專案檔: - - - - Unable to determine which project file to add the reference to. - 無法判斷要將參考新增到哪一個專案檔。 - - - - Adding reference type {0} is not supported. - 不支援要新增的專案類型 {0}。 - - - - Failed to add a reference to the project file. - 無法將參考新增至專案檔。 - - - - Successfully added a reference to the project file. - 成功將參考新增至專案檔。 - - Failed to run the command: argument 'executable' is missing in post action configuration. 無法執行命令: 後續動作設定中遺漏引數 'executable'。 - - Couldn't determine files to restore. - 無法判斷要還原的檔案。 - - - - No projects are configured to restore. Check primary outputs configuration in template.json. - 未設定要還原的專案。請檢查 template.json 中的主要輸出設定。 - - - - Restore failed. - 還原失敗。 - - - - Restoring {0}: - 正在還原 {0}: - {0} - path to a project to restore - - - Restore succeeded. - 還原成功。 - - Processing post-creation actions... 正在處理建立後的動作... @@ -824,22 +718,22 @@ The header is followed by the list of parameters and their errors (might be seve Unable to locate the specified template content, the template package might be removed or corrupted. - Unable to locate the specified template content, the template package might be removed or corrupted. + 找不到指定的範本內容,範本套件可能已移除或損毀。 To install the template package, run: - To install the template package, run: + 若要安裝範本套件,請執行: The sentence is followed by the command to run the action To rescan installed template packages, run: - To rescan installed template packages, run: + 若要重新掃描已安裝的範本套件,請執行: The sentence is followed by the command to run the action To uninstall the template package, run: - To uninstall the template package, run: + 若要解除安裝範本套件,請執行: The sentence is followed by the command to run the action @@ -879,7 +773,7 @@ The header is followed by the list of parameters and their errors (might be seve Allowed values for '{0}' option are: {1}. - '{0}'選項允許的值為: {1}。 + '{0}' 選項允許的值為: {1}。 0} - option name (as --language) {1} - comma separated, escaped in quotes list of allowed values @@ -935,7 +829,7 @@ The header is followed by the list of parameters and their errors (might be seve The following template package(s) are already available: - 下列範本套件(的)已可供使用: + 下列範本套件已可供使用: Followed by list of packages that are available @@ -945,7 +839,7 @@ The header is followed by the list of parameters and their errors (might be seve To install the template package(s) anyway, apply '{0}' option: - 若仍要()安裝範本套件,請套用'{0}'選項: + 若仍要安裝範本套件,請套用 '{0}' 選項: {0} is option to use (--force). Followed by command to use to install the packages. diff --git a/src/Cli/dotnet-new3/New3CommandFactory.cs b/src/Cli/dotnet-new3/New3CommandFactory.cs index db52f30cea50..8b6ed15f01d9 100644 --- a/src/Cli/dotnet-new3/New3CommandFactory.cs +++ b/src/Cli/dotnet-new3/New3CommandFactory.cs @@ -26,14 +26,7 @@ internal static Command Create() Command newCommand = NewCommandFactory.Create( CommandName, (ParseResult parseResult) => HostFactory.CreateHost(parseResult.GetValueForOption(_debugDisableBuiltInTemplatesOption)), - (ParseResult parseResult) => new TelemetryLogger(null, parseResult.GetValueForOption(_debugEmitTelemetryOption)), - new NewCommandCallbacks() - { - RestoreProject = (projectPath) => ExecuteDotnetCommand(Dotnet.Restore(projectPath)), - AddProjectReference = (projectPath, references) => ExecuteDotnetCommand(Dotnet.AddProjectToProjectReference(projectPath, references.ToArray())), - AddPackageReference = (projectPath, package, version) => ExecuteDotnetCommand(Dotnet.AddPackageReference(projectPath, package, version)), - AddProjectsToSolution = (solutionPath, projects, solutionFolder) => ExecuteDotnetCommand(Dotnet.AddProjectsToSolution(solutionPath, projects, solutionFolder)), - }); + (ParseResult parseResult) => new TelemetryLogger(null, parseResult.GetValueForOption(_debugEmitTelemetryOption))); newCommand.AddGlobalOption(_debugEmitTelemetryOption); newCommand.AddGlobalOption(_debugDisableBuiltInTemplatesOption); diff --git a/src/Cli/dotnet/Installer/Windows/Interop.cs b/src/Cli/dotnet/Installer/Windows/Interop.cs deleted file mode 100644 index 3d7fbcd07409..000000000000 --- a/src/Cli/dotnet/Installer/Windows/Interop.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -#nullable disable - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace Microsoft.DotNet.Installer.Windows -{ - // Decompiled from WUA typelib - [ComImport] - [Guid("ADE87BF7-7B56-4275-8FAB-B9B0E591844B")] - [TypeLibType(4304)] - public interface ISystemInformation - { - [DispId(1610743809)] - string OemHardwareSupportLink - { - [MethodImpl(MethodImplOptions.InternalCall)] - [DispId(1610743809)] - [return: MarshalAs(UnmanagedType.BStr)] - get; - } - - [DispId(1610743810)] - bool RebootRequired - { - [MethodImpl(MethodImplOptions.InternalCall)] - [DispId(1610743810)] - get; - } - } - - [ComImport] - [Guid("ADE87BF7-7B56-4275-8FAB-B9B0E591844B")] - [CoClass(typeof(SystemInformationClass))] - public interface SystemInformation : ISystemInformation - { - } - - [ComImport] - [Guid("C01B9BA0-BEA7-41BA-B604-D0A36F469133")] - [TypeLibType(2)] - [ClassInterface(ClassInterfaceType.None)] - public class SystemInformationClass : ISystemInformation, SystemInformation - { - [DispId(1610743809)] - public extern virtual string OemHardwareSupportLink - { - [MethodImpl(MethodImplOptions.InternalCall)] - [DispId(1610743809)] - [return: MarshalAs(UnmanagedType.BStr)] - get; - } - - [DispId(1610743810)] - public extern virtual bool RebootRequired - { - [MethodImpl(MethodImplOptions.InternalCall)] - [DispId(1610743810)] - get; - } - } -} diff --git a/src/Cli/dotnet/Installer/Windows/WindowsUtils.cs b/src/Cli/dotnet/Installer/Windows/WindowsUtils.cs index e390c91bf7df..a614efceeeec 100644 --- a/src/Cli/dotnet/Installer/Windows/WindowsUtils.cs +++ b/src/Cli/dotnet/Installer/Windows/WindowsUtils.cs @@ -7,6 +7,7 @@ using System.Threading; using Microsoft.DotNet.Cli.Telemetry; using Microsoft.DotNet.Cli.Utils; +using Microsoft.Win32; namespace Microsoft.DotNet.Installer.Windows { @@ -54,16 +55,19 @@ public static bool InstallRunning() } /// - /// Queries the Windows Update Agent API to determine if there is a pending reboot. + /// Queries the Windows Update Agent, Component Based Servicing (CBS), and pending file rename registry keys to determine if there is a pending reboot. /// /// if there is a pending reboot; otherwise. - /// - /// See this - /// for more information. - /// public static bool RebootRequired() { - return new SystemInformationClass().RebootRequired; + using RegistryKey localMachineKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64); + using RegistryKey auKey = localMachineKey?.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired"); + using RegistryKey cbsKey = localMachineKey?.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending"); + using RegistryKey sessionKey = localMachineKey?.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Session Manager"); + + string[] pendingFileRenameOperations = (string[])sessionKey?.GetValue("PendingFileRenameOperations") ?? new string[0]; + + return (auKey != null || cbsKey != null || pendingFileRenameOperations.Length > 0); } } } diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.cs.xlf index b927a0c95d1f..760b8f9c0208 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.cs.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + Přeskakuje se ověření podpisu balíčku NuGet. diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.de.xlf index d7f5150c0db8..83c6ce3c730b 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.de.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + Die Überprüfung der NuGet-Paketsignatur wird übersprungen. diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.es.xlf index d5ae976a9054..4462767a2652 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.es.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + Omitiendo la comprobación de la firma del paquete NuGet. diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.fr.xlf index bcae57734e8e..da6c54e176df 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.fr.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + La vérification de la signature du package NuGet est ignorée. diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.it.xlf index b6a6d2e0a6d7..5cc8dd6e64d1 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.it.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + La verifica della firma del pacchetto NuGet verrà ignorata. diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ja.xlf index 3bd3249d43e5..31b0c8d0f38a 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ja.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + NuGet パッケージ署名の認証をスキップしています。 diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ko.xlf index 6a706b9b330e..dfd1652be929 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ko.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + NuGet 패키지 서명 확인을 건너뛰는 중입니다. diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pl.xlf index 616ba4821f91..11cc9088c02f 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pl.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + Pomijanie weryfikacji podpisu pakietu NuGet. diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pt-BR.xlf index 3461fa14003c..cd6b41a1d698 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.pt-BR.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + Ignorando a verificação de assinatura do pacote NuGet. diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ru.xlf index c365bddd3beb..48e3edcead33 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.ru.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + Пропуск проверки подписи пакета NuGet. diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.tr.xlf index 654a7481a143..7978957cf585 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.tr.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + NuGet paket imzası doğrulaması atlanıyor. diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hans.xlf index a0a978e6a9c1..7c2878b9614c 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hans.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + 正在跳过 NuGet 包签名验证。 diff --git a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hant.xlf index 776c983f2b54..e9c0b948dd8c 100644 --- a/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/NugetPackageDownloader/xlf/LocalizableStrings.zh-Hant.xlf @@ -29,7 +29,7 @@ Skipping NuGet package signature verification. - Skipping NuGet package signature verification. + 正在略過 NuGet 套件簽章驗證。 diff --git a/src/Cli/dotnet/OptionForwardingExtensions.cs b/src/Cli/dotnet/OptionForwardingExtensions.cs index b5d24dd29555..38223e45dc5b 100644 --- a/src/Cli/dotnet/OptionForwardingExtensions.cs +++ b/src/Cli/dotnet/OptionForwardingExtensions.cs @@ -21,8 +21,9 @@ public static class OptionForwardingExtensions public static ForwardedOption ForwardAsProperty(this ForwardedOption option) => option .SetForwardingFunction((optionVals) => optionVals - .Select(optionVal => optionVal.Replace(";", "%3B")) // must escape semicolon-delimited property values when forwarding them to MSBuild - .Select(optionVal => $"{option.Aliases.FirstOrDefault()}:{optionVal}") + .SelectMany(Microsoft.DotNet.Cli.Utils.MSBuildPropertyParser.ParseProperties) + // must escape semicolon-delimited property values when forwarding them to MSBuild + .Select(keyValue => $"{option.Aliases.FirstOrDefault()}:{keyValue.key}={keyValue.value.Replace(";", "%3B")}") ); public static Option ForwardAsMany(this ForwardedOption option, Func> format) => option.SetForwardingFunction(format); diff --git a/src/Cli/dotnet/Parser.cs b/src/Cli/dotnet/Parser.cs index ef8493edec64..4e985e0c85b2 100644 --- a/src/Cli/dotnet/Parser.cs +++ b/src/Cli/dotnet/Parser.cs @@ -130,6 +130,8 @@ public static bool TokenPerLine(string tokenToReplace, out IReadOnlyList return line.Substring(0, hashPos).Trim(); } }) + // trim leading/trailing whitespace to not pass along dead spaces + .Select(x => x.Trim()) // Remove empty lines .Where(line => line.Length > 0); replacementTokens = trimmedLines.ToArray(); diff --git a/src/Cli/dotnet/Program.cs b/src/Cli/dotnet/Program.cs index eee34231f9ce..b7cc49dd4274 100644 --- a/src/Cli/dotnet/Program.cs +++ b/src/Cli/dotnet/Program.cs @@ -168,7 +168,7 @@ internal static int ProcessArgs(string[] args, TimeSpan startupTime, ITelemetry bool generateAspNetCertificate = environmentProvider.GetEnvironmentVariableAsBool("DOTNET_GENERATE_ASPNET_CERTIFICATE", defaultValue: true); bool telemetryOptout = - environmentProvider.GetEnvironmentVariableAsBool("DOTNET_CLI_TELEMETRY_OPTOUT", defaultValue: false); + environmentProvider.GetEnvironmentVariableAsBool(EnvironmentVariableNames.TELEMETRY_OPTOUT, defaultValue: CompileOptions.TelemetryOptOutDefault); bool addGlobalToolsToPath = environmentProvider.GetEnvironmentVariableAsBool("DOTNET_ADD_GLOBAL_TOOLS_TO_PATH", defaultValue: true); bool nologo = diff --git a/src/Cli/dotnet/Telemetry/Sha256Hasher.cs b/src/Cli/dotnet/Telemetry/Sha256Hasher.cs index a15bd4f9f4b8..ae2257e3ce45 100644 --- a/src/Cli/dotnet/Telemetry/Sha256Hasher.cs +++ b/src/Cli/dotnet/Telemetry/Sha256Hasher.cs @@ -1,6 +1,8 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +#nullable enable + using System; using System.Security.Cryptography; using System.Text; diff --git a/src/Cli/dotnet/Telemetry/Telemetry.cs b/src/Cli/dotnet/Telemetry/Telemetry.cs index 20b2af393c34..954fe655c64a 100644 --- a/src/Cli/dotnet/Telemetry/Telemetry.cs +++ b/src/Cli/dotnet/Telemetry/Telemetry.cs @@ -23,7 +23,6 @@ public class Telemetry : ITelemetry private Task _trackEventTask = null; private const string InstrumentationKey = "74cc1c9e-3e6e-4d05-b3fc-dde9101d0254"; - private const string TelemetryOptout = "DOTNET_CLI_TELEMETRY_OPTOUT"; public bool Enabled { get; } @@ -49,7 +48,8 @@ public Telemetry( environmentProvider = new EnvironmentProvider(); } - Enabled = !environmentProvider.GetEnvironmentVariableAsBool(TelemetryOptout, false) && PermissionExists(sentinel); + Enabled = !environmentProvider.GetEnvironmentVariableAsBool(EnvironmentVariableNames.TELEMETRY_OPTOUT, defaultValue: CompileOptions.TelemetryOptOutDefault) + && PermissionExists(sentinel); if (!Enabled) { diff --git a/src/Cli/dotnet/Telemetry/TopLevelCommandNameAndOptionToLog.cs b/src/Cli/dotnet/Telemetry/TopLevelCommandNameAndOptionToLog.cs index e53213bce3b6..0bed0fc2ee31 100644 --- a/src/Cli/dotnet/Telemetry/TopLevelCommandNameAndOptionToLog.cs +++ b/src/Cli/dotnet/Telemetry/TopLevelCommandNameAndOptionToLog.cs @@ -28,14 +28,14 @@ public List AllowList(ParseResult parseResult, D foreach (var option in _optionsToLog) { if (_topLevelCommandName.Contains(topLevelCommandName) - && parseResult.HasOption(option)) + && parseResult.SafelyGetValueForOption(option) is string optionValue) { result.Add(new ApplicationInsightsEntryFormat( "sublevelparser/command", new Dictionary { { "verb", topLevelCommandName}, - { option.Name, parseResult.GetValueForOption(option)?.ToString() } + { option.Name, optionValue } }, measurements)); } diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index 966e7301993d..d8df4fb955aa 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -37,6 +37,7 @@ internal abstract class InstallingWorkloadCommand : WorkloadCommandBase protected readonly string _userProfileDir; protected readonly bool _checkIfManifestExist; protected readonly ReleaseVersion _sdkVersion; + protected readonly ReleaseVersion _installedSdkVersion; protected readonly SdkFeatureBand _sdkFeatureBand; protected readonly SdkFeatureBand _installedFeatureBand; protected readonly string _fromRollbackDefinition; @@ -70,8 +71,8 @@ public InstallingWorkloadCommand( _checkIfManifestExist = !(_printDownloadLinkOnly); // don't check for manifest existence when print download link is passed _sdkVersion = WorkloadOptionsExtensions.GetValidatedSdkVersion(parseResult.GetValueForOption(InstallingWorkloadCommandParser.VersionOption), version, _dotnetPath, _userProfileDir, _checkIfManifestExist); _sdkFeatureBand = new SdkFeatureBand(_sdkVersion); - - _installedFeatureBand = installedFeatureBand == null ? new SdkFeatureBand(Product.Version) : new SdkFeatureBand(installedFeatureBand); + _installedSdkVersion = new ReleaseVersion(version ?? Product.Version); + _installedFeatureBand = new SdkFeatureBand(installedFeatureBand ?? Product.Version); _fromRollbackDefinition = parseResult.GetValueForOption(InstallingWorkloadCommandParser.FromRollbackFileOption); var configOption = parseResult.GetValueForOption(InstallingWorkloadCommandParser.ConfigOption); @@ -79,8 +80,8 @@ public InstallingWorkloadCommand( _packageSourceLocation = string.IsNullOrEmpty(configOption) && (sourceOption == null || !sourceOption.Any()) ? null : new PackageSourceLocation(string.IsNullOrEmpty(configOption) ? null : new FilePath(configOption), sourceFeedOverrides: sourceOption); - var sdkWorkloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(_dotnetPath, _sdkVersion.ToString(), userProfileDir); - _workloadResolver = workloadResolver ?? WorkloadResolver.Create(sdkWorkloadManifestProvider, _dotnetPath, _sdkVersion.ToString(), _userProfileDir); + var sdkWorkloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(_dotnetPath, _installedSdkVersion.ToString(), userProfileDir); + _workloadResolver = workloadResolver ?? WorkloadResolver.Create(sdkWorkloadManifestProvider, _dotnetPath, _installedSdkVersion.ToString(), _userProfileDir); _workloadInstallerFromConstructor = workloadInstaller; _workloadManifestUpdaterFromConstructor = workloadManifestUpdater; @@ -109,7 +110,7 @@ protected async Task> GetDownloads(IEnumerable> GetDownloads(IEnumerable Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + Spravujte webové tokeny JSON ve vývoji. diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf index 6461683722cd..3a802eba8f22 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.de.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + Verwalten sie JSON-Webtoken in der Entwicklung. diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf index 5dd80b3f844d..d478ac457066 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.es.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + Administre los tokens web JSON en el desarrollo. diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf index 42cc0e952cb7..d44f62ac0d97 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.fr.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + Gérer les jetons Web JSON en développement. diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf index d06f5a56cddb..f49591731780 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.it.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + Consente di gestire i token JSON Web nello sviluppo. diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf index f8fd0010d5a5..91d94b97b654 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ja.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + 開発中の JSON Web トークンを管理します。 diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf index b6574c2424a9..d77d074f4ca2 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ko.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + 개발 중인 JSON 웹 토큰을 관리합니다. diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf index de1337fdfab0..b93ea4dc3a5e 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pl.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + Zarządzaj tokenami internetowymi JSON w trakcie opracowywania. diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf index 36eaa1395e45..322c82ab52a1 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.pt-BR.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + Gerenciar tokens da Web JSON em desenvolvimento. diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf index 38bc62e20cb1..6e7dbd83d728 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.ru.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + Управлять JSON Web Token в разработке. diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf index 232d16f5653b..f3d8748898f6 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.tr.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + Geliştirme aşamasındaki JSON Web Belirteçlerini yönetme. diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf index d42d12383f7f..151f68cba53d 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hans.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + 在开发中管理 JSON Web 令牌。 diff --git a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf index 9d1fddeac565..b1db7a035ef0 100644 --- a/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-help/xlf/LocalizableStrings.zh-Hant.xlf @@ -59,7 +59,7 @@ Manage JSON Web Tokens in development. - Manage JSON Web Tokens in development. + 在開發中管理 JSON Web 權杖。 diff --git a/src/Cli/dotnet/commands/dotnet-new/DotnetCommandCallbacks.cs b/src/Cli/dotnet/commands/dotnet-new/DotnetCommandCallbacks.cs new file mode 100644 index 000000000000..4d3ad4798d34 --- /dev/null +++ b/src/Cli/dotnet/commands/dotnet-new/DotnetCommandCallbacks.cs @@ -0,0 +1,62 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +#nullable enable + +using Microsoft.DotNet.Tools.Add.PackageReference; +using Microsoft.DotNet.Tools; +using System.Collections.Generic; +using System.CommandLine; +using System.Linq; +using Microsoft.DotNet.Tools.Common; +using Microsoft.DotNet.Tools.Add.ProjectToProjectReference; +using Microsoft.DotNet.Tools.Restore; +using Microsoft.DotNet.Tools.Sln.Add; +using Microsoft.DotNet.Cli; + +namespace Microsoft.DotNet.Tools.New +{ + internal static class DotnetCommandCallbacks + { + internal static bool AddPackageReference(string projectPath, string packageName, string? version) + { + PathUtility.EnsureAllPathsExist(new[] { projectPath }, CommonLocalizableStrings.FileNotFound, allowDirectories: false); + IEnumerable commandArgs = new[] { "add", projectPath, "package", packageName }; + if (!string.IsNullOrWhiteSpace(version)) + { + commandArgs = commandArgs.Append(AddPackageParser.VersionOption.Aliases.First()).Append(version); + } + var addPackageReferenceCommand = new AddPackageReferenceCommand(AddCommandParser.GetCommand().Parse(commandArgs.ToArray())); + return addPackageReferenceCommand.Execute() == 0; + } + + internal static bool AddProjectReference(string projectPath, string projectToAdd) + { + PathUtility.EnsureAllPathsExist(new[] { projectPath }, CommonLocalizableStrings.FileNotFound, allowDirectories: false); + PathUtility.EnsureAllPathsExist(new[] { projectToAdd }, CommonLocalizableStrings.FileNotFound, allowDirectories: false); + IEnumerable commandArgs = new[] { "add", projectPath, "reference", projectToAdd }; + var addProjectReferenceCommand = new AddProjectToProjectReferenceCommand(AddCommandParser.GetCommand().Parse(commandArgs.ToArray())); + return addProjectReferenceCommand.Execute() == 0; + } + + internal static bool RestoreProject(string pathToRestore) + { + PathUtility.EnsureAllPathsExist(new[] { pathToRestore }, CommonLocalizableStrings.FileNotFound, allowDirectories: true); + return RestoreCommand.Run(new string[] { pathToRestore }) == 0; + } + + internal static bool AddProjectsToSolution(string solutionPath, IReadOnlyList projectsToAdd, string? solutionFolder) + { + PathUtility.EnsureAllPathsExist(new[] { solutionPath }, CommonLocalizableStrings.FileNotFound, allowDirectories: false); + PathUtility.EnsureAllPathsExist(projectsToAdd, CommonLocalizableStrings.FileNotFound, allowDirectories: false); + IEnumerable commandArgs = new[] { "sln", solutionPath, "add" }.Concat(projectsToAdd); + if (!string.IsNullOrWhiteSpace(solutionFolder)) + { + commandArgs = commandArgs.Append(SlnAddParser.SolutionFolderOption.Aliases.First()).Append(solutionFolder); + } + var addProjectToSolutionCommand = new AddProjectToSolutionCommand(SlnCommandParser.GetCommand().Parse(commandArgs.ToArray())); + return addProjectToSolutionCommand.Execute() == 0; + } + } +} diff --git a/src/Cli/dotnet/commands/dotnet-new/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-new/LocalizableStrings.resx index 632892b0436e..c2a76416edee 100644 --- a/src/Cli/dotnet/commands/dotnet-new/LocalizableStrings.resx +++ b/src/Cli/dotnet/commands/dotnet-new/LocalizableStrings.resx @@ -117,27 +117,15 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Failed to add package reference: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. + + Disables evaluating project context using MSBuild. + If present, prevents templates bundled in the SDK from being presented. - - Enables evaluating project context using MSBuild. - No project was found at the path: {0}. {0} - the file path where project was expected to be found. @@ -154,6 +142,86 @@ Multiple projects found: {0}. {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + + + Unable to determine which solution file to add the reference to. + + + Failed to add project(s) to the solution: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + + + Successfully added project(s) to a solution file. + + + Adding a package reference {0} to project file {1}: + + + Failed to add package reference: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + + + Adding a project reference {0} to project file {1}: + + + Failed to add project reference: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + + + Project files found: + + + Unable to determine which project file to add the reference to. + + + Adding reference type {0} is not supported. + + + Failed to add a reference to the project file. + + + Successfully added a reference to the project file. + + + Couldn't determine files to restore. + + + No projects are configured to restore. Check primary outputs configuration in template.json. + + + Restore failed. + + + Failed to perform restore: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + {0} - path to a project to restore + + + Restore succeeded. + Failed to create constraint '{0}': failed to evaluate the project: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. @@ -210,10 +278,6 @@ The project that should be used for context evaluation. - - Failed to perform restore: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. {0} is the list of supported versions. diff --git a/src/Cli/dotnet/commands/dotnet-new/MSBuildEvaluation/MSBuildEvaluator.cs b/src/Cli/dotnet/commands/dotnet-new/MSBuildEvaluation/MSBuildEvaluator.cs index 7713b7212145..8361c086b6b4 100644 --- a/src/Cli/dotnet/commands/dotnet-new/MSBuildEvaluation/MSBuildEvaluator.cs +++ b/src/Cli/dotnet/commands/dotnet-new/MSBuildEvaluation/MSBuildEvaluator.cs @@ -5,9 +5,12 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using Microsoft.Build.Evaluation; +using Microsoft.DotNet.Cli.Telemetry; +using Microsoft.DotNet.Cli.Utils; using Microsoft.Extensions.Logging; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Utils; @@ -17,8 +20,8 @@ namespace Microsoft.TemplateEngine.MSBuildEvaluation { internal class MSBuildEvaluator : IIdentifiedComponent { - private readonly ProjectCollection _projectCollection = new ProjectCollection(); - private readonly object _lockObj = new object(); + private readonly ProjectCollection _projectCollection = new(); + private readonly object _lockObj = new(); private IEngineEnvironmentSettings? _settings; private ILogger? _logger; @@ -113,18 +116,26 @@ private MSBuildEvaluationResult EvaluateProjectInternal(IEngineEnvironmentSettin projectPath = _projectFullPath; } + Stopwatch watch = new(); + Stopwatch innerBuildWatch = new(); + bool IsSdkStyleProject = false; + IReadOnlyList? targetFrameworks = null; + string? targetFramework = null; + MSBuildEvaluationResult? result = null; + try { + watch.Start(); _logger?.LogDebug("Evaluating project: {0}", projectPath); Project evaluatedProject = RunEvaluate(projectPath); //if project is using Microsoft.NET.Sdk, then it is SDK-style project. - bool IsSdkStyleProject = evaluatedProject.GetProperty("UsingMicrosoftNETSDK")?.EvaluatedValue == "true"; + IsSdkStyleProject = evaluatedProject.GetProperty("UsingMicrosoftNETSDK")?.EvaluatedValue == "true"; _logger?.LogDebug("SDK-style project: {0}", IsSdkStyleProject); - IReadOnlyList? targetFrameworks = evaluatedProject.GetProperty("TargetFrameworks")?.EvaluatedValue?.Split(";"); + targetFrameworks = evaluatedProject.GetProperty("TargetFrameworks")?.EvaluatedValue?.Split(";"); _logger?.LogDebug("Target frameworks: {0}", string.Join("; ", targetFrameworks ?? Array.Empty())); - string? targetFramework = evaluatedProject.GetProperty("TargetFramework")?.EvaluatedValue; + targetFramework = evaluatedProject.GetProperty("TargetFramework")?.EvaluatedValue; _logger?.LogDebug("Target framework: {0}", targetFramework ?? ""); if (!IsSdkStyleProject || string.IsNullOrWhiteSpace(targetFramework) && targetFrameworks == null) @@ -132,21 +143,21 @@ private MSBuildEvaluationResult EvaluateProjectInternal(IEngineEnvironmentSettin //For non SDK style project, we cannot evaluate more info. Also there is no indication, whether the project //was restored or not, so it is not checked. _logger?.LogDebug("Project is non-SDK style, cannot evaluate restore status, succeeding."); - return NonSDKStyleEvaluationResult.CreateSuccess(projectPath, evaluatedProject); + return result = NonSDKStyleEvaluationResult.CreateSuccess(projectPath, evaluatedProject); } //For SDK-style project, if the project was restored "RestoreSuccess" property will be set to true. if (!evaluatedProject.GetProperty("RestoreSuccess")?.EvaluatedValue.Equals("true", StringComparison.OrdinalIgnoreCase) ?? true) { _logger?.LogDebug("Project is not restored, exiting."); - return MSBuildEvaluationResult.CreateNoRestore(projectPath); + return result = MSBuildEvaluationResult.CreateNoRestore(projectPath); } //If target framework is set, no further evaluation is needed. if (!string.IsNullOrWhiteSpace(targetFramework)) { _logger?.LogDebug("Project is SDK style, single TFM:{0}, evaluation succeeded.", targetFramework); - return SDKStyleEvaluationResult.CreateSuccess(projectPath, targetFramework, evaluatedProject); + return result = SDKStyleEvaluationResult.CreateSuccess(projectPath, targetFramework, evaluatedProject); } //If target framework is not set, then presumably it is multi-target project. @@ -154,24 +165,58 @@ private MSBuildEvaluationResult EvaluateProjectInternal(IEngineEnvironmentSettin if (targetFrameworks == null) { _logger?.LogDebug("Project is SDK style, but does not specify the framework."); - return MSBuildEvaluationResult.CreateFailure(projectPath, string.Format(LocalizableStrings.MSBuildEvaluator_Error_NoTargetFramework, projectPath)); + return result = MSBuildEvaluationResult.CreateFailure(projectPath, string.Format(LocalizableStrings.MSBuildEvaluator_Error_NoTargetFramework, projectPath)); } //For multi-target project, we need to do additional evaluation for each target framework. Dictionary evaluatedTfmBasedProjects = new Dictionary(); + innerBuildWatch.Start(); foreach (string tfm in targetFrameworks) { _logger?.LogDebug("Evaluating project for target framework: {0}", tfm); evaluatedTfmBasedProjects[tfm] = RunEvaluate(projectPath, tfm); } + innerBuildWatch.Stop(); _logger?.LogDebug("Project is SDK style, multi-target, evaluation succeeded."); - return MultiTargetEvaluationResult.CreateSuccess(projectPath, evaluatedProject, evaluatedTfmBasedProjects); + return result = MultiTargetEvaluationResult.CreateSuccess(projectPath, evaluatedProject, evaluatedTfmBasedProjects); } catch (Exception e) { _logger?.LogDebug("Unexpected error: {0}", e); - return MSBuildEvaluationResult.CreateFailure(projectPath, e.Message); + return result = MSBuildEvaluationResult.CreateFailure(projectPath, e.Message); + } + finally + { + watch.Stop(); + innerBuildWatch.Stop(); + + string? targetFrameworksString = null; + + if (targetFrameworks != null) + { + targetFrameworksString = string.Join(",", targetFrameworks.Select(tfm => Sha256Hasher.HashWithNormalizedCasing(tfm))); + } + else if (targetFramework != null) + { + targetFrameworksString = Sha256Hasher.HashWithNormalizedCasing(targetFramework); + } + + Dictionary properties = new() + { + { "ProjectPath", Sha256Hasher.HashWithNormalizedCasing(projectPath)}, + { "SdkStyleProject", IsSdkStyleProject.ToString() }, + { "Status", result?.Status.ToString() ?? ""}, + { "TargetFrameworks", targetFrameworksString ?? ""}, + }; + + Dictionary measurements = new() + { + { "EvaluationTime", watch.ElapsedMilliseconds }, + { "InnerEvaluationTime", innerBuildWatch.ElapsedMilliseconds } + }; + + TelemetryEventEntry.TrackEvent("new/msbuild-eval", properties, measurements); } } diff --git a/src/Cli/dotnet/commands/dotnet-new/NewCommandParser.cs b/src/Cli/dotnet/commands/dotnet-new/NewCommandParser.cs index 83bd479ca3dc..3bf5c1293523 100644 --- a/src/Cli/dotnet/commands/dotnet-new/NewCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-new/NewCommandParser.cs @@ -28,6 +28,9 @@ using Microsoft.TemplateEngine.MSBuildEvaluation; using Microsoft.TemplateEngine.Abstractions.Constraints; using System.IO; +using NuGet.Packaging; +using Microsoft.TemplateEngine.Cli.PostActionProcessors; +using Microsoft.DotNet.Tools.New.PostActionProcessors; namespace Microsoft.DotNet.Cli { @@ -35,12 +38,12 @@ internal static class NewCommandParser { public static readonly string DocsLink = "https://aka.ms/dotnet-new"; public const string CommandName = "new"; - private const string EnableProjectContextEvaluationEnvVar = "DOTNET_CLI_ENABLE_PROJECT_EVAL"; + private const string EnableProjectContextEvaluationEnvVar = "DOTNET_CLI_DISABLE_PROJECT_EVAL"; private const string HostIdentifier = "dotnetcli"; private static readonly Option _disableSdkTemplates = new Option("--debug:disable-sdk-templates", () => false, LocalizableStrings.DisableSdkTemplates_OptionDescription).Hide(); - private static readonly Option _enableProjectContextEvaluation = new Option("--debug:enable-project-context", () => false, LocalizableStrings.EnableProjectContextEval_OptionDescription).Hide(); + private static readonly Option _disableProjectContextEvaluation = new Option("--debug:disable-project-context", () => false, LocalizableStrings.DisableProjectContextEval_OptionDescription).Hide(); internal static Option ProjectPathOption { get; } = new Option("--project", LocalizableStrings.ProjectPath_OptionDescription).ExistingOnly().Hide(); @@ -73,46 +76,46 @@ public static System.CommandLine.Command GetCommand() return logger; }; - var callbacks = new Microsoft.TemplateEngine.Cli.NewCommandCallbacks() - { - RestoreProject = RestoreProject, - AddPackageReference = AddPackageReference, - AddProjectReference = AddProjectReference, - AddProjectsToSolution = AddProjectsToSolution - }; - var getEngineHost = (ParseResult parseResult) => { bool disableSdkTemplates = parseResult.GetValueForOption(_disableSdkTemplates); - bool enableProjectContext = parseResult.GetValueForOption(_enableProjectContextEvaluation) + bool disableProjectContext = parseResult.GetValueForOption(_disableProjectContextEvaluation) || Env.GetEnvironmentVariableAsBool(EnableProjectContextEvaluationEnvVar); FileInfo? projectPath = parseResult.GetValueForOption(ProjectPathOption); //TODO: read and pass output directory - return CreateHost(disableSdkTemplates, enableProjectContext, projectPath); + return CreateHost(disableSdkTemplates, disableProjectContext, projectPath); }; - var command = Microsoft.TemplateEngine.Cli.NewCommandFactory.Create(CommandName, getEngineHost, getLogger, callbacks); + var command = Microsoft.TemplateEngine.Cli.NewCommandFactory.Create(CommandName, getEngineHost, getLogger); // adding this option lets us look for its bound value during binding in a typed way command.AddGlobalOption(_disableSdkTemplates); - command.AddGlobalOption(_enableProjectContextEvaluation); + command.AddGlobalOption(_disableProjectContextEvaluation); command.AddGlobalOption(ProjectPathOption); return command; } - private static ITemplateEngineHost CreateHost(bool disableSdkTemplates, bool enableProjectContext, FileInfo? projectPath) + private static ITemplateEngineHost CreateHost(bool disableSdkTemplates, bool disableProjectContext, FileInfo? projectPath) { var builtIns = new List<(Type InterfaceType, IIdentifiedComponent Instance)>(); builtIns.AddRange(Microsoft.TemplateEngine.Orchestrator.RunnableProjects.Components.AllComponents); builtIns.AddRange(Microsoft.TemplateEngine.Edge.Components.AllComponents); builtIns.AddRange(Microsoft.TemplateEngine.Cli.Components.AllComponents); builtIns.AddRange(Microsoft.TemplateSearch.Common.Components.AllComponents); + + //post actions + builtIns.AddRange(new (Type, IIdentifiedComponent)[] + { + (typeof(IPostActionProcessor), new DotnetAddPostActionProcessor()), + (typeof(IPostActionProcessor), new DotnetSlnPostActionProcessor()), + (typeof(IPostActionProcessor), new DotnetRestorePostActionProcessor()), + }); if (!disableSdkTemplates) { builtIns.Add((typeof(ITemplatePackageProviderFactory), new BuiltInTemplatePackageProviderFactory())); builtIns.Add((typeof(ITemplatePackageProviderFactory), new OptionalWorkloadProviderFactory())); } - if (enableProjectContext) + if (!disableProjectContext) { builtIns.Add((typeof(IBindSymbolSource), new ProjectContextSymbolSource())); builtIns.Add((typeof(ITemplateConstraintFactory), new ProjectCapabilityConstraintFactory())); @@ -135,76 +138,6 @@ private static ITemplateEngineHost CreateHost(bool disableSdkTemplates, bool ena return new DefaultTemplateEngineHost(HostIdentifier, "v" + Product.Version, preferences, builtIns); } - private static bool RestoreProject(string pathToRestore) - { - try - { - PathUtility.EnsureAllPathsExist(new[] { pathToRestore }, CommonLocalizableStrings.FileNotFound, allowDirectories: true); - return RestoreCommand.Run(new string[] { pathToRestore }) == 0; - } - catch (Exception e) - { - Reporter.Error.WriteLine(string.Format(LocalizableStrings.RestoreCallback_Failed, e.Message)); - return false; - } - } - private static bool AddPackageReference(string projectPath, string packageName, string? version) - { - try - { - PathUtility.EnsureAllPathsExist(new[] { projectPath }, CommonLocalizableStrings.FileNotFound, allowDirectories: false); - IEnumerable commandArgs = new [] { "add", projectPath, "package", packageName }; - if (!string.IsNullOrWhiteSpace(version)) - { - commandArgs = commandArgs.Append(AddPackageParser.VersionOption.Aliases.First()).Append(version); - } - var addPackageReferenceCommand = new AddPackageReferenceCommand(AddCommandParser.GetCommand().Parse(commandArgs.ToArray())); - return addPackageReferenceCommand.Execute() == 0; - } - catch (Exception e) - { - Reporter.Error.WriteLine(string.Format(LocalizableStrings.AddPackageReferenceCallback_Failed, e.Message)); - return false; - } - } - - private static bool AddProjectReference(string projectPath, IReadOnlyList projectsToAdd) - { - try - { - PathUtility.EnsureAllPathsExist(new[] { projectPath }, CommonLocalizableStrings.FileNotFound, allowDirectories: false); - PathUtility.EnsureAllPathsExist(projectsToAdd, CommonLocalizableStrings.FileNotFound, allowDirectories: false); - IEnumerable commandArgs = new[] { "add", projectPath, "reference", }.Concat(projectsToAdd); - var addProjectReferenceCommand = new AddProjectToProjectReferenceCommand(AddCommandParser.GetCommand().Parse(commandArgs.ToArray())); - return addProjectReferenceCommand.Execute() == 0; - } - catch (Exception e) - { - Reporter.Error.WriteLine(string.Format(LocalizableStrings.AddProjectReferenceCallback_Failed, e.Message)); - return false; - } - } - - private static bool AddProjectsToSolution(string solutionPath, IReadOnlyList projectsToAdd, string? solutionFolder) - { - try - { - PathUtility.EnsureAllPathsExist(new[] { solutionPath }, CommonLocalizableStrings.FileNotFound, allowDirectories: false); - PathUtility.EnsureAllPathsExist(projectsToAdd, CommonLocalizableStrings.FileNotFound, allowDirectories: false); - IEnumerable commandArgs = new[] { "sln", solutionPath, "add" }.Concat(projectsToAdd); - if (!string.IsNullOrWhiteSpace(solutionFolder)) - { - commandArgs = commandArgs.Append(SlnAddParser.SolutionFolderOption.Aliases.First()).Append(solutionFolder); - } - var addProjectToSolutionCommand = new AddProjectToSolutionCommand(SlnCommandParser.GetCommand().Parse(commandArgs.ToArray())); - return addProjectToSolutionCommand.Execute() == 0; - } - catch (Exception e) - { - Reporter.Error.WriteLine(string.Format(LocalizableStrings.AddProjectsToSolutionCallback_Failed, e.Message)); - return false; - } - } } } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddReferencePostActionProcessor.cs b/src/Cli/dotnet/commands/dotnet-new/PostActions/DotnetAddPostActionProcessor.cs similarity index 67% rename from src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddReferencePostActionProcessor.cs rename to src/Cli/dotnet/commands/dotnet-new/PostActions/DotnetAddPostActionProcessor.cs index 6fb7c3cf62f7..854d560633a8 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddReferencePostActionProcessor.cs +++ b/src/Cli/dotnet/commands/dotnet-new/PostActions/DotnetAddPostActionProcessor.cs @@ -1,20 +1,38 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#nullable enable + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem; +using Microsoft.TemplateEngine.Cli.PostActionProcessors; using Microsoft.TemplateEngine.Utils; -using Newtonsoft.Json.Linq; -namespace Microsoft.TemplateEngine.Cli.PostActionProcessors +namespace Microsoft.DotNet.Tools.New.PostActionProcessors { - internal class AddReferencePostActionProcessor : PostActionProcessor2Base + internal class DotnetAddPostActionProcessor : PostActionProcessorBase { - internal static readonly Guid ActionProcessorId = new Guid("B17581D1-C5C9-4489-8F0A-004BE667B814"); + private readonly Func _addPackageReferenceCallback; + private readonly Func _addProjectReferenceCallback; + + public DotnetAddPostActionProcessor( + Func? addPackageReferenceCallback = null, + Func? addProjectReferenceCallback = null) + { + _addPackageReferenceCallback = addPackageReferenceCallback ?? DotnetCommandCallbacks.AddPackageReference; + _addProjectReferenceCallback = addProjectReferenceCallback ?? DotnetCommandCallbacks.AddProjectReference; + } public override Guid Id => ActionProcessorId; - internal IReadOnlyList FindProjFileAtOrAbovePath(IPhysicalFileSystem fileSystem, string startPath, HashSet extensionLimiters) + internal static Guid ActionProcessorId { get; } = new("B17581D1-C5C9-4489-8F0A-004BE667B814"); + + internal static IReadOnlyList FindProjFileAtOrAbovePath(IPhysicalFileSystem fileSystem, string startPath, HashSet extensionLimiters) { if (extensionLimiters.Count == 0) { @@ -33,10 +51,10 @@ protected override bool ProcessInternal(IEngineEnvironmentSettings environment, if (projectsToProcess is null) { //If the author didn't opt in to the new behavior by specifying "targetFiles", search for project file in current output directory or above. - HashSet extensionLimiters = new HashSet(StringComparer.Ordinal); + HashSet extensionLimiters = new(StringComparer.Ordinal); if (action.Args.TryGetValue("projectFileExtensions", out string? projectFileExtensions)) { - if (projectFileExtensions.Contains("/") || projectFileExtensions.Contains("\\") || projectFileExtensions.Contains("*")) + if (projectFileExtensions.Contains('/') || projectFileExtensions.Contains('\\') || projectFileExtensions.Contains('*')) { // these must be literals Reporter.Error.WriteLine(LocalizableStrings.PostAction_AddReference_Error_ActionMisconfigured); @@ -68,7 +86,7 @@ protected override bool ProcessInternal(IEngineEnvironmentSettings environment, bool success = true; foreach (string projectFile in projectsToProcess) { - success &= AddReference(environment, action, projectFile, outputBasePath, creationEffects); + success &= AddReference(action, projectFile, outputBasePath, creationEffects); if (!success) { @@ -78,7 +96,7 @@ protected override bool ProcessInternal(IEngineEnvironmentSettings environment, return true; } - private bool AddReference(IEngineEnvironmentSettings environment, IPostAction actionConfig, string projectFile, string outputBasePath, ICreationEffects creationEffects) + private bool AddReference(IPostAction actionConfig, string projectFile, string outputBasePath, ICreationEffects creationEffects) { if (actionConfig.Args == null || !actionConfig.Args.TryGetValue("reference", out string? referenceToAdd)) { @@ -92,53 +110,45 @@ private bool AddReference(IEngineEnvironmentSettings environment, IPostAction ac return false; } - bool succeeded = false; - if (string.Equals(referenceType, "project", StringComparison.OrdinalIgnoreCase)) { - if ((Callbacks?.AddProjectReference) == null) - { - Reporter.Error.WriteLine(LocalizableStrings.PostAction_AddReference_Failed); - Reporter.Error.WriteLine(LocalizableStrings.Generic_NoCallbackError); - return false; - } - // replace the referenced project file's name in case it has been renamed string? referenceNameChange = GetTargetForSource((ICreationEffects2)creationEffects, referenceToAdd, outputBasePath).SingleOrDefault(); string relativeProjectReference = referenceNameChange ?? referenceToAdd; referenceToAdd = Path.GetFullPath(relativeProjectReference, outputBasePath); - - Reporter.Output.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_AddProjectReference, referenceToAdd, projectFile)); - succeeded = Callbacks.AddProjectReference(projectFile, new[] { referenceToAdd }); - if (succeeded) - { - Reporter.Output.WriteLine(LocalizableStrings.PostAction_AddReference_Succeeded); - } - else - { - Reporter.Error.WriteLine(LocalizableStrings.PostAction_AddReference_Failed); - } - return succeeded; + return AddProjectReference(projectFile, referenceToAdd); } else if (string.Equals(referenceType, "package", StringComparison.OrdinalIgnoreCase)) { actionConfig.Args.TryGetValue("version", out string? version); - if ((Callbacks?.AddPackageReference) == null) - { - Reporter.Error.WriteLine(LocalizableStrings.PostAction_AddReference_Failed); - Reporter.Error.WriteLine(LocalizableStrings.Generic_NoCallbackError); - return false; - } + return AddPackageReference(projectFile, referenceToAdd, version); + } + else if (string.Equals(referenceType, "framework", StringComparison.OrdinalIgnoreCase)) + { + Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_Error_FrameworkNotSupported, referenceToAdd)); + return false; + } + else + { + Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_Error_UnsupportedRefType, referenceType)); + return false; + } + } + + private bool AddPackageReference(string projectPath, string packageName, string? version) + { + try + { if (string.IsNullOrWhiteSpace(version)) { - Reporter.Output.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_AddPackageReference, referenceToAdd, projectFile)); + Reporter.Output.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_AddPackageReference, packageName, projectPath)); } else { - Reporter.Output.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_AddPackageReference_WithVersion, referenceToAdd, version, projectFile)); + Reporter.Output.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_AddPackageReference_WithVersion, packageName, version, projectPath)); } - succeeded = Callbacks.AddPackageReference(projectFile, referenceToAdd, version); + bool succeeded = _addPackageReferenceCallback(projectPath, packageName, version); if (succeeded) { Reporter.Output.WriteLine(LocalizableStrings.PostAction_AddReference_Succeeded); @@ -149,14 +159,32 @@ private bool AddReference(IEngineEnvironmentSettings environment, IPostAction ac } return succeeded; } - else if (string.Equals(referenceType, "framework", StringComparison.OrdinalIgnoreCase)) + catch (Exception e) { - Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_Error_FrameworkNotSupported, referenceToAdd)); + Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_AddPackageReference_Failed, e.Message)); return false; } - else + } + + private bool AddProjectReference(string projectPath, string projectToAdd) + { + try { - Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_Error_UnsupportedRefType, referenceType)); + Reporter.Output.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_AddProjectReference, projectToAdd, projectPath)); + bool succeeded = _addProjectReferenceCallback(projectPath, projectToAdd); + if (succeeded) + { + Reporter.Output.WriteLine(LocalizableStrings.PostAction_AddReference_Succeeded); + } + else + { + Reporter.Error.WriteLine(LocalizableStrings.PostAction_AddReference_Failed); + } + return succeeded; + } + catch (Exception e) + { + Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_AddReference_AddProjectReference_Failed, e.Message)); return false; } } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/DotnetRestorePostActionProcessor.cs b/src/Cli/dotnet/commands/dotnet-new/PostActions/DotnetRestorePostActionProcessor.cs similarity index 65% rename from src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/DotnetRestorePostActionProcessor.cs rename to src/Cli/dotnet/commands/dotnet-new/PostActions/DotnetRestorePostActionProcessor.cs index c193ef8aa062..552409b631d0 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/DotnetRestorePostActionProcessor.cs +++ b/src/Cli/dotnet/commands/dotnet-new/PostActions/DotnetRestorePostActionProcessor.cs @@ -1,17 +1,32 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#nullable enable + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; -using Newtonsoft.Json.Linq; +using Microsoft.TemplateEngine.Cli.PostActionProcessors; -namespace Microsoft.TemplateEngine.Cli.PostActionProcessors +namespace Microsoft.DotNet.Tools.New.PostActionProcessors { - internal class DotnetRestorePostActionProcessor : PostActionProcessor2Base + internal class DotnetRestorePostActionProcessor : PostActionProcessorBase { - private static readonly Guid ActionProcessorId = new Guid("210D431B-A78B-4D2F-B762-4ED3E3EA9025"); + + private readonly Func _restoreCallback; + + public DotnetRestorePostActionProcessor(Func? restoreCallback = null) + { + _restoreCallback = restoreCallback ?? DotnetCommandCallbacks.RestoreProject; + } public override Guid Id => ActionProcessorId; + internal static Guid ActionProcessorId { get; } = new Guid("210D431B-A78B-4D2F-B762-4ED3E3EA9025"); + protected override bool ProcessInternal(IEngineEnvironmentSettings environment, IPostAction actionConfig, ICreationEffects creationEffects, ICreationResult templateCreationResult, string outputBasePath) { bool allSucceeded = true; @@ -36,31 +51,32 @@ protected override bool ProcessInternal(IEngineEnvironmentSettings environment, foreach (string pathToRestore in targetFiles) { - //do not check for file existance. The restore will fail in case file doesn't exist. - Reporter.Output.WriteLine(string.Format(LocalizableStrings.PostAction_Restore_Running, pathToRestore)); - - // Prefer to restore the project in-proc vs. creating a new process. - bool succeeded = false; - if (Callbacks?.RestoreProject != null) - { - succeeded = Callbacks.RestoreProject(pathToRestore); - } + allSucceeded &= RestoreProject(pathToRestore); + } + return allSucceeded; + } + private bool RestoreProject(string pathToRestore) + { + try + { + Reporter.Output.WriteLine(string.Format(LocalizableStrings.PostAction_Restore_Running, pathToRestore)); + bool succeeded = _restoreCallback(pathToRestore); if (!succeeded) { Reporter.Error.WriteLine(LocalizableStrings.PostAction_Restore_Failed); - if (Callbacks?.RestoreProject == null) - { - Reporter.Error.WriteLine(LocalizableStrings.Generic_NoCallbackError); - } - allSucceeded = false; } else { Reporter.Output.WriteLine(LocalizableStrings.PostAction_Restore_Succeeded); } + return succeeded; + } + catch (Exception e) + { + Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_Restore_RestoreFailed, e.Message)); + return false; } - return allSucceeded; } } } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddProjectsToSolutionPostAction.cs b/src/Cli/dotnet/commands/dotnet-new/PostActions/DotnetSlnPostActionProcessor.cs similarity index 71% rename from src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddProjectsToSolutionPostAction.cs rename to src/Cli/dotnet/commands/dotnet-new/PostActions/DotnetSlnPostActionProcessor.cs index 1db7094ffeb0..6cac86bb2764 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddProjectsToSolutionPostAction.cs +++ b/src/Cli/dotnet/commands/dotnet-new/PostActions/DotnetSlnPostActionProcessor.cs @@ -1,20 +1,34 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#nullable enable + +using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using Microsoft.DotNet.Cli.Utils; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem; using Microsoft.TemplateEngine.Utils; -using Newtonsoft.Json.Linq; +using Microsoft.TemplateEngine.Cli.PostActionProcessors; -namespace Microsoft.TemplateEngine.Cli.PostActionProcessors +namespace Microsoft.DotNet.Tools.New.PostActionProcessors { - internal class AddProjectsToSolutionPostAction : PostActionProcessor2Base, IPostActionProcessor + internal class DotnetSlnPostActionProcessor : PostActionProcessorBase { - internal static readonly Guid ActionProcessorId = new Guid("D396686C-DE0E-4DE6-906D-291CD29FC5DE"); + private readonly Func, string?, bool> _addProjToSolutionCallback; + + public DotnetSlnPostActionProcessor(Func, string?, bool>? addProjToSolutionCallback = null) + { + _addProjToSolutionCallback = addProjToSolutionCallback ?? DotnetCommandCallbacks.AddProjectsToSolution; + } public override Guid Id => ActionProcessorId; + internal static Guid ActionProcessorId { get; } = new Guid("D396686C-DE0E-4DE6-906D-291CD29FC5DE"); + internal static IReadOnlyList FindSolutionFilesAtOrAbovePath(IPhysicalFileSystem fileSystem, string outputBasePath) { return FileFindHelpers.FindFilesAtOrAbovePath(fileSystem, outputBasePath, "*.sln"); @@ -24,7 +38,7 @@ internal static IReadOnlyList FindSolutionFilesAtOrAbovePath(IPhysicalFi // If any indexes are out of range or non-numeric, this method returns false and projectFiles is set to null. internal static bool TryGetProjectFilesToAdd(IPostAction actionConfig, ICreationResult templateCreationResult, string outputBasePath, [NotNullWhen(true)]out IReadOnlyList? projectFiles) { - List filesToAdd = new List(); + List filesToAdd = new(); if ((actionConfig.Args != null) && actionConfig.Args.TryGetValue("primaryOutputIndexes", out string? projectIndexes)) { @@ -89,30 +103,34 @@ protected override bool ProcessInternal(IEngineEnvironmentSettings environment, string solutionFolder = GetSolutionFolder(action); - bool succeeded = false; - if (Callbacks?.AddProjectsToSolution != null) - { - Reporter.Output.WriteLine(string.Format(LocalizableStrings.PostAction_AddProjToSln_Running, string.Join(" ", projectFiles), nearestSlnFilesFound[0], solutionFolder)); - succeeded = Callbacks.AddProjectsToSolution(nearestSlnFilesFound[0], projectFiles, solutionFolder); - } - - if (!succeeded) + Reporter.Output.WriteLine(string.Format(LocalizableStrings.PostAction_AddProjToSln_Running, string.Join(" ", projectFiles), nearestSlnFilesFound[0], solutionFolder)); + return AddProjectsToSolution(nearestSlnFilesFound[0], projectFiles, solutionFolder); + } + + private bool AddProjectsToSolution(string solutionPath, IReadOnlyList projectsToAdd, string? solutionFolder) + { + try { - Reporter.Error.WriteLine(LocalizableStrings.PostAction_AddProjToSln_Failed); - if (Callbacks?.AddProjectsToSolution == null) + bool succeeded = _addProjToSolutionCallback(solutionPath, projectsToAdd, solutionFolder); + if (!succeeded) { - Reporter.Error.WriteLine(LocalizableStrings.Generic_NoCallbackError); + Reporter.Error.WriteLine(LocalizableStrings.PostAction_AddProjToSln_Failed_NoReason); } - return false; + else + { + Reporter.Output.WriteLine(LocalizableStrings.PostAction_AddProjToSln_Succeeded); + } + return succeeded; + } - else + catch (Exception e) { - Reporter.Output.WriteLine(LocalizableStrings.PostAction_AddProjToSln_Succeeded); - return true; + Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_AddProjToSln_Failed, e.Message)); + return false; } } - private string GetSolutionFolder(IPostAction actionConfig) + private static string GetSolutionFolder(IPostAction actionConfig) { if (actionConfig.Args != null && actionConfig.Args.TryGetValue("solutionFolder", out string? solutionFolder)) { diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.cs.xlf index d86cf439f4ad..1d84a0389ac8 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.cs.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - Nepovedlo se přidat odkaz na balíček: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - Nepovedlo se přidat odkaz na projekt: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - Do řešení se nepovedlo přidat projekty: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + Neplatný výraz, pozice: {0} + + + + Disables evaluating project context using MSBuild. + Zakáže vyhodnocování kontextu projektu pomocí nástroje MSBuild. @@ -27,111 +17,227 @@ Pokud je k dispozici, zabrání zobrazení šablon, které jsou součástí sady SDK. - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + Žádný projekt se nepodařilo najít v cestě: {0}. {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + {0} se neobnovil. {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + Projekt {0} je projekt ve stylu sady SDK, ale neurčuje architekturu. {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + Našlo se více projektů: {0}. {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + Akce Přidat odkaz na projekt do řešení není v šabloně správně nakonfigurovaná. Nedají se určit soubory projektu, které se mají přidat. + + + + Unable to determine which solution file to add the reference to. + Nedá se určit, do kterého souboru řešení se má odkaz přidat. + + + + Failed to add project(s) to the solution: {0} + Do řešení se nepovedlo přidat projekty: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + Přidání projektu/ů do souboru řešení se nezdařilo. + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + Přidávání + projektů: {0} + do souboru řešení: {1} + složka řešení: {2} + + + + Successfully added project(s) to a solution file. + Projekt(y) se úspěšně přidal(y) do souboru řešení. + + + + Adding a package reference {0} to project file {1}: + Přidávání reference balíčku {0} do souboru projektu {1}: + + + + Failed to add package reference: {0} + Nepovedlo se přidat odkaz na balíček: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + Přidávání reference balíčku {0} (verze: {1}) do souboru projektu {2}: + + + + Adding a project reference {0} to project file {1}: + Přidávání reference projektu {0} do souboru projektu {1}: + + + + Failed to add project reference: {0} + Nepovedlo se přidat odkaz na projekt: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + V šabloně není správně nakonfigurovaná akce pro přidání odkazu. + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + Do projektu se nedá automaticky přidat odkaz na rozhraní {0}. Pokud ho chcete přidat, upravte soubor projektu ručně. + + + + Project files found: + Nalezené soubory projektu: + + + + Unable to determine which project file to add the reference to. + Nepovedlo se určit, do kterého souboru projektu se má odkaz přidat. + + + + Adding reference type {0} is not supported. + Přidávání typu odkazu {0} se nepodporuje. + + + + Failed to add a reference to the project file. + Přidání reference do souboru projektu se nezdařilo. + + + + Successfully added a reference to the project file. + Reference se úspěšně přidala do souboru projektu. + + + + Couldn't determine files to restore. + Soubory k obnovení se nepodařilo určit. + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + Nejsou nakonfigurovány žádné projekty k obnovení. Ověřte konfiguraci primárních výstupů v template.json. + + + + Restore failed. + Obnovení neproběhlo úspěšně. + + + + Failed to perform restore: {0} + Nepovedlo se provést obnovení: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + Obnovování {0}: + {0} - path to a project to restore + + + Restore succeeded. + Obnovení proběhlo úspěšně. + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + Nepovedlo se vytvořit omezení {0}: Nepovedlo se vyhodnotit projekt: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + Nepovedlo se vytvořit omezení {0}: Komponenta {1} není k dispozici. {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + Schopnosti projektu argument should be a string - argument should be a string + argument musí být řetězec part of a sentence arguments should not contain empty values - arguments should not contain empty values + argumenty by neměly obsahovat prázdné hodnoty part of a sentence Invalid constraint configuration - Invalid constraint configuration + Neplatná konfigurace omezení part of a sentence invalid JSON - invalid JSON + neplatný JSON part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + Nepovedlo se vyhodnotit kontext projektu: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + Šablona potřebuje schopnost projektu {0} a aktuální projekt ({1}) ji nesplňuje. {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + Zadejte projekt, který se má použít s možností {0}. {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + Tuto šablonu je možné vytvořit jenom v rámci projektu. The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + Projekt {0} není projekt ve stylu sady SDK a není podporován pro hodnocení. Tuto šablonu je možné použít jenom s projekty ve stylu sady SDK. {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + Spuštěním příkazu dotnet restore {0} projekt obnovíte. do not translate 'dotnet restore {0}' Project context - Project context + Kontext projektu The project that should be used for context evaluation. - The project that should be used for context evaluation. + Projekt, který by se měl použít pro vyhodnocení kontextu. - - Failed to perform restore: {0} - Nepovedlo se provést obnovení: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. Přejděte na aka.ms/get-dotnet a nainstalujte některou z podporovaných verzí sady SDK:{0}. diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.de.xlf index 7901c2d11658..0d47018112f9 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.de.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - Fehler beim Hinzufügen des Paketverweises: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - Fehler beim Hinzufügen des Projektverweises: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - Fehler beim Hinzufügen von Projekten zur Lösung: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + Ungültiger Ausdruck, Position: {0}. + + + + Disables evaluating project context using MSBuild. + Disables evaluating project context using MSBuild. @@ -27,111 +17,227 @@ Falls vorhanden, wird verhindert, dass im SDK gebündelte Vorlagen präsentiert werden. - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + Im Pfad wurde kein Projekt gefunden: {0}. {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + {0} ist nicht wiederhergestellt. {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + Das Projekt „{0}“ ist ein SDK-Projekt, gibt jedoch das Framework nicht an. {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + Mehrere Projekte gefunden: {0}. {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + Die Aktion „Projektverweis zur Projektmappe hinzufügen“ ist in der Vorlage nicht ordnungsgemäß konfiguriert. Die hinzuzufügenden Projektdateien können nicht ermittelt werden. + + + + Unable to determine which solution file to add the reference to. + Es konnte nicht bestimmt werden, welcher Projektmappendatei der Verweis hinzugefügt werden soll. + + + + Failed to add project(s) to the solution: {0} + Fehler beim Hinzufügen von Projekten zur Lösung: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + Projekt(e) konnten nicht zu einer Lösungsdatei hinzugefügt werden. + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + + + + Successfully added project(s) to a solution file. + Projekt(e) erfolgreich zu einer Projektmappendatei hinzugefügt. + + + + Adding a package reference {0} to project file {1}: + Hinzufügen einer Paketreferenz {0} zur Projektdatei {1}: + + + + Failed to add package reference: {0} + Fehler beim Hinzufügen des Paketverweises: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + Hinzufügen einer Paketreferenz {0} (Version: {1}) zur Projektdatei {2}: + + + + Adding a project reference {0} to project file {1}: + Hinzufügen einer Projektreferenz {0} zur Projektdatei {1}: + + + + Failed to add project reference: {0} + Fehler beim Hinzufügen des Projektverweises: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + Die Aktion zum Hinzufügen von Verweisen ist in der Vorlage nicht korrekt konfiguriert. + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + Der Framework-Verweis \"{0}\" konnte dem Projekt nicht automatisch hinzugefügt werden. Bearbeiten Sie die Projektdatei manuell, um sie hinzuzufügen. + + + + Project files found: + Gefundene Projektdateien: + + + + Unable to determine which project file to add the reference to. + Es konnte nicht bestimmt werden, welcher Projektdatei der Verweis hinzugefügt werden soll. + + + + Adding reference type {0} is not supported. + Das Hinzufügen des Verweistyps {0} wird nicht unterstützt. + + + + Failed to add a reference to the project file. + Fehler beim Hinzufügen einer Referenz zur Projektdatei. + + + + Successfully added a reference to the project file. + Der Projektdatei wurde erfolgreich ein Verweis hinzugefügt. + + + + Couldn't determine files to restore. + Für die Wiederherstellung konnten keine Dateien ermittelt werden. + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + Es sind keine Projekte für die Wiederherstellung konfiguriert. Überprüfen Sie die primäre Ausgabekonfiguration in template.json. + + + + Restore failed. + Fehler beim Wiederherstellen. + + + + Failed to perform restore: {0} + Fehler beim Ausführen der Wiederherstellung: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + Wiederherstellung {0}: + {0} - path to a project to restore + + + Restore succeeded. + Wiederherstellung erfolgreich. + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + Fehler beim Erstellen der Einschränkung '{0}': Fehler beim Auswerten des Projekts: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + Fehler beim Erstellen der Einschränkung '{0}': {1} Komponente ist nicht verfügbar. {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + Projektkaabiltitäten argument should be a string - argument should be a string + das Argument muss eine Zeichenfolge sein part of a sentence arguments should not contain empty values - arguments should not contain empty values + Argumente dürfen keine leeren Werte enthalten. part of a sentence Invalid constraint configuration - Invalid constraint configuration + Ungültige Einschränkungskonfiguration part of a sentence invalid JSON - invalid JSON + ungültiges JSON part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + Fehler beim Auswerten des Projektkontexts: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + Die Vorlage benötigt die Projektfunktion '{0}', und das aktuelle Projekt ({1}) erfüllt sie nicht. {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + Geben Sie das Projekt an, das mit {0} Option verwendet werden soll. {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + Diese Vorlage kann nur innerhalb des Projekts erstellt werden. The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + Das Projekt {0} ist kein SDK-Projekt und wird für die Auswertung nicht unterstützt. Diese Vorlage kann nur mit Projekten im SDK-Stil verwendet werden. {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + Führen Sie "dotnet restore {0}" aus, um das Projekt wiederherzustellen. do not translate 'dotnet restore {0}' Project context - Project context + Projektkontext The project that should be used for context evaluation. - The project that should be used for context evaluation. + Das Projekt, das für die Kontextauswertung verwendet werden soll. - - Failed to perform restore: {0} - Fehler beim Ausführen der Wiederherstellung: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. Wechseln Sie zu aka.ms/get-dotnet, und installieren Sie eine der unterstützten SDK-Versionen: „{0}“. diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.es.xlf index 968345d6ead7..6c0b01b73123 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.es.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - No se ha podido agregar la referencia de paquete: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - No se ha podido agregar la referencia del proyecto: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - No se han podido agregar proyectos a la solución: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + Expresión no válida, posición: {0}. + + + + Disables evaluating project context using MSBuild. + Deshabilita la evaluación del contexto del proyecto mediante MSBuild. @@ -27,111 +17,227 @@ Si está presente, impide que se presenten las plantillas agrupadas en el SDK. - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + No se encontró ningún proyecto en la ruta de acceso: {0}. {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + {0} no se ha restaurado. {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + El proyecto "{0}" es un proyecto de estilo SDK, pero no especifica el marco. {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + Se encontraron varios proyectos: {0}. {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + La acción de agregar una referencia de proyecto a la solución no está configurada correctamente en la plantilla. No se pueden determinar los archivos de proyecto que se van a agregar. + + + + Unable to determine which solution file to add the reference to. + No se puede determinar a qué archivo de solución debe agregarse la referencia. + + + + Failed to add project(s) to the solution: {0} + No se han podido agregar proyectos a la solución: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + No se pudieron agregar proyectos a un archivo de solución. + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + Agregando + proyectos: {0} + al archivo de solución: {1} + carpeta de la solución: {2} + + + + Successfully added project(s) to a solution file. + Los proyectos se agregaron correctamente a un archivo de solución. + + + + Adding a package reference {0} to project file {1}: + Agregando un paquete de referencia {0} al archivo de proyecto {1}: + + + + Failed to add package reference: {0} + No se ha podido agregar la referencia de paquete: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + Agregando una referencia de paquete {0} (versión: {1}) al archivo de proyecto {2}: + + + + Adding a project reference {0} to project file {1}: + Agregando un proyecto de referencia {0} al archivo de proyecto {1}: + + + + Failed to add project reference: {0} + No se ha podido agregar la referencia del proyecto: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + La acción Agregar referencia no está bien configurada en la plantilla. + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + No se puede agregar automáticamente la referencia de marco {0} al proyecto. Edite manualmente el archivo del proyecto para agregarla. + + + + Project files found: + Archivos de proyecto encontrados: + + + + Unable to determine which project file to add the reference to. + No se puede determinar a qué archivo de proyecto debe agregarse la referencia. + + + + Adding reference type {0} is not supported. + No se puede agregar el tipo de referencia {0}. + + + + Failed to add a reference to the project file. + No se pudo agregar una referencia al archivo de proyecto. + + + + Successfully added a reference to the project file. + Se agregó correctamente una referencia al archivo de proyecto. + + + + Couldn't determine files to restore. + No se pudieron determinar los archivos que se van a restaurar. + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + No hay ningún proyecto configurado para restaurar. Compruebe la configuración de las salidas principales en template.json. + + + + Restore failed. + Error en la restauración. + + + + Failed to perform restore: {0} + No se ha podido realizar la restauración: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + Restaurando {0}: + {0} - path to a project to restore + + + Restore succeeded. + Restauración realizada correctamente. + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + Error en la creación de la restricción "{0}": no se pudo evaluar el proyecto: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + Error en la creación de la restricción "{0}": {1} componente no está disponible. {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + Capacidades del proyecto argument should be a string - argument should be a string + el argumento debe ser una cadena part of a sentence arguments should not contain empty values - arguments should not contain empty values + los argumentos no deben contener valores vacíos part of a sentence Invalid constraint configuration - Invalid constraint configuration + Configuración de restricción no válida part of a sentence invalid JSON - invalid JSON + JSON no válido part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + No se pudo evaluar el contexto del proyecto: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + La plantilla necesita una capacidad de proyecto "{0}" y el proyecto actual ({1}) no lo satisface. {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + Especifique el proyecto que se va a usar mediante la opción {0}. {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + Esta plantilla solo se puede crear dentro del proyecto. The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + El proyecto {0} no es un proyecto de estilo SDK y no se admite para la evaluación. Solo es posible usar esta plantilla con proyectos de estilo SDK. {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + Ejecute "dotnet restore {0}" para restaurar el proyecto. do not translate 'dotnet restore {0}' Project context - Project context + Contexto del proyecto The project that should be used for context evaluation. - The project that should be used for context evaluation. + Proyecto que se debe usar para la evaluación de contexto. - - Failed to perform restore: {0} - No se ha podido realizar la restauración: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. Vaya a aka.ms/get-dotnet e instale cualquiera de las versiones de SDK admitidas: "{0}". diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.fr.xlf index c30bbf07a62c..6a57436c1dcf 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.fr.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - Échec de l'ajout de la référence du package : {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - Échec de l'ajout de la référence du projet : {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - Échec de l'ajout de projet(s) à la solution : {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + Expression non valide, position : {0} + + + + Disables evaluating project context using MSBuild. + Disables evaluating project context using MSBuild. @@ -27,111 +17,227 @@ S'il est présent, empêche la présentation des modèles regroupés dans le SDK. - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + Aucun projet n’a été trouvé dans le chemin d’accès : {0}. {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + {0} n’est pas restauré. {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + Project '{0}' est un projet de style de Kit de développement logiciel (SDK), mais ne spécifie pas le cadre. {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + Plusieurs projets trouvés : {0} {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + L’ajout d’une référence de projet à l’action de solution n’est pas configuré correctement dans le modèle. Impossible de déterminer les fichiers de projet à ajouter. + + + + Unable to determine which solution file to add the reference to. + Impossible de déterminer le fichier solution auquel ajouter la référence. + + + + Failed to add project(s) to the solution: {0} + Échec de l'ajout de projet(s) à la solution : {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + Échec de l’ajout du ou des projets à un fichier solution. + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + + + + Successfully added project(s) to a solution file. + Projet(s) ajouté(s) à un fichier solution. + + + + Adding a package reference {0} to project file {1}: + Ajout d’une référence de package {0} au fichier projet {1} : + + + + Failed to add package reference: {0} + Échec de l'ajout de la référence du package : {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + Ajout d’une référence de package {0} (version : {1}) au fichier projet {2} : + + + + Adding a project reference {0} to project file {1}: + Ajout d’une référence de projet {0} au fichier projet {1} : + + + + Failed to add project reference: {0} + Échec de l'ajout de la référence du projet : {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + L'action d'ajout d'une référence n'est pas configurée correctement dans le modèle. + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + Impossible d’ajouter automatiquement la référence d’infrastructure {0} au projet. Modifiez manuellement le fichier projet pour l’ajouter. + + + + Project files found: + Fichiers projet trouvés : + + + + Unable to determine which project file to add the reference to. + Impossible de déterminer le fichier projet auquel ajouter la référence. + + + + Adding reference type {0} is not supported. + L'ajout du type de référence {0} n'est pas pris en charge. + + + + Failed to add a reference to the project file. + Échec de l’ajout d’une référence au fichier projet. + + + + Successfully added a reference to the project file. + Une référence au fichier projet a été ajoutée. + + + + Couldn't determine files to restore. + Impossible de déterminer les fichiers à restaurer. + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + Aucun projet n’est configuré pour la restauration. Vérifiez la configuration des sorties principales dans template.json. + + + + Restore failed. + Échec de la restauration. + + + + Failed to perform restore: {0} + Échec de la restauration : {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + Restauration de {0} : + {0} - path to a project to restore + + + Restore succeeded. + Restauration réussie. + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + Nous n’avons pas pu créer la contrainte '{0}' : échec de l’évaluation du projet : {1}. {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + Nous n’avons pas pu créer la '{0}' de contrainte : {1} le composant n’est pas disponible. {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + Fonctionnalités du projet argument should be a string - argument should be a string + l’argument doit être une chaîne. part of a sentence arguments should not contain empty values - arguments should not contain empty values + les arguments ne doivent pas contenir de valeurs vides. part of a sentence Invalid constraint configuration - Invalid constraint configuration + Configuration de contrainte non valide part of a sentence invalid JSON - invalid JSON + JSON non valide part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + Nous n’avons pas pu évaluer le contexte du projet : {0}. {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + Le modèle a besoin d’une fonctionnalité de projet '{0}', et le projet actuel ({1}) ne le satisfait pas. {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + Spécifiez le projet à utiliser à l’aide de {0} option. {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + Ce modèle ne peut être créé qu’à l’intérieur du projet. The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + Le projet {0} n’est pas un projet de style SDK et n’est pas pris en charge pour l’évaluation. Ce modèle ne peut être utilisé qu’avec des projets de style SDK. {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + Exécutez « dotnet restore {0} » pour restaurer le projet. do not translate 'dotnet restore {0}' Project context - Project context + Contexte du projet The project that should be used for context evaluation. - The project that should be used for context evaluation. + Projet à utiliser pour l’évaluation du contexte - - Failed to perform restore: {0} - Échec de la restauration : {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. Accédez à aka.ms/get-dotnet et installez l'une des versions de SDK prises en charge : '{0}'. diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.it.xlf index 00bca14765e7..1e4f83aae6f4 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.it.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - Non è stato possibile aggiungere il riferimento al pacchetto: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - Non è stato possibile aggiungere il riferimento al progetto: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - Non è stato possibile aggiungere progetti alla soluzione: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + Espressione non valida. Posizione: {0}. + + + + Disables evaluating project context using MSBuild. + Disables evaluating project context using MSBuild. @@ -27,111 +17,227 @@ Se presente, impedisce la presentazione dei modelli forniti in bundle nell'SDK. - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + Nessun progetto trovato nel percorso: {0}. {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + {0} non viene ripristinato. {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + Project '{0}' è un progetto di tipo SDK, ma non specifica il framework. {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + Sono stati trovati più progetti: {0}. {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + L'aggiunta del riferimento al progetto all'azione della soluzione non è configurata correttamente nel modello. Non è possibile determinare i file di progetto da aggiungere. + + + + Unable to determine which solution file to add the reference to. + Non è possibile determinare il file di soluzione a cui aggiungere il riferimento. + + + + Failed to add project(s) to the solution: {0} + Non è stato possibile aggiungere progetti alla soluzione: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + Non è stato possibile aggiungere il/i progetto/i a un file di soluzione. + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + + + + Successfully added project(s) to a solution file. + I progetti sono stati aggiunti a un file di soluzione. + + + + Adding a package reference {0} to project file {1}: + Aggiunta di un riferimento al pacchetto {0} al file di progetto {1}: + + + + Failed to add package reference: {0} + Non è stato possibile aggiungere il riferimento al pacchetto: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + Aggiunta di un riferimento al pacchetto {0} (versione: {1}) al file di progetto {2}: + + + + Adding a project reference {0} to project file {1}: + Aggiunta di un riferimento al progetto {0} al file di progetto {1}: + + + + Failed to add project reference: {0} + Non è stato possibile aggiungere il riferimento al progetto: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + L'azione di aggiunta del riferimento non è configurata correttamente nel modello. + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + Non è possibile aggiungere automaticamente il riferimento framework {0} al progetto. Modificare manualmente il file di progetto per aggiungerlo. + + + + Project files found: + File di progetto trovati: + + + + Unable to determine which project file to add the reference to. + Non è possibile determinare il file di progetto a cui aggiungere il riferimento. + + + + Adding reference type {0} is not supported. + L'aggiunta del tipo riferimento {0} non è supportata. + + + + Failed to add a reference to the project file. + Non è stato possibile aggiungere un riferimento al file di progetto. + + + + Successfully added a reference to the project file. + Aggiunta di un riferimento al file di progetto completata. + + + + Couldn't determine files to restore. + Non è stato possibile determinare i file da ripristinare. + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + Nessun progetto configurato per il ripristino. Controllare la configurazione degli output in template.json. + + + + Restore failed. + Il ripristino non è riuscito. + + + + Failed to perform restore: {0} + Non è stato possibile eseguire il ripristino: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + Ripristino di {0}: + {0} - path to a project to restore + + + Restore succeeded. + Il ripristino è riuscito. + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + Non è stato possibile creare il vincolo '{0}': impossibile valutare il progetto: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + Non è stato possibile creare il vincolo '{0}': {1} componente non è disponibile. {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + Capacità del progetto argument should be a string - argument should be a string + l'argomento deve essere una stringa part of a sentence arguments should not contain empty values - arguments should not contain empty values + gli argomenti non devono contenere valori vuoti part of a sentence Invalid constraint configuration - Invalid constraint configuration + Configurazione vincolo non valida part of a sentence invalid JSON - invalid JSON + JSON non valido part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + Non è stato possibile valutare il contesto del progetto: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + Il modello richiede la funzionalità '{0}' del progetto e il progetto corrente ({1}) non la soddisfa. {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + Specificare il progetto da utilizzare usando l'opzione {0}. {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + Questo modello può essere creato solo all'interno del progetto. The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + Il progetto {0} non è un progetto di stile SDK e non è supportato per la valutazione. È possibile usare questo modello solo con progetti di tipo SDK. {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + Eseguire 'dotnet restore {0}' per ripristinare il progetto. do not translate 'dotnet restore {0}' Project context - Project context + Contesto progetto The project that should be used for context evaluation. - The project that should be used for context evaluation. + Progetto da usare per la valutazione del contesto. - - Failed to perform restore: {0} - Non è stato possibile eseguire il ripristino: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. Passare a aka.ms/get-dotnet e installare una delle versioni supportate dell'SDK: '{0}'. diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ja.xlf index 37d18e07bc73..5049418a4089 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ja.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - パッケージ参照を追加できませんでした: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - プロジェクト参照を追加できませんでした: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - ソリューションにプロジェクトを追加できませんでした: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + 式が無効です、位置: {0}。 + + + + Disables evaluating project context using MSBuild. + MSBuild を使用してプロジェクト コンテキストの評価を無効にします。 @@ -27,111 +17,227 @@ SDK にバンドルされているテンプレートがある場合にそれらが表示されないようにします。 - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + パスにプロジェクトが見つかりませんでした: {0}。 {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + {0} は復元されません。 {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + プロジェクト '{0}' は SDK スタイルのプロジェクトですが、フレームワークが指定されていません。 {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + 複数のプロジェクトが見つかりました: {0}。 {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + ソリューションへのプロジェクト参照追加のアクションがテンプレートで正しく構成されていません。追加するプロジェクトファイルを特定できません。 + + + + Unable to determine which solution file to add the reference to. + 参照の追加先となるソリューション ファイルを特定できませんでした。 + + + + Failed to add project(s) to the solution: {0} + ソリューションにプロジェクトを追加できませんでした: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + プロジェクトをソリューション ファイルに追加できませんでした。 + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + + プロジェクトの追加 対象: {0} + 対応するソリューション ファイル: {1} + ソリューション フォルダー: {2} + + + + Successfully added project(s) to a solution file. + プロジェクトがソリューション ファイルに正常に追加されました。 + + + + Adding a package reference {0} to project file {1}: + パッケージ参照 {0} をプロジェクト ファイル {1} に追加しています: + + + + Failed to add package reference: {0} + パッケージ参照を追加できませんでした: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + パッケージ参照 {0} (バージョン: {1}) をプロジェクト ファイル {2} に追加しています: + + + + Adding a project reference {0} to project file {1}: + プロジェクト参照 {0} をプロジェクト ファイル {1} に追加しています: + + + + Failed to add project reference: {0} + プロジェクト参照を追加できませんでした: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + 参照の追加アクションがテンプレートに正しく構成されていません。 + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + フレームワーク参照 {0} をプロジェクトに自動的に追加できません。プロジェクト ファイルを手動で編集して追加します。 + + + + Project files found: + 見つかったプロジェクト ファイル: + + + + Unable to determine which project file to add the reference to. + 参照の追加先となるプロジェクト ファイルを特定できませんでした。 + + + + Adding reference type {0} is not supported. + 参照型 {0} の追加はサポートされていません。 + + + + Failed to add a reference to the project file. + 参照をプロジェクト ファイルに追加できませんでした。 + + + + Successfully added a reference to the project file. + 参照がプロジェクトファイルに正常に追加されました。 + + + + Couldn't determine files to restore. + 復元するファイルを特定できませんでした。 + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + 復元するように構成されているプロジェクトはありません。template.json のプライマリ出力構成を確認してください。 + + + + Restore failed. + 復元に失敗しました。 + + + + Failed to perform restore: {0} + 復元を実行できませんでした: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + {0} を復元しています: + {0} - path to a project to restore + + + Restore succeeded. + 正常に復元されました。 + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + 制約 '{0}' を作成できませんでした: プロジェクトを評価できませんでした: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + 制約 '{0}' を作成できませんでした: {1} コンポーネントは使用できません。 {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + プロジェクトの可能性 argument should be a string - argument should be a string + 引数を文字列にしなければなりません part of a sentence arguments should not contain empty values - arguments should not contain empty values + 引数に空の値を含めることはできません part of a sentence Invalid constraint configuration - Invalid constraint configuration + 制約の構成が無効です part of a sentence invalid JSON - invalid JSON + 無効な JSON part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + プロジェクト コンテキストを評価できませんでした: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + テンプレートにはプロジェクト機能 '{0}' が必要ですが、現在のプロジェクト ({1}) はこの機能を満たしていません。 {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + {0} オプションを使用して、使用するプロジェクトを指定してください。 {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + このテンプレートはプロジェクト内でのみ作成できます。 The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + プロジェクト {0}は SDK スタイルのプロジェクトではないため、評価の対象としてサポートされていません。このテンプレートは SDK スタイルのプロジェクトでのみ使用できます。 {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + 'dotnet restore {0}' を実行してプロジェクトを復元します。 do not translate 'dotnet restore {0}' Project context - Project context + プロジェクト コンテキスト The project that should be used for context evaluation. - The project that should be used for context evaluation. + コンテキストの評価に使用する必要があるプロジェクトです。 - - Failed to perform restore: {0} - 復元を実行できませんでした: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. aka.ms/get-dotnet に移動し、サポートされている SDK バージョン '{0}' のいずれかをインストールします。 diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ko.xlf index 1d054b16f436..7ac774fb9931 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ko.xlf @@ -2,149 +2,255 @@ - - Failed to add package reference: {0} - Failed to add package reference: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - Failed to add project reference: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - Failed to add project(s) to the solution: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + 잘못된 식, 위치: {0}. - - If present, prevents templates bundled in the SDK from being presented. - If present, prevents templates bundled in the SDK from being presented. + + Disables evaluating project context using MSBuild. + MSBuild를 사용하여 프로젝트 컨텍스트 평가를 사용하지 않도록 설정합니다. - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. + + If present, prevents templates bundled in the SDK from being presented. + 있는 경우 SDK에 번들로 제공되는 템플릿이 표시되지 않도록 합니다. No project was found at the path: {0}. - No project was found at the path: {0}. + 경로 {0}에서 프로젝트를 찾을 수 없습니다. {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + {0}은(는) 복원되지 않습니다. {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + 프로젝트 '{0}'은(는) SDK 스타일 프로젝트이지만 프레임워크를 지정하지 않습니다. {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + 여러 프로젝트를 찾았습니다: {0}. {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + 솔루션 작업에 프로젝트 참조 추가가 템플릿에서 올바르게 구성되지 않았습니다. 추가할 프로젝트 파일을 확인할 수 없습니다. + + + + Unable to determine which solution file to add the reference to. + 참조를 추가할 솔루션 파일을 확인할 수 없습니다. + + + + Failed to add project(s) to the solution: {0} + 솔루션에 프로젝트 추가 실패: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + 솔루션 파일에 프로젝트를 추가하지 못했습니다. + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + + 프로젝트 추가: {0} + 대상 솔루션 파일: {1} + 솔루션 폴더: {2} + + + + Successfully added project(s) to a solution file. + 솔루션 파일에 프로젝트를 추가했습니다. + + + + Adding a package reference {0} to project file {1}: + {1} 프로젝트 파일에 {0} 패키지 참조를 추가하는 중: + + + + Failed to add package reference: {0} + 패키지 참조 추가 실패: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + {2} 프로젝트 파일에 {0} 패키지 참조(버전: {1})를 추가하는 중: + + + + Adding a project reference {0} to project file {1}: + {1} 프로젝트 파일에 {0} 프로젝트 참조를 추가하는 중: + + + + Failed to add project reference: {0} + 프로젝트 참조 추가 실패: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + 템플릿에서 참조 추가 작업이 올바르게 구성되지 않았습니다. + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + 프레임워크 참조 {0}을(를) 프로젝트에 자동으로 추가할 수 없습니다. 프로젝트 파일을 수동으로 편집하여 추가하세요. + + + + Project files found: + 찾은 프로젝트 파일 : + + + + Unable to determine which project file to add the reference to. + 참조를 추가할 프로젝트 파일을 확인할 수 없습니다. + + + + Adding reference type {0} is not supported. + 참조 형식 {0} 추가는 지원되지 않습니다. + + + + Failed to add a reference to the project file. + 프로젝트 파일에 참조를 추가하지 못했습니다. + + + + Successfully added a reference to the project file. + 프로젝트 파일에 참조를 추가했습니다. + + + + Couldn't determine files to restore. + 복원할 파일을 확인할 수 없습니다. + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + 복원하도록 구성된 프로젝트가 없습니다. template.json에서 기본 출력 구성을 확인하세요. + + + + Restore failed. + 복원하지 못했습니다. + + + + Failed to perform restore: {0} + 복원 수행 실패: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + {0} 복원 중: + {0} - path to a project to restore + + + Restore succeeded. + 복원에 성공했습니다. + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + 제약 조건 '{0}' 생성 실패: 프로젝트 평가 실패: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + 제약 조건 '{0}' 생성 실패: {1} 구성 요소를 사용할 수 없습니다. {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + 프로젝트 능력 argument should be a string - argument should be a string + 인수는 문자열이어야 합니다. part of a sentence arguments should not contain empty values - arguments should not contain empty values + 인수에는 빈 값이 포함되어서는 안 됩니다. part of a sentence Invalid constraint configuration - Invalid constraint configuration + 잘못된 제약 조건 구성 part of a sentence invalid JSON - invalid JSON + 잘못된 JSON part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + 프로젝트 컨텍스트 평가 실패: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + 템플릿에 프로젝트 기능 '{0}'이(가) 필요하며 현재 프로젝트({1})가 이를 충족하지 않습니다. {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + {0} 옵션을 사용하여 사용할 프로젝트를 지정합니다. {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + 이 템플릿은 프로젝트 내에서만 만들 수 있습니다. The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + 프로젝트 {0}은(는) SDK 스타일 프로젝트가 아니며 평가가 지원되지 않습니다. 이 템플릿은 SDK 스타일 프로젝트에서만 사용할 수 있습니다. {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + 프로젝트를 복원하려면 'dotnet restore {0}'을(를) 실행하세요. do not translate 'dotnet restore {0}' Project context - Project context + 프로젝트 컨텍스트 The project that should be used for context evaluation. - The project that should be used for context evaluation. + 컨텍스트 평가에 사용해야 하는 프로젝트입니다. - - Failed to perform restore: {0} - Failed to perform restore: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. + aka.ms/get-dotnet으로 이동하여 지원되는 SDK 버전 '{0}'을(를) 설치합니다. {0} is the list of supported versions. You have other SDK version(s) installed that can be used to run this template. Switch to any of the following SDK(s) on your system to run this template: '{0}'. Details on selecting SDK version to run: https://docs.microsoft.com/dotnet/core/tools/global-json. - You have other SDK version(s) installed that can be used to run this template. Switch to any of the following SDK(s) on your system to run this template: '{0}'. Details on selecting SDK version to run: https://docs.microsoft.com/dotnet/core/tools/global-json. + 이 템플릿을 실행하는 데 사용할 수 있는 다른 SDK 버전이 설치되어 있습니다. 이 템플릿을 실행하려면 시스템에서 다음 SDK 중 하나로 전환하세요. '{0}'. 실행할 SDK 버전 선택에 대한 세부 정보: https://docs.microsoft.com/dotnet/core/tools/global-json. {0} is the list of installed and supported versions. Run 'dotnet workload search' to search workloads available to be installed on your SDK. - Run 'dotnet workload search' to search workloads available to be installed on your SDK. + 'dotnet 워크로드 검색'을 실행하여 SDK에 설치할 수 있는 워크로드를 검색합니다. diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.pl.xlf index 3adae76085e1..56bbab8c66da 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.pl.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - Nie można dodać odwołania do pakietu: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - Nie można dodać odwołania do projektu: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - Nie można dodać projektów do rozwiązania: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + Nieprawidłowe wyrażenie, pozycja: {0}. + + + + Disables evaluating project context using MSBuild. + Wyłącza ocenianie kontekstu projektu przy użyciu programu MSBuild. @@ -27,111 +17,227 @@ Jeśli istnieją, uniemożliwia prezentowanie szablonów dołączonych do zestawu SDK. - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + Nie znaleziono projektu w ścieżce: {0}. {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + {0} nie został przywrócony. {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + Projekt „{0}” jest projektem w stylu zestawu SDK, ale nie określa struktury. {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + Znaleziono wiele projektów: {0}. {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + Dodawanie odwołania projektu do akcji rozwiązania nie jest poprawnie skonfigurowane w szablonie. Nie można określić plików projektu do dodania. + + + + Unable to determine which solution file to add the reference to. + Nie można ustalić, do którego pliku projektu należy dodać odwołanie. + + + + Failed to add project(s) to the solution: {0} + Nie można dodać projektów do rozwiązania: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + Nie można dodać projektów do pliku rozwiązania. + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + Dodawanie + projektów: {0} + do pliku rozwiązania: {1} + folder rozwiązania: {2} + + + + Successfully added project(s) to a solution file. + Pomyślnie dodano projekty do pliku rozwiązania. + + + + Adding a package reference {0} to project file {1}: + Dodawanie odwołania do pakietu {0} do pliku projektu {1}: + + + + Failed to add package reference: {0} + Nie można dodać odwołania do pakietu: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + Dodawanie odwołania do pakietu {0} (wersja: {1}) do pliku projektu {2}: + + + + Adding a project reference {0} to project file {1}: + Dodawanie odwołania do projektu {0} do pliku projektu {1}: + + + + Failed to add project reference: {0} + Nie można dodać odwołania do projektu: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + Akcja dodania odwołania nie jest poprawnie skonfigurowana w tym szablonie. + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + Nie można automatycznie dodać odwołania platformy {0} do projektu. Edytuj ręcznie plik projektu, aby go dodać. + + + + Project files found: + Znaleziono pliki projektu: + + + + Unable to determine which project file to add the reference to. + Nie można ustalić, do którego pliku projektu należy dodać odwołanie. + + + + Adding reference type {0} is not supported. + Dodawanie odwołania typu {0} nie jest obsługiwane. + + + + Failed to add a reference to the project file. + Nie można dodać odwołania do pliku projektu. + + + + Successfully added a reference to the project file. + Pomyślnie dodano odwołanie do pliku projektu. + + + + Couldn't determine files to restore. + Nie można ustalić plików do przywrócenia. + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + Żadne projekty nie są skonfigurowane do przywracania. Sprawdź konfigurację podstawowych danych wyjściowych w pliku template.json. + + + + Restore failed. + Błąd przywracania. + + + + Failed to perform restore: {0} + Nie można wykonać przywracania: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + Przywracanie pakietu {0}: + {0} - path to a project to restore + + + Restore succeeded. + Przywracanie powiodło się. + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + Nie można utworzyć ograniczenia „{0}”: nie można ocenić projektu: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + Nie można utworzyć ograniczenia „{0}”: składnik {1} jest niedostępny. {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + Możliwości projektowe argument should be a string - argument should be a string + argument powinien być ciągiem part of a sentence arguments should not contain empty values - arguments should not contain empty values + argumenty nie powinny zawierać pustych wartości part of a sentence Invalid constraint configuration - Invalid constraint configuration + Nieprawidłowa konfiguracja ograniczenia part of a sentence invalid JSON - invalid JSON + Nieprawidłowy kod JSON part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + Nie można ocenić kontekstu projektu: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + Szablon wymaga możliwości projektu „{0}”, a bieżący projekt ({1}) ich nie spełnia. {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + Określ projekt do użycia przy użyciu opcji {0}. {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + Ten szablon można utworzyć tylko wewnątrz projektu. The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + Projekt {0} nie jest projektem w stylu zestawu SDK i nie jest obsługiwany na potrzeby oceny. Tego szablonu można używać tylko z projektami w stylu zestawu SDK. {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + Uruchom polecenie „dotnet restore {0}”, aby przywrócić projekt. do not translate 'dotnet restore {0}' Project context - Project context + Kontekst projektu The project that should be used for context evaluation. - The project that should be used for context evaluation. + Projekt, który powinien być używany do oceny kontekstu. - - Failed to perform restore: {0} - Nie można wykonać przywracania: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. Przejdź do aka.ms/get-dotnet i zainstaluj dowolną z obsługiwanych wersji zestawu SDK: „{0}”. diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.pt-BR.xlf index f7e98f3bbafc..b88b75653bb3 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.pt-BR.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - Falha ao adicionar referência de pacote: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - Falha ao adicionar referência do projeto: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - Falha ao adicionar projeto(s) à solução: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + Expressão inválida, posição: {0}. + + + + Disables evaluating project context using MSBuild. + Desabilita a avaliação do contexto do projeto usando o MSBuild. @@ -27,111 +17,227 @@ Se presente, impede que os modelos agrupados no SDK sejam apresentados. - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + Nenhum projeto foi encontrado no caminho: {0}. {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + {0} não restaurado. {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + O projeto “{0}” é um projeto no estilo SDK, mas não especifica a estrutura. {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + Vários projetos encontrados: {0}. {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + A adição de referência de projeto à ação de solução não está configurada corretamente no modelo. Não é possível determinar os arquivos de projeto a serem adicionados. + + + + Unable to determine which solution file to add the reference to. + Não foi possível determinar o arquivo de projeto ao qual adicionar a referência. + + + + Failed to add project(s) to the solution: {0} + Falha ao adicionar projeto(s) à solução: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + Falha ao adicionar projeto(s) a um arquivo de solução. + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + Adicionando + projeto(s): {0} + ao arquivo de solução: {1} + pasta de solução: {2} + + + + Successfully added project(s) to a solution file. + Projeto(s) adicionado(s) com sucesso a um arquivo de solução. + + + + Adding a package reference {0} to project file {1}: + Adicionando uma referência de pacote {0} ao arquivo de projeto {1}: + + + + Failed to add package reference: {0} + Falha ao adicionar referência de pacote: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + Adicionando uma referência de pacote {0} (versão: {1}) ao arquivo de projeto {2}: + + + + Adding a project reference {0} to project file {1}: + Adicionando uma referência de projeto {0} ao arquivo de projeto {1}: + + + + Failed to add project reference: {0} + Falha ao adicionar referência do projeto: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + A ação de referência Adicionar não está configurada corretamente no modelo. + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + Não é possível adicionar automaticamente a referência de estrutura {0} ao projeto. Edite manualmente o arquivo de projeto para adicioná-lo. + + + + Project files found: + Arquivos de projeto encontrados: + + + + Unable to determine which project file to add the reference to. + Não foi possível determinar o arquivo de projeto ao qual adicionar a referência. + + + + Adding reference type {0} is not supported. + Não há suporte para adicionar o tipo de referência {0}. + + + + Failed to add a reference to the project file. + Falha ao adicionar uma referência ao arquivo de projeto. + + + + Successfully added a reference to the project file. + Adicionada com sucesso uma referência ao arquivo de projeto. + + + + Couldn't determine files to restore. + Não foi possível determinar os arquivos a serem restaurados. + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + Nenhum projeto está configurado para restauração. Verifique a configuração das saídas primárias em template.json. + + + + Restore failed. + Falha na restauração. + + + + Failed to perform restore: {0} + Falha ao executar a restauração: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + Restaurando {0}: + {0} - path to a project to restore + + + Restore succeeded. + A restauração foi bem-sucedida. + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + Falha ao criar a restrição “{0}”: falha ao avaliar o projeto: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + Falha ao criar a restrição “{0}”: {1} componente não está disponível. {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + Capacidades do projeto argument should be a string - argument should be a string + o argumento deve ser uma cadeia de caracteres part of a sentence arguments should not contain empty values - arguments should not contain empty values + argumentos não devem conter valores vazios part of a sentence Invalid constraint configuration - Invalid constraint configuration + Configuração de restrição inválida part of a sentence invalid JSON - invalid JSON + JSON inválido part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + Falha ao avaliar o contexto do projeto: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + O modelo precisa de recursos de projeto “{0}” e o projeto atual ({1}) não o satisfaz. {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + Especifique o projeto a ser usado com a opção {0}. {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + Este modelo somente pode ser criado dentro do projeto. The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + O projeto {0} não é um projeto de estilo SDK e não tem suporte para avaliação. Só é possível usar este modelo com projetos no estilo SDK. {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + Executar o “dotnet restore {0}” para restaurar o projeto. do not translate 'dotnet restore {0}' Project context - Project context + Contexto do projeto The project that should be used for context evaluation. - The project that should be used for context evaluation. + O projeto que deve ser usado para avaliação de contexto. - - Failed to perform restore: {0} - Falha ao executar a restauração: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. Acesse aka.ms/get-dotnet e instale qualquer uma das versões do SDK compatíveis: '{0}'. diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ru.xlf index abe4d2ad5c97..50862ab51eb7 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.ru.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - Не удалось добавить ссылки на пакет: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - Не удалось добавить ссылки на проект: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - Не удалось добавить проект(ы) в решение: {0}. - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + Недопустимое выражение, позиция: {0}. + + + + Disables evaluating project context using MSBuild. + Отключает оценку контекста проекта с помощью MSBuild. @@ -27,111 +17,227 @@ При наличии этого параметра шаблоны, входящие в пакет SDK, не будут представлены. - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + Не удалось найти проект по пути: {0}. {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + Восстановление {0} не выполнено. {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + Проект "{0}" является проектом в стиле SDK, но не указывает платформу. {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + Найдено несколько проектов: {0} {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + Добавить ссылку на проект в решение. Действие в шаблоне настроено неправильно. Не удалось определить файлы проекта для добавления. + + + + Unable to determine which solution file to add the reference to. + Не удается определить файл решения для добавления ссылки. + + + + Failed to add project(s) to the solution: {0} + Не удалось добавить проект(ы) в решение: {0}. + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + Не удалось добавить проект (ы) в файл решения. + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + Добавление + проектов {0} + в файл решения {1} + папки решения {2} + + + + Successfully added project(s) to a solution file. + Проект успешно добавлен в файл решения. + + + + Adding a package reference {0} to project file {1}: + Добавление ссылки на пакет {0} в файл проекта {1}: + + + + Failed to add package reference: {0} + Не удалось добавить ссылки на пакет: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + Добавление ссылки на пакет {0} (версия: {1}) в файл проекта {2}: + + + + Adding a project reference {0} to project file {1}: + Добавление ссылки на проект{0} в файл проекта {1}: + + + + Failed to add project reference: {0} + Не удалось добавить ссылки на проект: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + Действие добавления ссылки неправильно настроено в шаблоне. + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + Не удалось автоматически добавить ссылку на платформу {0} в проект. Измените вручную файл проекта, чтобы добавить его. + + + + Project files found: + Найдено файлов проекта: + + + + Unable to determine which project file to add the reference to. + Не удается определить файл проекта для добавления ссылки. + + + + Adding reference type {0} is not supported. + Добавление ссылки типа {0} не поддерживается. + + + + Failed to add a reference to the project file. + Не удалось добавить ссылку на файл проекта. + + + + Successfully added a reference to the project file. + Ссылка на файл проекта успешно добавлена. + + + + Couldn't determine files to restore. + Не удалось определить файлы для восстановления. + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + Нет проектов, настроенных для восстановления. Проверьте конфигурацию основных выходных данных в template.json. + + + + Restore failed. + Сбой восстановления. + + + + Failed to perform restore: {0} + Не удалось выполнить восстановление: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + Восстановление {0}: + {0} - path to a project to restore + + + Restore succeeded. + Восстановление выполнено. + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + Не удалось создать ограничение "{0}": не удалось оценить проект: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + Не удалось создать ограничение "{0}": компонент {1} недоступен. {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + Возможности проекта argument should be a string - argument should be a string + аргумент должен быть строкой part of a sentence arguments should not contain empty values - arguments should not contain empty values + аргументы не должны содержать пустые значения part of a sentence Invalid constraint configuration - Invalid constraint configuration + Недопустимая конфигурация ограничения part of a sentence invalid JSON - invalid JSON + Недопустимый JSON part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + Не удалось оценить контекст проекта: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + Шаблону требуются возможность проекта "{0}", а текущий проект ({1}) не соответствует этому условию. {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + Укажите проект для использования с помощью параметра {0}. {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + Этот шаблон можно создать только внутри проекта. The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + Проект {0} не является проектом в стиле SDK и не поддерживается для оценки. Этот шаблон можно использовать только с проектами в стиле SDK. {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + Выполните команду "dotnet restore {0}", чтобы восстановить проект. do not translate 'dotnet restore {0}' Project context - Project context + Контекст проекта The project that should be used for context evaluation. - The project that should be used for context evaluation. + Проект, который следует использовать для оценки контекста. - - Failed to perform restore: {0} - Не удалось выполнить восстановление: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. Перейдите aka.ms/get-dotnet и установите любую из поддерживаемых версий пакета SDK: "{0}". diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.tr.xlf index c3888e3dfa1f..b3104bedf587 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.tr.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - Paket başvurusu eklenemedi: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - Proje başvurusu eklenemedi: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - Bir çözüme proje(ler) eklenemedi: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + Geçersiz ifade, konum: {0}. + + + + Disables evaluating project context using MSBuild. + MSBuild kullanarak proje bağlamının değerlendirilmesini devre dışı bırakır. @@ -27,111 +17,227 @@ Varsa, SDK'da paketlenmiş şablonların sunumlarını önler. - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + Yolda proje bulunamadı: {0}. {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + {0} geri yüklenmez. {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + '{0}' projesi SDK stili bir projedir, ancak çerçeveyi belirtmez. {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + Birden çok proje bulundu: {0}. {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + Çözüme proje başvurusu ekleme eylemi şablonda doğru şekilde yapılandırılmadı. Eklenecek proje dosyaları belirlenemiyor. + + + + Unable to determine which solution file to add the reference to. + Başvurunun hangi çözüm dosyasına ekleneceği belirlenemiyor. + + + + Failed to add project(s) to the solution: {0} + Bir çözüme proje(ler) eklenemedi: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + Bir çözüm dosyasına proje(ler) eklenemedi. + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + + projesi/projeleri: {0} + şu çözüm dosyasına: {1} + şu çözüm klasörüne: {2} ekleniyor + + + + Successfully added project(s) to a solution file. + Proje(ler) bir çözüm dosyasına başarıyla eklendi. + + + + Adding a package reference {0} to project file {1}: + {0} paket başvurusu {1} proje dosyasına ekleniyor: + + + + Failed to add package reference: {0} + Paket başvurusu eklenemedi: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + {2} proje dosyasına, {0} paket başvurusu (sürüm: {1}) ekleniyor: + + + + Adding a project reference {0} to project file {1}: + {0} proje başvurusu {1} proje dosyasına ekleniyor: + + + + Failed to add project reference: {0} + Proje başvurusu eklenemedi: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + Add reference eylemi şablonda doğru yapılandırılmamış. + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + {0} çerçeve başvurusu projeye otomatik olarak eklenemiyor. Proje dosyasını el ile düzenleyerek ekleyin. + + + + Project files found: + Bulunan proje dosyaları: + + + + Unable to determine which project file to add the reference to. + Başvurunun hangi proje dosyasına ekleneceği belirlenemiyor. + + + + Adding reference type {0} is not supported. + {0} başvuru türünün eklenmesi desteklenmiyor. + + + + Failed to add a reference to the project file. + Proje dosyasına başvuru eklenemedi. + + + + Successfully added a reference to the project file. + Proje dosyasına bir referans başarıyla eklendi. + + + + Couldn't determine files to restore. + Geri yüklenecek dosyalar belirlenemedi. + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + Geri yüklenecek hiçbir proje yapılandırılmadı. Template.json'da birincil çıktı yapılandırmasını kontrol edin. + + + + Restore failed. + Geri yükleme başarısız oldu. + + + + Failed to perform restore: {0} + Geri yükleme gerçekleştirilemedi: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + {0} geri yükleniyor: + {0} - path to a project to restore + + + Restore succeeded. + Geri yükleme başarılı oldu. + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + '{0}' kısıtlaması oluşturulamadı: proje değerlendirilemedi: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + '{0}' kısıtlaması oluşturulamadı: {1} bileşeni kullanılamıyor. {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + Proje kapasitesi argument should be a string - argument should be a string + bağımsız değişken bir dize olmalıdır part of a sentence arguments should not contain empty values - arguments should not contain empty values + bağımsız değişkenler boş değer içeremez part of a sentence Invalid constraint configuration - Invalid constraint configuration + Geçersiz kısıtlama yapılandırması part of a sentence invalid JSON - invalid JSON + geçersiz JSON part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + Proje bağlamı değerlendirilemedi: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + Şablon, '{0}' proje özelliğine ihtiyaç duyar ve geçerli proje ({1}) bunu karşılamaz. {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + {0} seçeneği aracılığıyla kullanılacak projeyi belirtin. {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + Bu şablon yalnızca proje içinde oluşturulabilir. The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + {0} projesi bir SDK stili proje değil ve değerlendirme için desteklenmiyor. Bu şablon yalnızca SDK stili projelerle kullanılabilir. {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + Projeyi geri yüklemek için 'dotnet restore {0}' komutunu çalıştırın. do not translate 'dotnet restore {0}' Project context - Project context + Proje bağlamı The project that should be used for context evaluation. - The project that should be used for context evaluation. + Bağlam değerlendirmesi için kullanılacak proje. - - Failed to perform restore: {0} - Geri yükleme gerçekleştirilemedi: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. Desteklenen SDK sürümlerinden herhangi birini aka.ms/get-dotnet’e gidin ve yükleyin: '{0}'. diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.zh-Hans.xlf index 86a2be0c6761..a66c7657e6fc 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.zh-Hans.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - 无法添加包引用: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - 无法添加项目引用: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - 无法将项目添加到解决方案: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + 表达式无效,位置: {0}。 + + + + Disables evaluating project context using MSBuild. + 禁用使用 MSBuild 评估项目上下文。 @@ -27,111 +17,227 @@ 如果存在,则阻止显示捆绑在 SDK 中的模板。 - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + 在以下路径找不到项目: {0}。 {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + 未还原 {0}。 {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + 项目“{0}”是 SDK 样式的项目,但未指定框架。 {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + 找到多个项目: {0}。 {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + 模板中未正确配置将项目引用添加到解决方案操作。无法确定要添加的项目文件。 + + + + Unable to determine which solution file to add the reference to. + 无法确定向哪一个解决方案文件添加引用。 + + + + Failed to add project(s) to the solution: {0} + 无法将项目添加到解决方案: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + 无法将项目添加到解决方案文件。 + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + 添加 + 项目: {0} + 到解决方案文件: {1} + 解决方案文件夹: {2} + + + + Successfully added project(s) to a solution file. + 已成功将项目添加到解决方案文件。 + + + + Adding a package reference {0} to project file {1}: + 将包引用 {0} 添加到项目文件 {1}: + + + + Failed to add package reference: {0} + 无法添加包引用: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + 将包引用 {0}(版本: {1})添加到项目文件 {2}: + + + + Adding a project reference {0} to project file {1}: + 将项目引用 {0} 添加到项目文件 {1}: + + + + Failed to add project reference: {0} + 无法添加项目引用: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + 模板中未正确配置添加引用操作。 + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + 无法将框架引用 {0} 自动添加到项目中。请手动编辑项目文件以添加它。 + + + + Project files found: + 已找到项目文件: + + + + Unable to determine which project file to add the reference to. + 无法确定哪一个项目文件要添加引用。 + + + + Adding reference type {0} is not supported. + 不支持添加引用类型 {0}。 + + + + Failed to add a reference to the project file. + 无法添加对项目文件的引用。 + + + + Successfully added a reference to the project file. + 已成功添加对项目文件的引用。 + + + + Couldn't determine files to restore. + 无法确定要还原的文件。 + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + 未将任何项目配置为还原。检查 template.json 中的主输出配置。 + + + + Restore failed. + 还原失败。 + + + + Failed to perform restore: {0} + 无法执行还原: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + 正在还原 {0}: + {0} - path to a project to restore + + + Restore succeeded. + 已成功还原。 + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + 未能创建约束“{0}”: 未能评估项目: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + 未能创建约束“{0}”: {1} 组件不可用。 {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + 项目功能 argument should be a string - argument should be a string + 参数应为字符串 part of a sentence arguments should not contain empty values - arguments should not contain empty values + 参数不应包含空值 part of a sentence Invalid constraint configuration - Invalid constraint configuration + 约束配置无效 part of a sentence invalid JSON - invalid JSON + JSON 无效 part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + 未能评估项目上下文: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + 模板需要项目功能“{0}”,而当前项目({1})不满足它的条件。 {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + 指定要使用 {0} 选项的项目。 {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + 只能在项目内创建此模板。 The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + 项目 {0} 不是 SDK 样式项目,不支持评估。只能将此模板与 SDK 样式项目配合使用。 {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + 运行“dotnet restore {0}”以还原项目。 do not translate 'dotnet restore {0}' Project context - Project context + 项目上下文 The project that should be used for context evaluation. - The project that should be used for context evaluation. + 应用于上下文评估的项目。 - - Failed to perform restore: {0} - 无法执行还原: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. 转到 aka.ms/get-dotnet 并安装任何受支持的 SDK 版本:“{0}”。 diff --git a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.zh-Hant.xlf index 87c609a20ed6..71d744e50e60 100644 --- a/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-new/xlf/LocalizableStrings.zh-Hant.xlf @@ -2,24 +2,14 @@ - - Failed to add package reference: {0} - 無法新增套件參考: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project reference: {0} - 無法新增專案參考: {0} - {0} - the reason why operation failed, normally ends with period - - - Failed to add project(s) to the solution: {0} - 無法將專案新增至解決方案: {0} - {0} - the reason why operation failed, normally ends with period - Invalid expression, position: {0}. - Invalid expression, position: {0}. + 運算式無效,位置: {0}。 + + + + Disables evaluating project context using MSBuild. + 使用 MSBuild 停用評估專案內容。 @@ -27,111 +17,227 @@ 如果存在,則會防止顯示 SDK 中套件組合的範本。 - - Enables evaluating project context using MSBuild. - Enables evaluating project context using MSBuild. - - No project was found at the path: {0}. - No project was found at the path: {0}. + 在路徑 {0} 中找不到任何專案。 {0} - the file path where project was expected to be found. {0} is not restored. - {0} is not restored. + {0} 未還原。 {0} - the full path to the project. Project '{0}' is a SDK-style project, but does not specify the framework. - Project '{0}' is a SDK-style project, but does not specify the framework. + 專案 '{0}' 是 SDK 樣式專案,但未指定架構。 {0} - the full path to the project. Multiple projects found: {0}. - Multiple projects found: {0}. + 找到多個專案: {0}。 {0} - semi-colon separated list of path to projects found. + + Add project reference to solution action is not configured correctly in the template. Unable to determine the project files to add. + 範本中未正確設定將專案參考新增至方案動作。無法判斷要新增的專案檔案。 + + + + Unable to determine which solution file to add the reference to. + 無法判斷要將參考新增到哪一個解決方案檔。 + + + + Failed to add project(s) to the solution: {0} + 無法將專案新增至解決方案: {0} + {0} - the reason why operation failed, normally ends with period + + + Failed to add project(s) to a solution file. + 無法將專案新增至方案檔。 + + + + Adding + project(s): {0} + to solution file: {1} + solution folder: {2} + 正在新增 + 專案: {0} + 至解決方案檔案: {1} + 解決方案資料夾: {2} + + + + Successfully added project(s) to a solution file. + 成功將專案新增至方案檔。 + + + + Adding a package reference {0} to project file {1}: + 正在將套件參考 {0} 新增至專案檔 {1}: + + + + Failed to add package reference: {0} + 無法新增套件參考: {0} + {0} - the reason why operation failed, normally ends with period + + + Adding a package reference {0} (version: {1}) to project file {2}: + 正在將套件參考 {0} (版本: {1}) 新增至專案檔 {2}: + + + + Adding a project reference {0} to project file {1}: + 正在將專案參考 {0} 新增至專案檔 {1}: + + + + Failed to add project reference: {0} + 無法新增專案參考: {0} + {0} - the reason why operation failed, normally ends with period + + + Add reference action is not configured correctly in the template. + 範本中的新增參考動作設定不正確。 + + + + Unable to automatically add the framework reference {0} to the project. Manually edit the project file to add it. + 無法將架構參考 {0} 自動新增到專案。手動編輯專案檔案以新增。 + + + + Project files found: + 找到的專案檔: + + + + Unable to determine which project file to add the reference to. + 無法判斷要將參考新增到哪一個專案檔。 + + + + Adding reference type {0} is not supported. + 不支援要新增的專案類型 {0}。 + + + + Failed to add a reference to the project file. + 無法將參考新增至專案檔。 + + + + Successfully added a reference to the project file. + 成功將參考新增至專案檔。 + + + + Couldn't determine files to restore. + 無法判斷要還原的檔案。 + + + + No projects are configured to restore. Check primary outputs configuration in template.json. + 未設定要還原的專案。請檢查 template.json 中的主要輸出設定。 + + + + Restore failed. + 還原失敗。 + + + + Failed to perform restore: {0} + 無法執行還原: {0} + {0} - the reason why operation failed, normally ends with period + + + Restoring {0}: + 正在還原 {0}: + {0} - path to a project to restore + + + Restore succeeded. + 還原成功。 + + Failed to create constraint '{0}': failed to evaluate the project: {1} - Failed to create constraint '{0}': failed to evaluate the project: {1} + 無法建立限制式 '{0}': 無法評估專案: {1} {0} - type of constraint (non-localizable), {1} - localized reason why evaluation failed, ends with period. Failed to create constraint '{0}': {1} component is not available. - Failed to create constraint '{0}': {1} component is not available. + 無法建立限制式 '{0}': {1} 元件無法使用。 {0} - type of constraint (non-localizable), {1} - name of required component (non-localizable). Project capabiltities - Project capabiltities + 專案功能 argument should be a string - argument should be a string + 引數應為字串 part of a sentence arguments should not contain empty values - arguments should not contain empty values + 引數不應包含空白值 part of a sentence Invalid constraint configuration - Invalid constraint configuration + 限制式設定無效 part of a sentence invalid JSON - invalid JSON + JSON 無效 part of a sentence Failed to evaluate project context: {0} - Failed to evaluate project context: {0} + 無法評估專案內容: {0} {0} - failure reason The template needs project capability '{0}', and current project ({1}) does not satisfy it. - The template needs project capability '{0}', and current project ({1}) does not satisfy it. + 範本需要專案功能 '{0}',但目前的專案 ({1}) 無法滿足。 {0} - project capability expression (non-localizable), {1} - path to the project. Specify the project to use using {0} option. - Specify the project to use using {0} option. + 指定要使用 {0} 選項的專案。 {0} - option to use - non localizable This template can only be created inside the project. - This template can only be created inside the project. + 此範本只能在專案內建立。 The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. - The project {0} is not an SDK style project, and is not supported for evaluation. It is only possible to use this template with SDK-style projects. + 專案 {0} 不是 SDK 樣式專案,因此不支援評估。此範本只能搭配 SDK 樣式專案使用。 {0} - path to the project Run 'dotnet restore {0}' to restore the project. - Run 'dotnet restore {0}' to restore the project. + 執行 'dotnet restore {0}' 以還原專案。 do not translate 'dotnet restore {0}' Project context - Project context + 專案內容 The project that should be used for context evaluation. - The project that should be used for context evaluation. + 應該用於內容評估的專案。 - - Failed to perform restore: {0} - 無法執行還原: {0} - {0} - the reason why operation failed, normally ends with period - Go to aka.ms/get-dotnet and install any of the supported SDK versions: '{0}'. 移至 aka.ms/get-dotnet 並安裝任何支援的 SDK 版本: '{0}'。 diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.cs.xlf index 6a88fd652d7b..a652d7db0722 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.cs.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - Konfigurace, která se má použít k sestavení balíčku. Výchozí hodnota je Debug. Pomocí vlastnosti PackRelease nastavte release jako výchozí pro tento příkaz. + Konfigurace, která se má použít k sestavení balíčku. Výchozí hodnota je Debug. Pomocí vlastnosti PackRelease nastavte release jako výchozí pro tento příkaz. diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.de.xlf index c43488d267d4..f0ba729a0a9d 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.de.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - Die Konfiguration, die zum Erstellen des Pakets verwendet werden soll. Der Standardwert ist „Debuggen“. Verwenden Sie die „PackRelease“-Eigenschaft, um „Release“ als Standard für diesen Befehl zu verwenden. + Die Konfiguration, die zum Erstellen des Pakets verwendet werden soll. Der Standardwert ist „Debuggen“. Verwenden Sie die „PackRelease“-Eigenschaft, um „Release“ als Standard für diesen Befehl zu verwenden. diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.es.xlf index 4d9b7d4170fa..0d5fbca2e73f 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.es.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - Configuración que se va a usar para compilar el paquete. El valor predeterminado es "Debug". Use la propiedad "PackRelease" para que "Release" sea el valor predeterminado para este comando. + Configuración que se va a usar para compilar el paquete. El valor predeterminado es "Debug". Use la propiedad "PackRelease" para que "Release" sea el valor predeterminado para este comando. diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.fr.xlf index b6e28f303b29..0ae75b6e6958 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.fr.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - La configuration à utiliser pour construire le package. La valeur par défaut est 'Débogage'. Utilisez la propriété `PackRelease` pour faire de 'Release' la valeur par défaut pour cette commande. + La configuration à utiliser pour construire le package. La valeur par défaut est 'Débogage'. Utilisez la propriété `PackRelease` pour faire de 'Release' la valeur par défaut pour cette commande. diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.it.xlf index 78db201f329e..ce520989693b 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.it.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - Configurazione da usare per compilare il pacchetto. L'impostazione predefinita è 'Debug'. Usare la proprietà 'PackRelease' per rendere 'Release' il valore predefinito per questo comando. + Configurazione da usare per compilare il pacchetto. L'impostazione predefinita è 'Debug'. Usare la proprietà 'PackRelease' per rendere 'Release' il valore predefinito per questo comando. diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ja.xlf index 87bb8f3910e0..ed31679c6dd1 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ja.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - パッケージのビルドに使用する構成。既定値は 'Debug' です。'Release' をこのコマンドの既定値にするには、'PackRelease' プロパティを使用します。 + パッケージのビルドに使用する構成。既定値は 'Debug' です。'Release' をこのコマンドの既定値にするには、'PackRelease' プロパティを使用します。 diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ko.xlf index c1b10787c75d..6d33c0cf9c3c 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ko.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - The configuration to use for building the package. The default for most projects is 'Debug'. + 패키지를 빌드하는 데 사용할 구성입니다. 기본값은 '디버그'입니다. `PackRelease` 속성을 사용하여 'Release'를 이 명령의 기본값으로 설정합니다. diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pl.xlf index acfba51606bf..570c27b99db5 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pl.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - Konfiguracja używana do kompilowania pakietu. Wartość domyślna to „Debug”. Użyj właściwości „PackRelease”, aby ustawienie „Release” było domyślne dla tego polecenia. + Konfiguracja używana do kompilowania pakietu. Wartość domyślna to „Debug”. Użyj właściwości „PackRelease”, aby ustawienie „Release” było domyślne dla tego polecenia. diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pt-BR.xlf index 59ad3f7441ab..0fd9a36d3c93 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.pt-BR.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - A configuração a ser usada para compilar o pacote. O padrão é 'Depurar'. Use a propriedade `PackRelease` para tornar 'Release' o padrão para este comando. + A configuração a ser usada para compilar o pacote. O padrão é 'Depurar'. Use a propriedade `PackRelease` para tornar 'Release' o padrão para este comando. diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ru.xlf index f8b5f7d72bce..e74c35301f09 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.ru.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - Конфигурация для сборки пакета. По умолчанию используется Debug. Используйте свойство PackRelease, чтобы сделать Release стандартом для этой команды. + Конфигурация для сборки пакета. По умолчанию используется Debug. Используйте свойство PackRelease, чтобы сделать Release стандартом для этой команды. diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.tr.xlf index 49b9f410eedd..29ca7702f482 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.tr.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - Paket derlemede kullanmak için yapılandırma. Varsayılan değer: 'Debug'. Bu komutta, 'Release' komutunu varsayılan yapmak için 'PackRelease' özelliğini kullanın. + Paket derlemede kullanmak için yapılandırma. Varsayılan değer: 'Debug'. Bu komutta, 'Release' komutunu varsayılan yapmak için 'PackRelease' özelliğini kullanın. diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.zh-Hans.xlf index 88c0f7492f55..1c2e7968486b 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.zh-Hans.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - 用于生成包的配置。默认值为 “Debug”。使用 `PackRelease` 属性将 “Release” 作为此命令的默认值。 + 用于生成包的配置。默认值为 “Debug”。使用 `PackRelease` 属性将 “Release” 作为此命令的默认值。 diff --git a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.zh-Hant.xlf index a7a000fa677e..fca3f1cb7608 100644 --- a/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-pack/xlf/LocalizableStrings.zh-Hant.xlf @@ -59,7 +59,7 @@ The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command. - 將用以組建套件的設定。預設值為 'Debug'。使用 'PackRelease' 屬性將 'Release' 設定為此命令的預設值。 + 將用以組建套件的設定。預設值為 'Debug'。使用 'PackRelease' 屬性將 'Release' 設定為此命令的預設值。 diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf index bb6d51e41043..11bb18276b2d 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.cs.xlf @@ -56,7 +56,7 @@ Ve výchozím nastavení je publikována aplikace závislá na architektuře. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - Konfigurace, pro kterou se má publikovat. Výchozí hodnota je Debug. Pomocí vlastnosti PublishRelease nastavte release jako výchozí pro tento příkaz. + Konfigurace, pro kterou se má publikovat. Výchozí hodnota je Debug. Pomocí vlastnosti PublishRelease nastavte release jako výchozí pro tento příkaz. diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf index 119c355b82f7..f4393210deef 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.de.xlf @@ -56,7 +56,7 @@ Standardmäßig wird eine Framework-abhängige Anwendung veröffentlicht. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - Die Konfiguration, für die veröffentlicht werden soll. Der Standardwert ist „Debuggen“. Verwenden Sie die „PublishRelease“-Eigenschaft, um „Release“ als Standard für diesen Befehl zu verwenden. + Die Konfiguration, für die veröffentlicht werden soll. Der Standardwert ist „Debuggen“. Verwenden Sie die „PublishRelease“-Eigenschaft, um „Release“ als Standard für diesen Befehl zu verwenden. diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf index d22664fa7f21..7325a57b4daf 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.es.xlf @@ -56,7 +56,7 @@ El valor predeterminado es publicar una aplicación dependiente del marco. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - Configuración para la que se va a publicar. El valor predeterminado es "Debug". Use la propiedad "PublishRelease" para que "Release" sea el valor predeterminado para este comando. + Configuración para la que se va a publicar. El valor predeterminado es "Debug". Use la propiedad "PublishRelease" para que "Release" sea el valor predeterminado para este comando. diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf index ab6a3b163e1d..cefffaf14b2d 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.fr.xlf @@ -56,7 +56,7 @@ La valeur par défaut est de publier une application dépendante du framework. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - La configuration pour laquelle publier. La valeur par défaut est 'Débogage'. Utilisez la propriété `PublishRelease` pour faire de 'Release' la valeur par défaut pour cette commande. + La configuration pour laquelle publier. La valeur par défaut est 'Débogage'. Utilisez la propriété `PublishRelease` pour faire de 'Release' la valeur par défaut pour cette commande. diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf index 142583149dc6..4d6ff39e1091 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.it.xlf @@ -56,7 +56,7 @@ Per impostazione predefinita, viene generato un pacchetto dipendente dal framewo The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - Configurazione per cui eseguire la pubblicazione. L'impostazione predefinita è 'Debug'. Usare la proprietà 'PublishRelease' per rendere 'Release' il valore predefinito per questo comando. + Configurazione per cui eseguire la pubblicazione. L'impostazione predefinita è 'Debug'. Usare la proprietà 'PublishRelease' per rendere 'Release' il valore predefinito per questo comando. diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf index 9b895571ce18..e1e541aeef17 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ja.xlf @@ -56,7 +56,7 @@ The default is to publish a framework-dependent application. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - 公開する構成。既定値は 'Debug' です。'Release' をこのコマンドの既定値にするには、'PublishRelease' プロパティを使用します。 + 公開する構成。既定値は 'Debug' です。'Release' をこのコマンドの既定値にするには、'PublishRelease' プロパティを使用します。 diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf index 85aeeae036ef..65690fb6e612 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ko.xlf @@ -56,7 +56,7 @@ The default is to publish a framework-dependent application. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - The configuration to publish for. The default for most projects is 'Debug'. + 게시할 구성입니다. 기본값은 '디버그'입니다. 'PublishRelease' 속성을 사용하여 'Release'를 이 명령의 기본값으로 설정합니다. diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf index f88c3668c007..35e6fb500892 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pl.xlf @@ -56,7 +56,7 @@ Domyślnie publikowana jest aplikacja zależna od struktury. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - Konfiguracja do opublikowania. Wartość domyślna to „Debug”. Użyj właściwości „PublishRelease”, aby ustawienie „Release” było ustawieniem domyślnym dla tego polecenia. + Konfiguracja do opublikowania. Wartość domyślna to „Debug”. Użyj właściwości „PublishRelease”, aby ustawienie „Release” było ustawieniem domyślnym dla tego polecenia. diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf index 260b80316a6d..e01e3d146cab 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.pt-BR.xlf @@ -56,7 +56,7 @@ O padrão é publicar uma aplicação dependente de framework. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - A configuração para a qual publicar. O padrão é 'Depurar'. Use a propriedade `PublishRelease` para tornar 'Release' o padrão para este comando. + A configuração para a qual publicar. O padrão é 'Depurar'. Use a propriedade `PublishRelease` para tornar 'Release' o padrão para este comando. diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf index 90414653809b..b6d79581222c 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.ru.xlf @@ -56,7 +56,7 @@ The default is to publish a framework-dependent application. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - Конфигурация для публикации. По умолчанию используется Debug. Используйте свойство PublishRelease, чтобы сделать Release стандартом для этой команды. + Конфигурация для публикации. По умолчанию используется Debug. Используйте свойство PublishRelease, чтобы сделать Release стандартом для этой команды. diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf index ce16fef8dc29..b304302b03dc 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.tr.xlf @@ -56,7 +56,7 @@ Varsayılan durum, çerçeveye bağımlı bir uygulama yayımlamaktır. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - Yayımlama için yapılandırma. Varsayılan değer: 'Debug'. Bu komutta, 'Release' komutunu varsayılan yapmak için 'PublishRelease' özelliğini kullanın. + Yayımlama için yapılandırma. Varsayılan değer: 'Debug'. Bu komutta, 'Release' komutunu varsayılan yapmak için 'PublishRelease' özelliğini kullanın. diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf index 1a3f1f22d253..631b85ae9f2d 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hans.xlf @@ -56,7 +56,7 @@ The default is to publish a framework-dependent application. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - 要发布的配置。默认值为 “Debug”。使用 `PublishRelease` 属性将 “Release” 作为此命令的默认值。 + 要发布的配置。默认值为 “Debug”。使用 `PublishRelease` 属性将 “Release” 作为此命令的默认值。 diff --git a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf index 68f51adfd09e..028b9866dec6 100644 --- a/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-publish/xlf/LocalizableStrings.zh-Hant.xlf @@ -56,7 +56,7 @@ The default is to publish a framework-dependent application. The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command. - 將發佈的設定。預設值為 'Debug'。使用 'PublishRelease' 屬性將 'Release' 設定為此命令的預設值。 + 將發佈的設定。預設值為 'Debug'。使用 'PublishRelease' 屬性將 'Release' 設定為此命令的預設值。 diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.cs.xlf index a53fc9a5bb54..eefdcdfdb962 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.cs.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + Nástroj{0}byl znovu nainstalován s nejnovější předběžnou verzí (verze{1}). Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + Nástroj {0} byl přeinstalován nejnovější stabilní verzí (verze {1}). diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.de.xlf index 0aed08ad4569..856f011a4789 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.de.xlf @@ -1,4 +1,4 @@ - + @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + Das Tool „{0}“ wurde in der neuesten Vorabversion neu installiert (Version „{1}“). Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + Das Tool "{0}" wurde in der neuesten stabilen Version neu installiert (Version {1}). diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.es.xlf index 36b9ea95a618..6530430582c0 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.es.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + La herramienta "{0}" se ha reinstalado con la versión preliminar más reciente (versión "{1}"). Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + La herramienta "{0}" se reinstaló con la versión estable más reciente (versión "{1}"). diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.fr.xlf index c3b6493769b1..aff0d5e56526 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.fr.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + L'outil '{0}' a été réinstallé avec la dernière version préliminaire (version '{1}'). Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + L'outil '{0}' a été réinstallé avec la dernière version stable (version '{1}'). diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.it.xlf index facc836eb1bf..cacda572c0fd 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.it.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + Lo strumento '{0}' è stato reinstallato con l'ultima versione preliminare (versione '{1}'). Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + Lo strumento '{0}' è stato reinstallato con l'ultima versione stabile (versione '{1}'). diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ja.xlf index 32e34579a111..0856585d0c17 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ja.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + ツール '{0}' は、最新のプレリリース バージョン (バージョン '{1}') で再インストールされました。 Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + ツール '{0}' が安定した最新バージョン (バージョン '{1}') で再インストールされました。 diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ko.xlf index e592d5efbfb6..6d587878ad9b 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ko.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + 도구 '{0}'이(가) 최신 시험판 버전(버전 '{1}')으로 다시 설치되었습니다. Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + '{0}' 도구가 안정적인 최신 버전('{1}' 버전)으로 다시 설치되었습니다. diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pl.xlf index 38e95e2fa64f..678a2beee033 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pl.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + Narzędzie „{0}” zostało ponownie zainstalowane przy użyciu najnowszej stabilnej wersji (wersja „{1}”). Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + Narzędzie „{0}” zostało ponownie zainstalowane przy użyciu najnowszej stabilnej wersji (wersja „{1}”). diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pt-BR.xlf index b1d90f266f65..3c6ab251cbfd 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.pt-BR.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + A ferramenta '{0}' foi reinstalada com a versão de pré-lançamento mais recente (versão '{1}'). Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + A ferramenta '{0}' foi reinstalada com a versão estável mais recente (versão '{1}'). diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ru.xlf index 6078cfe4588b..b9970d404860 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.ru.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + Инструмент "{0}" был переустановлен с последней предварительной версией (версией "{1}"). Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + Инструмент "{0}" был переустановлен с последней стабильной версией (версией "{1}"). diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.tr.xlf index 9b641c63eedc..62fbc94e5126 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.tr.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + '{0}' aracı, en yeni ön sürüm (sürüm '{1}') ile yeniden yüklendi. Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + '{0}' aracı, en son kararlı sürüm (sürüm '{1}') ile yeniden yüklendi. diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hans.xlf index 69299dd92dcf..e0ef1cd3e99a 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hans.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + 工具“{0}”已重新安装最新预发行版本(版本“{1}”)。 Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + 工具“{0}”已重新安装最新稳定版本(版本“{1}”)。 diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hant.xlf index f9e3ae9b39ba..45f74922d757 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.zh-Hant.xlf @@ -54,12 +54,12 @@ Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). - Tool '{0}' was reinstalled with the latest prerelease version (version '{1}'). + 已使用最新搶鮮版 ('{0}' 版) 來重新安裝工具 '{1}'。 Tool '{0}' was reinstalled with the latest stable version (version '{1}'). - Tool '{0}' was reinstalled with the latest stable version (version '{1}'). + 已使用最新穩定版本 ('{1}' 版) 來重新安裝工具 '{0}'。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/IWorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/IWorkloadManifestUpdater.cs index 1bb4c5a9026e..db6a05d41171 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/IWorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/IWorkloadManifestUpdater.cs @@ -23,7 +23,7 @@ Dictionary Workloads IEnumerable CalculateManifestRollbacks(string rollbackDefinitionFilePath); - Task> GetManifestPackageDownloadsAsync(bool includePreviews); + Task> GetManifestPackageDownloadsAsync(bool includePreviews, SdkFeatureBand providedSdkFeatureBand, SdkFeatureBand installedSdkFeatureBand); IEnumerable GetUpdatableWorkloadsToAdvertise(IEnumerable installedWorkloads); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs index 6cd10324b316..048d3dc22889 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs @@ -46,14 +46,15 @@ public WorkloadManifestUpdater(IReporter reporter, IWorkloadManifestInstaller workloadManifestInstaller, PackageSourceLocation packageSourceLocation = null, Func getEnvironmentVariable = null, - bool displayManifestUpdates = true) + bool displayManifestUpdates = true, + SdkFeatureBand? sdkFeatureBand = null) { _reporter = reporter; _workloadResolver = workloadResolver; _userProfileDir = userProfileDir; _tempDirPath = tempDirPath; _nugetPackageDownloader = nugetPackageDownloader; - _sdkFeatureBand = new SdkFeatureBand(_workloadResolver.GetSdkFeatureBand()); + _sdkFeatureBand = sdkFeatureBand ?? new SdkFeatureBand(_workloadResolver.GetSdkFeatureBand()); _packageSourceLocation = packageSourceLocation; _getEnvironmentVariable = getEnvironmentVariable ?? Environment.GetEnvironmentVariable; _workloadRecordRepo = workloadRecordRepo; @@ -239,29 +240,26 @@ public IEnumerable CalculateManifestRollbacks(string roll } - public async Task> GetManifestPackageDownloadsAsync(bool includePreviews) + public async Task> GetManifestPackageDownloadsAsync(bool includePreviews, SdkFeatureBand providedSdkFeatureBand, SdkFeatureBand installedSdkFeatureBand) { - var packageIds = GetInstalledManifestIds() - .Select(manifestId => _workloadManifestInstaller.GetManifestPackageId(manifestId, _sdkFeatureBand)); - var downloads = new List(); foreach (var manifest in _workloadResolver.GetInstalledManifests()) { try { - - var packageId = _workloadManifestInstaller.GetManifestPackageId(new ManifestId(manifest.Id), _sdkFeatureBand); + var packageId = _workloadManifestInstaller.GetManifestPackageId(new ManifestId(manifest.Id), providedSdkFeatureBand); bool success; + // After checking the --sdk-version, check the current sdk band, and then the manifest band in that order (success, var latestVersion) = await GetPackageVersion(packageId, packageSourceLocation: _packageSourceLocation, includePreview: includePreviews); if (success) { downloads.Add(new WorkloadDownload(manifest.Id, packageId.ToString(), latestVersion.ToString())); } - if (!success) + + if (!success && !installedSdkFeatureBand.Equals(providedSdkFeatureBand)) { - var newFeatureBand = new SdkFeatureBand(manifest.ManifestFeatureBand); - var newPackageId = _workloadManifestInstaller.GetManifestPackageId(new ManifestId(manifest.Id), newFeatureBand); + var newPackageId = _workloadManifestInstaller.GetManifestPackageId(new ManifestId(manifest.Id), installedSdkFeatureBand); (success, latestVersion) = await GetPackageVersion(newPackageId, packageSourceLocation: _packageSourceLocation, includePreview: includePreviews); @@ -270,6 +268,18 @@ public async Task> GetManifestPackageDownloadsAsyn downloads.Add(new WorkloadDownload(manifest.Id, newPackageId.ToString(), latestVersion.ToString())); } } + var fallbackFeatureBand = new SdkFeatureBand(manifest.ManifestFeatureBand); + if (!success && !fallbackFeatureBand.Equals(installedSdkFeatureBand)) + { + var newPackageId = _workloadManifestInstaller.GetManifestPackageId(new ManifestId(manifest.Id), fallbackFeatureBand); + + (success, latestVersion) = await GetPackageVersion(newPackageId, packageSourceLocation: _packageSourceLocation, includePreview: includePreviews); + + if (success) + { + downloads.Add(new WorkloadDownload(manifest.Id, newPackageId.ToString(), latestVersion.ToString())); + } + } if (!success) { _reporter.WriteLine(string.Format(LocalizableStrings.ManifestPackageUrlNotResolved, packageId)); diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf index 1557f47e0901..a0fb117e3f13 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Balíček manifestu nebyl přeložen. Balíček manifestu nebo adresa URL pro {0} neexistuje. @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + Neplatná definice vrácení zpět. ID manifestu v definici vrácení zpět {0} neodpovídají nainstalovaným ID manifestu {1}. @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + Přeskočit ověření podpisu balíčků úloh a instalačních programů diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf index cdce9b38d728..e0ce777c6a09 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Das Manifestpaket wurde nicht aufgelöst. Das Manifestpaket oder die URL für {0} ist nicht vorhanden. @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + Ungültige Rollbackdefinition. Die Manifest-IDs in der Rollbackdefinition {0} stimmen nicht mit den installierten Manifest-IDs {1} überein. @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + Überspringen Sie die Signaturüberprüfung von Workloadpaketen und -installationsprogrammen. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf index 5f971892ce8e..f6f18dda3a07 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Paquete de manifiesto no resuelto. El paquete de manifiesto o la dirección URL de {0} no existe. @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + Definición de reversión no válida. Los id. de manifiesto de la definición de reversión {0} no coinciden con los id. de manifiesto instalados {1}. @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + Omita la comprobación de firma de los paquetes de carga de trabajo y los instaladores. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf index b84c2e3e8f14..7691069beb89 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Package de manifeste non résolu. Le package ou l’URL du manifeste pour {0} n’existe pas. @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + Définition de restauration non valide. Les ID de manifeste dans la définition de restauration {0} ne correspondent pas aux ID de manifeste installés {1}. @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + Ignorez la vérification de signature des packages de charge de travail et des programmes d’installation. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf index 9b6b67ff92f4..70224de72584 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Pacchetto manifesto non risolto. L'URL o il pacchetto manifesto per {0} non esiste. @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + Definizione di ripristino dello stato precedente non valida. Gli ID manifesto nella definizione di ripristino dello stato precedente {0} non corrispondono agli ID manifesto installati {1}. @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + Ignora la verifica della firma dei pacchetti e dei programmi di installazione del carico di lavoro. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf index df5b7e3c76f4..17cf7af16e23 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + マニフェスト パッケージが解決されていません。{0} のマニフェスト パッケージまたは URL が存在しません。 @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + 無効なロールバック定義。ロールバック定義 {0} のマニフェスト ID が、インストール済みのマニフェスト ID {1} と一致しません。 @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + ワークロード パッケージとインストーラーの署名の認証をスキップします。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf index c0eaef257208..fa3871c6a108 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + 매니페스트 패키지가 해결되지 않았습니다. {0}에 대한 매니페스트 패키지 또는 URL이 존재하지 않습니다. @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + 롤백 정의가 잘못되었습니다. 롤백 정의 {0}의 매니페스트 ID {1}와(과) 일치하지 않습니다. @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + 워크로드 패키지 및 설치 관리자의 서명 확인을 건너뜁니다. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf index b978aecceef7..71f653b05d55 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Pakiet manifestu nie został rozpoznany. Pakiet manifestu lub adres URL {0} nie istnieje. @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + Nieprawidłowa definicja wycofania. Identyfikatory manifestów w definicji wycofania {0} nie są zgodne z zainstalowanymi identyfikatorami manifestów {1}. @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + Pomiń weryfikację podpisu pakietów obciążeń i instalatorów. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf index 283e715db05c..dad6c37440cb 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Pacote de manifesto não resolvido. O pacote de manifesto ou a URL para {0} não existe. @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + Definição de reversão inválida. Os IDs de manifesto na definição de reversão {0} não correspondem aos IDs de manifesto instalados {1}. @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + Ignorar a verificação de assinatura de pacotes de carga de trabalho e instaladores. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf index 4384717145be..13a687aaba72 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Пакет манифеста не разрешен. Пакет манифеста или URL-адрес для {0} не существует. @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + Недопустимое определение отката. Идентификаторы манифеста в определении отката {0} не совпадают с установленными идентификаторами манифеста {1}. @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + Пропустить проверку подписи пакетов рабочих нагрузок и установщиков. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf index 21cf4da32d21..5a89bc39aac8 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + Bildirim paketi çözümlenmedi. {0} için bildirim paketi veya URL yok. @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + Geri alma tanımı geçersiz. {0} geri alma tanımındaki bildirim kimlikleri yüklü bildirim kimlikleriyle ({1}) eşleşmiyor. @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + İş yükü paketlerinin ve yükleyicilerin imza doğrulamasını atlayın. diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf index 53f8fbefc27c..1a1a82c20baa 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + 未解析清单包。{0} 的清单包或 URL 不存在。 @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + 无效的回滚定义。回滚定义 {0} 中的清单 ID 与安装的清单 ID {1} 不匹配。 @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + 跳过对工作负载包和安装程序的签名验证。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf index 83848e104bd8..8b5a6615b6a5 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf @@ -164,7 +164,7 @@ Manifest package not resolved. Manifest package or URL for {0} doesn't exist. - Manifest package not resolved. Manifest package or URL for {0} doesn't exist. + 未解析資訊清單封裝。{0} 的資訊清單套件或 URL 不存在。 @@ -214,7 +214,7 @@ Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. - Invalid rollback definition. The manifest IDs in rollback definition {0} do not match installed manifest IDs {1}. + 無效的復原定義。復原定義 {0} 中的資訊清單識別碼不符合已安裝的資訊清單識別碼 {1}。 @@ -239,7 +239,7 @@ Skip signature verification of workload packages and installers. - Skip signature verification of workload packages and installers. + 略過工作負載套件和安裝程式的簽章驗證。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.cs.xlf index 2f5fe652abb2..47bdd697b3e6 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.cs.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - Aktualizace jsou k dispozici pro následující úlohy: {0}. Pokud chcete získat nejnovější verzi, spusťte aktualizaci úlohy dotnet. + Aktualizace jsou k dispozici pro následující úlohy: {0}. Pokud chcete získat nejnovější verzi, spusťte aktualizaci úlohy dotnet. diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.de.xlf index e04f0f91e79d..178cf16ce8ff 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.de.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - Updates sind für die folgenden Workloads verfügbar: {0}. Führen Sie „dotnet workload update“ aus, um die neueste Updates zu erhalten. + Updates sind für die folgenden Workloads verfügbar: {0}. Führen Sie „dotnet workload update“ aus, um die neueste Updates zu erhalten. diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.es.xlf index 36aba2a92919..c226001cbf9f 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.es.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - Hay actualizaciones disponibles para las siguientes cargas de trabajo: {0}. Ejecute "dotnet workload update" para obtener la versión más reciente. + Hay actualizaciones disponibles para las siguientes cargas de trabajo: {0}. Ejecute "dotnet workload update" para obtener la versión más reciente. diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.fr.xlf index 8e814a5a58d0..56b60d138442 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.fr.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - Des mises à jour sont disponibles pour les charges de travail suivantes : {0}. Exécutez `dotnet workload update` pour obtenir la dernière version. + Des mises à jour sont disponibles pour les charges de travail suivantes : {0}. Exécutez `dotnet workload update` pour obtenir la dernière version. diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.it.xlf index b7834da6e82d..bd07dcb5c248 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.it.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - Gli aggiornamenti sono disponibili per i carichi di lavoro seguenti: {0}. Per ottenere la versione più recente, eseguire 'dotnet workload update'. + Gli aggiornamenti sono disponibili per i carichi di lavoro seguenti: {0}. Per ottenere la versione più recente, eseguire 'dotnet workload update'. diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ja.xlf index 35e7788db68c..2abe9314869a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ja.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - 次のワークロードについて更新プログラムを入手可能です: {0}。最新版を取得するには、`dotnet workload update` を実行します。 + 次のワークロードについて更新プログラムを入手可能です: {0}。最新版を取得するには、`dotnet workload update` を実行します。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ko.xlf index 18ee8ea606db..9c3c9f4fe8d2 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ko.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. + 다음 워크로드에 대한 업데이트를 사용할 수 있습니다. {0}. 최신 버전을 받으려면 `dotnet 워크로드 업데이트`를 실행하세요. diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.pl.xlf index 3b2184c5002a..c3ca428e7dac 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.pl.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - Aktualizacje są dostępne dla następujących obciążeń: {0}. Uruchom polecenie „aktualizacja obciążenia dotnet”, aby uzyskać najnowszą wersję. + Aktualizacje są dostępne dla następujących obciążeń: {0}. Uruchom polecenie „aktualizacja obciążenia dotnet”, aby uzyskać najnowszą wersję. diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.pt-BR.xlf index 3024f29974ca..d178dd696f6d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.pt-BR.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - As atualizações estão disponíveis para as seguintes cargas de trabalho(s): {0}. Execute `dotnet workload update` para obter o mais recente. + As atualizações estão disponíveis para as seguintes cargas de trabalho(s): {0}. Execute `dotnet workload update` para obter o mais recente. diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ru.xlf index 34d62b624f63..58901abbfbc6 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.ru.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - Обновления доступны для следующих рабочих нагрузок: {0}. Чтобы получить последнюю версию, запустите обновление рабочей нагрузки DotNet. + Обновления доступны для следующих рабочих нагрузок: {0}. Чтобы получить последнюю версию, запустите обновление рабочей нагрузки DotNet. diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.tr.xlf index 5ccb27ad8952..ad5ad97c8d3c 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.tr.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - Şu iş yükleri için güncelleştirmeler var: {0}. En son sürümü almak için `dotnet workload update` çalıştırın. + Şu iş yükleri için güncelleştirmeler var: {0}. En son sürümü almak için `dotnet workload update` çalıştırın. diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.zh-Hans.xlf index 4ed8830f6c25..d9734f7585da 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.zh-Hans.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - 更新可用于以下工作负载: {0}。运行 `dotnet 工作负载更新` 以获取最新版本。 + 更新可用于以下工作负载: {0}。运行 `dotnet 工作负载更新` 以获取最新版本。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.zh-Hant.xlf index be28d7fc323f..6c13393f4fd5 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/list/xlf/LocalizableStrings.zh-Hant.xlf @@ -14,7 +14,7 @@ Updates are available for the following workload(s): {0}. Run `dotnet workload update` to get the latest. - 以下工作負載有可用的更新: {0}。執行 `dotnet workload update` 以取得最新更新。 + 以下工作負載有可用的更新: {0}。執行 `dotnet workload update` 以取得最新更新。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs index 8cc2e0955f18..8dc4c083834c 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/update/WorkloadUpdateCommand.cs @@ -57,7 +57,7 @@ public WorkloadUpdateCommand( elevationRequired: !_printDownloadLinkOnly && !_printRollbackDefinitionOnly && string.IsNullOrWhiteSpace(_downloadToCacheOption)); _workloadManifestUpdater = _workloadManifestUpdaterFromConstructor ?? new WorkloadManifestUpdater(Reporter, workloadResolver ?? _workloadResolver, PackageDownloader, _userProfileDir, TempDirectoryPath, - _workloadInstaller.GetWorkloadInstallationRecordRepository(), _workloadInstaller, _packageSourceLocation); + _workloadInstaller.GetWorkloadInstallationRecordRepository(), _workloadInstaller, _packageSourceLocation, sdkFeatureBand: _sdkFeatureBand); } diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.cs.xlf index 7a5c539eb0e5..2d5ba309259a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.cs.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + Nejsou k dispozici žádné nainstalované úlohy, které by se daly zobrazit. Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + Nepovedlo se obejít ověření podpisu. Zadaná možnost je v konfliktu s globálními zásadami. @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + ID nainstalované úlohy Install Type - Install Type + Typ instalace Manifest Version - Manifest Version + Verze manifestu Manifest Path - Manifest Path + Cesta manifestu Installation Source - Installation Source + Zdroj instalace diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.de.xlf index b76d188be34e..387cbc2688e8 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.de.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + Es sind keine installierten Workloads zum Anzeigen vorhanden. Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + Die Signaturüberprüfung kann nicht umgangen werden. Die angegebene Option verursacht einen Konflikt mit einer globalen Richtlinie. @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + Installierte Workload-ID Install Type - Install Type + Installationstyp Manifest Version - Manifest Version + Manifestversion Manifest Path - Manifest Path + Manifestpfad Installation Source - Installation Source + Installationsquelle diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.es.xlf index d01934e92c9a..de639c0b3d35 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.es.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + No hay cargas de trabajo instaladas para mostrar. Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + No se puede omitir la comprobación de firma. La opción especificada entra en conflicto con una directiva global. @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + Id. de carga de trabajo instalada Install Type - Install Type + Tipo de instalación Manifest Version - Manifest Version + Versión del manifiesto Manifest Path - Manifest Path + Ruta de acceso del manifiesto Installation Source - Installation Source + Origen de la instalación diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.fr.xlf index 95c520eafffe..6ac242e49062 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.fr.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + Il n'y a aucune charge de travail installée à afficher. Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + Impossible de contourner la vérification de signature. L’option spécifiée est en conflit avec une stratégie globale. @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + ID de la charge de travail installée Install Type - Install Type + Type d'installation Manifest Version - Manifest Version + Version de manifeste Manifest Path - Manifest Path + Chemin d'accès au Manifeste Installation Source - Installation Source + Source de l’installation diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.it.xlf index ccdc3d2aa94e..f974760591e5 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.it.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + Non sono presenti carichi di lavoro installati da visualizzare. Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + Non è possibile ignorare la verifica della firma. L'opzione specificata è in conflitto con un criterio globale. @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + ID carico di lavoro installato Install Type - Install Type + Tipo di installazione Manifest Version - Manifest Version + Versioni del manifesto Manifest Path - Manifest Path + Percorso del manifesto Installation Source - Installation Source + Origine dell'installazione diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ja.xlf index 5310dc1877c8..a7b94d492bb0 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ja.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + 表示するインストール済みワークロードはありません。 Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + 署名の認証を回避できません。指定されたオプションがグローバル ポリシーと競合しています。 @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + インストール済みワークロードの ID Install Type - Install Type + インストールの種類 Manifest Version - Manifest Version + マニフェストのバージョン Manifest Path - Manifest Path + マニフェスト パス Installation Source - Installation Source + インストール ソース diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ko.xlf index ebaf83544de3..0eabac6cbb8e 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ko.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + 표시할 설치된 워크로드가 없습니다. Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + 서명 확인을 무시할 수 없습니다. 지정한 옵션이 전역 정책과 충돌합니다. @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + 설치된 워크로드 ID Install Type - Install Type + 설치 유형 Manifest Version - Manifest Version + 매니페스트 버전 Manifest Path - Manifest Path + 매니페스트 경로 Installation Source - Installation Source + 설치 원본 diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.pl.xlf index caf580ef2326..9a626f97d823 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.pl.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + Brak zainstalowanych obciążeń do wyświetlenia. Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + Nie można pominąć weryfikacji podpisu. Określona opcja powoduje konflikt z zasadami globalnymi. @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + Identyfikator zainstalowanego obciążenia Install Type - Install Type + Typ instalacji Manifest Version - Manifest Version + Wersja manifestu Manifest Path - Manifest Path + Ścieżka manifestu Installation Source - Installation Source + Źródło instalacji diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.pt-BR.xlf index 5cdb30b39254..691fa66fdddf 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.pt-BR.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + Não há cargas de trabalho instaladas para exibir. Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + Não é possível ignorar a verificação de assinatura. A opção especificada está em conflito com uma política global. @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + ID da carga de trabalho instalada Install Type - Install Type + Tipo de Instalação Manifest Version - Manifest Version + Versão do Manifesto Manifest Path - Manifest Path + Caminho do Manifesto Installation Source - Installation Source + Origem da Instalação diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ru.xlf index 7d13a3e2b35a..e82115c560a4 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.ru.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + Нет установленных рабочих нагрузок для отображения. Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + Не удаётся обойти проверку подписи. Указанный параметр конфликтует с глобальной политикой. @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + Идентификатор установленной рабочей нагрузки Install Type - Install Type + Тип установки Manifest Version - Manifest Version + Версия манифеста Manifest Path - Manifest Path + Путь к манифесту Installation Source - Installation Source + Источник установки diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.tr.xlf index 98c916b701d6..5707a7368dcc 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.tr.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + Görüntülenecek yüklü iş yükü yok. Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + İmza doğrulaması atlanamıyor. Belirtilen seçenek bir genel ilkeyle çakışıyor. @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + Yüklü İş Yükü Kimliği Install Type - Install Type + Yükleme Türü Manifest Version - Manifest Version + Bildirim Sürümü Manifest Path - Manifest Path + Bildirim Yolu Installation Source - Installation Source + Yükleme Kaynağı diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.zh-Hans.xlf index a5e746ad2bb4..e7e80aac3e8c 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.zh-Hans.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + 没有要显示的已安装工作负载。 Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + 无法绕过签名验证。指定的选项与全局策略冲突。 @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + 已安装的工作负载 ID Install Type - Install Type + 安装类型 Manifest Version - Manifest Version + 清单版本 Manifest Path - Manifest Path + 清单路径 Installation Source - Installation Source + 安装源文件 diff --git a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.zh-Hant.xlf index d44870950bf6..d84f9b5288a6 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.zh-Hant.xlf @@ -19,12 +19,12 @@ There are no installed workloads to display. - There are no installed workloads to display. + 沒有已安裝的工作負載可顯示。 Unable to bypass signature verification. The specified option conflicts with a global policy. - Unable to bypass signature verification. The specified option conflicts with a global policy. + 無法跳過簽章驗證。指定的選項與全域原則衝突。 @@ -34,27 +34,27 @@ Installed Workload Id - Installed Workload Id + 已安裝的工作負載識別碼 Install Type - Install Type + 安裝類型 Manifest Version - Manifest Version + 資訊清單版本 Manifest Path - Manifest Path + 資訊清單路徑 Installation Source - Installation Source + 安裝來源 diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj index ad31316cefd3..bb202db43721 100644 --- a/src/Cli/dotnet/dotnet.csproj +++ b/src/Cli/dotnet/dotnet.csproj @@ -17,6 +17,7 @@ + diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf index edd35bcad2c3..c814418a46a9 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + Vynuťte, aby příkaz ignoroval všechny trvalé buildovací servery. @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + Soubor odpovědí {0} neexistuje. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf index 38e4ae8d8d2e..456e343d52ea 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + Erzwingen Sie, dass der Befehl alle persistenten Buildserver ignoriert. @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + Die Antwortdatei „{0}“ ist nicht vorhanden. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf index 87a8d0372c8b..2c4254afff77 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + Fuerce el comando para omitir los servidores de compilación persistentes. @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + El archivo de respuesta '{0}' no existe. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf index 1f1bf0206d61..4569f3ce0fba 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + Forcez la commande à ignorer tous les serveurs de build persistants. @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + Le fichier réponse '{0}' n’existe pas. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf index 200bcf6758b4..83a951bca3e2 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + Forza il comando a ignorare tutti i server di compilazione persistenti. @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + Il file di risposta '{0}' non esiste. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf index fa3118cd2d48..c72859b735ba 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + 永続的なビルド サーバーがそのコマンドで無視されるようにします。 @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + 応答ファイル '{0}' が存在しません。 diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf index 3319aaf1778d..381a178d373a 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + 모든 영구 빌드 서버를 무시하도록 명령을 강제 실행합니다. @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + 지시 파일 '{0}'이(가) 없습니다. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf index d089e6207f6b..2dda6dc2b436 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + Wymuś polecenie, aby zignorować wszystkie trwałe serwery kompilacji. @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + Plik odpowiedzi „{0}” nie istnieje. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf index 165f56dd7a46..2d97af03fd71 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + Force o comando a ignorar quaisquer servidores de compilação persistentes. @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + O arquivo de resposta '{0}' não existe. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf index 721018051662..32485494ff2d 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + Принудительно игнорировать все постоянные серверы сборки. @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + Файл отклика "{0}" не существует. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf index 0cc525afd2a9..52db9f795477 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + Komutu kalıcı derleme sunucularını yoksaymaya zorla. @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + '{0}' yanıt dosyası mevcut değil. diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf index 463da052ae66..7c6c4a703ec3 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + 强制命令忽略任何永久性生成服务器。 @@ -172,7 +172,7 @@ EOF Response file '{0}' does not exist. - Response file '{0}' does not exist. + 响应文件“{0}”不存在。 diff --git a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf index e8968c724b07..5d6cdf4bbdff 100644 --- a/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf @@ -39,7 +39,7 @@ Force the command to ignore any persistent build servers. - Force the command to ignore any persistent build servers. + 強制命令略過任何持續性組建伺服器。 @@ -172,7 +172,7 @@ export PATH="$PATH:{0}" Response file '{0}' does not exist. - Response file '{0}' does not exist. + 回應檔 '{0}' 不存在。 diff --git a/src/Common/CompileOptions.cs b/src/Common/CompileOptions.cs new file mode 100644 index 000000000000..2ba77d957d5e --- /dev/null +++ b/src/Common/CompileOptions.cs @@ -0,0 +1,15 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.DotNet.Cli +{ + static class CompileOptions + { + public const bool TelemetryOptOutDefault = +#if MICROSOFT_ENABLE_TELEMETRY + false; +#else + true; +#endif + } +} diff --git a/src/Common/EnvironmentVariableNames.cs b/src/Common/EnvironmentVariableNames.cs index 236e27329eb1..573bf63dcd98 100644 --- a/src/Common/EnvironmentVariableNames.cs +++ b/src/Common/EnvironmentVariableNames.cs @@ -11,5 +11,6 @@ static class EnvironmentVariableNames public static readonly string WORKLOAD_UPDATE_NOTIFY_DISABLE = "DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE"; public static readonly string WORKLOAD_UPDATE_NOTIFY_INTERVAL_HOURS = "DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_INTERVAL_HOURS"; public static readonly string WORKLOAD_DISABLE_PACK_GROUPS = "DOTNET_CLI_WORKLOAD_DISABLE_PACK_GROUPS"; + public static readonly string TELEMETRY_OPTOUT = "DOTNET_CLI_TELEMETRY_OPTOUT"; } } diff --git a/src/Layout/redist/targets/GenerateLayout.targets b/src/Layout/redist/targets/GenerateLayout.targets index c493a1111cb0..85adb4ed8aee 100644 --- a/src/Layout/redist/targets/GenerateLayout.targets +++ b/src/Layout/redist/targets/GenerateLayout.targets @@ -160,7 +160,7 @@ - netcoreapp2.1 + netcoreapp3.1 net6.0 $(NuGetPackageRoot)/microsoft.testplatform.cli/$(MicrosoftTestPlatformCLIPackageVersion)/contentFiles/any/$(TestCliNuGetDirectoryTargetFramework)/ diff --git a/src/Layout/redist/targets/OverlaySdkOnLKG.targets b/src/Layout/redist/targets/OverlaySdkOnLKG.targets index b9146254d1e3..b31188d592de 100644 --- a/src/Layout/redist/targets/OverlaySdkOnLKG.targets +++ b/src/Layout/redist/targets/OverlaySdkOnLKG.targets @@ -9,14 +9,27 @@ - - - $(_DotNetHiveRoot)/sdk/$(Stage0SdkVersion)/IncludedWorkloadManifests.txt + + + + + + + $([System.IO.Path]::GetFileName(`%(Identity)`)) + + + + + + + + + @@ -28,14 +41,10 @@ Exclude="$(_DotNetHiveRoot)/sdk/$(Stage0SdkVersion)/DotnetTools/dotnet-watch/**" /> - - - $(RedistLayoutPath)/sdk/$(Version) diff --git a/src/RazorSdk/Targets/Microsoft.NET.Sdk.Razor.StaticWebAssets.targets b/src/RazorSdk/Targets/Microsoft.NET.Sdk.Razor.StaticWebAssets.targets index 391ed3a18a90..3d6fbd352b20 100644 --- a/src/RazorSdk/Targets/Microsoft.NET.Sdk.Razor.StaticWebAssets.targets +++ b/src/RazorSdk/Targets/Microsoft.NET.Sdk.Razor.StaticWebAssets.targets @@ -273,7 +273,7 @@ Copyright (c) .NET Foundation. All rights reserved. - <_StaticWebAssetsManifestBase>$(IntermediateOutputPath) + <_StaticWebAssetsManifestBase Condition="'$(_StaticWebAssetsManifestBase)' == ''">$(IntermediateOutputPath) _content/$(PackageId) Default $(_StaticWebAssetsManifestBase)staticwebassets.build.json @@ -536,7 +536,7 @@ Copyright (c) .NET Foundation. All rights reserved. Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + Nepovedlo se najít verzi sady .NET SDK {0} podle souboru global.json. Zkontrolujte prosím, jestli je zadaná verze nainstalovaná. @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - Nepovedlo se najít sadu .NET SDK. Zkontrolujte, jestli je nainstalovaná, jestli je vaše cesta nakonfigurovaná pro správnou architekturu a jestli verze zadaná v souboru global.json (pokud existuje) odpovídá nainstalované verzi. + Nepovedlo se najít sadu .NET SDK. Zkontrolujte, jestli je nainstalovaná, jestli je vaše cesta nakonfigurovaná pro správnou architekturu a jestli verze zadaná v souboru global.json (pokud existuje) odpovídá nainstalované verzi. diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.de.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.de.xlf index 0c4c72826a19..0ffc3dca3b8c 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.de.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.de.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + Die in „global.json“ angegebene .NET SDK-Version „{0}“ wurde nicht gefunden. Überprüfen Sie, ob die angegebene Version installiert ist. @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - Das .NET SDK wurde nicht gefunden. Überprüfen Sie, ob es installiert ist, Ihr PFAD für die richtige Architektur konfiguriert ist und dass die in „global.json“ angegebene Version (falls vorhanden) mit der installierten Version übereinstimmt. + Das .NET SDK wurde nicht gefunden. Überprüfen Sie, ob es installiert ist, Ihr PFAD für die richtige Architektur konfiguriert ist und dass die in „global.json“ angegebene Version (falls vorhanden) mit der installierten Version übereinstimmt. diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.es.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.es.xlf index 7a2e59495223..157de49257be 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.es.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.es.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + No se encuentra la versión del SDK de .NET "{0}" tal como se especifica en global.json. Compruebe que la versión especificada está instalada. @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - No se encuentra el SDK de .NET. Compruebe que está instalado, que su RUTA DE ACCESO está configurada para la arquitectura correcta y que la versión especificada en global.json (si la hubiera) coincide con la versión instalada. + No se encuentra el SDK de .NET. Compruebe que está instalado, que su RUTA DE ACCESO está configurada para la arquitectura correcta y que la versión especificada en global.json (si la hubiera) coincide con la versión instalada. diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.fr.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.fr.xlf index 95f86f46e24a..b72b2d1079c3 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.fr.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.fr.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + Impossible de localiser la version du SDK .NET '{0}' comme spécifié par global.json, veuillez vérifier que la version spécifiée est installée. @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - Impossible de localiser le SDK .NET. Vérifiez qu'il est installé, que votre PATH est configuré pour la bonne architecture et que la version spécifiée dans global.json (le cas échéant) correspond à la version installée. + Impossible de localiser le SDK .NET. Vérifiez qu'il est installé, que votre PATH est configuré pour la bonne architecture et que la version spécifiée dans global.json (le cas échéant) correspond à la version installée. diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.it.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.it.xlf index f9c91c7919ad..73fb7f107f50 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.it.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.it.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + Non è possibile trovare la versione '{0}' di .NET SDK specificata in global.json. Verificare che sia installata la versione specificata. @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - Non è possibile trovare .NET SDK. Verificare che sia installato, che PATH sia configurato per l'architettura corretta e che la versione specificata in global.json, se presente, corrisponda alla versione installata. + Non è possibile trovare .NET SDK. Verificare che sia installato, che PATH sia configurato per l'architettura corretta e che la versione specificata in global.json, se presente, corrisponda alla versione installata. diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ja.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ja.xlf index 6e38502e3795..c1f5da9ad1fb 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ja.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ja.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + global.json で指定されている .NET SDK バージョン '{0}' が見つかりません。指定されたバージョンがインストールされていることをご確認ください。 @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - .NET SDK が見つかりません。それがインストールされていること、正しいアーキテクチャについて PATH が構成されていること、そのインストール済みバージョンが global.json で指定されているバージョンと一致していること (指定されている場合) をご確認ください。 + .NET SDK が見つかりません。それがインストールされていること、正しいアーキテクチャについて PATH が構成されていること、そのインストール済みバージョンが global.json で指定されているバージョンと一致していること (指定されている場合) をご確認ください。 diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ko.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ko.xlf index 010da8a11899..e8270ad89db7 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ko.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ko.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + global.json에 지정된 대로 .NET SDK 버전 '{0}'을(를) 찾을 수 없습니다. 지정된 버전이 설치되어 있는지 확인하세요. @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - Unable to locate the .NET SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version. + .NET SDK를 찾을 수 없습니다. 설치되었는지, PATH가 올바른 아키텍처로 구성되었는지, global.json(있는 경우)에 지정된 버전이 설치된 버전과 일치하는지 확인하세요. diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.pl.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.pl.xlf index e768f61c1ce1..e3f9732da252 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.pl.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.pl.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + Nie można zlokalizować zestawu .NET SDK w wersji „{0}” , który został określony przez plik global.json. Upewnij się, że określona wersja jest zainstalowana. @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - Nie można zlokalizować zestawu .NET SDK. Sprawdź, czy jest zainstalowana, ścieżka PATH jest skonfigurowana pod kątem poprawnej architektury i czy wersja określona w pliku global.json (jeśli istnieje) jest zgodna z zainstalowaną wersją. + Nie można zlokalizować zestawu .NET SDK. Sprawdź, czy jest zainstalowana, ścieżka PATH jest skonfigurowana pod kątem poprawnej architektury i czy wersja określona w pliku global.json (jeśli istnieje) jest zgodna z zainstalowaną wersją. diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.pt-BR.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.pt-BR.xlf index 6721ec3baac0..d7475fdeaa7d 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.pt-BR.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.pt-BR.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + Não foi possível localizar a versão do SDK do .NET '{0}' conforme especificado pelo global.json, verifique se a versão especificada está instalada. @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - Não é possível localizar o .NET SDK. Verifique se ele está instalado, seu PATH está configurado para a arquitetura correta e se a versão especificada em global.json (se houver) corresponde à versão instalada. + Não é possível localizar o .NET SDK. Verifique se ele está instalado, seu PATH está configurado para a arquitetura correta e se a versão especificada em global.json (se houver) corresponde à versão instalada. diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ru.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ru.xlf index e0c8600e2ee4..df54e7aa973f 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ru.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.ru.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + Не удалось найти пакет SDK для .NET версии {0}, указанный в файле global.json. Убедитесь, что указанная версия установлена. @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - Не удается найти пакет SDK для .NET. Убедитесь, что пакет установлен, PATH настроен для правильной архитектуры и версия, указанная в файле global.json (если он имеется), соответствует установленной. + Не удается найти пакет SDK для .NET. Убедитесь, что пакет установлен, PATH настроен для правильной архитектуры и версия, указанная в файле global.json (если он имеется), соответствует установленной. diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.tr.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.tr.xlf index d07d8339683f..67197fcada96 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.tr.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.tr.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + global.json tarafından belirtilen .NET SDK sürüm '{0}' bulunamıyor, lütfen belirtilen sürümün yüklü olduğundan emin olun. @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - .NET SDK bulunamadı. Yüklü olduğundan, PATH’inizin doğru mimari için yapılandırıldığından ve (varsa) global.json içinde belirtilen sürümün yüklü sürümle eşleştiğinden emin olun. + .NET SDK bulunamadı. Yüklü olduğundan, PATH’inizin doğru mimari için yapılandırıldığından ve (varsa) global.json içinde belirtilen sürümün yüklü sürümle eşleştiğinden emin olun. diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.zh-Hans.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.zh-Hans.xlf index a15268c7b52a..c9e6fa5f0789 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.zh-Hans.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.zh-Hans.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + 无法找到 global.json 指定的 .NET SDK 版本“{0}”,请检查是否已安装指定的版本。 @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - 找不到 .NET SDK。检查它是否已安装、是否将 PATH 配置为正确的体系结构,以及 global.json (如果有)中指定的版本是否与安装的版本匹配。 + 找不到 .NET SDK。检查它是否已安装、是否将 PATH 配置为正确的体系结构,以及 global.json (如果有)中指定的版本是否与安装的版本匹配。 diff --git a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.zh-Hant.xlf b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.zh-Hant.xlf index 996c62426fa0..54f9be5ad1c0 100644 --- a/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.zh-Hant.xlf +++ b/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/xlf/Strings.zh-Hant.xlf @@ -9,7 +9,7 @@ Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. - Unable to locate the .NET SDK version '{0}' as specified by global.json, please check that the specified version is installed. + 找不到 global.js 所指定的 .NET SDK 版本 ‘{0}’,請檢查是否已安裝指定的版本。 @@ -34,7 +34,7 @@ Unable to locate the .NET SDK. Check that it is installed, your PATH is configured for the correct architecture, and that the version specified in global.json (if any) matches the installed version. - 找不到 .NET SDK。請檢查是否已安裝該項目,已針對正確的架構設定您的 PATH,且在 global.json 中指定的版本 (如果有的話) 和安裝的版本相符。 + 找不到 .NET SDK。請檢查是否已安裝該項目,已針對正確的架構設定您的 PATH,且在 global.json 中指定的版本 (如果有的話) 和安裝的版本相符。 diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/TempDirectoryWorkloadManifestProvider.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/TempDirectoryWorkloadManifestProvider.cs index d645988b9c7d..6ae5e948fb6c 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/TempDirectoryWorkloadManifestProvider.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/TempDirectoryWorkloadManifestProvider.cs @@ -13,10 +13,10 @@ public class TempDirectoryWorkloadManifestProvider : IWorkloadManifestProvider private readonly string _manifestsPath; private readonly string _sdkVersionBand; - public TempDirectoryWorkloadManifestProvider(string manifestsPath, string sdkVersion) + public TempDirectoryWorkloadManifestProvider(string manifestsPath, string sdkFeatureBand) { _manifestsPath = manifestsPath; - _sdkVersionBand = sdkVersion; + _sdkVersionBand = sdkFeatureBand; } public IEnumerable diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 27a92837b06e..8d7e270b7097 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + Optimalizace velikosti sestavení může změnit chování aplikace. Po publikování nezapomeňte provést test. Viz: https://aka.ms/dotnet-illink Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + Optimalizace velikosti sestavení Tento proces může chvíli trvat. @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: Zadané ID knihovny typů {0} pro knihovnu typů {1} je neplatné. ID musí být kladné celé číslo menší než 65536. + NETSDK1170: Zadané ID knihovny typů {0} pro knihovnu typů {1} je neplatné. ID musí být kladné celé číslo menší než 65536. {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: Balíček {0} {1} má prostředek s národním prostředím {2}. Toto národní prostředí se normalizovalo do standardního formátu {3}, aby se zabránilo problémům s malými a velkými písmeny v sestavení. Zvažte možnost upozornit na tento problém autora balíčku. Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: Balíček {0} {1} má prostředek s národním prostředím {2}. Toto národní prostředí není rozpoznáno rozhraním .NET. Doporučujeme upozornit autora balíčku, že se zdá, že používá neplatné národní prostředí. Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: Sestavení nelze optimalizovat z hlediska výkonu: nebyl nalezen platný balíček modulu runtime. Buď nastavte vlastnost PublishReadyToRun na hodnotu false, nebo při publikování použijte podporovaný identifikátor modulu runtime. Při cílení na .NET 6 nebo vyšší nezapomeňte obnovit balíčky s vlastností PublishReadyToRun nastavenou na hodnotu true. + NETSDK1094: Sestavení nelze optimalizovat z hlediska výkonu: nebyl nalezen platný balíček modulu runtime. Buď nastavte vlastnost PublishReadyToRun na hodnotu false, nebo při publikování použijte podporovaný identifikátor modulu runtime. Při cílení na .NET 6 nebo vyšší nezapomeňte obnovit balíčky s vlastností PublishReadyToRun nastavenou na hodnotu true. {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: Sada Runtime Pack pro FrameworkReference {0} nebyla k dispozici. Důvodem může být to, že vlastnost DisableTransitiveFrameworkReferenceDownloads byla nastavena na hodnotu true. + NETSDK1185: Sada Runtime Pack pro FrameworkReference {0} nebyla k dispozici. Důvodem může být to, že vlastnost DisableTransitiveFrameworkReferenceDownloads byla nastavena na hodnotu true. {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: Balíček cílení pro FrameworkReference {0} nebyl k dispozici. Důvodem může být to, že vlastnost DisableTransitiveFrameworkReferenceDownloads byla nastavena na hodnotu true. + NETSDK1184: Balíček cílení pro FrameworkReference {0} nebyl k dispozici. Důvodem může být to, že vlastnost DisableTransitiveFrameworkReferenceDownloads byla nastavena na hodnotu true. {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: Tento projekt závisí na Maui Essentials prostřednictvím odkazu na projekt nebo balíček NuGet, ale nedeklaruje tuto závislost explicitně. Pokud chcete tento projekt sestavit, musíte nastavit vlastnost UseMauiEssentials na true (a v případě potřeby nainstalovat úlohu Maui). + NETSDK1186: Tento projekt závisí na Maui Essentials prostřednictvím odkazu na projekt nebo balíček NuGet, ale nedeklaruje tuto závislost explicitně. Pokud chcete tento projekt sestavit, musíte nastavit vlastnost UseMauiEssentials na true (a v případě potřeby nainstalovat úlohu Maui). {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: Používáte verzi Preview rozhraní .NET. Viz: https://aka.ms/dotnet-support-policy + NETSDK1057: Používáte verzi Preview rozhraní .NET. Viz: https://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 81fcac68c0ab..d9eb3a393f3f 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + Das Optimieren der Assembly für die Größe kann das Verhalten der App ändern. Stellen Sie sicher, dass nach der Veröffentlichung Tests durchgeführt werden. Informationen finden Sie unter https://aka.ms/dotnet-illink. Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + Assemblys werden für die Größe optimiert. Dieser Vorgang kann eine Weile dauern. @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: Die angegebene Typenbibliotheks-ID „{0}“ für die Typbibliothek „{1}“ ist ungültig. Die ID muss eine positive Ganzzahl kleiner als 65536 sein. + NETSDK1170: Die angegebene Typenbibliotheks-ID „{0}“ für die Typbibliothek „{1}“ ist ungültig. Die ID muss eine positive Ganzzahl kleiner als 65536 sein. {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: Das Paket {0} {1} verfügt über eine Ressource mit dem gebietsschema-'{2}'. Dieses Gebietsschema wurde auf das Standardformat '{3}' normalisiert, um Groß-/Kleinschreibungsprobleme im Build zu vermeiden. Erwägen Sie, den Paketautor über dieses Groß-/Kleinschreibungsproblem zu benachrichtigen. Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: Das Paket {0} {1} verfügt über eine Ressource mit dem gebietsschema-'{2}'. Dieses Gebietsschema wird von .NET nicht erkannt. Erwägen Sie, den Paketautor darüber zu benachrichtigen, dass offenbar ein ungültiges Gebietsschema verwendet wird. Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: Assemblys können nicht für Leistung optimiert werden: Es wurde kein gültiges Runtimepaket gefunden. Legen Sie entweder die PublishReadyToRun-Eigenschaft auf FALSE fest, oder verwenden Sie beim Veröffentlichen einen unterstützten Runtimebezeichner. Wenn Sie .NET 6 oder höher verwenden, stellen Sie sicher, dass Sie Pakete wiederherstellen, bei denen die PublishReadyToRun-Eigenschaft auf TRUE festgelegt ist. + NETSDK1094: Assemblys können nicht für Leistung optimiert werden: Es wurde kein gültiges Runtimepaket gefunden. Legen Sie entweder die PublishReadyToRun-Eigenschaft auf FALSE fest, oder verwenden Sie beim Veröffentlichen einen unterstützten Runtimebezeichner. Wenn Sie .NET 6 oder höher verwenden, stellen Sie sicher, dass Sie Pakete wiederherstellen, bei denen die PublishReadyToRun-Eigenschaft auf TRUE festgelegt ist. {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: Das Runtimepaket für FrameworkReference „{0}“ war nicht verfügbar. Dies kann daran liegen, dass DisableTransitiveFrameworkReferenceDownloads auf TRUE festgelegt wurde. + NETSDK1185: Das Runtimepaket für FrameworkReference „{0}“ war nicht verfügbar. Dies kann daran liegen, dass DisableTransitiveFrameworkReferenceDownloads auf TRUE festgelegt wurde. {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: Das Zielpaket für FrameworkReference „{0}“ war nicht verfügbar. Dies kann daran liegt, dass DisableTransitiveFrameworkReferenceDownloads auf TRUE festgelegt wurde. + NETSDK1184: Das Zielpaket für FrameworkReference „{0}“ war nicht verfügbar. Dies kann daran liegt, dass DisableTransitiveFrameworkReferenceDownloads auf TRUE festgelegt wurde. {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: Dieses Projekt ist über einen Projekt- oder NuGet-Paketverweis von Maui Essentials abhängig, deklariert diese Abhängigkeit jedoch nicht explizit. Um dieses Projekt zu erstellen, müssen Sie die UseMauiEssentials-Eigenschaft auf TRUE festlegen (und bei Bedarf den Maui-Workload installieren). + NETSDK1186: Dieses Projekt ist über einen Projekt- oder NuGet-Paketverweis von Maui Essentials abhängig, deklariert diese Abhängigkeit jedoch nicht explizit. Um dieses Projekt zu erstellen, müssen Sie die UseMauiEssentials-Eigenschaft auf TRUE festlegen (und bei Bedarf den Maui-Workload installieren). {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: Sie verwenden eine Vorschauversion von .NET. Weitere Informationen: https://aka.ms/dotnet-support-policy + NETSDK1057: Sie verwenden eine Vorschauversion von .NET. Weitere Informationen: https://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 9b52b74963af..2aa33940bd30 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -1,4 +1,4 @@ - + @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + Al optimizar el tamaño de los ensamblados, es posible que cambie el comportamiento de la aplicación. Asegúrese de probarla después de su publicación. Visite https://aka.ms/dotnet-illink Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + Optimización del tamaño de los ensamblados. Este proceso puede tardar un momento. @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: El identificador de biblioteca de tipos proporcionado "{0}" para la biblioteca de tipos "{1}" no es válido. El identificador debe ser un entero positivo menor de 65 536. + NETSDK1170: El identificador de biblioteca de tipos proporcionado "{0}" para la biblioteca de tipos "{1}" no es válido. El identificador debe ser un entero positivo menor de 65 536. {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: El paquete {0} {1} tiene un recurso con la configuración regional "{2}". Esta configuración regional se ha normalizado al formato estándar "{3}" para evitar problemas de uso de mayúsculas y minúsculas en la compilación. Considere la posibilidad de notificar al autor del paquete sobre este problema de uso de mayúsculas y minúsculas. Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: El paquete {0} {1} tiene un recurso con la configuración regional "{2}". .NET no reconoce esta configuración regional. Considere la posibilidad de notificar al autor del paquete que parece estar usando una configuración regional no válida. Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: No se pueden optimizar los ensamblados para mejorar el rendimiento: no se ha encontrado un paquete en tiempo de ejecución válido. Establezca la propiedad PublishReadyToRun en false o use un identificador en tiempo de ejecución compatible al publicar. Cuando el destino sea .NET 6 o una versión posterior, asegúrese de restaurar los paquetes con la propiedad PublishReadyToRun establecida en true. + NETSDK1094: No se pueden optimizar los ensamblados para mejorar el rendimiento: no se ha encontrado un paquete en tiempo de ejecución válido. Establezca la propiedad PublishReadyToRun en false o use un identificador en tiempo de ejecución compatible al publicar. Cuando el destino sea .NET 6 o una versión posterior, asegúrese de restaurar los paquetes con la propiedad PublishReadyToRun establecida en true. {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: El paquete en tiempo de ejecución para FrameworkReference "{0}" no estaba disponible. Esto puede deberse a que DisableTransitiveFrameworkReferenceDownloads se ha establecido en true. + NETSDK1185: El paquete en tiempo de ejecución para FrameworkReference "{0}" no estaba disponible. Esto puede deberse a que DisableTransitiveFrameworkReferenceDownloads se ha establecido en true. {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: El paquete de destinatarios para FrameworkReference "{0}" no estaba disponible. Esto puede deberse a que DisableTransitiveFrameworkReferenceDownloads se ha establecido en true. + NETSDK1184: El paquete de destinatarios para FrameworkReference "{0}" no estaba disponible. Esto puede deberse a que DisableTransitiveFrameworkReferenceDownloads se ha establecido en true. {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: Este proyecto depende de Maui Essentials a través de un proyecto o una referencia de paquete NuGet, pero no declara esa dependencia de forma explícita. Para compilar este proyecto, debe establecer la propiedad UseMauiEssentials en true (e instalar la carga de trabajo de Maui, si es necesario). + NETSDK1186: Este proyecto depende de Maui Essentials a través de un proyecto o una referencia de paquete NuGet, pero no declara esa dependencia de forma explícita. Para compilar este proyecto, debe establecer la propiedad UseMauiEssentials en true (e instalar la carga de trabajo de Maui, si es necesario). {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: Está usando una versión preliminar de .NET. Visite: https://aka.ms/dotnet-support-policy + NETSDK1057: Está usando una versión preliminar de .NET. Visite: https://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 9db081f7c201..25cc4ea000a2 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + L'optimisation de la taille des assemblys peut modifier le comportement de l'application. Assurez-vous de tester après la publication. Voir : https://aka.ms/dotnet-illink Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + Optimisation des assemblages pour la taille. Ce processus peut prendre un certain temps. @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: L'ID de bibliothèque de types fourni "{0}" pour la bibliothèque de types "{1}" n'est pas valide. L'ID doit être un entier positif inférieur à 65536. + NETSDK1170: L'ID de bibliothèque de types fourni "{0}" pour la bibliothèque de types "{1}" n'est pas valide. L'ID doit être un entier positif inférieur à 65536. {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187 : package {0} {1} a une ressource avec les paramètres régionaux '{2}'. Ces paramètres régionaux ont été normalisés au format standard '{3}' pour éviter les problèmes de casse dans la build. Envisagez d’avertir l’auteur du package de ce problème de casse. Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: Package {0} {1} a une ressource avec les paramètres régionaux '{2}'. Ces paramètres régionaux ne sont pas reconnus par .NET. Envisagez d’avertir l’auteur du package qu’il semble utiliser des paramètres régionaux non valides. Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: Impossible d'optimiser les assemblages pour les performances : un package d'exécution valide n'a pas été trouvé. Définissez la propriété PublishReadyToRun sur false ou utilisez un identificateur d'exécution pris en charge lors de la publication. Lorsque vous ciblez .NET 6 ou supérieur, assurez-vous de restaurer les packages avec la propriété PublishReadyToRun définie sur true. + NETSDK1094: Impossible d'optimiser les assemblages pour les performances : un package d'exécution valide n'a pas été trouvé. Définissez la propriété PublishReadyToRun sur false ou utilisez un identificateur d'exécution pris en charge lors de la publication. Lorsque vous ciblez .NET 6 ou supérieur, assurez-vous de restaurer les packages avec la propriété PublishReadyToRun définie sur true. {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: Le pack d'exécution pour FrameworkReference '{0}' n'était pas disponible. Cela peut être dû au fait que DisableTransitiveFrameworkReferenceDownloads a été défini sur true. + NETSDK1185: Le pack d'exécution pour FrameworkReference '{0}' n'était pas disponible. Cela peut être dû au fait que DisableTransitiveFrameworkReferenceDownloads a été défini sur true. {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: le pack de ciblage pour FrameworkReference '{0}' n'était pas disponible. Cela peut être dû au fait que DisableTransitiveFrameworkReferenceDownloads a été défini sur true. + NETSDK1184: le pack de ciblage pour FrameworkReference '{0}' n'était pas disponible. Cela peut être dû au fait que DisableTransitiveFrameworkReferenceDownloads a été défini sur true. {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: ce projet dépend de Maui Essentials via une référence de projet ou de package NuGet, mais ne déclare pas explicitement cette dépendance. Pour construire ce projet, vous devez définir la propriété UseMauiEssentials sur true (et installer la charge de travail Maui si nécessaire). + NETSDK1186: ce projet dépend de Maui Essentials via une référence de projet ou de package NuGet, mais ne déclare pas explicitement cette dépendance. Pour construire ce projet, vous devez définir la propriété UseMauiEssentials sur true (et installer la charge de travail Maui si nécessaire). {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057 : vous utilisez une version d'aperçu de .NET. Voir : https://aka.ms/dotnet-support-policy + NETSDK1057 : vous utilisez une version d'aperçu de .NET. Voir : https://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index a1fffc2a9d9f..11542802ea25 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + L'ottimizzazione degli assembly per le dimensioni potrebbe comportare la modifica del comportamento dell'app. Assicurarsi di testarla dopo la pubblicazione. Vedere: https://aka.ms/dotnet-illink Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + Ottimizzazione degli assembly per le dimensioni. Questo processo potrebbe richiedere del tempo. @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: l'ID '{0}' per la libreria dei tipi specificato '{1}' non è valido. L'ID deve essere un numero positivo intero inferiore a 65536. + NETSDK1170: l'ID '{0}' per la libreria dei tipi specificato '{1}' non è valido. L'ID deve essere un numero positivo intero inferiore a 65536. {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: il pacchetto {0} {1} include una risorsa con le impostazioni locali '{2}'. Queste impostazioni locali sono state normalizzate nel formato standard '{3}' per evitare problemi di maiuscole e minuscole nella compilazione. È consigliabile informare l'autore del pacchetto in merito a questo problema di maiuscole e minuscole. Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: il pacchetto {0} {1} include una risorsa con le impostazioni locali '{2}'. Queste impostazioni locali non sono riconosciute da .NET. È consigliabile notificare all'autore del pacchetto che sembra usare impostazioni locali non valide. Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: non è possibile ottimizzare gli assembly per le prestazioni perché non è stato trovato alcun pacchetto di runtime valido. Impostare la proprietà PublishReadyToRun su false oppure usare un identificatore di runtime supportato durante la pubblicazione. Quando si usa .NET 6 o versioni successive, assicurarsi di ripristinare i pacchetti con la proprietà PublishReadyToRun impostata su true. + NETSDK1094: non è possibile ottimizzare gli assembly per le prestazioni perché non è stato trovato alcun pacchetto di runtime valido. Impostare la proprietà PublishReadyToRun su false oppure usare un identificatore di runtime supportato durante la pubblicazione. Quando si usa .NET 6 o versioni successive, assicurarsi di ripristinare i pacchetti con la proprietà PublishReadyToRun impostata su true. {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: il Runtime Pack per FrameworkReference '{0}' non è disponibile. È possibile che DisableTransitiveFrameworkReferenceDownloads sia stato impostato su true. + NETSDK1185: il Runtime Pack per FrameworkReference '{0}' non è disponibile. È possibile che DisableTransitiveFrameworkReferenceDownloads sia stato impostato su true. {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: il Targeting Pack per FrameworkReference '{0}' non è disponibile. È possibile che DisableTransitiveFrameworkReferenceDownloads sia stato impostato su true. + NETSDK1184: il Targeting Pack per FrameworkReference '{0}' non è disponibile. È possibile che DisableTransitiveFrameworkReferenceDownloads sia stato impostato su true. {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: questo progetto dipende da Maui Essentials tramite un riferimento al progetto o al pacchetto NuGet, ma non dichiara questa dipendenza in modo esplicito. Per compilare questo progetto, è necessario impostare la proprietà UseMauiEssentials su true e, se necessario, installare il carico di lavoro Maui. + NETSDK1186: questo progetto dipende da Maui Essentials tramite un riferimento al progetto o al pacchetto NuGet, ma non dichiara questa dipendenza in modo esplicito. Per compilare questo progetto, è necessario impostare la proprietà UseMauiEssentials su true e, se necessario, installare il carico di lavoro Maui. {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: si sta usando una versione in anteprima di .NET. Vedere https://aka.ms/dotnet-support-policy + NETSDK1057: si sta usando una versione in anteprima di .NET. Vedere https://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 571e46b83d65..1606ae08aff0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -1,4 +1,4 @@ - + @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + アセンブリのサイズを最適化すると、アプリの動作が変わる可能性があります。公開した後に必ずテストしてください。https://aka.ms/dotnet-illink を参照してください Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + アセンブリのサイズを最適化しています。このプロセスには時間がかかる場合があります。 @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: タイプ ライブラリ '{1}' の指定されたタイプ ライブラリ ID '{0}' が無効です。ID は 65536 未満の正の整数である必要があります。 + NETSDK1170: タイプ ライブラリ '{1}' の指定されたタイプ ライブラリ ID '{0}' が無効です。ID は 65536 未満の正の整数である必要があります。 {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: パッケージ {0} {1} にロケール '{2}' のリソースがあります。大文字と小文字の区別に関する問題を防ぐために、このロケールはビルド内では標準形式 '{3}' に正規化されています。大文字と小文字の区別に関する問題があることをパッケージの作成者に通知するようお勧めします。 Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: パッケージ {0} {1} にロケール '{2}' のリソースがあります。このロケールは .NET では認識されません。無効なロケールを使用していると思われることをパッケージ作成者に通知するようお勧めします。 Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: アセンブリのパフォーマンスを最適化できません: 有効なランタイム パッケージが見つかりませんでした。PublishReadyToRun プロパティを false に設定するか、公開時に、サポートされているランタイム識別子を使用してください。.NET 6 以降を対象とする場合は、必ず PublishReadyToRun プロパティを true に設定してパッケージを復元してください。 + NETSDK1094: アセンブリのパフォーマンスを最適化できません: 有効なランタイム パッケージが見つかりませんでした。PublishReadyToRun プロパティを false に設定するか、公開時に、サポートされているランタイム識別子を使用してください。.NET 6 以降を対象とする場合は、必ず PublishReadyToRun プロパティを true に設定してパッケージを復元してください。 {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: FrameworkReference '{0}' のランタイム パックは使用できませんでした。DisableTransitiveFrameworkReferenceDownloads が true に設定されたことが原因である可能性があります。 + NETSDK1185: FrameworkReference '{0}' のランタイム パックは使用できませんでした。DisableTransitiveFrameworkReferenceDownloads が true に設定されたことが原因である可能性があります。 {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: FrameworkReference '{0}' の Targeting Pack は使用できませんでした。DisableTransitiveFrameworkReferenceDownloads が true に設定されたことが原因である可能性があります。 + NETSDK1184: FrameworkReference '{0}' の Targeting Pack は使用できませんでした。DisableTransitiveFrameworkReferenceDownloads が true に設定されたことが原因である可能性があります。 {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: このプロジェクトでは、プロジェクトまたは NuGet パッケージ参照を介して Maui Essentials に依存していますが、その依存関係が明示的に宣言されていません。このプロジェクトをビルドするには、UseMauiEssentials プロパティを true に設定する必要があります (必要に応じて、Maui ワークロードをインストールしてください)。 + NETSDK1186: このプロジェクトでは、プロジェクトまたは NuGet パッケージ参照を介して Maui Essentials に依存していますが、その依存関係が明示的に宣言されていません。このプロジェクトをビルドするには、UseMauiEssentials プロパティを true に設定する必要があります (必要に応じて、Maui ワークロードをインストールしてください)。 {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: プレビュー版の .NET を使用しています。https://aka.ms/dotnet-support-policy をご覧ください + NETSDK1057: プレビュー版の .NET を使用しています。https://aka.ms/dotnet-support-policy をご覧ください diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 853414202f73..e0dd18eba9a9 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -1,4 +1,4 @@ - + @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + 크기에 맞게 어셈블리를 최적화하면 앱의 동작이 변경될 수 있습니다. 퍼블리싱 후 꼭 테스트 해보세요. 참조: https://aka.ms/dotnet-illink Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + 크기에 맞게 어셈블리 최적화. 이 프로세스는 시간이 걸릴 수 있습니다. @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. + NETSDK1170: '{1}' 형식 라이브러리에 대해 제공된 형식 라이브러리 ID '{0}'이(가) 잘못되었습니다. ID는 65536보다 작은 양의 정수여야 합니다. {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: 패키지 {0} {1}에 로캘이 '{2}'인 리소스가 있습니다. 이 로캘은 빌드에서 대/소문자 문제를 방지하기 위해 표준 형식 '{3}'(으)로 정규화되었습니다. 패키지 작성자에게 이 대/소문자 문제에 대해 알리는 것이 좋습니다. Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: 패키지 {0} {1}에는 로캘이 '{2}'인 리소스가 있습니다. 이 로캘은 .NET에서 인식할 수 없습니다. 패키지 작성자에게 잘못된 로캘을 사용하는 것 같다고 알리는 것이 좋습니다. Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. + NETSDK1094: 성능을 위해 어셈블리를 최적화할 수 없습니다. 유효한 런타임 패키지를 찾을 수 없습니다. PublishReadyToRun 속성을 false로 설정하거나 게시할 때 지원되는 런타임 식별자를 사용하세요. .NET 6 이상을 대상으로 하는 경우 PublishReadyToRun 속성이 true로 설정된 패키지를 복원해야 합니다. {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. + NETSDK1185: FrameworkReference '{0}'용 런타임 팩을 사용할 수 없습니다. DisableTransitiveFrameworkReferenceDownloads가 true로 설정되었기 때문일 수 있습니다. {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. + NETSDK1184: FrameworkReference '{0}'에 대한 대상 지정 팩을 사용할 수 없습니다. DisableTransitiveFrameworkReferenceDownloads가 true로 설정되었기 때문일 수 있습니다. {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). + NETSDK1186: 이 프로젝트는 프로젝트 또는 NuGet 패키지 참조를 통해 Maui Essentials에 종속되지만 해당 종속성을 명시적으로 선언하지 않습니다. 이 프로젝트를 빌드하려면 UseMauiEssentials 속성을 true로 설정해야 합니다(필요한 경우 Maui 워크로드 설치). {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy + NETSDK1057: .NET의 미리 보기 버전을 사용하고 있습니다. 참조: https://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index ed80d315f57b..a6f4b97ede58 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -9,7 +9,7 @@ NETSDK1183: Unable to optimize assemblies for Ahead of time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true. - NETSDK1183: Unable to optimize assemblies for Ahead of time compilation: a valid runtime package was not found. Either set the PublishAot property to false, or use a supported runtime identifier when publishing. When targeting .NET 7 or higher, make sure to restore packages with the PublishAot property set to true. + NETSDK1094: Nie można zoptymalizować zestawów pod kątem kompilacji z wyprzedzeniem: nie znaleziono prawidłowego pakietu środowiska uruchomieniowego. Ustaw właściwość PublishAot na wartość false lub użyj obsługiwanego identyfikatora środowiska uruchomieniowego podczas publikowania. W przypadku określania wartości docelowej platformy .NET 7 lub nowszej należy przywrócić pakiety z właściwością PublishAot ustawioną na wartość true. {StrBegin="NETSDK1094: "} @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + Zestawy są optymalizowane pod kątem rozmiaru, co może spowodować zmianę zachowania aplikacji. Pamiętaj, aby wykonać testy po opublikowaniu. Zobacz: https://aka.ms/dotnet-illink Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + Optymalizowanie zestawów pod kątem rozmiaru. Ten proces może trochę potrwać. @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: podany identyfikator biblioteki typów „{0}” dla biblioteki typów „{1}” jest nieprawidłowy. Identyfikator musi być dodatnią liczbą całkowitą mniejszą niż 65536. + NETSDK1170: podany identyfikator biblioteki typów „{0}” dla biblioteki typów „{1}” jest nieprawidłowy. Identyfikator musi być dodatnią liczbą całkowitą mniejszą niż 65536. {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: Pakiet {0} {1} ma zasób z ustawieniami regionalnymi „{2}”. Te ustawienia regionalne zostały znormalizowane do standardowego formatu „{3}”, aby zapobiec problemom z wielkością liter w kompilacji. Rozważ powiadomienie autora pakietu o tym problemie z wielkością liter. Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: Pakiet {0} {1} ma zasób z ustawieniami regionalnymi „{2}”. To ustawienie regionalne nie jest rozpoznawane przez platformę .NET. Rozważ powiadomienie autora pakietu, że prawdopodobnie używa on nieprawidłowych ustawień regionalnych. Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: Nie można zoptymalizować zestawów pod kątem wydajności: nie znaleziono prawidłowego pakietu środowiska uruchomieniowego. Ustaw właściwość PublishReadyToRun na wartość false lub użyj obsługiwanego identyfikatora środowiska uruchomieniowego podczas publikowania. W przypadku określania wartości docelowej platformy .NET 6 lub nowszej należy przywrócić pakiety z właściwością PublishReadyToRun ustawioną na wartość true. + NETSDK1094: Nie można zoptymalizować zestawów pod kątem wydajności: nie znaleziono prawidłowego pakietu środowiska uruchomieniowego. Ustaw właściwość PublishReadyToRun na wartość false lub użyj obsługiwanego identyfikatora środowiska uruchomieniowego podczas publikowania. W przypadku określania wartości docelowej platformy .NET 6 lub nowszej należy przywrócić pakiety z właściwością PublishReadyToRun ustawioną na wartość true. {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: Pakiet środowiska uruchomieniowego dla elementu FrameworkReference „{0}” był niedostępny. Może to być spowodowane tym, że parametr DisableTransitiveFrameworkReferenceDownloads został ustawiony na wartość true. + NETSDK1185: Pakiet środowiska uruchomieniowego dla elementu FrameworkReference „{0}” był niedostępny. Może to być spowodowane tym, że parametr DisableTransitiveFrameworkReferenceDownloads został ustawiony na wartość true. {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: Pakiet określania wartości docelowej dla elementu FrameworkReference „{0}” był niedostępny. Może to być spowodowane tym, że parametr DisableTransitiveFrameworkReferenceDownloads został ustawiony na wartość true. + NETSDK1184: Pakiet określania wartości docelowej dla elementu FrameworkReference „{0}” był niedostępny. Może to być spowodowane tym, że parametr DisableTransitiveFrameworkReferenceDownloads został ustawiony na wartość true. {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: Ten projekt zależy od programu Maui Essentials za pomocą projektu lub odwołania do pakietu NuGet, ale nie deklaruje jawnie tej zależności. Aby skompilować ten projekt, należy ustawić właściwość UseMauiEssentials na wartość true (i zainstalować obciążenie Maui w razie potrzeby). + NETSDK1186: Ten projekt zależy od programu Maui Essentials za pomocą projektu lub odwołania do pakietu NuGet, ale nie deklaruje jawnie tej zależności. Aby skompilować ten projekt, należy ustawić właściwość UseMauiEssentials na wartość true (i zainstalować obciążenie Maui w razie potrzeby). {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: Korzystasz z wersji zapoznawczej platformy .NET. Zobacz: ttps://aka.ms/dotnet-support-policy + NETSDK1057: Korzystasz z wersji zapoznawczej platformy .NET. Zobacz: ttps://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 7a615e81861f..5678d3d16519 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + Otimizar assemblies para tamanho pode alterar o comportamento do aplicativo. Certifique-se de testar após a publicação. Veja: https://aka.ms/dotnet-illink Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + Otimizando montagens para tamanho. Esse processo pode demorar um pouco. @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: A ID da biblioteca de tipos fornecida '{0}' para a biblioteca de tipos '{1}' é inválida. O ID deve ser um número inteiro positivo menor que 65536. + NETSDK1170: A ID da biblioteca de tipos fornecida '{0}' para a biblioteca de tipos '{1}' é inválida. O ID deve ser um número inteiro positivo menor que 65536. {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: o pacote {0} {1} tem um recurso com a localidade '{2}'. Essa localidade foi normalizada para o formato padrão '{3}' para evitar problemas de maiúsculas e minúsculas na compilação. Considere notificar o autor do pacote sobre esse problema de caixa. Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: o pacote {0} {1} tem um recurso com a localidade '{2}'. Esta localidade não é reconhecida pelo .NET. Considere notificar o autor do pacote de que parece estar usando uma localidade inválida. Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: Não é possível otimizar assemblies para desempenho: um pacote de tempo de execução válido não foi encontrado. Defina a propriedade PublishReadyToRun como false ou use um identificador de tempo de execução com suporte ao publicar. Ao direcionar o .NET 6 ou superior, certifique-se de restaurar os pacotes com a propriedade PublishReadyToRun definida como true. + NETSDK1094: Não é possível otimizar assemblies para desempenho: um pacote de tempo de execução válido não foi encontrado. Defina a propriedade PublishReadyToRun como false ou use um identificador de tempo de execução com suporte ao publicar. Ao direcionar o .NET 6 ou superior, certifique-se de restaurar os pacotes com a propriedade PublishReadyToRun definida como true. {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: O Runtime Pack para FrameworkReference '{0}' não estava disponível. Isso pode ser porque DisableTransitiveFrameworkReferenceDownloads foi definido como true. + NETSDK1185: O Runtime Pack para FrameworkReference '{0}' não estava disponível. Isso pode ser porque DisableTransitiveFrameworkReferenceDownloads foi definido como true. {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: O Targeting Pack para FrameworkReference '{0}' não estava disponível. Isso pode ser porque DisableTransitiveFrameworkReferenceDownloads foi definido como true. + NETSDK1184: O Targeting Pack para FrameworkReference '{0}' não estava disponível. Isso pode ser porque DisableTransitiveFrameworkReferenceDownloads foi definido como true. {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: Este projeto depende do Maui Essentials por meio de um projeto ou referência de pacote NuGet, mas não declara essa dependência explicitamente. Para construir este projeto, você deve definir a propriedade UseMauiEssentials como true (e instalar a carga de trabalho Maui, se necessário). + NETSDK1186: Este projeto depende do Maui Essentials por meio de um projeto ou referência de pacote NuGet, mas não declara essa dependência explicitamente. Para construir este projeto, você deve definir a propriedade UseMauiEssentials como true (e instalar a carga de trabalho Maui, se necessário). {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: Você está usando uma versão de visualização do .NET. Veja: https://aka.ms/dotnet-support-policy + NETSDK1057: Você está usando uma versão de visualização do .NET. Veja: https://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index dd9c5d15a482..10c14ba29892 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + Оптимизация сборок по размеру может изменить поведение приложения. Обязательно проведите тестирование после публикации. Дополнительные сведения см. на странице https://aka.ms/dotnet-illink. Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + Оптимизация сборок по размеру. Этот процесс может занять некоторое время. @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: указанный идентификатор "{0}" библиотеки типов для библиотеки типов "{1}" недопустим. Идентификатор должен быть положительным целым числом меньше 65536. + NETSDK1170: указанный идентификатор "{0}" библиотеки типов для библиотеки типов "{1}" недопустим. Идентификатор должен быть положительным целым числом меньше 65536. {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: в пакете {0} {1} есть ресурс с языковым стандартом "{2}". Эта локаль была нормализована до стандартного формата "{3}", чтобы предотвратить проблемы с регистром в сборке. Попробуйте уведомить автора пакета об этой проблеме с корпусом. Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: в пакете {0} {1} есть ресурс с языковым стандартом "{2}". Эта локаль не распознается .NET. Попробуйте уведомить автора пакета о том, что он использует недопустимую локаль. Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: не удалось оптимизировать сборки для производительности: не найден допустимый пакет среды выполнения. Задайте для свойства PublishReadyToRun значение false либо используйте поддерживаемый идентификатор среды выполнения при публикации. При выборе .NET 6 или более поздней версии в качестве цели восстановите пакеты со свойством PublishReadyToRun со значением true. + NETSDK1094: не удалось оптимизировать сборки для производительности: не найден допустимый пакет среды выполнения. Задайте для свойства PublishReadyToRun значение false либо используйте поддерживаемый идентификатор среды выполнения при публикации. При выборе .NET 6 или более поздней версии в качестве цели восстановите пакеты со свойством PublishReadyToRun со значением true. {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: пакет среды выполнения для FrameworkReference "{0}" недоступен. Причиной этого может быть то, что параметру DisableTransitiveFrameworkReferenceDownloads присвоено значение true. + NETSDK1185: пакет среды выполнения для FrameworkReference "{0}" недоступен. Причиной этого может быть то, что параметру DisableTransitiveFrameworkReferenceDownloads присвоено значение true. {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: целевой пакет для FrameworkReference "{0}" недоступен. Причиной этого может быть то, что параметру DisableTransitiveFrameworkReferenceDownloads присвоено значение true. + NETSDK1184: целевой пакет для FrameworkReference "{0}" недоступен. Причиной этого может быть то, что параметру DisableTransitiveFrameworkReferenceDownloads присвоено значение true. {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: этот проект зависит от MAUI Essentials через проект или ссылку на пакет NuGet. Но эта зависимость не объявлена явным образом. Для сборки этого проекта присвойте свойству UseMauiEssentials значение true (и при необходимости установите рабочую нагрузку MAUI). + NETSDK1186: этот проект зависит от MAUI Essentials через проект или ссылку на пакет NuGet. Но эта зависимость не объявлена явным образом. Для сборки этого проекта присвойте свойству UseMauiEssentials значение true (и при необходимости установите рабочую нагрузку MAUI). {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: Вы используете предварительную версию .NET. Дополнительные сведения см. на странице https://aka.ms/dotnet-support-policy + NETSDK1057: Вы используете предварительную версию .NET. Дополнительные сведения см. на странице https://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 568076e34bde..ab7e8b9f1b8d 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + Bütünleştirilmiş kodların boyutunu iyileştirmek uygulamanın davranışını değiştirebilir. Yayımladıktan sonra test etmeyi unutmayın. Bkz. https://aka.ms/dotnet-illink Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + Derlemelerin boyutu iyileştiriliyor. Bu işlem biraz zaman alabilir. @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: '{1}' tür kitaplığı için '{0} ' sağlanan tür kitaplığı kimliği geçersiz. Kimlik 65536’dan küçük bir pozitif tamsayı olmalıdır. + NETSDK1170: '{1}' tür kitaplığı için '{0} ' sağlanan tür kitaplığı kimliği geçersiz. Kimlik 65536’dan küçük bir pozitif tamsayı olmalıdır. {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: {0} {1} paketi, '{2}' yerel ayarına sahip bir kaynağa sahip. Bu yerel ayar, yapıdaki büyük/küçük harf sorunlarını önlemek için standart '{3}' biçimine normalleştirildi. Bu büyük/küçük harf sorunu hakkında paket yazarını bilgilendirmeyi düşünün. Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: {0} {1} paketi, '{2}' yerel ayarına sahip bir kaynağa sahip. Bu yerel ayar .NET tarafından tanınmıyor. Paket yazarına geçersiz bir yerel ayar kullanıyor gibi göründüğünü bildirmeyi düşünün. Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: Derlemeler performans için iyileştirilemedi: geçerli bir çalışma zamanı paketi bulunamadı. PublishReadyToRun özelliğini false olarak ayarlayın veya yayımlarken desteklenen bir çalışma zamanı tanımlayıcısı kullanın. .NET 6 veya üzerini hedeflerken PublishReadyToRun özelliği true olarak ayarlanmış paketleri geri yüklediğinizden emin olun. + NETSDK1094: Derlemeler performans için iyileştirilemedi: geçerli bir çalışma zamanı paketi bulunamadı. PublishReadyToRun özelliğini false olarak ayarlayın veya yayımlarken desteklenen bir çalışma zamanı tanımlayıcısı kullanın. .NET 6 veya üzerini hedeflerken PublishReadyToRun özelliği true olarak ayarlanmış paketleri geri yüklediğinizden emin olun. {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: FrameworkReference '{0}' için Çalışma Zamanı Paketi bulunamadı. Bunun nedeni DisableTransitiveFrameworkReferenceDownloads değerinin true olarak ayarlanmış olması olabilir. + NETSDK1185: FrameworkReference '{0}' için Çalışma Zamanı Paketi bulunamadı. Bunun nedeni DisableTransitiveFrameworkReferenceDownloads değerinin true olarak ayarlanmış olması olabilir. {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: FrameworkReference '{0}' için Hedefleme Paketi bulunamadı. Bunun nedeni DisableTransitiveFrameworkReferenceDownloads değerinin true olarak ayarlanmış olması olabilir. + NETSDK1184: FrameworkReference '{0}' için Hedefleme Paketi bulunamadı. Bunun nedeni DisableTransitiveFrameworkReferenceDownloads değerinin true olarak ayarlanmış olması olabilir. {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: Bu proje, bir proje veya bir NuGet paketi başvurusu aracılığıyla Maui Essentials'a bağımlı, ancak bu bağımlılığı açık olarak bildirmiyor. Bu projeyi derlemek için UseMauiEssentials özelliğini true olarak ayarlamalısınız (ve gerekirse Maui iş yükünü yüklemelisiniz). + NETSDK1186: Bu proje, bir proje veya bir NuGet paketi başvurusu aracılığıyla Maui Essentials'a bağımlı, ancak bu bağımlılığı açık olarak bildirmiyor. Bu projeyi derlemek için UseMauiEssentials özelliğini true olarak ayarlamalısınız (ve gerekirse Maui iş yükünü yüklemelisiniz). {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: Bir .NET önizleme sürümü kullanıyorsunuz. Bkz. https://aka.ms/dotnet-support-policy + NETSDK1057: Bir .NET önizleme sürümü kullanıyorsunuz. Bkz. https://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 090a254674e2..b5c55712c2a4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + 优化程序集以调整大小可能会更改应用的行为。请务必在发布后进行测试。请参阅: https://aka.ms/dotnet-illink Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + 正在优化程序集以调整大小。此过程可能需要一段时间。 @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: 为类型库“{1}”提供的类型库 ID“{0}”无效。该 ID 必须是小于 65536 的正整数。 + NETSDK1170: 为类型库“{1}”提供的类型库 ID“{0}”无效。该 ID 必须是小于 65536 的正整数。 {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187:包 {0} {1} 具有具有区域设置'{2}'的资源。此区域设置已规范化为标准格式'{3}'以防止生成中出现大小写问题。请考虑就此大小写问题通知包作者。 Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188:包 {0} {1} 具有具有区域设置'{2}'的资源。.NET 无法识别此区域设置。请考虑通知包作者它似乎正在使用无效的区域设置。 Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: 无法优化程序集以改进性能: 找不到有效的运行时包。将 PublishReadyToRun 属性设置为 false,或在发布时使用支持的运行时标识符。面向 .NET 6 或更高版本时,请确保还原将 PublishReadyToRun 属性设置为 true 的包。 + NETSDK1094: 无法优化程序集以改进性能: 找不到有效的运行时包。将 PublishReadyToRun 属性设置为 false,或在发布时使用支持的运行时标识符。面向 .NET 6 或更高版本时,请确保还原将 PublishReadyToRun 属性设置为 true 的包。 {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: FrameworkReference“{0}”的运行时包不可用。这可能是因为 DisableTransitiveFrameworkReferenceDownloads 设置为 true。 + NETSDK1185: FrameworkReference“{0}”的运行时包不可用。这可能是因为 DisableTransitiveFrameworkReferenceDownloads 设置为 true。 {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: FrameworkReference“{0}”的目标包不可用。这可能是因为 DisableTransitiveFrameworkReferenceDownloads 设置为 true。 + NETSDK1184: FrameworkReference“{0}”的目标包不可用。这可能是因为 DisableTransitiveFrameworkReferenceDownloads 设置为 true。 {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: 此项目通过项目或 NuGet 包引用依赖于 Maui Essentials,但未显式声明该依赖项。要生成此项目,必须将 UseMauiEssentials 属性设置为 true (如有必要,请安装 Maui 工作负载)。 + NETSDK1186: 此项目通过项目或 NuGet 包引用依赖于 Maui Essentials,但未显式声明该依赖项。要生成此项目,必须将 UseMauiEssentials 属性设置为 true (如有必要,请安装 Maui 工作负载)。 {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: 你正在使用 .NET Core 的预览版。请参阅 https://aka.ms/dotnet-support-policy + NETSDK1057: 你正在使用 .NET Core 的预览版。请参阅 https://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 1e43af9d2c32..a1b0bfcc0951 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -456,12 +456,12 @@ Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink - Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink + 最佳化組件的大小可能會變更應用程式的行為。發佈後請務必加以測試。請參閱: https://aka.ms/dotnet-illink Optimizing assemblies for size. This process might take a while. - Optimizing assemblies for size. This process might take a while. + 正在針對大小最佳化組件。此流程可能需要一些時間。 @@ -519,7 +519,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1170: The provided type library ID '{0}' for type library '{1}' is invalid. The ID must be a positive integer less than 65536. - NETSDK1170: 為型別程式庫 '{0}' 提供的型別程式庫識別碼 '{1}' 無效。識別碼必須是小於 65536 的正整數。 + NETSDK1170: 為型別程式庫 '{0}' 提供的型別程式庫識別碼 '{1}' 無效。識別碼必須是小於 65536 的正整數。 {StrBegin="NETSDK1170: "} @@ -652,12 +652,12 @@ The following are names of parameters or literal values and should not be transl NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. - NETSDK1187: Package {0} {1} has a resource with the locale '{2}'. This locale has been normalized to the standard format '{3}' to prevent casing issues in the build. Consider notifying the package author about this casing issue. + NETSDK1187: 封裝 {0} {1} 具有地區設定 '{2}' 的資源。此地區設定已標準化為標準格式 '{3}' 以避免組建中發生大小寫問題。請考慮通知封裝作者這個大小寫問題。 Error code is NETSDK1187. 0 is a package name, 1 is a package version, 2 is the incorrect locale string, and 3 is the correct locale string. NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. - NETSDK1188: Package {0} {1} has a resource with the locale '{2}'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. + NETSDK1188: 封裝 {0} {1} 具有地區設定為 '{2}' 的資源。.NET 無法辨識此地區設定。請考慮通知封裝作者,其似乎使用不正確的地區設定。 Error code is NETSDK1188. 0 is a package name, 1 is a package version, and 2 is the incorrect locale string @@ -727,7 +727,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. When targeting .NET 6 or higher, make sure to restore packages with the PublishReadyToRun property set to true. - NETSDK1094: 無法最佳化組件的效能: 找不到有效的執行階段套件。請將 PublishReadyToRun 屬性設定為 false,或在發佈時使用支援的執行階段識別碼。以 .NET 6 或更高版本為目標時,請務必還原套件,將 PublishReadyToRun 屬性設為 true。 + NETSDK1094: 無法最佳化組件的效能: 找不到有效的執行階段套件。請將 PublishReadyToRun 屬性設定為 false,或在發佈時使用支援的執行階段識別碼。以 .NET 6 或更高版本為目標時,請務必還原套件,將 PublishReadyToRun 屬性設為 true。 {StrBegin="NETSDK1094: "} @@ -762,7 +762,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1185: The Runtime Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1185: 無法提供 FrameworkReference '{0}' 的執行階段套件。這可能是因為 DisableTransitiveFrameworkReferenceDownloads 已設為 true。 + NETSDK1185: 無法提供 FrameworkReference '{0}' 的執行階段套件。這可能是因為 DisableTransitiveFrameworkReferenceDownloads 已設為 true。 {StrBegin="NETSDK1185: "} @@ -802,7 +802,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1184: The Targeting Pack for FrameworkReference '{0}' was not available. This may be because DisableTransitiveFrameworkReferenceDownloads was set to true. - NETSDK1184: 無法提供 FrameworkReference '{0}' 的目標套件。這可能是因為 DisableTransitiveFrameworkReferenceDownloads 已設為 true。 + NETSDK1184: 無法提供 FrameworkReference '{0}' 的目標套件。這可能是因為 DisableTransitiveFrameworkReferenceDownloads 已設為 true。 {StrBegin="NETSDK1184: "} @@ -842,7 +842,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary). - NETSDK1186: 此專案透過專案或 NuGet 套件參考相依於 Maui Essentials,但不明確宣告該相依性。若要組建此專案,您必須將 UseMauiEssentials 屬性設為 true (並在必要時安裝 Maui 工作負載)。 + NETSDK1186: 此專案透過專案或 NuGet 套件參考相依於 Maui Essentials,但不明確宣告該相依性。若要組建此專案,您必須將 UseMauiEssentials 屬性設為 true (並在必要時安裝 Maui 工作負載)。 {StrBegin="NETSDK1186: "} @@ -892,7 +892,7 @@ The following are names of parameters or literal values and should not be transl NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy - NETSDK1057: 您目前使用的是 .NET 預覽版。請參閱: https://aka.ms/dotnet-support-policy + NETSDK1057: 您目前使用的是 .NET 預覽版。請參閱: https://aka.ms/dotnet-support-policy diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs index 9ec56c965a8b..9447c16cbd02 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs @@ -99,7 +99,10 @@ public class ProcessFrameworkReferences : TaskBase public ITaskItem[] Crossgen2Packs { get; set; } [Output] - public ITaskItem[] ILCompilerPacks { get; set; } + public ITaskItem[] HostILCompilerPacks { get; set; } + + [Output] + public ITaskItem[] TargetILCompilerPacks { get; set; } // Runtime packs which aren't available for the specified RuntimeIdentifier [Output] @@ -617,7 +620,29 @@ private bool AddAotOrR2RRuntimePackage(AotPackageType packageType, Version norma } else { - ILCompilerPacks = new[] { newItem }; + HostILCompilerPacks = new[] { newItem }; + // ILCompiler supports cross target compilation. If there is a cross-target request, we need to download that package as well + // We expect RuntimeIdentifier to be defined during publish but can allow during build + if (RuntimeIdentifier != null) + { + var targetRuntimeIdentifier = NuGetUtils.GetBestMatchingRid(runtimeGraph, RuntimeIdentifier, packSupportedRuntimeIdentifiers, out bool wasInGraph2); + if (targetRuntimeIdentifier == null) + { + return false; + } + if (!hostRuntimeIdentifier.Equals(targetRuntimeIdentifier)) + { + var runtimeIlcPackName = packPattern.Replace("**RID**", targetRuntimeIdentifier); + TaskItem targetIlcPackToDownload = new TaskItem(runtimeIlcPackName); + targetIlcPackToDownload.SetMetadata(MetadataKeys.Version, packVersion); + packagesToDownload.Add(targetIlcPackToDownload); + + var newItem2 = new TaskItem(runtimeIlcPackName); + newItem2.SetMetadata(MetadataKeys.NuGetPackageId, runtimeIlcPackName); + newItem2.SetMetadata(MetadataKeys.NuGetPackageVersion, packVersion); + TargetILCompilerPacks = new[] { newItem2 }; + } + } } return true; diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.ValidatePackage.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.ValidatePackage.targets index f86d5d3c32b2..4d306141e8f1 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.ValidatePackage.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.ValidatePackage.targets @@ -27,10 +27,15 @@ Copyright (c) .NET Foundation. All rights reserved. $([MSBuild]::NormalizePath('$(NuGetPackageRoot)', '$(PackageValidationBaselineName.ToLower())', '$(PackageValidationBaselineVersion)', '$(PackageValidationBaselineName.ToLower()).$(PackageValidationBaselineVersion).nupkg')) <_packageValidationBaselinePath Condition="'$(DisablePackageBaselineValidation)' != 'true'">$(PackageValidationBaselinePath) + + + <_PackageTargetPath Include="@(NuGetPackOutput->WithMetadataValue('Extension', '.nupkg'))" + Condition="!$([System.String]::new('%(Identity)').EndsWith('.symbols.nupkg'))" /> + - + + @@ -252,12 +253,19 @@ Copyright (c) .NET Foundation. All rights reserved. - + + + + + + diff --git a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs b/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs index 8d5bcc52eab2..642bb069f76e 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/CompatibleFrameworkInPackageValidatorIntegrationTests.cs @@ -5,6 +5,7 @@ using Microsoft.DotNet.ApiCompatibility; using Microsoft.DotNet.ApiCompatibility.Abstractions; using Microsoft.DotNet.ApiCompatibility.Logging; +using Microsoft.DotNet.ApiCompatibility.Rules; using Microsoft.DotNet.ApiCompatibility.Runner; using Microsoft.DotNet.PackageValidation; using Microsoft.DotNet.PackageValidation.Tests; @@ -29,7 +30,7 @@ public CompatibleFrameworkInPackageValidatorIntegrationTests(ITestOutputHelper l CompatibleFrameworkInPackageValidator validator = new(log, new ApiCompatRunner(log, new SuppressionEngine(), - new ApiComparerFactory(), + new ApiComparerFactory(new RuleFactory()), new AssemblySymbolLoaderFactory(), new MetadataStreamProvider())); diff --git a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs b/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs index ea3b115dd179..dfa40972429e 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs @@ -8,6 +8,7 @@ using Microsoft.DotNet.ApiCompatibility; using Microsoft.DotNet.ApiCompatibility.Abstractions; using Microsoft.DotNet.ApiCompatibility.Logging; +using Microsoft.DotNet.ApiCompatibility.Rules; using Microsoft.DotNet.ApiCompatibility.Runner; using Microsoft.DotNet.PackageValidation; using Microsoft.DotNet.PackageValidation.Tests; @@ -32,7 +33,7 @@ public ValidatePackageTargetIntegrationTests(ITestOutputHelper log) : base(log) CompatibleFrameworkInPackageValidator validator = new(log, new ApiCompatRunner(log, new SuppressionEngine(), - new ApiComparerFactory(), + new ApiComparerFactory(new RuleFactory()), new AssemblySymbolLoaderFactory(), new MetadataStreamProvider())); diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs index d29043dd572d..fb40cee153c3 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs @@ -5,12 +5,15 @@ using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.DotNet.ApiCompatibility.Abstractions; +using Microsoft.DotNet.ApiCompatibility.Rules; using Xunit; namespace Microsoft.DotNet.ApiCompatibility.Tests { public class CustomSideNameTests { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new MembersMustExist(settings, context)); + [Fact] public void CustomSideNameAreNotSpecified() { @@ -30,13 +33,15 @@ public class First { } } "; - ApiComparer differ = new(); bool enableNullable = false; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax, enableNullable); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax, enableNullable); string expectedLeftName = "left"; string expectedRightName = "right"; + ApiComparer differ = new(s_ruleFactory); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); + Assert.Single(differences); AssertNames(differences.First(), expectedLeftName, expectedRightName); } @@ -62,20 +67,22 @@ public class First { } } "; - ApiComparer differ = new(); bool enableNullable = false; - IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax, enableNullable); - IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax, enableNullable); - string expectedLeftName = "ref/net6.0/a.dll"; - string expectedRightName = "lib/net6.0/a.dll"; - IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }, leftName: expectedLeftName, rightName: expectedRightName); + ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax, enableNullable), + new MetadataInformation("a.dll", "ref/net6.0/a.dll")); + ElementContainer right = new(SymbolFactory.GetAssemblyFromSyntax(rightSyntax, enableNullable), + new MetadataInformation("a.dll", "lib/net6.0/a.dll")); + ApiComparer differ = new(s_ruleFactory); + + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); + Assert.Single(differences); - AssertNames(differences.First(), expectedLeftName, expectedRightName); + AssertNames(differences.First(), left.MetadataInformation.DisplayString, right.MetadataInformation.DisplayString); // Use the single assembly override - differences = differ.GetDifferences(left, right, leftName: expectedLeftName, rightName: expectedRightName); + differences = differ.GetDifferences(left, right); Assert.Single(differences); - AssertNames(differences.First(), expectedLeftName, expectedRightName); + AssertNames(differences.First(), left.MetadataInformation.DisplayString, right.MetadataInformation.DisplayString); } [Fact] @@ -99,16 +106,17 @@ public class First } "; - ApiComparer differ = new(); bool enableNullable = false; - IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax, enableNullable); - IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax, enableNullable); - string expectedLeftName = "ref/net6.0/a.dll"; - string expectedRightName = "lib/net6.0/a.dll"; - differ.StrictMode = true; - IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }, leftName: expectedLeftName, rightName: expectedRightName); + ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax, enableNullable), + new MetadataInformation("a.dll", "ref/net6.0/a.dll")); + ElementContainer right = new(SymbolFactory.GetAssemblyFromSyntax(rightSyntax, enableNullable), + new MetadataInformation("a.dll", "lib/net6.0/a.dll")); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); + Assert.Single(differences); - AssertNames(differences.First(), expectedLeftName, expectedRightName, leftFirst: false); + AssertNames(differences.First(), left.MetadataInformation.DisplayString, right.MetadataInformation.DisplayString, leftFirst: false); } [Fact] @@ -185,21 +193,14 @@ public class ThirdNested } } "}; + ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation("a.dll", "ref/net6.0/a.dll")); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + ApiComparer differ = new(s_ruleFactory); - ApiComparer differ = new(); - ElementContainer left = - new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation("a.dll", "ref/net6.0/a.dll")); - - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); - - IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = - differ.GetDifferences(left, right); - - int i = 0; - foreach ((MetadataInformation, MetadataInformation, IEnumerable differences) diff in differences) + foreach ((MetadataInformation leftMetadata, MetadataInformation rightMetadata, IEnumerable differences) in differ.GetDifferences(left, right)) { - Assert.Single(diff.differences); - AssertNames(diff.differences.First(), left.MetadataInformation.AssemblyId, right[i++].MetadataInformation.AssemblyId); + Assert.Single(differences); + AssertNames(differences.First(), leftMetadata.AssemblyId, rightMetadata.AssemblyId); } } diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs index 71fa867690e7..76dbcea0bfe4 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/AssemblyIdentityMustMatchTests.cs @@ -14,6 +14,8 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests { public class AssemblyIdentityMustMatchTests { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new AssemblyIdentityMustMatch(settings, context)); + private static readonly byte[] _publicKey = new byte[] { 0, 36, 0, 0, 4, 128, 0, 0, 148, 0, 0, 0, 6, 2, 0, 0, 0, 36, 0, 0, @@ -33,11 +35,11 @@ public static void AssemblyNamesDoNotMatch() { IAssemblySymbol left = CSharpCompilation.Create("AssemblyA").Assembly; IAssemblySymbol right = CSharpCompilation.Create("AssemblyB").Assembly; - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); + IEnumerable differences = differ.GetDifferences(left, right); Assert.Single(differences); - CompatDifference expected = new(DiagnosticIds.AssemblyIdentityMustMatch, string.Empty, DifferenceType.Changed, "AssemblyB, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"); Assert.Equal(expected, differences.First()); } @@ -54,10 +56,10 @@ public void AssemblyCultureMustBeCompatible() Assert.Equal(string.Empty, leftSymbol.Identity.CultureName); Assert.Equal("de", rightSymbol.Identity.CultureName); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(leftSymbol, rightSymbol); + Assert.Single(differences); - CompatDifference expected = new(DiagnosticIds.AssemblyIdentityMustMatch, string.Empty, DifferenceType.Changed, $"{leftSymbol.Name}, Version=0.0.0.0, Culture=de, PublicKeyToken=null"); Assert.Equal(expected, differences.First()); } @@ -74,12 +76,11 @@ public void AssemblyVersionMustBeCompatible() Assert.Equal(new Version(2, 0, 0, 0), leftSymbol.Identity.Version); Assert.Equal(new Version(0, 0, 0, 0), rightSymbol.Identity.Version); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(leftSymbol, rightSymbol); // right assembly should have same or higher version than left Assert.Single(differences); - CompatDifference expected = new(DiagnosticIds.AssemblyIdentityMustMatch, string.Empty, DifferenceType.Changed, $"{rightSymbol.Name}, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"); Assert.Equal(expected, differences.First()); } @@ -97,11 +98,11 @@ public void AssemblyVersionMustBeStrictlyCompatible() Assert.Equal(new Version(2, 0, 0, 0), rightSymbol.Identity.Version); // Compatible assembly versions - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(leftSymbol, rightSymbol); Assert.Empty(differences); - differ.StrictMode = true; + differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); // Not strictly compatible differences = differ.GetDifferences(leftSymbol, rightSymbol); @@ -125,8 +126,7 @@ public void AssemblyKeyTokenMustBeCompatible(bool strictMode) Assert.Equal(_publicKey, rightSymbol.Identity.PublicKey); // public key tokens must match - ApiComparer differ = new(); - differ.StrictMode = strictMode; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: strictMode)); IEnumerable differences = differ.GetDifferences(leftSymbol, rightSymbol); Assert.Empty(differences); @@ -145,8 +145,7 @@ public void LeftAssemblyKeyTokenNull(bool strictMode) Assert.False(leftSymbol.Identity.HasPublicKey); Assert.Equal(_publicKey, rightSymbol.Identity.PublicKey); - ApiComparer differ = new(); - differ.StrictMode = strictMode; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: strictMode)); IEnumerable differences = differ.GetDifferences(leftSymbol, rightSymbol); if (strictMode) @@ -174,12 +173,10 @@ public void RightAssemblyKeyTokenNull(bool strictMode) Assert.Equal(_publicKey, leftSymbol.Identity.PublicKey); Assert.False(rightSymbol.Identity.HasPublicKey); - ApiComparer differ = new(); - differ.StrictMode = strictMode; - + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: strictMode)); IEnumerable differences = differ.GetDifferences(leftSymbol, rightSymbol); + Assert.Single(differences); - CompatDifference expected = new(DiagnosticIds.AssemblyIdentityMustMatch, string.Empty, DifferenceType.Changed, $"{leftSymbol.Name}, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"); Assert.Equal(expected, differences.First()); } @@ -208,8 +205,7 @@ public void RetargetableFlagSet(bool strictMode) Assert.False(rightSymbol.Identity.HasPublicKey); Assert.Equal(_publicKey, leftSymbol.Identity.PublicKey); - ApiComparer differ = new(); - differ.StrictMode = strictMode; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: strictMode)); Assert.Empty(differ.GetDifferences(leftSymbol, rightSymbol)); } diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs index 33bdbb468c02..5da257e51665 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddAbstractMemberTests.cs @@ -13,22 +13,22 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests { public class CannotAddAbstractMemberTests { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new CannotAddAbstractMember(settings, context)); + [Theory] [MemberData(nameof(AddedAbstractMemberIsReportedData))] public void AddedAbstractMemberIsReported(string leftSyntax, string rightSyntax, bool includeInternals) { IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(includeInternalSymbols: includeInternals)); - ApiComparer differ = new(); - differ.IncludeInternalSymbols = includeInternals; IEnumerable differences = differ.GetDifferences(left, right); CompatDifference[] expected = new[] { new CompatDifference(DiagnosticIds.CannotAddAbstractMember, string.Empty, DifferenceType.Added, "M:CompatTests.First.SecondAbstract") }; - Assert.Equal(expected, differences); } @@ -38,8 +38,8 @@ public void AddedAbstractMemberNoVisibleConstructor(string leftSyntax, string ri { IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory); - ApiComparer differ = new(); IEnumerable differences = differ.GetDifferences(left, right); Assert.Empty(differences); @@ -51,8 +51,8 @@ public void AddedToUnsealedTypeInRightNotReported(string leftSyntax, string righ { IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory); - ApiComparer differ = new(); IEnumerable differences = differ.GetDifferences(left, right); Assert.Empty(differences); @@ -67,9 +67,8 @@ public void StrictModeRuleIsNotExecuted() IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); - ApiComparer differ = new(); - differ.StrictMode = true; IEnumerable differences = differ.GetDifferences(left, right); foreach (CompatDifference difference in differences) @@ -146,11 +145,10 @@ public void SomeMethod() { } } "}; - ApiComparer differ = new(); ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref")); - - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + ApiComparer differ = new(s_ruleFactory); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs index c230432ad5ac..f7992feec070 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs @@ -12,6 +12,8 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests { public class CannotAddMemberToInterfaceTests { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new CannotAddMemberToInterface(settings, context)); + [Fact] public void AddedMembersAreReported() { @@ -43,8 +45,8 @@ event System.EventHandler MyEvent { add { } remove { } } "; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory); - ApiComparer differ = new(); IEnumerable differences = differ.GetDifferences(left, right); CompatDifference[] expected = new[] @@ -63,8 +65,8 @@ public void NoDifferencesShouldBeReported(string leftSyntax, string rightSyntax) { IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory); - ApiComparer differ = new(); IEnumerable differences = differ.GetDifferences(left, right); Assert.Empty(differences); @@ -102,9 +104,8 @@ event System.EventHandler MyEvent { add { } remove { } } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); - ApiComparer differ = new(); - differ.StrictMode = true; IEnumerable differences = differ.GetDifferences(left, right); foreach (CompatDifference difference in differences) @@ -182,11 +183,10 @@ event System.EventHandler MyOtherEventWithDIM { add { } remove { } } } "}; - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref")); - - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs index 0ed00261db37..edc155fcc5c1 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddOrRemoveVirtualKeywordTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests { public class CannotAddOrRemoveVirtualKeywordTests { - private static readonly bool IsNetFramework = RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase); + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new CannotAddOrRemoveVirtualKeyword(settings, context)); private static string CreateType(string s, params object[] args) => string.Format(@" namespace CompatTests {{ @@ -163,9 +163,10 @@ public static void EnsureDiagnosticIsReported(string leftSyntax, string rightSyn { IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); - differ.StrictMode = strictMode; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: strictMode)); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); + Assert.Equal(expected, differences); } @@ -190,8 +191,11 @@ public virtual void G() {} "; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + // Register CannotAddOrRemoveVirtualKeyword and MemberMustExist rules as this test validates both. + ApiComparer differ = new(s_ruleFactory.WithRule((settings, context) => new MembersMustExist(settings, context))); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); + CompatDifference[] expected = new[] { new CompatDifference(DiagnosticIds.MemberMustExist, string.Empty, DifferenceType.Removed, "M:CompatTests.First.F"), diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs index 7ea714d8c767..c4e9bb24c99b 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotRemoveBaseTypeOrInterfaceTests.cs @@ -13,6 +13,8 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests { public class CannotRemoveBaseTypeOrInterfaceTests { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new CannotRemoveBaseTypeOrInterface(settings, context)); + [Fact] public void PromotedBaseClassOrInterfaceIsNotReported() { @@ -45,7 +47,7 @@ public interface INewInterface : IFirstInterface { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); Assert.Empty(differ.GetDifferences(left, right)); } @@ -76,7 +78,7 @@ public interface INewInterface { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); CompatDifference[] differences = differ.GetDifferences(left, right).ToArray(); @@ -117,9 +119,8 @@ internal interface IFirstInternalInterface { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(includeInternalSymbols: includeInternals)); - ApiComparer differ = new(); - differ.IncludeInternalSymbols = includeInternals; IEnumerable differences = differ.GetDifferences(left, right); if (includeInternals) @@ -160,9 +161,7 @@ public interface IFirstInterface { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - - ApiComparer differ = new(); - differ.StrictMode = true; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); CompatDifference[] differences = differ.GetDifferences(left, right).ToArray(); @@ -219,8 +218,7 @@ public interface IFourthInterface { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); - differ.StrictMode = strictMode; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: strictMode)); Assert.Empty(differ.GetDifferences(left, right)); } @@ -283,10 +281,9 @@ internal interface ISecondInterface { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); MetadataInformation leftMetadata = new("left", @"ref\a.dll"); ElementContainer leftContainer = new(left, leftMetadata); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + ApiComparer differ = new(s_ruleFactory); - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); - - ApiComparer differ = new(); IEnumerable<(MetadataInformation left, MetadataInformation right, IEnumerable differences)> result = differ.GetDifferences(leftContainer, right); @@ -361,7 +358,7 @@ public class ThirdBase { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); Assert.Empty(differ.GetDifferences(left, right)); } diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs index 1e8cc64c794f..7bdfc7c1f4bd 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotSealTypeTests.cs @@ -13,14 +13,16 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests { public class CannotSealTypeTests { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new CannotSealType(settings, context)); + [Theory] [MemberData(nameof(SealNonInheritableTypeNotReportedData))] public void SealNonInheritableTypeNotReported(string leftSyntax, string rightSyntax) { IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory); - ApiComparer differ = new(); IEnumerable differences = differ.GetDifferences(left, right); foreach (CompatDifference difference in differences) @@ -35,12 +37,11 @@ public void SealInheritableTypeReported(string leftSyntax, string rightSyntax) { IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory); - ApiComparer differ = new(); IEnumerable differences = differ.GetDifferences(left, right); CompatDifference difference = new(DiagnosticIds.CannotSealType, string.Empty, DifferenceType.Changed, "T:CompatTests.First"); - Assert.Contains(difference, differences); } @@ -67,12 +68,10 @@ internal First() { } } } "; - IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(includeInternalSymbols: includeInternals)); - ApiComparer differ = new(); - differ.IncludeInternalSymbols = includeInternals; IEnumerable differences = differ.GetDifferences(left, right); if (!includeInternals) @@ -140,10 +139,10 @@ private First() { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); MetadataInformation leftMetadata = new("left", @"ref\a.dll"); ElementContainer leftContainer = new(left, leftMetadata); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + // Register CannotSealType and MemberMustExist rules as this test validates both. + ApiComparer differ = new(s_ruleFactory.WithRule((settings, context) => new MembersMustExist(settings, context))); - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); - - ApiComparer differ = new(); IEnumerable<(MetadataInformation left, MetadataInformation right, IEnumerable differences)> result = differ.GetDifferences(leftContainer, right); @@ -161,7 +160,6 @@ private First() { } new CompatDifference(DiagnosticIds.MemberMustExist, string.Empty, DifferenceType.Removed, "M:CompatTests.First.#ctor"), }, }; - AssertExtensions.MultiRightResult(leftMetadata, expectedDiffs, result); } @@ -207,11 +205,9 @@ internal First() { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); MetadataInformation leftMetadata = new("left", @"ref\a.dll"); ElementContainer leftContainer = new(left, leftMetadata); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(includeInternalSymbols: true)); - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); - - ApiComparer differ = new(); - differ.IncludeInternalSymbols = true; IEnumerable<(MetadataInformation left, MetadataInformation right, IEnumerable differences)> result = differ.GetDifferences(leftContainer, right); @@ -224,13 +220,11 @@ public void StrictModeSealedLeftIsReported(string leftSyntax, string rightSyntax { IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); - ApiComparer differ = new(); - differ.StrictMode = true; CompatDifference[] differences = differ.GetDifferences(left, right).ToArray(); CompatDifference difference = new(DiagnosticIds.CannotSealType, string.Empty, DifferenceType.Changed, "T:CompatTests.First"); - Assert.Contains(difference, differences); Assert.True(differences[0].Message.IndexOf("left") < differences[0].Message.IndexOf("right")); } diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs index ed99e290b4e0..59c868653b02 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs @@ -11,6 +11,8 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests { public class EnumsMustMatchTests { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new EnumsMustMatch(settings, context)); + [Fact] public static void DifferencesReported() { @@ -40,7 +42,7 @@ public enum First { "; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); CompatDifference[] expected = new[] { @@ -78,8 +80,11 @@ public enum First { "; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + // Register EnumMustMatch and MemberMustExist rules as this test validates both. + ApiComparer differ = new(s_ruleFactory.WithRule((settings, context) => new MembersMustExist(settings, context))); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); + Assert.NotEmpty(differences); } @@ -112,7 +117,7 @@ public enum Second {} "; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); Assert.Empty(differences); } @@ -145,7 +150,7 @@ public enum First : int { "; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); CompatDifference[] expected = new[] { diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs index c95548d7f182..86d696ecba69 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.Strict.cs @@ -12,6 +12,8 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests { public class MembersMustExistTests_Strict { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new MembersMustExist(settings, context)); + [Fact] public static void MissingMembersOnLeftAreReported() { @@ -45,8 +47,8 @@ public void ShouldReportMethod(string a, string b) { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); - differ.StrictMode = true; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); CompatDifference[] expected = new[] @@ -58,7 +60,6 @@ public void ShouldReportMethod(string a, string b) { } new CompatDifference(DiagnosticIds.MemberMustExist, string.Empty, DifferenceType.Added, "M:CompatTests.First.remove_ShouldReportMissingEvent(CompatTests.EventHandler)"), new CompatDifference(DiagnosticIds.MemberMustExist, string.Empty, DifferenceType.Added, "F:CompatTests.First.ReportMissingField"), }; - Assert.Equal(expected, differences); } @@ -101,9 +102,10 @@ public class Second : FirstBase IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); - differ.StrictMode = true; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); + Assert.Empty(differences); } @@ -123,7 +125,6 @@ public class First } } "; - string leftSyntax = @" namespace CompatTests { @@ -135,11 +136,10 @@ public class First } } "; - IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); - differ.StrictMode = true; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); CompatDifference[] expected = new[] @@ -147,7 +147,6 @@ public class First new CompatDifference(DiagnosticIds.MemberMustExist, string.Empty, DifferenceType.Added, "M:CompatTests.First.MultipleOverrides(System.String,System.String)"), new CompatDifference(DiagnosticIds.MemberMustExist, string.Empty, DifferenceType.Added, "M:CompatTests.First.MultipleOverrides(System.String,System.Int32,System.String)"), }; - Assert.Equal(expected, differences); } @@ -170,7 +169,6 @@ public class First } } "; - string leftSyntax = @" namespace CompatTests { @@ -184,12 +182,12 @@ public class First } } "; - IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); - differ.IncludeInternalSymbols = includeInternals; - differ.StrictMode = true; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings( + strictMode: true, + includeInternalSymbols: includeInternals)); + IEnumerable differences = differ.GetDifferences(left, right); if (includeInternals) @@ -221,7 +219,6 @@ public class First } } "; - string rightSyntax = @" namespace CompatTests { @@ -232,11 +229,10 @@ public void MissingMethodLeft(string a, string b) { } } } "; - IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); - differ.StrictMode = true; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); CompatDifference[] expected = new[] @@ -244,7 +240,6 @@ public void MissingMethodLeft(string a, string b) { } new CompatDifference(DiagnosticIds.MemberMustExist, string.Empty, DifferenceType.Removed, "M:CompatTests.First.MissingMethodRight"), new CompatDifference(DiagnosticIds.MemberMustExist, string.Empty, DifferenceType.Added, "M:CompatTests.First.MissingMethodLeft(System.String,System.String)"), }; - Assert.Equal(expected, differences); } @@ -270,7 +265,6 @@ public class ThirdNested } } "; - string[] rightSyntaxes = new[] { @" namespace CompatTests @@ -331,13 +325,10 @@ public class ThirdNested } } "}; - - ApiComparer differ = new(); - differ.StrictMode = true; ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref")); - - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); @@ -354,7 +345,6 @@ public class ThirdNested }, Array.Empty(), }; - AssertExtensions.MultiRightResult(left.MetadataInformation, expectedDiffs, differences); } @@ -373,7 +363,6 @@ public enum First } } "; - string rightSyntax = @" namespace CompatTests { @@ -386,11 +375,10 @@ public enum First } } "; - IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); - differ.StrictMode = true; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); CompatDifference[] expected = new[] @@ -400,7 +388,6 @@ public enum First new CompatDifference(DiagnosticIds.MemberMustExist, string.Empty, DifferenceType.Added, "F:CompatTests.First.F"), new CompatDifference(DiagnosticIds.MemberMustExist, string.Empty, DifferenceType.Added, "F:CompatTests.First.E"), }; - Assert.Equal(expected, differences); } } diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs index e6e93686134e..0b57d929dea7 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/MembersMustExistTests.cs @@ -11,6 +11,8 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests { public class MembersMustExistTests { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new MembersMustExist(settings, context)); + [Fact] public static void MissingMembersAreReported() { @@ -44,7 +46,7 @@ public void Parameterless() { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); CompatDifference[] expected = new[] @@ -99,7 +101,7 @@ public class Second : FirstBase { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); Assert.Empty(differences); } @@ -135,7 +137,7 @@ public class First IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); CompatDifference[] expected = new[] @@ -166,7 +168,6 @@ public class First } } "; - string rightSyntax = @" namespace CompatTests { @@ -180,11 +181,10 @@ public class First } } "; - IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); - differ.IncludeInternalSymbols = includeInternals; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(includeInternalSymbols: includeInternals)); + IEnumerable differences = differ.GetDifferences(left, right); if (includeInternals) @@ -227,7 +227,7 @@ public class First "; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax, enableNullable: true); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(left, right); Assert.Empty(differences); @@ -259,7 +259,7 @@ public void MyOutMethod(string a) { } "; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(left, right); Assert.Empty(differences); @@ -291,7 +291,7 @@ public void OneMethod() { } "; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax, enableNullable: true); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(left, right); CompatDifference[] expected = new[] @@ -386,11 +386,11 @@ public class ThirdNested } "}; - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref")); - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); @@ -441,11 +441,11 @@ public class ThirdNested string[] rightSyntaxes = new[] { leftSyntax, leftSyntax, leftSyntax, leftSyntax }; MetadataInformation expectedLeftMetadata = new(string.Empty, "ref"); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), expectedLeftMetadata); - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); @@ -480,7 +480,7 @@ private First() { } IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(left, right); CompatDifference[] expected = new[] diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs index dd21f915e81f..dc7e77b59eb6 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.Strict.cs @@ -12,6 +12,8 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests { public class TypeMustExistTests_Strict { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new MembersMustExist(settings, context)); + [Fact] public void MissingPublicTypesInLeftAreReported() { @@ -35,11 +37,11 @@ public record MyRecord(string a, string b); } "; - ApiComparer differ = new(); - differ.StrictMode = true; bool enableNullable = false; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax, enableNullable); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax, enableNullable); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + IEnumerable differences = differ.GetDifferences(left, right); CompatDifference[] expected = new[] @@ -50,7 +52,6 @@ public record MyRecord(string a, string b); new CompatDifference(DiagnosticIds.TypeMustExist, string.Empty, DifferenceType.Added, "T:CompatTests.MyRecord"), #endif }; - Assert.Equal(expected, differences); } @@ -79,15 +80,14 @@ public class First { } "; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntaxWithReferences(rightSyntax, new[] { forwardedTypeSyntax }); - ApiComparer differ = new(); - differ.StrictMode = true; + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + IEnumerable differences = differ.GetDifferences(left, right); CompatDifference[] expected = new[] { new CompatDifference(DiagnosticIds.TypeMustExist, string.Empty, DifferenceType.Added, "T:CompatTests.ForwardedTestType") }; - Assert.Equal(expected, differences); } @@ -110,8 +110,9 @@ public class First { } IEnumerable references = new[] { forwardedTypeSyntax }; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntaxWithReferences(syntax, references); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntaxWithReferences(syntax, references); - ApiComparer differ = new(); - differ.StrictMode = true; + + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + Assert.Empty(differ.GetDifferences(new[] { left }, new[] { right })); } @@ -141,11 +142,10 @@ public enum MyEnum { } } "; - ApiComparer differ = new(); - differ.StrictMode = true; - IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); CompatDifference[] expected = new[] @@ -185,17 +185,16 @@ public class SecondNested { } } "; - ApiComparer differ = new(); - differ.StrictMode = true; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); List expected = new() { new CompatDifference(DiagnosticIds.TypeMustExist, string.Empty, DifferenceType.Added, "T:CompatTests.First.FirstNested"), }; - Assert.Equal(expected, differences); } @@ -214,10 +213,10 @@ namespace CompatTests public class RightType { } } "; - ApiComparer differ = new(); - differ.StrictMode = true; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); + IEnumerable differences = differ.GetDifferences(left, right); List expected = new() @@ -225,7 +224,6 @@ public class RightType { } new CompatDifference(DiagnosticIds.TypeMustExist, string.Empty, DifferenceType.Removed, "T:CompatTests.LeftType"), new CompatDifference(DiagnosticIds.TypeMustExist, string.Empty, DifferenceType.Added, "T:CompatTests.RightType"), }; - Assert.Equal(expected, differences); } @@ -262,12 +260,10 @@ public class Third { } } "}; - ApiComparer differ = new(); - differ.StrictMode = true; ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref")); - - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); @@ -284,7 +280,6 @@ public class Third { } new CompatDifference(DiagnosticIds.TypeMustExist, string.Empty, DifferenceType.Added, "T:CompatTests.Third"), }, }; - AssertExtensions.MultiRightResult(left.MetadataInformation, expected, differences); } @@ -340,12 +335,10 @@ public class SecondNested } "}; - ApiComparer differ = new(); - differ.StrictMode = true; ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref")); - - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); @@ -383,10 +376,9 @@ namespace CompatTests IEnumerable references = new[] { forwardedTypeSyntax }; ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref")); - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes, references); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes, references); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(strictMode: true)); - ApiComparer differ = new(); - differ.StrictMode = true; IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); @@ -402,7 +394,6 @@ namespace CompatTests new CompatDifference(DiagnosticIds.TypeMustExist, string.Empty, DifferenceType.Added, "T:CompatTests.ForwardedTestType"), }, }; - AssertExtensions.MultiRightResult(left.MetadataInformation, expected, differences); } } diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs index 1361b453b974..776f9a4456c0 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Rules/TypeMustExistTests.cs @@ -12,6 +12,8 @@ namespace Microsoft.DotNet.ApiCompatibility.Rules.Tests { public class TypeMustExistTests { + private static readonly TestRuleFactory s_ruleFactory = new((settings, context) => new MembersMustExist(settings, context)); + [Fact] public void MissingPublicTypesInRightAreReported() { @@ -37,7 +39,7 @@ public class First { } } "; - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); @@ -72,7 +74,7 @@ namespace B.B public class C { } } "; - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); bool enableNullable = false; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax, enableNullable); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax, enableNullable); @@ -102,7 +104,7 @@ public class A public class B { } } "; - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); bool enableNullable = false; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax, enableNullable); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax, enableNullable); @@ -141,7 +143,7 @@ public class First { } "; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntaxWithReferences(leftSyntax, new[] { forwardedTypeSyntax }); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable differences = differ.GetDifferences(left, right); CompatDifference[] expected = new[] @@ -171,7 +173,7 @@ public class First { } IEnumerable references = new[] { forwardedTypeSyntax }; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntaxWithReferences(syntax, references); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntaxWithReferences(syntax, references); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); Assert.Empty(differ.GetDifferences(new[] { left }, new[] { right })); } @@ -201,7 +203,7 @@ public record First(string a, string b); } "; - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); @@ -238,10 +240,10 @@ public class First { } } "; - ApiComparer differ = new(); - differ.IncludeInternalSymbols = includeInternalSymbols; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(includeInternalSymbols: includeInternalSymbols)); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); if (!includeInternalSymbols) @@ -265,7 +267,6 @@ public class First { } public static void MissingNestedTypeIsReported(bool includeInternalSymbols) { string leftSyntax = @" - namespace CompatTests { public class First @@ -281,7 +282,6 @@ internal class DoubleNested { } } } "; - string rightSyntax = @" namespace CompatTests { @@ -291,11 +291,10 @@ internal class InternalNested { } } } "; - - ApiComparer differ = new(); - differ.IncludeInternalSymbols = includeInternalSymbols; IAssemblySymbol left = SymbolFactory.GetAssemblyFromSyntax(leftSyntax); IAssemblySymbol right = SymbolFactory.GetAssemblyFromSyntax(rightSyntax); + ApiComparer differ = new(s_ruleFactory, new ApiComparerSettings(includeInternalSymbols: includeInternalSymbols)); + IEnumerable differences = differ.GetDifferences(new[] { left }, new[] { right }); List expected = new() @@ -309,7 +308,6 @@ internal class InternalNested { } new CompatDifference(DiagnosticIds.TypeMustExist, string.Empty, DifferenceType.Removed, "T:CompatTests.First.InternalNested.DoubleNested") ); } - Assert.Equal(expected, differences); } @@ -346,11 +344,11 @@ public class First { } } "}; - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref")); - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); @@ -433,11 +431,11 @@ namespace CompatTests } "}; - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref")); - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); @@ -488,11 +486,11 @@ public class ThirdNested string[] rightSyntaxes = new[] { leftSyntax, leftSyntax, leftSyntax, leftSyntax }; - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(leftSyntax), new MetadataInformation(string.Empty, "ref")); - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); @@ -516,9 +514,9 @@ public class ForwardedTestType { } IEnumerable references = new[] { forwardedTypeSyntax }; ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(forwardedTypeSyntax), new MetadataInformation(string.Empty, "ref")); - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes, references); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes, references); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); @@ -541,9 +539,9 @@ public class ForwardedTestType { } IEnumerable references = new[] { forwardedTypeSyntax }; ElementContainer left = new(SymbolFactory.GetAssemblyFromSyntax(forwardedTypeSyntax), new MetadataInformation(string.Empty, "ref")); - IList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes, references); + IReadOnlyList> right = SymbolFactory.GetElementContainersFromSyntaxes(rightSyntaxes, references); - ApiComparer differ = new(); + ApiComparer differ = new(s_ruleFactory); IEnumerable<(MetadataInformation, MetadataInformation, IEnumerable)> differences = differ.GetDifferences(left, right); diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs index 6175ca7841f5..6314192c0607 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs @@ -19,14 +19,14 @@ private static ApiCompatRunner MockApiCompatRunner(MetadataInformation left = de // Mock the api comparer's GetDifferences method so that it returns items. Mock apiComparerMock = new(); apiComparerMock - .Setup(y => y.GetDifferences(It.IsAny>(), It.IsAny>>())) + .Setup(y => y.GetDifferences(It.IsAny>(), It.IsAny>>())) .Returns(new (MetadataInformation, MetadataInformation, IEnumerable)[] { new ( left, right, new CompatDifference[] { new CompatDifference("CP0001", "Invalid", DifferenceType.Removed, "X01") } ) }); Mock apiComparerFactoryMock = new(); apiComparerFactoryMock - .Setup(x => x.Create()) + .Setup(x => x.Create(null)) .Returns(apiComparerMock.Object); // Mock the suppression engine diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs index 6c3ed4eda142..b468a568da7d 100644 --- a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactory.cs @@ -51,7 +51,7 @@ internal static IAssemblySymbol GetAssemblyFromSyntaxWithReferences(string synta return compilation.Assembly; } - internal static IList> GetElementContainersFromSyntaxes(IEnumerable syntaxes, IEnumerable referencesSyntax = null, bool enableNullable = false, byte[] publicKey = null, [CallerMemberName] string assemblyName = "") + internal static IReadOnlyList> GetElementContainersFromSyntaxes(IEnumerable syntaxes, IEnumerable referencesSyntax = null, bool enableNullable = false, byte[] publicKey = null, [CallerMemberName] string assemblyName = "") { int i = 0; List> result = new(); diff --git a/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/TestRuleFactory.cs b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/TestRuleFactory.cs new file mode 100644 index 000000000000..7c9505d4429b --- /dev/null +++ b/src/Tests/Microsoft.DotNet.ApiCompatibility.Tests/TestRuleFactory.cs @@ -0,0 +1,39 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Collections.Generic; +using Microsoft.DotNet.ApiCompatibility.Rules; + +namespace Microsoft.DotNet.ApiCompatibility.Tests +{ + internal class TestRuleFactory : IRuleFactory + { + private readonly HashSet> _ruleFactories; + + public TestRuleFactory(params Func[] ruleFactories) + { + _ruleFactories = new HashSet>(ruleFactories); + } + + public IRule[] CreateRules(RuleSettings settings, IRuleRegistrationContext context) + { + List rules = new(); + foreach (Func ruleFactory in _ruleFactories) + { + rules.Add(ruleFactory(settings, context)); + } + + return rules.ToArray(); + } + + public TestRuleFactory WithRule(Func ruleFactory) + { + var rules = new Func[_ruleFactories.Count + 1]; + _ruleFactories.CopyTo(rules); + rules[rules.Length - 1] = ruleFactory; + + return new TestRuleFactory(rules); + } + } +} diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyNuGetReferenceCompat.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyNuGetReferenceCompat.cs index 93b8ae47577a..d2f78b0c1559 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyNuGetReferenceCompat.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToVerifyNuGetReferenceCompat.cs @@ -189,7 +189,7 @@ public void It_is_possible_to_disable_netfx_implicit_asset_target_fallback() [WindowsOnlyFact] public void It_chooses_lowest_netfx_in_default_atf() { - var testProjectName = $"{Regex.Replace(ToolsetInfo.CurrentTargetFramework, @"\.", "")}_multiple_atf"; + var testProjectName = $"{ToolsetInfo.CurrentTargetFramework.Replace(".", "")}_multiple_atf"; var (testProjectTestAsset, testPackageReference) = CreateTestAsset( testProjectName, diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs index 07b7d06f841a..c674294f09e1 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs @@ -78,6 +78,40 @@ public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_enabled(string } } + [RequiresMSBuildVersionTheory("17.0.0.32901")] + [InlineData(ToolsetInfo.CurrentTargetFramework)] + public void NativeAot_hw_runs_with_no_warnings_when_PublishAot_is_false(string targetFramework) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + var projectName = "HellowWorldNativeAotApp"; + var rid = EnvironmentInfo.GetCompatibleRid(targetFramework); + + var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true); + testProject.AdditionalProperties["PublishAot"] = "false"; + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); + publishCommand + .Execute($"/p:RuntimeIdentifier={rid}") + .Should().Pass() + .And.NotHaveStdOutContaining("IL2026") + .And.NotHaveStdErrContaining("NETSDK1179") + .And.NotHaveStdErrContaining("warning"); + + var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; + var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll"); + var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"); + + // PublishAot=false will be a normal publish + File.Exists(publishedDll).Should().BeTrue(); + + var command = new RunExeCommand(Log, publishedExe) + .Execute().Should().Pass() + .And.HaveStdOutContaining("Hello World"); + } + } + [RequiresMSBuildVersionTheory("17.0.0.32901")] [InlineData(ToolsetInfo.CurrentTargetFramework)] public void NativeAot_app_runs_in_debug_with_no_config_when_PublishAot_is_enabled(string targetFramework) @@ -238,14 +272,13 @@ public void NativeAot_hw_runs_with_PackageReference_PublishAot_is_enabled(string testProject.AdditionalProperties["PublishAot"] = "true"; // This will add a reference to a package that will also be automatically imported by the SDK - testProject.PackageReferences.Add(new TestPackageReference("Microsoft.DotNet.ILCompiler", "7.0.0-*")); + testProject.PackageReferences.Add(new TestPackageReference("Microsoft.DotNet.ILCompiler", "7.0.0-rc.1.22416.1")); // Linux symbol files are embedded and require additional steps to be stripped to a separate file // assumes /bin (or /usr/bin) are in the PATH if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { testProject.AdditionalProperties["StripSymbols"] = "true"; - testProject.AdditionalProperties["ObjCopyName"] = "objcopy"; } var testAsset = _testAssetsManager.CreateTestProject(testProject); @@ -274,6 +307,102 @@ public void NativeAot_hw_runs_with_PackageReference_PublishAot_is_enabled(string } } + [RequiresMSBuildVersionTheory("17.0.0.32901")] + [InlineData(ToolsetInfo.CurrentTargetFramework)] + public void NativeAot_hw_runs_with_PackageReference_PublishAot_is_empty(string targetFramework) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + var projectName = "HellowWorldNativeAotApp"; + var rid = EnvironmentInfo.GetCompatibleRid(targetFramework); + + var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true); + + // This will add a reference to a package that will also be automatically imported by the SDK + testProject.PackageReferences.Add(new TestPackageReference("Microsoft.DotNet.ILCompiler", "7.0.0-rc.1.22416.1")); + + // Linux symbol files are embedded and require additional steps to be stripped to a separate file + // assumes /bin (or /usr/bin) are in the PATH + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + testProject.AdditionalProperties["StripSymbols"] = "true"; + } + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); + publishCommand + .Execute($"/p:RuntimeIdentifier={rid}") + .Should().Pass(); + + var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; + var sharedLibSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".dll" : ".so"; + var publishedDll = Path.Combine(publishDirectory, $"{projectName}{sharedLibSuffix}"); + var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"); + var symbolSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".pdb" : ".dbg"; + var publishedDebugFile = Path.Combine(publishDirectory, $"{testProject.Name}{symbolSuffix}"); + + // NativeAOT published dir should not contain a non-host stand alone package + File.Exists(publishedDll).Should().BeFalse(); + // The exe exist and should be native + File.Exists(publishedExe).Should().BeTrue(); + File.Exists(publishedDebugFile).Should().BeTrue(); + IsNativeImage(publishedExe).Should().BeTrue(); + + var command = new RunExeCommand(Log, publishedExe) + .Execute().Should().Pass() + .And.HaveStdOutContaining("Hello World"); + } + } + + [RequiresMSBuildVersionTheory("17.0.0.32901")] + [InlineData(ToolsetInfo.CurrentTargetFramework)] + public void NativeAot_hw_runs_with_cross_PackageReference_PublishAot_is_enabled(string targetFramework) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && (RuntimeInformation.OSArchitecture == System.Runtime.InteropServices.Architecture.X64)) + { + var projectName = "HellowWorldNativeAotApp"; + var rid = "win-arm64"; + + var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true); + testProject.AdditionalProperties["PublishAot"] = "true"; + + // This will add a reference to a package that will also be automatically imported by the SDK + testProject.PackageReferences.Add(new TestPackageReference("Microsoft.DotNet.ILCompiler", "7.0.0-rc.1.22416.1")); + testProject.PackageReferences.Add(new TestPackageReference("runtime.win-x64.Microsoft.DotNet.ILCompiler", "7.0.0-rc.1.22416.1")); + + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); + publishCommand + .Execute($"/p:RuntimeIdentifier={rid}") + .Should().Pass(); + } + } + + [RequiresMSBuildVersionTheory("17.0.0.32901")] + [InlineData(ToolsetInfo.CurrentTargetFramework)] + public void NativeAot_hw_runs_with_cross_PackageReference_PublishAot_is_empty(string targetFramework) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && (RuntimeInformation.OSArchitecture == System.Runtime.InteropServices.Architecture.X64)) + { + var projectName = "HellowWorldNativeAotApp"; + var rid = "win-arm64"; + + var testProject = CreateHelloWorldTestProject(targetFramework, projectName, true); + + // This will add a reference to a package that will also be automatically imported by the SDK + testProject.PackageReferences.Add(new TestPackageReference("Microsoft.DotNet.ILCompiler", "7.0.0-rc.1.22416.1")); + testProject.PackageReferences.Add(new TestPackageReference("runtime.win-x64.Microsoft.DotNet.ILCompiler", "7.0.0-rc.1.22416.1")); + + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); + publishCommand + .Execute($"/p:RuntimeIdentifier={rid}") + .Should().Pass(); + } + } + [RequiresMSBuildVersionTheory("17.0.0.32901")] [InlineData(ToolsetInfo.CurrentTargetFramework)] public void Only_Aot_warnings_are_produced_if_EnableAotAnalyzer_is_set(string targetFramework) diff --git a/src/Tests/Microsoft.NET.TestFramework/Commands/DotnetNewCommand.cs b/src/Tests/Microsoft.NET.TestFramework/Commands/DotnetNewCommand.cs index 7490bbbdd1a7..57f2b91f4999 100644 --- a/src/Tests/Microsoft.NET.TestFramework/Commands/DotnetNewCommand.cs +++ b/src/Tests/Microsoft.NET.TestFramework/Commands/DotnetNewCommand.cs @@ -15,6 +15,9 @@ public DotnetNewCommand(ITestOutputHelper log, params string[] args) : base(log) { Arguments.Add("new"); Arguments.AddRange(args); + + //opt out from telemetry + WithEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "true"); } public DotnetNewCommand WithCustomHive(string path) diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj index cec92f168d88..3985709e66b3 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj @@ -1,4 +1,4 @@ - + $(SdkTargetFramework) Exe @@ -22,6 +22,7 @@ + diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/HelpTests.Resolution.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/HelpTests.Resolution.cs index d5b98f89e1bd..283cccb94ddd 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/HelpTests.Resolution.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/HelpTests.Resolution.cs @@ -3,6 +3,8 @@ using System.CommandLine; using FakeItEasy; +using Microsoft.DotNet.Cli.Utils; +using Microsoft.NET.TestFramework.Utilities; using Microsoft.TemplateEngine.Abstractions; using Microsoft.TemplateEngine.Cli.Commands; using Microsoft.TemplateEngine.Edge; @@ -30,15 +32,14 @@ public void UniqueNameMatchesCorrectly() ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new console2"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); Assert.Single(matchingTemplates); - StringWriter output = new StringWriter(); - Reporter reporter = new Reporter(new AnsiConsole(output)); + BufferedReporter reporter = new BufferedReporter(); Assert.True(InstantiateCommand.VerifyMatchingTemplates(settings, matchingTemplates, reporter, out _)); - Assert.Empty(output.ToString()); + Assert.Empty(reporter.Lines); } [Fact] @@ -56,15 +57,15 @@ public Task FailedToResolveTemplate_WhenMultipleLanguagesAreFound() ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new console"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); Assert.Equal(3, matchingTemplates.Count()); StringWriter output = new StringWriter(); - Reporter reporter = new Reporter(new AnsiConsole(output)); + BufferedReporter reporter = new BufferedReporter(); Assert.False(InstantiateCommand.VerifyMatchingTemplates(settings, matchingTemplates, reporter, out _)); - return Verify(output.ToString()); + return Verify(string.Join(Environment.NewLine, reporter.Lines)); } [Fact] @@ -82,17 +83,16 @@ public void DefaultLanguageDisambiguates() ITemplateEngineHost host = TestHost.GetVirtualHost(defaultParameters: defaultParams); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new console"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); Assert.Equal(2, matchingTemplates.Count()); - StringWriter output = new StringWriter(); - Reporter reporter = new Reporter(new AnsiConsole(output)); + BufferedReporter reporter = new BufferedReporter(); Assert.True(InstantiateCommand.VerifyMatchingTemplates(settings, matchingTemplates, reporter, out IEnumerable? filtered)); Assert.Equal(1, filtered?.Count()); Assert.Equal("Console.App.L1", filtered?.Single().Template.Identity); - Assert.Empty(output.ToString()); + Assert.Empty(reporter.Lines); } [Fact] @@ -109,17 +109,16 @@ public void InputLanguageIsPreferredOverDefault() ITemplateEngineHost host = TestHost.GetVirtualHost(defaultParameters: defaultParams); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new console --language L2"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); Assert.Single(matchingTemplates); - StringWriter output = new StringWriter(); - Reporter reporter = new Reporter(new AnsiConsole(output)); + BufferedReporter reporter = new BufferedReporter(); Assert.True(InstantiateCommand.VerifyMatchingTemplates(settings, matchingTemplates, reporter, out IEnumerable? filtered)); Assert.Equal(1, filtered?.Count()); Assert.Equal("Console.App.L2", filtered?.Single().Template.Identity); - Assert.Empty(output.ToString()); + Assert.Empty(reporter.Lines); } [Fact] @@ -134,16 +133,15 @@ public void TemplatesAreSameLanguage() ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new console"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); Assert.Equal(3, matchingTemplates.Count()); - StringWriter output = new StringWriter(); - Reporter reporter = new Reporter(new AnsiConsole(output)); + BufferedReporter reporter = new BufferedReporter(); Assert.True(InstantiateCommand.VerifyMatchingTemplates(settings, matchingTemplates, reporter, out IEnumerable? filtered)); Assert.Equal(3, filtered?.Count()); - Assert.Empty(output.ToString()); + Assert.Empty(reporter.Lines); } [Fact] @@ -161,7 +159,7 @@ public void HasLanguageMismatch() ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new console --language L2"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); @@ -184,7 +182,7 @@ public void HasTypeMismatch() ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new console --type item"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); @@ -206,7 +204,7 @@ public void HasBaselineMismatch() ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new console --baseline core"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); @@ -229,7 +227,7 @@ public void HasMultipleMismatches() ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new console --language L2 --type item --baseline core"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); @@ -258,7 +256,7 @@ public void HasTypeMismatch_HasGroupLanguageMatch() ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new console --language L2 --type item"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); @@ -295,7 +293,7 @@ public void OtherParameterMatch_Text() ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new console --langVersion ver"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); @@ -332,7 +330,7 @@ public void OtherParameterMatch_Choice() ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new console --framework netcoreapp1.0"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); @@ -370,7 +368,7 @@ public void OtherParameterDoesNotExist() ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new console --do-not-exist"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake(), templateGroup); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/HelpTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/HelpTests.cs index 2b7c39c03ecd..1a9154bfd37b 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/HelpTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/HelpTests.cs @@ -72,7 +72,7 @@ public void CanShowUsage() { ITemplateEngineHost host = TestHost.GetVirtualHost(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); StringWriter sw = new StringWriter(); HelpContext helpContext = new HelpContext(new HelpBuilder(LocalizationResources.Instance), myCommand, sw); @@ -85,7 +85,7 @@ public void CanShowUsage_ForMultipleShortNames() { ITemplateEngineHost host = TestHost.GetVirtualHost(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); StringWriter sw = new StringWriter(); HelpContext helpContext = new HelpContext(new HelpBuilder(LocalizationResources.Instance), myCommand, sw); @@ -105,7 +105,7 @@ public Task CanShowCommandOptions_Basic() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -128,7 +128,7 @@ public Task CanShowCommandOptions_Language() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -151,7 +151,7 @@ public Task CanShowCommandOptions_Type() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -174,7 +174,7 @@ public void CanShowCommandOptions_NoOptions() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -198,7 +198,7 @@ public Task CanShowTemplateOptions_SingleTemplate_Choice() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -224,7 +224,7 @@ public Task CanShowTemplateOptions_MultipleTemplate_CombinedChoice() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand1 = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates[0]); TemplateCommand templateCommand2 = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates[1]); @@ -249,7 +249,7 @@ public Task CanShowTemplateOptions_SingleTemplate_NonChoice() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -277,7 +277,7 @@ public Task CanShowTemplateOptions_MultipleTemplate_MultipleParams() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand1 = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates[0]); TemplateCommand templateCommand2 = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates[1]); @@ -302,7 +302,7 @@ public Task CanShowTemplateOptions_SingleTemplate_Choice_Required() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -326,7 +326,7 @@ public void CanShowTemplateOptions_RequiredIsNotShownWhenDefaultValueIsGiven() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -349,7 +349,7 @@ public Task CanShowHintsForOtherTemplates() ITemplateEngineHost host = TestHost.GetVirtualHost(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); ParseResult parseResult = myCommand.Parse("new -h"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); @@ -372,7 +372,7 @@ public Task CanShowTemplateOptions_SingleTemplate_Choice_ShortenedUsage_FirstTwo IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -396,7 +396,7 @@ public Task CanShowTemplateOptions_SingleTemplate_Choice_ShortenedUsage() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -438,7 +438,7 @@ public Task DoesNotCombineParametersWhenAliasesAreDifferent() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); TemplateCommand templateCommand1 = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates[0]); TemplateCommand templateCommand2 = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates[1]); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstallTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstallTests.cs index 102f4b105b37..a30335e97fa7 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstallTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstallTests.cs @@ -17,7 +17,7 @@ public class InstallTests public void Install_CanParseAddSourceOption(string optionName) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new install source {optionName} my-custom-source"); InstallCommandArgs args = new InstallCommandArgs((InstallCommand)parseResult.CommandResult.Command, parseResult); @@ -32,7 +32,7 @@ public void Install_CanParseAddSourceOption(string optionName) public void Install_Error_NoArguments() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new install"); @@ -46,7 +46,7 @@ public void Install_Error_NoArguments() public void Install_Legacy_Error_NoArguments() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new --install --interactive"); @@ -62,7 +62,7 @@ public void Install_Legacy_Error_NoArguments() public void Install_CanParseAddSourceOption_MultipleEntries(string testCase) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(testCase); InstallCommandArgs args = new InstallCommandArgs((InstallCommand)parseResult.CommandResult.Command, parseResult); @@ -77,7 +77,7 @@ public void Install_CanParseAddSourceOption_MultipleEntries(string testCase) public void Install_CanParseInteractiveOption() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new install source --interactive"); InstallCommandArgs args = new InstallCommandArgs((InstallCommand)parseResult.CommandResult.Command, parseResult); @@ -98,7 +98,7 @@ public void Install_CanParseInteractiveOption() public void Install_CanParseForceOption() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new install source --force"); InstallCommandArgs args = new InstallCommandArgs((InstallCommand)parseResult.CommandResult.Command, parseResult); @@ -119,7 +119,7 @@ public void Install_CanParseForceOption() public void Install_CanParseMultipleArgs() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new install source1 source2"); InstallCommandArgs args = new InstallCommandArgs((InstallCommand)parseResult.CommandResult.Command, parseResult); @@ -136,7 +136,7 @@ public void Install_CanParseMultipleArgs() public void Install_Legacy_CanParseAddSourceOption(string testCase) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(testCase); InstallCommandArgs args = new InstallCommandArgs((LegacyInstallCommand)parseResult.CommandResult.Command, parseResult); @@ -153,7 +153,7 @@ public void Install_Legacy_CanParseAddSourceOption(string testCase) public void Install_Legacy_CanParseInteractiveOption(string testCase) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(testCase); InstallCommandArgs args = new InstallCommandArgs((LegacyInstallCommand)parseResult.CommandResult.Command, parseResult); @@ -169,7 +169,7 @@ public void Install_Legacy_CanParseInteractiveOption(string testCase) public void Install_Legacy_CanParseMultipleArgs(string testCase) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(testCase); InstallCommandArgs args = new InstallCommandArgs((LegacyInstallCommand)parseResult.CommandResult.Command, parseResult); @@ -186,7 +186,7 @@ public void Install_Legacy_CanParseMultipleArgs(string testCase) public void Install_Legacy_CanParseAddSourceOption_MultipleEntries(string testCase) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(testCase); InstallCommandArgs args = new InstallCommandArgs((LegacyInstallCommand)parseResult.CommandResult.Command, parseResult); @@ -207,7 +207,7 @@ public void Install_Legacy_CanParseAddSourceOption_MultipleEntries(string testCa public void Install_CanReturnParseError(string command, string expectedInvalidTokens) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); var errorMessages = parseResult.Errors.Select(error => error.Message); @@ -226,7 +226,7 @@ public void Install_CanReturnParseError(string command, string expectedInvalidTo public void CommandExampleCanShowParentCommandsBeyondNew() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); Command rootCommand = new Command("dotnet") { myCommand diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.NoMatchHandling.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.NoMatchHandling.cs index 1a86936ec000..5b1ea50dcb4a 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.NoMatchHandling.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.NoMatchHandling.cs @@ -152,7 +152,7 @@ internal void CanEvaluateInvalidParameters(string command, MockTemplateInfo[] te IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager templatePackageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new {command}"); var args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake(), templateGroup); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.Subcommand.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.Subcommand.cs index c2053e6954d7..239ea6c71897 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.Subcommand.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.Subcommand.cs @@ -21,7 +21,7 @@ public partial class InstantiateTests public void Create_CanParseTemplateWithOptions() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new create console --framework net5.0"); InstantiateCommandArgs args = new InstantiateCommandArgs((InstantiateCommand)parseResult.CommandResult.Command, parseResult); @@ -50,7 +50,7 @@ internal void Create_CanEvaluateTemplateToRun(string command, string templateSet ITemplateEngineHost host = TestHost.GetVirtualHost(defaultParameters: defaultParams); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new create {command}"); var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; var args = new InstantiateCommandArgs(instantiateCommand, parseResult); @@ -73,7 +73,7 @@ internal void Create_CanParseNameOption(string command, string? expectedValue) IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new create {command}"); var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; var args = new InstantiateCommandArgs(instantiateCommand, parseResult); @@ -106,7 +106,7 @@ internal void Create_CanParseTemplateOptions(string command, string parameterNam IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new create {command}"); var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; var args = new InstantiateCommandArgs(instantiateCommand, parseResult); @@ -141,7 +141,7 @@ internal void Create_CanParseChoiceTemplateOptions(string command, string parame IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new create {command}"); var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; var args = new InstantiateCommandArgs(instantiateCommand, parseResult); @@ -183,7 +183,7 @@ internal void Create_CanDetectParseErrorsTemplateOptions( IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new create {command}"); var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; var args = new InstantiateCommandArgs(instantiateCommand, parseResult); @@ -217,7 +217,7 @@ internal void Create_CanDetectParseErrorsChoiceTemplateOptions( IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new create {command}"); var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; var args = new InstantiateCommandArgs(instantiateCommand, parseResult); @@ -244,7 +244,7 @@ internal void Create_CanEvaluateTemplateWithSubcommandShortName(string command, ITemplateEngineHost host = TestHost.GetVirtualHost(); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new create {command}"); var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; var args = new InstantiateCommandArgs(instantiateCommand, parseResult); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.cs index 05dba3f5e6fd..8117debb0baa 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/InstantiateTests.cs @@ -21,7 +21,7 @@ public partial class InstantiateTests public void Instantiate_CanParseTemplateWithOptions() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new console --framework net5.0"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); @@ -225,7 +225,7 @@ internal void CanEvaluateTemplateToRun(string command, string templateSet, strin ITemplateEngineHost host = TestHost.GetVirtualHost(defaultParameters: defaultParams); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new {command}"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake(), templateGroup); @@ -255,7 +255,7 @@ internal void CanParseNameOption(string command, string? expectedValue) IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new {command}"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -320,7 +320,7 @@ internal void CanParseTemplateOptions(string command, string parameterName, stri IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); Parser parser = ParserFactory.CreateParser(myCommand); var parseResult = parser.Parse($" new {command}"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); @@ -364,7 +364,7 @@ internal void CanParseChoiceTemplateOptions(string command, string parameterName IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new {command}"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -408,7 +408,7 @@ internal void CanParseMultiChoiceTemplateOptions(string command, string paramete IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new {command}"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); TemplateCommand templateCommand = new TemplateCommand(myCommand, settings, packageManager, templateGroup, templateGroup.Templates.Single()); @@ -478,7 +478,7 @@ internal void CanDetectParseErrorsTemplateOptions( IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new {command}"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); @@ -521,7 +521,7 @@ internal void CanDetectParseErrorsChoiceTemplateOptions( IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); Parser parser = ParserFactory.CreateParser(myCommand); var parseResult = parser.Parse($" new {command}"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); @@ -546,7 +546,7 @@ internal void DoNotAddAllowScriptOptionForTemplate() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); @@ -579,7 +579,7 @@ internal void CanParseAllowScriptsOption(string command, AllowRunScripts? result IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); @@ -612,7 +612,7 @@ public void AllTemplatesInGroupUseAllShortNamesForResolution(string shortName) ITemplateEngineHost host = TestHost.GetVirtualHost(defaultParameters: defaultParams); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new {shortName}"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake(), templateGroup); @@ -640,7 +640,7 @@ public void ExplicitLanguageChoiceIsHonoredWithMultipleShortNames(string shortNa ITemplateEngineHost host = TestHost.GetVirtualHost(defaultParameters: defaultParams); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); string command = $"new {shortName} --language F#"; var parseResult = myCommand.Parse(command); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); @@ -670,7 +670,7 @@ public void ChoiceValueDisambiguatesMatchesWithMultipleShortNames(string name, s ITemplateEngineHost host = TestHost.GetVirtualHost(defaultParameters: defaultParams); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); string command = $"new {name} --foo {fooChoice}"; var parseResult = myCommand.Parse($" new {command}"); @@ -700,7 +700,7 @@ public void ParameterExistenceDisambiguatesMatchesWithMultipleShortNames(string ITemplateEngineHost host = TestHost.GetVirtualHost(defaultParameters: defaultParams); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); string command = $"new {name} --{paramName} {paramValue}"; var parseResult = myCommand.Parse($" new {command}"); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/ListTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/ListTests.cs index 8e750e25809b..5a774de8f596 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/ListTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/ListTests.cs @@ -81,7 +81,7 @@ public void List_CanParseFilterOption(string command, string expectedFilter) FilterOptionDefinition expectedDef = _stringToFilterDefMap[expectedFilter]; ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); ListCommandArgs args = new ListCommandArgs((BaseListCommand)parseResult.CommandResult.Command, parseResult); @@ -122,7 +122,7 @@ public void List_CanParseFilterOptionWithoutMainCriteria(string command, string FilterOptionDefinition expectedDef = _stringToFilterDefMap[expectedFilter]; ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); ListCommandArgs args = new ListCommandArgs((BaseListCommand)parseResult.CommandResult.Command, parseResult); @@ -138,7 +138,7 @@ public void List_CanParseFilterOptionWithoutMainCriteria(string command, string public void List_CannotParseMultipleArgs(string command) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); @@ -150,7 +150,7 @@ public void List_CannotParseMultipleArgs(string command) public void List_CannotParseArgsAtNewLevel() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new smth list"); @@ -167,7 +167,7 @@ public void List_CannotParseArgsAtNewLevel() public void List_CannotParseOptionsAtNewLevel(string command, string expectedFilter) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); @@ -179,7 +179,7 @@ public void List_CannotParseOptionsAtNewLevel(string command, string expectedFil public void List_Legacy_CannotParseArgsAtBothLevels() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new smth --list smth-else"); @@ -194,7 +194,7 @@ public void List_Legacy_CannotParseArgsAtBothLevels() public void List_CanParseColumnsAll(string command) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); @@ -214,7 +214,7 @@ public void List_CanParseColumnsAll(string command) public void List_CanParseColumns(string command, string[] expectedColumns) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); @@ -235,7 +235,7 @@ public void List_CanParseColumns(string command, string[] expectedColumns) public void List_CannotParseUnknownColumns(string command) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); @@ -251,7 +251,7 @@ public void List_CannotParseUnknownColumns(string command) public void List_HandleParseErrors(string command, string expectedInvalidTokens) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); var errorMessages = parseResult.Errors.Select(error => error.Message); @@ -270,7 +270,7 @@ public void List_HandleParseErrors(string command, string expectedInvalidTokens) public void CommandExampleCanShowParentCommandsBeyondNew() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); Command rootCommand = new Command("dotnet") { myCommand diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/MiscTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/MiscTests.cs index 8dbcd9ec874b..202ee6bbaff8 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/MiscTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/MiscTests.cs @@ -78,7 +78,7 @@ public void DebugFlagCanBeParsedOnNewLevel(string command, string option) }; ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = ParserFactory.CreateParser(myCommand).Parse(command); NewCommandArgs args = new NewCommandArgs(myCommand, parseResult); @@ -108,7 +108,7 @@ public void DebugFlagCanBeParsedOnSubcommandLevel(string command, string option) }; ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = ParserFactory.CreateParser(myCommand).Parse(command); InstallCommandArgs args = new InstallCommandArgs((InstallCommand)parseResult.CommandResult.Command, parseResult); @@ -138,7 +138,7 @@ public void DebugFlagCanBeParsedOnTemplateSubcommandLevel(string command, string }; ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); @@ -151,7 +151,7 @@ public void DebugFlagCanBeParsedOnTemplateSubcommandLevel(string command, string public void ManuallyAddedOptionIsPreservedOnTemplateSubcommandLevel() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var customOption = new Option("--newOption"); myCommand.AddGlobalOption(customOption); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/SearchTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/SearchTests.cs index 528250da0fa1..ed087b6123b1 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/SearchTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/SearchTests.cs @@ -63,7 +63,7 @@ public void Search_CanParseFilterOption(string command, string expectedFilter) FilterOptionDefinition expectedDef = _stringToFilterDefMap[expectedFilter]; ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); SearchCommandArgs args = new SearchCommandArgs((BaseSearchCommand)parseResult.CommandResult.Command, parseResult); @@ -97,7 +97,7 @@ public void Search_CanParseFilterOptionWithoutMainCriteria(string command, strin FilterOptionDefinition expectedDef = _stringToFilterDefMap[expectedFilter]; ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); SearchCommandArgs args = new SearchCommandArgs((BaseSearchCommand)parseResult.CommandResult.Command, parseResult); @@ -113,7 +113,7 @@ public void Search_CanParseFilterOptionWithoutMainCriteria(string command, strin public void Search_CannotParseMultipleArgs(string command) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); @@ -125,7 +125,7 @@ public void Search_CannotParseMultipleArgs(string command) public void Search_CannotParseArgsAtNewLevel() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new smth search"); @@ -143,7 +143,7 @@ public void Search_CannotParseArgsAtNewLevel() public void Search_CannotParseOptionsAtNewLevel(string command, string expectedFilter) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); @@ -155,7 +155,7 @@ public void Search_CannotParseOptionsAtNewLevel(string command, string expectedF public void Search_Legacy_CannotParseArgsAtBothLevels() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new smth --search smth-else"); @@ -171,7 +171,7 @@ public void Search_Legacy_CannotParseArgsAtBothLevels() public void Search_HandleParseErrors(string command, string expectedInvalidTokens) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); var errorMessages = parseResult.Errors.Select(error => error.Message); @@ -193,7 +193,7 @@ public void Search_HandleParseErrors(string command, string expectedInvalidToken public void Search_CanParseColumnsAll(string command) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); @@ -213,7 +213,7 @@ public void Search_CanParseColumnsAll(string command) public void Search_CanParseColumns(string command, string[] expectedColumns) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); @@ -234,7 +234,7 @@ public void Search_CanParseColumns(string command, string[] expectedColumns) public void Search_CannotParseUnknownColumns(string command) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); @@ -246,7 +246,7 @@ public void Search_CannotParseUnknownColumns(string command) public void CommandExampleCanShowParentCommandsBeyondNew() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); Command rootCommand = new Command("dotnet") { myCommand @@ -260,7 +260,7 @@ public void CommandExampleCanShowParentCommandsBeyondNew() public void CommandExampleShowsMandatoryArg() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); Command rootCommand = new Command("dotnet") { myCommand @@ -274,7 +274,7 @@ public void CommandExampleShowsMandatoryArg() public void CommandExampleShowsOptionalArgWhenOptionsAreGiven() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); Command rootCommand = new Command("dotnet") { myCommand diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TabCompletionTests.Approval.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TabCompletionTests.Approval.cs index 38f7f3d56b08..49b8e4b50880 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TabCompletionTests.Approval.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TabCompletionTests.Approval.cs @@ -19,7 +19,7 @@ public partial class TabCompletionTests public Task RootCommand_GetAllSuggestions() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = ParserFactory.CreateParser(myCommand).Parse("new "); var result = parseResult.GetCompletions().ToArray(); @@ -31,7 +31,7 @@ public Task RootCommand_GetAllSuggestions() public Task RootCommand_GetStartsWtihSuggestions() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new c"); var result = parseResult.GetCompletions().ToArray(); @@ -43,7 +43,7 @@ public Task RootCommand_GetStartsWtihSuggestions() public Task Install_GetAllSuggestions() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new install "); var result = parseResult.GetCompletions().ToArray(); @@ -55,7 +55,7 @@ public Task Install_GetAllSuggestions() public Task Uninstall_GetAllSuggestions() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new uninstall "); var result = parseResult.GetCompletions().ToArray(); @@ -67,7 +67,7 @@ public Task Uninstall_GetAllSuggestions() public Task Update_GetAllSuggestions() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new update "); var result = parseResult.GetCompletions().ToArray(); @@ -79,7 +79,7 @@ public Task Update_GetAllSuggestions() public Task List_GetAllSuggestions() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new list "); var result = parseResult.GetCompletions().ToArray(); @@ -91,7 +91,7 @@ public Task List_GetAllSuggestions() public Task Search_GetAllSuggestions() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new search "); var result = parseResult.GetCompletions().ToArray(); @@ -103,7 +103,7 @@ public Task Search_GetAllSuggestions() public Task Create_GetAllSuggestions() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new create "); var result = parseResult.GetCompletions().ToArray(); @@ -115,7 +115,7 @@ public Task Create_GetAllSuggestions() public Task TemplateCommand_GetAllSuggestions() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new console "); var result = parseResult.GetCompletions().ToArray(); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TabCompletionTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TabCompletionTests.cs index 6e87850cc156..9db1a319d6f0 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TabCompletionTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TabCompletionTests.cs @@ -22,7 +22,7 @@ public partial class TabCompletionTests public void Instantiate_CanSuggestTemplateOption_StartsWith() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new console --framework net7.0 --l"); var suggestions = parseResult.GetCompletions().Select(l => l.Label).ToArray(); @@ -38,7 +38,7 @@ public void Instantiate_CanSuggestTemplateOption_StartsWith() public void Instantiate_CanSuggestLanguages() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new console --language "); var suggestions = parseResult.GetCompletions().Select(l => l.Label).ToArray(); @@ -55,7 +55,7 @@ public void Instantiate_CanSuggestLanguages() public void Install_GetSuggestionsAfterInteractive() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new install --interactive "); var result = parseResult.GetCompletions().Select(l => l.Label).ToArray(); @@ -68,7 +68,7 @@ public void Install_GetSuggestionsAfterInteractive() public void Install_GetSuggestionsAfterOptionWithoutArg() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new install --nuget-source "); var result = parseResult.GetCompletions().ToArray(); @@ -82,7 +82,7 @@ public void Install_GetSuggestionsAfterOptionWithoutArg() public void Install_GetSuggestionsAfterOptionWithArg() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new install --nuget-source me"); var result = parseResult.GetCompletions().Select(l => l.Label).ToArray(); @@ -95,7 +95,7 @@ public void Install_GetSuggestionsAfterOptionWithArg() public void Instantiate_CanSuggestTemplate_StartsWith() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + var myCommand = NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new co"); var suggestions = parseResult.GetCompletions().Select(l => l.Label).ToArray(); @@ -117,7 +117,7 @@ public void CanCompleteChoice_FromSingleTemplate() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo --testChoice "); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; Assert.NotNull(completionContext); @@ -146,7 +146,7 @@ public void CanCompleteChoice_MultichoiceTabCompletion(string command, string[] IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; Assert.NotNull(completionContext); @@ -171,7 +171,7 @@ public void CanCompleteChoice_FromSingleTemplate_StartsWith() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo --testChoice v"); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; Assert.NotNull(completionContext); @@ -195,7 +195,7 @@ public void CanCompleteChoice_FromSingleTemplate_InTheMiddle() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo --testChoice v --name test"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -223,7 +223,7 @@ public void CanCompleteChoice_FromMultipleTemplates() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo --testChoice "); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -250,7 +250,7 @@ public void CanCompleteChoice_FromMultipleTemplates_StartsWith() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo --testChoice v"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -279,7 +279,7 @@ public void CanCompleteParameters_FromMultipleTemplates() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo "); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -320,7 +320,7 @@ public void CanCompleteParameters_StartsWith_FromMultipleTemplates() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo --t"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -363,7 +363,7 @@ public void CanCompleteParameters_StartsWith_AfterOption() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo --foo val1 --bar val2 --t"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -404,7 +404,7 @@ public void CanCompleteLanguages(string optionName) IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo {optionName} "); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -431,7 +431,7 @@ public void CanCompleteTypes() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo --type "); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -461,7 +461,7 @@ public void CanIgnoreTemplateGroupsWithConstraints() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new fo"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -491,7 +491,7 @@ public void CanIgnoreTemplateGroupsWithConstraints_IgnoresLongEvaluationTemplate IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new fo"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -524,7 +524,7 @@ public void CanIgnoreTemplatesInGroupWithConstraints() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo "); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -559,7 +559,7 @@ public void IncludesTemplatesInGroupWithLongEvaluatedConstraints() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo "); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; @@ -593,7 +593,7 @@ public void WillNotEvaluateConstraints_WhenAtLeastOneTemplateInGroupDoesNotHaveC IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new fo"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); var completionContext = parseResult.GetCompletionContext() as TextCompletionContext; diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TemplateCommandTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TemplateCommandTests.cs index 88059b6d064a..38360183a27a 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TemplateCommandTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/TemplateCommandTests.cs @@ -45,7 +45,7 @@ public Task CannotCreateCommandForInvalidParameter() IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); TemplatePackageManager packageManager = A.Fake(); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($" new foo"); InstantiateCommandArgs args = InstantiateCommandArgs.FromNewCommandArgs(new NewCommandArgs(myCommand, parseResult)); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UninstallTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UninstallTests.cs index f9de164de0f2..56f718c1480b 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UninstallTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UninstallTests.cs @@ -18,7 +18,7 @@ public class UninstallTests public void Uninstall_NoArguments(string commandName) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new {commandName}"); UninstallCommandArgs args = new UninstallCommandArgs((BaseUninstallCommand)parseResult.CommandResult.Command, parseResult); @@ -34,7 +34,7 @@ public void Uninstall_NoArguments(string commandName) public void Uninstall_WithArgument(string commandName) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new {commandName} source"); UninstallCommandArgs args = new UninstallCommandArgs((BaseUninstallCommand)parseResult.CommandResult.Command, parseResult); @@ -51,7 +51,7 @@ public void Uninstall_WithArgument(string commandName) public void Uninstall_WithMultipleArgument(string command) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); UninstallCommandArgs args = new UninstallCommandArgs((BaseUninstallCommand)parseResult.CommandResult.Command, parseResult); @@ -72,7 +72,7 @@ public void Uninstall_WithMultipleArgument(string command) public void Uninstall_CanReturnParseError(string command, string expectedInvalidTokens) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); var errorMessages = parseResult.Errors.Select(error => error.Message); @@ -91,7 +91,7 @@ public void Uninstall_CanReturnParseError(string command, string expectedInvalid public void CommandExampleCanShowParentCommandsBeyondNew() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); Command rootCommand = new Command("dotnet") { myCommand diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UpdateTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UpdateTests.cs index 7fd0d02afd85..2deea215d77b 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UpdateTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/UpdateTests.cs @@ -17,7 +17,7 @@ public class UpdateTests public void Update_CanParseAddSourceOption(string optionName) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new update {optionName} my-custom-source"); UpdateCommandArgs args = new UpdateCommandArgs((UpdateCommand)parseResult.CommandResult.Command, parseResult); @@ -33,7 +33,7 @@ public void Update_CanParseAddSourceOption(string optionName) public void Update_Error_WhenArguments(string commandName) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new {commandName} source"); @@ -47,7 +47,7 @@ public void Update_Error_WhenArguments(string commandName) public void Update_CanParseAddSourceOption_MultipleEntries(string testCase) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(testCase); UpdateCommandArgs args = new UpdateCommandArgs((UpdateCommand)parseResult.CommandResult.Command, parseResult); @@ -60,7 +60,7 @@ public void Update_CanParseAddSourceOption_MultipleEntries(string testCase) public void Update_CanParseInteractiveOption() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new update --interactive"); UpdateCommandArgs args = new UpdateCommandArgs((UpdateCommand)parseResult.CommandResult.Command, parseResult); @@ -79,7 +79,7 @@ public void Update_CanParseInteractiveOption() public void Update_CanParseCheckOnlyOption(string optionAlias) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new update {optionAlias}"); UpdateCommandArgs args = new UpdateCommandArgs((UpdateCommand)parseResult.CommandResult.Command, parseResult); @@ -96,7 +96,7 @@ public void Update_CanParseCheckOnlyOption(string optionAlias) public void Update_Legacy_CanParseCheckOnlyOption() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new --update-check"); UpdateCommandArgs args = new UpdateCommandArgs((LegacyUpdateCheckCommand)parseResult.CommandResult.Command, parseResult); @@ -116,7 +116,7 @@ public void Update_Legacy_CanParseCheckOnlyOption() public void Update_Legacy_CanParseAddSourceOption(string testCase) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(testCase); UpdateCommandArgs args = new UpdateCommandArgs((BaseUpdateCommand)parseResult.CommandResult.Command, parseResult); @@ -131,7 +131,7 @@ public void Update_Legacy_CanParseAddSourceOption(string testCase) public void Update_Legacy_CanParseInteractiveOption(string testCase) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(testCase); UpdateCommandArgs args = new UpdateCommandArgs((BaseUpdateCommand)parseResult.CommandResult.Command, parseResult); @@ -146,7 +146,7 @@ public void Update_Legacy_CanParseInteractiveOption(string testCase) public void Update_Legacy_CanParseAddSourceOption_MultipleEntries(string testCase) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(testCase); UpdateCommandArgs args = new UpdateCommandArgs((BaseUpdateCommand)parseResult.CommandResult.Command, parseResult); @@ -166,7 +166,7 @@ public void Update_Legacy_CanParseAddSourceOption_MultipleEntries(string testCas public void Update_CanReturnParseError(string command, string expectedInvalidTokens) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(command); var errorMessages = parseResult.Errors.Select(error => error.Message); @@ -185,7 +185,7 @@ public void Update_CanReturnParseError(string command, string expectedInvalidTok public void CommandExampleCanShowParentCommandsBeyondNew() { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); Command rootCommand = new Command("dotnet") { myCommand diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/PostActionDispatcherTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/PostActionDispatcherTests.cs index 0067ba15f86a..7195da016cff 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/PostActionDispatcherTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/PostActionDispatcherTests.cs @@ -39,7 +39,6 @@ public void CanProcessSuccessPostAction() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => string.Empty); var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); @@ -71,7 +70,6 @@ public void CanDryRunSuccessPostAction() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => string.Empty); var result = dispatcher.Process(templateCreationResult, isDryRun: true, AllowRunScripts.Prompt); @@ -98,7 +96,6 @@ public void CanProcessFailedPostAction() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => string.Empty); var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); @@ -130,7 +127,6 @@ public void CanDryRunFailedPostAction() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => string.Empty); var result = dispatcher.Process(templateCreationResult, isDryRun: true, AllowRunScripts.Prompt); @@ -161,7 +157,6 @@ public void CanProcessUnknownPostAction() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => string.Empty); var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); @@ -188,7 +183,6 @@ public void CanProcessPostActionThrowingException() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => string.Empty); var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Yes); @@ -230,7 +224,6 @@ public void CanContinueOnErrorWhenConfigured() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => string.Empty); var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Yes); @@ -279,7 +272,6 @@ public void CannotContinueOnErrorWhenNotConfigured() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => string.Empty); var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Yes); @@ -316,7 +308,6 @@ public void CanProcessRunScriptPostAction_WhenRunScriptAllowed() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => string.Empty); var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Yes); @@ -349,7 +340,6 @@ public void CanProcessRunScriptPostAction_WhenRunScriptNotAllowed() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => string.Empty); var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.No); @@ -381,7 +371,6 @@ public void CanProcessRunScriptPostAction_WhenRunScriptPrompt_Yes() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => "Y"); // the user allows to run post action var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); @@ -415,7 +404,6 @@ public void CanProcessRunScriptPostAction_WhenRunScriptPrompt_No() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => "N"); // the user forbids to run post action var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); @@ -447,7 +435,6 @@ public void CanProcessRunScriptPostAction_DryRun() PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => "N"); // the user forbids to run post action //run script setting doesn't matter for dry run @@ -494,7 +481,6 @@ public void CanProcessRunScriptPostActionAndFailedPostAction_WhenRunScriptPrompt PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => "N"); // the user forbids to run post action var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); @@ -538,7 +524,6 @@ public void CanProcessRunScriptPostActionAndSuccessPostAction_WhenRunScriptPromp PostActionDispatcher dispatcher = new PostActionDispatcher( engineEnvironmentSettings, - new NewCommandCallbacks(), () => "N"); // the user forbids to run post action var result = dispatcher.Process(templateCreationResult, isDryRun: false, AllowRunScripts.Prompt); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/TemplateResolutionTests/ListTemplateResolverTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/TemplateResolutionTests/ListTemplateResolverTests.cs index 7383dd41a6d2..15cf24dad48b 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/TemplateResolutionTests/ListTemplateResolverTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/TemplateResolutionTests/ListTemplateResolverTests.cs @@ -529,7 +529,7 @@ public async Task TestGetTemplateResolutionResult_ConstraintsMismatch() ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: new[] { (typeof(ITemplateConstraintFactory), (IIdentifiedComponent)new TestConstraintFactory("test")) }); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new list"); var args = new ListCommandArgs((ListCommand)parseResult.CommandResult.Command, parseResult); @@ -560,7 +560,7 @@ public async Task TestGetTemplateResolutionResult_IgnoreConstraintsMismatch() ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: new[] { (typeof(ITemplateConstraintFactory), (IIdentifiedComponent)new TestConstraintFactory("test")) }); IEngineEnvironmentSettings settings = new EngineEnvironmentSettings(host, virtualizeSettings: true); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse("new list --ignore-constraints"); var args = new ListCommandArgs((ListCommand)parseResult.CommandResult.Command, parseResult); @@ -580,7 +580,7 @@ public async Task TestGetTemplateResolutionResult_IgnoreConstraintsMismatch() private static ListCommandArgs GetListCommandArgsFor(string commandInput) { ITemplateEngineHost host = TestHost.GetVirtualHost(additionalComponents: BuiltInTemplatePackagesProviderFactory.GetComponents(includeTestTemplates: false)); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse(commandInput); return new ListCommandArgs((ListCommand)parseResult.CommandResult.Command, parseResult); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/TemplateSearchCoordinatorTests.cs b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/TemplateSearchCoordinatorTests.cs index c030f8932815..7639e1df0707 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/TemplateSearchCoordinatorTests.cs +++ b/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/TemplateSearchCoordinatorTests.cs @@ -75,7 +75,7 @@ public async Task CacheSearchNameMatchTest() var templatePackageManager = new TemplatePackageManager(engineEnvironmentSettings); engineEnvironmentSettings.Components.AddComponent(typeof(ITemplateSearchProviderFactory), new NuGetMetadataSearchProviderFactory()); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new search foo"); SearchCommandArgs args = new SearchCommandArgs((SearchCommand)parseResult.CommandResult.Command, parseResult); @@ -120,7 +120,7 @@ public async Task CacheSearchCliSymbolNameFilterTest() var templatePackageManager = new TemplatePackageManager(engineEnvironmentSettings); engineEnvironmentSettings.Components.AddComponent(typeof(ITemplateSearchProviderFactory), new NuGetMetadataSearchProviderFactory()); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new search foo --framework netcoreapp2.0"); SearchCommandArgs args = new SearchCommandArgs((SearchCommand)parseResult.CommandResult.Command, parseResult); @@ -162,7 +162,7 @@ public async Task CacheSearchCliSymbolNameMismatchFilterTest() var templatePackageManager = new TemplatePackageManager(engineEnvironmentSettings); engineEnvironmentSettings.Components.AddComponent(typeof(ITemplateSearchProviderFactory), new NuGetMetadataSearchProviderFactory()); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new search foo --tfm netcoreapp2.0"); SearchCommandArgs args = new SearchCommandArgs((SearchCommand)parseResult.CommandResult.Command, parseResult); @@ -201,7 +201,7 @@ public async Task CacheSearchLanguageFilterTest() var templatePackageManager = new TemplatePackageManager(engineEnvironmentSettings); engineEnvironmentSettings.Components.AddComponent(typeof(ITemplateSearchProviderFactory), new NuGetMetadataSearchProviderFactory()); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new search bar --language F#"); SearchCommandArgs args = new SearchCommandArgs((SearchCommand)parseResult.CommandResult.Command, parseResult); @@ -245,7 +245,7 @@ public async Task CacheSearchAuthorFilterTest(string commandTemplate, string com var templatePackageManager = new TemplatePackageManager(engineEnvironmentSettings); engineEnvironmentSettings.Components.AddComponent(typeof(ITemplateSearchProviderFactory), new NuGetMetadataSearchProviderFactory()); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new search {commandTemplate} --author {commandAuthor}"); SearchCommandArgs args = new SearchCommandArgs((SearchCommand)parseResult.CommandResult.Command, parseResult); @@ -286,7 +286,7 @@ public async Task CacheSearchTypeFilterTest(string commandTemplate, string comma var templatePackageManager = new TemplatePackageManager(engineEnvironmentSettings); engineEnvironmentSettings.Components.AddComponent(typeof(ITemplateSearchProviderFactory), new NuGetMetadataSearchProviderFactory()); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new search {commandTemplate} --type {commandType}"); SearchCommandArgs args = new SearchCommandArgs((SearchCommand)parseResult.CommandResult.Command, parseResult); @@ -328,7 +328,7 @@ public async Task CacheSearchPackageFilterTest(string commandTemplate, string co var templatePackageManager = new TemplatePackageManager(engineEnvironmentSettings); engineEnvironmentSettings.Components.AddComponent(typeof(ITemplateSearchProviderFactory), new NuGetMetadataSearchProviderFactory()); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new search {commandTemplate} --package {commandPackage}"); SearchCommandArgs args = new SearchCommandArgs((SearchCommand)parseResult.CommandResult.Command, parseResult); @@ -375,7 +375,7 @@ public async Task CacheSearchTagFilterTest(string commandTemplate, string comman var templatePackageManager = new TemplatePackageManager(engineEnvironmentSettings); engineEnvironmentSettings.Components.AddComponent(typeof(ITemplateSearchProviderFactory), new NuGetMetadataSearchProviderFactory()); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new search {commandTemplate} --tag {commandTag}"); SearchCommandArgs args = new SearchCommandArgs((SearchCommand)parseResult.CommandResult.Command, parseResult); @@ -417,7 +417,7 @@ public async Task CacheSearchLanguageMismatchFilterTest() var templatePackageManager = new TemplatePackageManager(engineEnvironmentSettings); engineEnvironmentSettings.Components.AddComponent(typeof(ITemplateSearchProviderFactory), new NuGetMetadataSearchProviderFactory()); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new search bar --language VB"); SearchCommandArgs args = new SearchCommandArgs((SearchCommand)parseResult.CommandResult.Command, parseResult); @@ -455,7 +455,7 @@ public async Task CacheSkipInvalidTemplatesTest() engineEnvironmentSettings.Components.AddComponent(typeof(ITemplateSearchProviderFactory), new NuGetMetadataSearchProviderFactory()); - NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false), new NewCommandCallbacks()); + NewCommand myCommand = (NewCommand)NewCommandFactory.Create("new", _ => engineEnvironmentSettings.Host, _ => new TelemetryLogger(null, false)); var parseResult = myCommand.Parse($"new search --unknown"); SearchCommandArgs args = new SearchCommandArgs((SearchCommand)parseResult.CommandResult.Command, parseResult); diff --git a/src/Tests/Microsoft.TemplateEngine.EndToEndTestHarness/Program.cs b/src/Tests/Microsoft.TemplateEngine.EndToEndTestHarness/Program.cs index 8a0a13550564..528b501be132 100644 --- a/src/Tests/Microsoft.TemplateEngine.EndToEndTestHarness/Program.cs +++ b/src/Tests/Microsoft.TemplateEngine.EndToEndTestHarness/Program.cs @@ -43,7 +43,7 @@ private static int Main(string[] args) ITemplateEngineHost host = CreateHost(testAssetsRoot); host.VirtualizeDirectory(outputPath); - var command = NewCommandFactory.Create(CommandName, _ => host, _ => new TelemetryLogger(null), new NewCommandCallbacks()); + var command = NewCommandFactory.Create(CommandName, _ => host, _ => new TelemetryLogger(null)); int result = ParserFactory.CreateParser(command).Parse(passThroughArgs.ToArray()).Invoke(); diff --git a/src/Tests/dotnet-new.Tests/MSBuildEvaluationTests.cs b/src/Tests/dotnet-new.Tests/MSBuildEvaluationTests.cs index 2f1609d81afa..811f2b475260 100644 --- a/src/Tests/dotnet-new.Tests/MSBuildEvaluationTests.cs +++ b/src/Tests/dotnet-new.Tests/MSBuildEvaluationTests.cs @@ -6,10 +6,9 @@ using FluentAssertions; using Microsoft.NET.TestFramework; using Microsoft.NET.TestFramework.Commands; -using Xunit; using Xunit.Abstractions; using Microsoft.NET.TestFramework.Assertions; -using System.IO; +using Microsoft.DotNet.Cli.Utils; namespace Microsoft.DotNet.New.Tests { @@ -26,19 +25,23 @@ public void Class_BasicTest() TestDirectory tempSettingsDir = _testAssetsManager.CreateTestDirectory(); string templateLocation = GetTestTemplatePath("Item/ClassTemplate"); - var cmd = new DotnetCommand(Log).Execute("new", "install", templateLocation, "--debug:custom-hive", tempSettingsDir.Path); + CommandResult cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) + .Execute("install", templateLocation); cmd.Should().Pass(); - cmd = new DotnetCommand(Log) + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) .WithWorkingDirectory(tempDir.Path) - .Execute("new", "console", "--debug:custom-hive", tempSettingsDir.Path, "--name", "MyConsole"); + .Execute("console", "--name", "MyConsole"); cmd.Should().Pass(); string projectPath = Path.Combine(tempDir.Path, "MyConsole"); - cmd = new DotnetCommand(Log) + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) .WithWorkingDirectory(projectPath) - .Execute("new", "TestAssets.ClassTemplate", "--debug:custom-hive", tempSettingsDir.Path, "--debug:enable-project-context", "--name", "MyTestClass"); + .Execute("TestAssets.ClassTemplate", "--name", "MyTestClass"); cmd.Should().Pass(); string testFilePath = Path.Combine(projectPath, "MyTestClass.cs"); @@ -46,9 +49,9 @@ public void Class_BasicTest() Assert.True(File.Exists(testFilePath)); Assert.Contains("namespace MyConsole", File.ReadAllText(testFilePath)); - cmd = new DotnetCommand(Log) + cmd = new DotnetBuildCommand(Log) .WithWorkingDirectory(projectPath) - .Execute("build"); + .Execute(); cmd.Should().Pass(); } @@ -60,21 +63,25 @@ public void TestClass_BasicTest() TestDirectory tempSettingsDir = _testAssetsManager.CreateTestDirectory(); string templateLocation = GetTestTemplatePath("Item/TestClassTemplate"); - var cmd = new DotnetCommand(Log).Execute("new", "install", templateLocation, "--debug:custom-hive", tempSettingsDir.Path); + CommandResult cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) + .Execute("install", templateLocation); cmd.Should().Pass(); - cmd = new DotnetCommand(Log) + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) .WithWorkingDirectory(tempDir.Path) - .Execute("new", "xunit", "--debug:custom-hive", tempSettingsDir.Path, "--name", "MyTestProject"); + .Execute("xunit", "--name", "MyTestProject"); cmd.Should().Pass(); string projectPath = Path.Combine(tempDir.Path, "MyTestProject"); - cmd = new DotnetCommand(Log) + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) .WithWorkingDirectory(projectPath) .WithEnvironmentVariable("DOTNET_CLI_CONTEXT_VERBOSE", "true") - .Execute("new", "TestAssets.TestClassTemplate", "--debug:custom-hive", tempSettingsDir.Path, "--debug:enable-project-context", "--name", "MyTestClass"); + .Execute("TestAssets.TestClassTemplate", "--name", "MyTestClass"); cmd.Should().Pass(); string testFilePath = Path.Combine(projectPath, "MyTestClass.cs"); @@ -82,9 +89,9 @@ public void TestClass_BasicTest() Assert.True(File.Exists(testFilePath)); Assert.Contains("namespace MyTestProject", File.ReadAllText(testFilePath)); - cmd = new DotnetCommand(Log) + cmd = new DotnetBuildCommand(Log) .WithWorkingDirectory(projectPath) - .Execute("build"); + .Execute(); cmd.Should().Pass(); } @@ -96,26 +103,35 @@ public void ListFiltersOutRestrictedTemplates() TestDirectory tempSettingsDir = _testAssetsManager.CreateTestDirectory(); string templateLocation = GetTestTemplatePath("Item/TestClassTemplate"); - var cmd = new DotnetCommand(Log).Execute("new", "install", templateLocation, "--debug:custom-hive", tempSettingsDir.Path); + CommandResult cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) + .Execute("install", templateLocation); cmd.Should().Pass(); + templateLocation = GetTestTemplatePath("Item/ClassTemplate"); - cmd = new DotnetCommand(Log).Execute("new", "install", templateLocation, "--debug:custom-hive", tempSettingsDir.Path); + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) + .Execute("install", templateLocation); cmd.Should().Pass(); - cmd = new DotnetCommand(Log).Execute("new", "list", "--debug:enable-project-context", "--debug:custom-hive", tempSettingsDir.Path); + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) + .Execute("list"); cmd.Should().Pass(); cmd.StdOut.Should().NotContain("TestAssets.ClassTemplate").And.NotContain("TestAssets.TestClassTemplate"); - cmd = new DotnetCommand(Log) + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) .WithWorkingDirectory(tempDir.Path) - .Execute("new", "console", "--debug:custom-hive", tempSettingsDir.Path, "--name", "MyConsole"); + .Execute("console", "--name", "MyConsole"); cmd.Should().Pass(); string projectPath = Path.Combine(tempDir.Path, "MyConsole"); - cmd = new DotnetCommand(Log) + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) .WithWorkingDirectory(projectPath) - .Execute("new", "list", "--debug:enable-project-context", "--debug:custom-hive", tempSettingsDir.Path); + .Execute("list"); cmd.Should().Pass(); cmd.StdOut.Should().Contain("TestAssets.ClassTemplate").And.NotContain("TestAssets.TestClassTemplate"); } @@ -127,42 +143,48 @@ public void MultipleProjects_BasicTest() TestDirectory tempSettingsDir = _testAssetsManager.CreateTestDirectory(); string templateLocation = GetTestTemplatePath("Item/ClassTemplate"); - var cmd = new DotnetCommand(Log).Execute("new", "install", templateLocation, "--debug:custom-hive", tempSettingsDir.Path); + CommandResult cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) + .Execute("install", templateLocation); cmd.Should().Pass(); - cmd = new DotnetCommand(Log) + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) .WithWorkingDirectory(tempDir.Path) - .Execute("new", "console", "--debug:custom-hive", tempSettingsDir.Path, "--name", "MyProject"); + .Execute("console", "--name", "MyProject"); cmd.Should().Pass(); - cmd = new DotnetCommand(Log) + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) .WithWorkingDirectory(tempDir.Path) - .Execute("new", "classlib", "--debug:custom-hive", tempSettingsDir.Path, "--language", "F#", "--name", "MyProject"); + .Execute("classlib", "--language", "F#", "--name", "MyProject"); cmd.Should().Pass(); string projectPath = Path.Combine(tempDir.Path, "MyProject"); - cmd = new DotnetCommand(Log) + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) .WithWorkingDirectory(projectPath) - .Execute("new", "TestAssets.ClassTemplate", "--debug:custom-hive", tempSettingsDir.Path, "--debug:enable-project-context", "--name", "MyTestClass"); + .Execute("TestAssets.ClassTemplate", "--name", "MyTestClass"); cmd.Should().Fail() .And.HaveStdErrContaining("Failed to instatiate template 'ClassTemplate', the following constraints are not met:") .And.HaveStdErrContaining("Project capabiltities: Multiple projects found:") .And.HaveStdErrContaining("Specify the project to use using --project option."); - cmd = new DotnetCommand(Log) - .WithWorkingDirectory(projectPath) - .Execute("new", "TestAssets.ClassTemplate", "--debug:custom-hive", tempSettingsDir.Path, "--debug:enable-project-context", "--name", "MyTestClass", "--project", "MyProject.csproj"); + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) + .WithWorkingDirectory(projectPath) + .Execute("TestAssets.ClassTemplate", "--name", "MyTestClass", "--project", "MyProject.csproj"); cmd.Should().Pass(); - cmd = new DotnetCommand(Log) + cmd = new DotnetBuildCommand(Log) .WithWorkingDirectory(projectPath) - .Execute("build", "MyProject.csproj"); + .Execute("MyProject.csproj"); cmd.Should().Pass(); - cmd = new DotnetCommand(Log) + cmd = new DotnetBuildCommand(Log) .WithWorkingDirectory(projectPath) - .Execute("build", "MyProject.fsproj"); + .Execute("MyProject.fsproj"); cmd.Should().Pass(); } @@ -173,14 +195,17 @@ public void NonSDKStyleProject_BasicTest() TestDirectory tempSettingsDir = _testAssetsManager.CreateTestDirectory(); string templateLocation = GetTestTemplatePath("Item/ClassTemplate"); - var cmd = new DotnetCommand(Log).Execute("new", "install", templateLocation, "--debug:custom-hive", tempSettingsDir.Path); + CommandResult cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) + .Execute("install", templateLocation); cmd.Should().Pass(); string projectPath = Path.Combine(tempDir.Path, "ConsoleFullFramework"); DirectoryCopy(GetTestTemplatePath("ConsoleFullFramework"), projectPath); - cmd = new DotnetCommand(Log) + cmd = new DotnetNewCommand(Log) + .WithCustomHive(tempSettingsDir.Path) .WithWorkingDirectory(projectPath) - .Execute("new", "TestAssets.ClassTemplate", "--debug:custom-hive", tempSettingsDir.Path, "--debug:enable-project-context", "--name", "MyTestClass"); + .Execute("TestAssets.ClassTemplate", "--name", "MyTestClass"); cmd.Should().Fail() .And.HaveStdErrContaining("Failed to instatiate template 'ClassTemplate', the following constraints are not met:") .And.HaveStdErrContaining($"Project capabiltities: The project {Path.Combine(projectPath, "ConsoleFullFramework.csproj")} is not an SDK style project, and is not supported for evaluation."); @@ -198,7 +223,7 @@ private static string GetTestTemplatePath(string templateName) private static void DirectoryCopy(string sourceDirName, string destDirName) { // Get the subdirectories for the specified directory. - DirectoryInfo dir = new DirectoryInfo(sourceDirName); + DirectoryInfo dir = new(sourceDirName); if (!dir.Exists) { diff --git a/src/Tests/dotnet-workload-install.Tests/MockWorkloadManifestUpdater.cs b/src/Tests/dotnet-workload-install.Tests/MockWorkloadManifestUpdater.cs index 226fab2d1a66..72eb7c2c8b97 100644 --- a/src/Tests/dotnet-workload-install.Tests/MockWorkloadManifestUpdater.cs +++ b/src/Tests/dotnet-workload-install.Tests/MockWorkloadManifestUpdater.cs @@ -43,7 +43,7 @@ public Task UpdateAdvertisingManifestsAsync(bool includePreview, DirectoryPath? return _manifestUpdates; } - public Task> GetManifestPackageDownloadsAsync(bool includePreviews) + public Task> GetManifestPackageDownloadsAsync(bool includePreviews, SdkFeatureBand providedSdkFeatureBand, SdkFeatureBand installedSdkFeatureBand) { GetManifestPackageDownloadsCallCount++; return Task.FromResult>(new List() diff --git a/src/Tests/dotnet.Tests/ParserTests/MSBuildArgumentCommandLineParserTests.cs b/src/Tests/dotnet.Tests/ParserTests/MSBuildArgumentCommandLineParserTests.cs index 2ba24972fa82..90be35893665 100644 --- a/src/Tests/dotnet.Tests/ParserTests/MSBuildArgumentCommandLineParserTests.cs +++ b/src/Tests/dotnet.Tests/ParserTests/MSBuildArgumentCommandLineParserTests.cs @@ -49,6 +49,9 @@ public void MSBuildArgumentsAreForwardedCorrectly(string[] arguments, bool build [InlineData(new string[] { "-p:teamcity_buildConfName=\"Build, Test and Publish\"" }, new string[] { "--property:teamcity_buildConfName=\"Build, Test and Publish\"" })] [InlineData(new string[] { "-p:prop1=true", "-p:prop2=false" }, new string[] { "--property:prop1=true", "--property:prop2=false" })] [InlineData(new string[] { "-p:prop1=\".;/opt/usr\"" }, new string[] { "--property:prop1=\".%3B/opt/usr\"" })] + [InlineData(new string[] { "-p:prop1=true;prop2=false;prop3=\"wut\";prop4=\"1;2;3\"" }, new string[]{ "--property:prop1=true", "--property:prop2=false", "--property:prop3=\"wut\"", "--property:prop4=\"1%3B2%3B3\""})] + [InlineData(new string[] { "-p:prop4=\"1;2;3\"" }, new string[]{ "--property:prop4=\"1%3B2%3B3\""})] + [InlineData(new string[] { "-p:prop4=\"1 ;2 ;3 \"" }, new string[]{ "--property:prop4=\"1 %3B2 %3B3 \""})] public void Can_pass_msbuild_properties_safely(string[] tokens, string[] forwardedTokens) { var forwardingFunction = (CommonOptions.PropertiesOption as ForwardedOption).GetForwardingFunction(); var result = CommonOptions.PropertiesOption.Parse(tokens); diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/AddReferencePostActionTests.cs b/src/Tests/dotnet.Tests/dotnet-new/DotnetAddPostActionTests.cs similarity index 68% rename from src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/AddReferencePostActionTests.cs rename to src/Tests/dotnet.Tests/dotnet-new/DotnetAddPostActionTests.cs index 03e2180c314d..dd8a20048b63 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/AddReferencePostActionTests.cs +++ b/src/Tests/dotnet.Tests/dotnet-new/DotnetAddPostActionTests.cs @@ -1,21 +1,26 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#nullable enable + +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.DotNet.Tools.New.PostActionProcessors; using Microsoft.TemplateEngine.Abstractions; -using Microsoft.TemplateEngine.Cli.PostActionProcessors; using Microsoft.TemplateEngine.Mocks; using Microsoft.TemplateEngine.TestHelper; using Xunit; -namespace Microsoft.TemplateEngine.Cli.UnitTests +namespace Microsoft.DotNet.Cli.New.Tests { - public class AddReferencePostActionTests : IClassFixture + public class DotnetAddPostActionTests : IClassFixture { - private IEngineEnvironmentSettings _engineEnvironmentSettings; + private readonly IEngineEnvironmentSettings _engineEnvironmentSettings; - public AddReferencePostActionTests(EnvironmentSettingsHelper environmentSettingsHelper) + public DotnetAddPostActionTests(EnvironmentSettingsHelper environmentSettingsHelper) { - _engineEnvironmentSettings = environmentSettingsHelper.CreateEnvironment(hostIdentifier: this.GetType().Name, virtualize: true); + _engineEnvironmentSettings = environmentSettingsHelper.CreateEnvironment(hostIdentifier: GetType().Name, virtualize: true); } private static string TestCsprojFile @@ -39,10 +44,10 @@ public void AddRefFindsOneDefaultProjFileInOutputDirectory() string projFileFullPath = Path.Combine(targetBasePath, "MyApp.proj"); _engineEnvironmentSettings.Host.FileSystem.WriteAllText(projFileFullPath, TestCsprojFile); - AddReferencePostActionProcessor actionProcessor = new AddReferencePostActionProcessor(); + DotnetAddPostActionProcessor actionProcessor = new(); string outputBasePath = targetBasePath; - IReadOnlyList projFilesFound = actionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, new HashSet()); + IReadOnlyList projFilesFound = DotnetAddPostActionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, new HashSet()); Assert.Equal(1, projFilesFound.Count); } @@ -53,11 +58,11 @@ public void AddRefFindsOneNameConfiguredProjFileInOutputDirectory() string fooprojFileFullPath = Path.Combine(targetBasePath, "MyApp.fooproj"); _engineEnvironmentSettings.Host.FileSystem.WriteAllText(fooprojFileFullPath, TestCsprojFile); - AddReferencePostActionProcessor actionProcessor = new AddReferencePostActionProcessor(); + DotnetAddPostActionProcessor actionProcessor = new(); string outputBasePath = targetBasePath; - HashSet projectFileExtensions = new HashSet() { ".fooproj" }; - IReadOnlyList projFilesFound = actionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, projectFileExtensions); + HashSet projectFileExtensions = new() { ".fooproj" }; + IReadOnlyList projFilesFound = DotnetAddPostActionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, projectFileExtensions); Assert.Equal(1, projFilesFound.Count); } @@ -68,11 +73,11 @@ public void AddRefFindsOneNameConfiguredProjFileWhenMultipleExtensionsAreAllowed string fooprojFileFullPath = Path.Combine(targetBasePath, "MyApp.fooproj"); _engineEnvironmentSettings.Host.FileSystem.WriteAllText(fooprojFileFullPath, TestCsprojFile); - AddReferencePostActionProcessor actionProcessor = new AddReferencePostActionProcessor(); + DotnetAddPostActionProcessor actionProcessor = new(); string outputBasePath = targetBasePath; - HashSet projectFileExtensions = new HashSet() { ".fooproj", ".barproj" }; - IReadOnlyList projFilesFound = actionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, projectFileExtensions); + HashSet projectFileExtensions = new() { ".fooproj", ".barproj" }; + IReadOnlyList projFilesFound = DotnetAddPostActionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, projectFileExtensions); Assert.Equal(1, projFilesFound.Count); } @@ -92,11 +97,11 @@ public void AddRefIgnoresOtherProjectTypesWhenMultipleTypesAreAllowed() string fsprojFileFullPath = Path.Combine(targetBasePath, "MyApp.fsproj"); _engineEnvironmentSettings.Host.FileSystem.WriteAllText(fsprojFileFullPath, TestCsprojFile); - AddReferencePostActionProcessor actionProcessor = new AddReferencePostActionProcessor(); + DotnetAddPostActionProcessor actionProcessor = new(); string outputBasePath = targetBasePath; - HashSet projectFileExtensions = new HashSet() { ".bazproj", ".fsproj" }; - IReadOnlyList projFilesFound = actionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, projectFileExtensions); + HashSet projectFileExtensions = new() { ".bazproj", ".fsproj" }; + IReadOnlyList projFilesFound = DotnetAddPostActionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, projectFileExtensions); Assert.Equal(1, projFilesFound.Count); } @@ -110,8 +115,8 @@ public void AddRefFindsOneDefaultProjFileInAncestorOfOutputDirectory() string outputBasePath = Path.Combine(targetBasePath, "ChildDir", "GrandchildDir"); _engineEnvironmentSettings.Host.FileSystem.CreateDirectory(outputBasePath); - AddReferencePostActionProcessor actionProcessor = new AddReferencePostActionProcessor(); - IReadOnlyList projFilesFound = actionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, new HashSet()); + DotnetAddPostActionProcessor actionProcessor = new(); + IReadOnlyList projFilesFound = DotnetAddPostActionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, new HashSet()); Assert.Equal(1, projFilesFound.Count); } @@ -126,9 +131,9 @@ public void AddRefFindsMultipleDefaultProjFilesInOutputDirectory() string projFileFullPathTwo = Path.Combine(targetBasePath, "MyApp2.someproj"); _engineEnvironmentSettings.Host.FileSystem.WriteAllText(projFileFullPathTwo, projFilesOriginalContent); - AddReferencePostActionProcessor actionProcessor = new AddReferencePostActionProcessor(); + DotnetAddPostActionProcessor actionProcessor = new(); string outputBasePath = targetBasePath; - IReadOnlyList projFilesFound = actionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, new HashSet()); + IReadOnlyList projFilesFound = DotnetAddPostActionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, new HashSet()); Assert.Equal(2, projFilesFound.Count); } @@ -145,30 +150,28 @@ public void AddRefFindsMultipleDefaultProjFilesInAncestorOfOutputDirectory() string outputBasePath = Path.Combine(targetBasePath, "ChildDir", "GrandchildDir"); - AddReferencePostActionProcessor actionProcessor = new AddReferencePostActionProcessor(); - IReadOnlyList projFilesFound = actionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, new HashSet()); + DotnetAddPostActionProcessor actionProcessor = new(); + IReadOnlyList projFilesFound = DotnetAddPostActionProcessor.FindProjFileAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, outputBasePath, new HashSet()); Assert.Equal(2, projFilesFound.Count); } [Fact(DisplayName = nameof(AddRefCanHandleProjectFileRenames))] public void AddRefCanHandleProjectFileRenames() { - AddReferencePostActionProcessor actionProcessor = new AddReferencePostActionProcessor(); + var callback = new MockAddProjectReferenceCallback(); + DotnetAddPostActionProcessor actionProcessor = new(callback.AddPackageReference, callback.AddProjectReference); string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath(); string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj"); string referencedProjFileFullPath = Path.Combine(targetBasePath, "NewName.csproj"); var args = new Dictionary() { { "targetFiles", "[\"MyApp.csproj\"]" }, { "referenceType", "project" }, { "reference", "./OldName.csproj" } }; - var postAction = new MockPostAction { ActionId = AddReferencePostActionProcessor.ActionProcessorId, Args = args }; + var postAction = new MockPostAction { ActionId = DotnetAddPostActionProcessor.ActionProcessorId, Args = args }; - var creationEffects = new MockCreationEffects() + MockCreationEffects creationEffects = new MockCreationEffects() .WithFileChange(new MockFileChange("./OldName.csproj", "./NewName.csproj", ChangeKind.Create)) .WithFileChange(new MockFileChange("./MyApp.csproj", "./MyApp.csproj", ChangeKind.Create)); - var callback = new MockAddProjectReferenceCallback(); - actionProcessor.Callbacks = new NewCommandCallbacks { AddProjectReference = callback.AddProjectReference }; - actionProcessor.Process( _engineEnvironmentSettings, postAction, @@ -177,27 +180,25 @@ public void AddRefCanHandleProjectFileRenames() targetBasePath); Assert.Equal(projFileFullPath, callback.Target); - Assert.Equal(new [] { referencedProjFileFullPath }, callback.References); + Assert.Equal(referencedProjFileFullPath, callback.Reference); } [Fact(DisplayName = nameof(AddRefCanHandleProjectFilesWithoutRenames))] public void AddRefCanHandleProjectFilesWithoutRenames() { - AddReferencePostActionProcessor actionProcessor = new AddReferencePostActionProcessor(); + var callback = new MockAddProjectReferenceCallback(); + DotnetAddPostActionProcessor actionProcessor = new(callback.AddPackageReference, callback.AddProjectReference); string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath(); string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj"); string referencedProjFileFullPath = Path.Combine(targetBasePath, "Reference.csproj"); var args = new Dictionary() { { "targetFiles", "[\"MyApp.csproj\"]" }, { "referenceType", "project" }, { "reference", "./Reference.csproj" } }; - var postAction = new MockPostAction { ActionId = AddReferencePostActionProcessor.ActionProcessorId, Args = args }; + var postAction = new MockPostAction { ActionId = DotnetAddPostActionProcessor.ActionProcessorId, Args = args }; - var creationEffects = new MockCreationEffects() + MockCreationEffects creationEffects = new MockCreationEffects() .WithFileChange(new MockFileChange("./MyApp.csproj", "./MyApp.csproj", ChangeKind.Create)); - var callback = new MockAddProjectReferenceCallback(); - actionProcessor.Callbacks = new NewCommandCallbacks { AddProjectReference = callback.AddProjectReference }; - actionProcessor.Process( _engineEnvironmentSettings, postAction, @@ -206,26 +207,24 @@ public void AddRefCanHandleProjectFilesWithoutRenames() targetBasePath); Assert.Equal(projFileFullPath, callback.Target); - Assert.Equal(new[] { referencedProjFileFullPath }, callback.References); + Assert.Equal(referencedProjFileFullPath, callback.Reference); } [Fact(DisplayName = nameof(AddRefCanTargetASingleProjectWithAJsonArray))] public void AddRefCanTargetASingleProjectWithAJsonArray() { - AddReferencePostActionProcessor actionProcessor = new AddReferencePostActionProcessor(); + var callback = new MockAddProjectReferenceCallback(); + DotnetAddPostActionProcessor actionProcessor = new(callback.AddPackageReference, callback.AddProjectReference); string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath(); string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj"); var args = new Dictionary() { { "targetFiles", "[\"MyApp.csproj\"]" }, { "referenceType", "package" }, { "reference", "System.Net.Json" } }; - var postAction = new MockPostAction { ActionId = AddReferencePostActionProcessor.ActionProcessorId, Args = args }; + var postAction = new MockPostAction { ActionId = DotnetAddPostActionProcessor.ActionProcessorId, Args = args }; - var creationEffects = new MockCreationEffects() + MockCreationEffects creationEffects = new MockCreationEffects() .WithFileChange(new MockFileChange("./MyApp.csproj", "./MyApp.csproj", ChangeKind.Create)); - var callback = new MockAddProjectReferenceCallback(); - actionProcessor.Callbacks = new NewCommandCallbacks { AddPackageReference = callback.AddPackageReference }; - actionProcessor.Process( _engineEnvironmentSettings, postAction, @@ -234,25 +233,24 @@ public void AddRefCanTargetASingleProjectWithAJsonArray() targetBasePath); Assert.Equal(projFileFullPath, callback.Target); - Assert.Equal(new[] { "System.Net.Json" }, callback.References); + Assert.Equal("System.Net.Json", callback.Reference); } [Fact(DisplayName = nameof(AddRefCanTargetASingleProjectWithTheProjectName))] public void AddRefCanTargetASingleProjectWithTheProjectName() { - AddReferencePostActionProcessor actionProcessor = new AddReferencePostActionProcessor(); + var callback = new MockAddProjectReferenceCallback(); + DotnetAddPostActionProcessor actionProcessor = new(callback.AddPackageReference, callback.AddProjectReference); string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath(); string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj"); var args = new Dictionary() { { "targetFiles", "MyApp.csproj" }, { "referenceType", "package" }, { "reference", "System.Net.Json" } }; - var postAction = new MockPostAction { ActionId = AddReferencePostActionProcessor.ActionProcessorId, Args = args }; + var postAction = new MockPostAction { ActionId = DotnetAddPostActionProcessor.ActionProcessorId, Args = args }; - var creationEffects = new MockCreationEffects() + MockCreationEffects creationEffects = new MockCreationEffects() .WithFileChange(new MockFileChange("./MyApp.csproj", "./MyApp.csproj", ChangeKind.Create)); - var callback = new MockAddProjectReferenceCallback(); - actionProcessor.Callbacks = new NewCommandCallbacks { AddPackageReference = callback.AddPackageReference }; actionProcessor.Process( _engineEnvironmentSettings, @@ -262,27 +260,37 @@ public void AddRefCanTargetASingleProjectWithTheProjectName() targetBasePath); Assert.Equal(projFileFullPath, callback.Target); - Assert.Equal(new[] { "System.Net.Json" }, callback.References); + Assert.Equal("System.Net.Json", callback.Reference); } private class MockAddProjectReferenceCallback { public string? Target { get; private set; } - public IReadOnlyList? References { get; private set; } + public string? Reference { get; private set; } - public bool AddProjectReference(string target, IReadOnlyList references) + public bool AddProjectReference(string target, string reference) { - this.Target = target; - this.References = references; + if (Target != null) + { + throw new Exception($"{nameof(AddProjectReference)} is called more than once."); + } + + Target = target; + Reference = reference; return true; } public bool AddPackageReference(string target, string reference, string? version) { - this.Target = target; - this.References = new[] { reference }; + if (Target != null) + { + throw new Exception($"{nameof(AddPackageReference)} is called more than once."); + } + + Target = target; + Reference = reference; return true; } diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/DotnetRestorePostActionTests.cs b/src/Tests/dotnet.Tests/dotnet-new/DotnetRestorePostActionTests.cs similarity index 80% rename from src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/DotnetRestorePostActionTests.cs rename to src/Tests/dotnet.Tests/dotnet-new/DotnetRestorePostActionTests.cs index 7959de34b06c..cd1ce153e758 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/DotnetRestorePostActionTests.cs +++ b/src/Tests/dotnet.Tests/dotnet-new/DotnetRestorePostActionTests.cs @@ -1,26 +1,32 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#nullable enable + +using System.Collections.Generic; +using System.IO; +using Microsoft.DotNet.Tools.New.PostActionProcessors; using Microsoft.TemplateEngine.Abstractions; -using Microsoft.TemplateEngine.Cli.PostActionProcessors; using Microsoft.TemplateEngine.Mocks; using Microsoft.TemplateEngine.TestHelper; +using Xunit; -namespace Microsoft.TemplateEngine.Cli.UnitTests +namespace Microsoft.DotNet.Cli.New.Tests { public class DotnetRestorePostActionTests : IClassFixture { - private IEngineEnvironmentSettings _engineEnvironmentSettings; + private readonly IEngineEnvironmentSettings _engineEnvironmentSettings; public DotnetRestorePostActionTests(EnvironmentSettingsHelper environmentSettingsHelper) { - _engineEnvironmentSettings = environmentSettingsHelper.CreateEnvironment(hostIdentifier: this.GetType().Name, virtualize: true); + _engineEnvironmentSettings = environmentSettingsHelper.CreateEnvironment(hostIdentifier: GetType().Name, virtualize: true); } [Fact(DisplayName = nameof(DotnetRestoreCanTargetASingleProjectWithAJsonArray))] public void DotnetRestoreCanTargetASingleProjectWithAJsonArray() { - DotnetRestorePostActionProcessor actionProcessor = new DotnetRestorePostActionProcessor(); + var callback = new MockDotnetRestoreCallback(); + DotnetRestorePostActionProcessor actionProcessor = new(callback.RestoreProject); string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath(); string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj"); @@ -28,12 +34,9 @@ public void DotnetRestoreCanTargetASingleProjectWithAJsonArray() var args = new Dictionary() { { "files", "[\"MyApp.csproj\"]" } }; var postAction = new MockPostAction { ActionId = actionProcessor.Id, Args = args }; - var creationEffects = new MockCreationEffects() + MockCreationEffects creationEffects = new MockCreationEffects() .WithFileChange(new MockFileChange("./MyApp.csproj", "./MyApp.csproj", ChangeKind.Create)); - var callback = new MockDotnetRestoreCallback(); - actionProcessor.Callbacks = new NewCommandCallbacks { RestoreProject = callback.RestoreProject }; - actionProcessor.Process( _engineEnvironmentSettings, postAction, @@ -47,7 +50,8 @@ public void DotnetRestoreCanTargetASingleProjectWithAJsonArray() [Fact(DisplayName = nameof(DotnetRestoreCanTargetASingleProjectWithTheProjectName))] public void DotnetRestoreCanTargetASingleProjectWithTheProjectName() { - DotnetRestorePostActionProcessor actionProcessor = new DotnetRestorePostActionProcessor(); + var callback = new MockDotnetRestoreCallback(); + DotnetRestorePostActionProcessor actionProcessor = new(callback.RestoreProject); string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath(); string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj"); @@ -55,12 +59,9 @@ public void DotnetRestoreCanTargetASingleProjectWithTheProjectName() var args = new Dictionary() { { "files", "MyApp.csproj" } }; var postAction = new MockPostAction { ActionId = actionProcessor.Id, Args = args }; - var creationEffects = new MockCreationEffects() + MockCreationEffects creationEffects = new MockCreationEffects() .WithFileChange(new MockFileChange("./MyApp.csproj", "./MyApp.csproj", ChangeKind.Create)); - var callback = new MockDotnetRestoreCallback(); - actionProcessor.Callbacks = new NewCommandCallbacks { RestoreProject = callback.RestoreProject }; - actionProcessor.Process( _engineEnvironmentSettings, postAction, @@ -77,8 +78,7 @@ private class MockDotnetRestoreCallback public bool RestoreProject(string target) { - this.Target = target; - + Target = target; return true; } } diff --git a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/AddProjectsToSolutionPostActionTests.cs b/src/Tests/dotnet.Tests/dotnet-new/DotnetSlnPostActionTests.cs similarity index 77% rename from src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/AddProjectsToSolutionPostActionTests.cs rename to src/Tests/dotnet.Tests/dotnet-new/DotnetSlnPostActionTests.cs index 4f6040b00df8..a360eedf7611 100644 --- a/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/AddProjectsToSolutionPostActionTests.cs +++ b/src/Tests/dotnet.Tests/dotnet-new/DotnetSlnPostActionTests.cs @@ -1,21 +1,26 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#nullable enable + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.DotNet.Tools.New.PostActionProcessors; using Microsoft.TemplateEngine.Abstractions; -using Microsoft.TemplateEngine.Cli.PostActionProcessors; using Microsoft.TemplateEngine.Mocks; using Microsoft.TemplateEngine.TestHelper; using Xunit; -namespace Microsoft.TemplateEngine.Cli.UnitTests +namespace Microsoft.DotNet.Cli.New.Tests { - public class AddProjectsToSolutionPostActionTests : IClassFixture + public class DotnetSlnPostActionTests : IClassFixture { - private IEngineEnvironmentSettings _engineEnvironmentSettings; + private readonly IEngineEnvironmentSettings _engineEnvironmentSettings; - public AddProjectsToSolutionPostActionTests(EnvironmentSettingsHelper environmentSettingsHelper) + public DotnetSlnPostActionTests(EnvironmentSettingsHelper environmentSettingsHelper) { - _engineEnvironmentSettings = environmentSettingsHelper.CreateEnvironment(hostIdentifier: this.GetType().Name, virtualize: true); + _engineEnvironmentSettings = environmentSettingsHelper.CreateEnvironment(hostIdentifier: GetType().Name, virtualize: true); } [Fact(DisplayName = nameof(AddProjectToSolutionPostActionFindSolutionFileAtOutputPath))] @@ -25,7 +30,7 @@ public void AddProjectToSolutionPostActionFindSolutionFileAtOutputPath() string solutionFileFullPath = Path.Combine(targetBasePath, "MySln.sln"); _engineEnvironmentSettings.Host.FileSystem.WriteAllText(solutionFileFullPath, string.Empty); - IReadOnlyList solutionFiles = AddProjectsToSolutionPostAction.FindSolutionFilesAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, targetBasePath); + IReadOnlyList solutionFiles = DotnetSlnPostActionProcessor.FindSolutionFilesAtOrAbovePath(_engineEnvironmentSettings.Host.FileSystem, targetBasePath); Assert.Equal(1, solutionFiles.Count); Assert.Equal(solutionFileFullPath, solutionFiles[0]); } @@ -36,7 +41,7 @@ public void AddProjectToSolutionPostActionFindsOneProjectToAdd() string outputBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings); IPostAction postAction = new MockPostAction() { - ActionId = AddProjectsToSolutionPostAction.ActionProcessorId, + ActionId = DotnetSlnPostActionProcessor.ActionProcessorId, Args = new Dictionary() { { "primaryOutputIndexes", "0" } @@ -45,7 +50,7 @@ public void AddProjectToSolutionPostActionFindsOneProjectToAdd() ICreationResult creationResult = new MockCreationResult(primaryOutputs: new[] { new MockCreationPath(Path.GetFullPath("outputProj1.csproj")) }); - Assert.True(AddProjectsToSolutionPostAction.TryGetProjectFilesToAdd( postAction, creationResult, outputBasePath, out IReadOnlyList? foundProjectFiles)); + Assert.True(DotnetSlnPostActionProcessor.TryGetProjectFilesToAdd( postAction, creationResult, outputBasePath, out IReadOnlyList? foundProjectFiles)); Assert.Equal(1, foundProjectFiles?.Count); Assert.Equal(creationResult.PrimaryOutputs[0].Path, foundProjectFiles?[0]); } @@ -56,7 +61,7 @@ public void AddProjectToSolutionPostActionFindsMultipleProjectsToAdd() string outputBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings); IPostAction postAction = new MockPostAction() { - ActionId = AddProjectsToSolutionPostAction.ActionProcessorId, + ActionId = DotnetSlnPostActionProcessor.ActionProcessorId, Args = new Dictionary() { { "primaryOutputIndexes", "0; 2" } @@ -71,7 +76,7 @@ public void AddProjectToSolutionPostActionFindsMultipleProjectsToAdd() new MockCreationPath(Path.GetFullPath("outputProj2.csproj")) }); - Assert.True(AddProjectsToSolutionPostAction.TryGetProjectFilesToAdd( postAction, creationResult, outputBasePath, out IReadOnlyList? foundProjectFiles)); + Assert.True(DotnetSlnPostActionProcessor.TryGetProjectFilesToAdd( postAction, creationResult, outputBasePath, out IReadOnlyList? foundProjectFiles)); Assert.Equal(2, foundProjectFiles?.Count); Assert.Contains(creationResult.PrimaryOutputs[0].Path, foundProjectFiles?.ToList()); Assert.Contains(creationResult.PrimaryOutputs[2].Path, foundProjectFiles?.ToList()); @@ -84,7 +89,7 @@ public void AddProjectToSolutionPostActionDoesntFindProjectOutOfRange() { IPostAction postAction = new MockPostAction() { - ActionId = AddProjectsToSolutionPostAction.ActionProcessorId, + ActionId = DotnetSlnPostActionProcessor.ActionProcessorId, Args = new Dictionary() { { "primaryOutputIndexes", "1" } @@ -93,7 +98,7 @@ public void AddProjectToSolutionPostActionDoesntFindProjectOutOfRange() ICreationResult creationResult = new MockCreationResult(primaryOutputs: new[] { new MockCreationPath("outputProj1.csproj") }); - Assert.False(AddProjectsToSolutionPostAction.TryGetProjectFilesToAdd( postAction, creationResult, string.Empty, out IReadOnlyList? foundProjectFiles)); + Assert.False(DotnetSlnPostActionProcessor.TryGetProjectFilesToAdd( postAction, creationResult, string.Empty, out IReadOnlyList? foundProjectFiles)); Assert.Null(foundProjectFiles); } @@ -104,7 +109,7 @@ public void AddProjectToSolutionPostActionFindsMultipleProjectsToAddWithOutputBa IPostAction postAction = new MockPostAction() { - ActionId = AddProjectsToSolutionPostAction.ActionProcessorId, + ActionId = DotnetSlnPostActionProcessor.ActionProcessorId, Args = new Dictionary() { { "primaryOutputIndexes", "0; 2" } @@ -122,7 +127,7 @@ public void AddProjectToSolutionPostActionFindsMultipleProjectsToAddWithOutputBa string dontFindMeFullPath1 = Path.Combine(outputBasePath, creationResult.PrimaryOutputs[1].Path); string outputFileFullPath2 = Path.Combine(outputBasePath, creationResult.PrimaryOutputs[2].Path); - Assert.True(AddProjectsToSolutionPostAction.TryGetProjectFilesToAdd( postAction, creationResult, outputBasePath, out IReadOnlyList? foundProjectFiles)); + Assert.True(DotnetSlnPostActionProcessor.TryGetProjectFilesToAdd( postAction, creationResult, outputBasePath, out IReadOnlyList? foundProjectFiles)); Assert.Equal(2, foundProjectFiles?.Count); Assert.Contains(outputFileFullPath0, foundProjectFiles?.ToList()); Assert.Contains(outputFileFullPath2, foundProjectFiles?.ToList()); @@ -137,7 +142,7 @@ public void AddProjectToSolutionPostActionWithoutPrimaryOutputIndexesWithOutputB IPostAction postAction = new MockPostAction() { - ActionId = AddProjectsToSolutionPostAction.ActionProcessorId, + ActionId = DotnetSlnPostActionProcessor.ActionProcessorId, Args = new Dictionary() }; @@ -150,7 +155,7 @@ public void AddProjectToSolutionPostActionWithoutPrimaryOutputIndexesWithOutputB string outputFileFullPath0 = Path.Combine(outputBasePath, creationResult.PrimaryOutputs[0].Path); string outputFileFullPath1 = Path.Combine(outputBasePath, creationResult.PrimaryOutputs[1].Path); - Assert.True(AddProjectsToSolutionPostAction.TryGetProjectFilesToAdd( postAction, creationResult, outputBasePath, out IReadOnlyList? foundProjectFiles)); + Assert.True(DotnetSlnPostActionProcessor.TryGetProjectFilesToAdd( postAction, creationResult, outputBasePath, out IReadOnlyList? foundProjectFiles)); Assert.Equal(2, foundProjectFiles?.Count); Assert.Contains(outputFileFullPath0, foundProjectFiles?.ToList()); Assert.Contains(outputFileFullPath1, foundProjectFiles?.ToList()); @@ -159,7 +164,8 @@ public void AddProjectToSolutionPostActionWithoutPrimaryOutputIndexesWithOutputB [Fact(DisplayName = nameof(AddProjectToSolutionCanTargetASingleProjectWithAJsonArray))] public void AddProjectToSolutionCanTargetASingleProjectWithAJsonArray() { - var actionProcessor = new AddProjectsToSolutionPostAction(); + var callback = new MockAddProjectToSolutionCallback(); + var actionProcessor = new DotnetSlnPostActionProcessor(callback.AddProjectToSolution); string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath(); string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln"); @@ -168,14 +174,11 @@ public void AddProjectToSolutionCanTargetASingleProjectWithAJsonArray() _engineEnvironmentSettings.Host.FileSystem.WriteAllText(slnFileFullPath, ""); var args = new Dictionary() { { "projectFiles", "[\"MyApp.csproj\"]" } }; - var postAction = new MockPostAction { ActionId = AddProjectsToSolutionPostAction.ActionProcessorId, Args = args }; + var postAction = new MockPostAction { ActionId = DotnetSlnPostActionProcessor.ActionProcessorId, Args = args }; - var creationEffects = new MockCreationEffects() + MockCreationEffects creationEffects = new MockCreationEffects() .WithFileChange(new MockFileChange("./MyApp.csproj", "./MyApp.csproj", ChangeKind.Create)); - var callback = new MockAddProjectToSolutionCallback(); - actionProcessor.Callbacks = new NewCommandCallbacks { AddProjectsToSolution = callback.AddProjectToSolution }; - actionProcessor.Process( _engineEnvironmentSettings, postAction, @@ -190,7 +193,8 @@ public void AddProjectToSolutionCanTargetASingleProjectWithAJsonArray() [Fact(DisplayName = nameof(AddProjectToSolutionCanTargetASingleProjectWithTheProjectName))] public void AddProjectToSolutionCanTargetASingleProjectWithTheProjectName() { - var actionProcessor = new AddProjectsToSolutionPostAction(); + var callback = new MockAddProjectToSolutionCallback(); + var actionProcessor = new DotnetSlnPostActionProcessor(callback.AddProjectToSolution); string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath(); string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln"); @@ -199,14 +203,11 @@ public void AddProjectToSolutionCanTargetASingleProjectWithTheProjectName() _engineEnvironmentSettings.Host.FileSystem.WriteAllText(slnFileFullPath, ""); var args = new Dictionary() { { "projectFiles", "MyApp.csproj" } }; - var postAction = new MockPostAction { ActionId = AddProjectsToSolutionPostAction.ActionProcessorId, Args = args }; + var postAction = new MockPostAction { ActionId = DotnetSlnPostActionProcessor.ActionProcessorId, Args = args }; - var creationEffects = new MockCreationEffects() + MockCreationEffects creationEffects = new MockCreationEffects() .WithFileChange(new MockFileChange("./MyApp.csproj", "./MyApp.csproj", ChangeKind.Create)); - var callback = new MockAddProjectToSolutionCallback(); - actionProcessor.Callbacks = new NewCommandCallbacks { AddProjectsToSolution = callback.AddProjectToSolution }; - actionProcessor.Process( _engineEnvironmentSettings, postAction, @@ -226,8 +227,8 @@ private class MockAddProjectToSolutionCallback public bool AddProjectToSolution(string solution, IReadOnlyList projects, string? targetFolder) { - this.Solution = solution; - this.Projects = projects; + Solution = solution; + Projects = projects; return true; } diff --git a/src/Tests/dotnet.Tests/dotnet.Tests.csproj b/src/Tests/dotnet.Tests/dotnet.Tests.csproj index 753fd2b40a77..ecdb6aaffab7 100644 --- a/src/Tests/dotnet.Tests/dotnet.Tests.csproj +++ b/src/Tests/dotnet.Tests/dotnet.Tests.csproj @@ -155,12 +155,14 @@ + + diff --git a/src/WebSdk/Publish/Tasks/Microsoft.NET.Sdk.Publish.Tasks.csproj b/src/WebSdk/Publish/Tasks/Microsoft.NET.Sdk.Publish.Tasks.csproj index 7946ba4deaf8..bfd3e00a8afd 100644 --- a/src/WebSdk/Publish/Tasks/Microsoft.NET.Sdk.Publish.Tasks.csproj +++ b/src/WebSdk/Publish/Tasks/Microsoft.NET.Sdk.Publish.Tasks.csproj @@ -48,7 +48,10 @@ True Resources.resx - + + + + true targets diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.cs.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.cs.xlf index 10ca885d6fac..a0d7ec850b12 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.cs.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.cs.xlf @@ -1165,12 +1165,12 @@ Podrobné informace o chybě: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - Pokus o publikování souboru ZIP prostřednictvím {0} se nezdařil se stavovým kódem HTTP{1}.%0 + Pokus o publikování souboru ZIP prostřednictvím {0} se nezdařil se stavovým kódem HTTP{1}.%0 {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + Pokus o publikování souboru ZIP prostřednictvím {0} se nezdařil se stavovým kódem HTTP{1}. Projděte si protokoly na {2}. {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.de.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.de.xlf index e898e77fc68a..30ac55421055 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.de.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.de.xlf @@ -1165,12 +1165,12 @@ Fehlerdetails: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - Der Versuch, die ZIP-Datei über „{0}“ zu veröffentlichen, ist mit HTTP-Statuscode „{1}“ fehlgeschlagen. + Der Versuch, die ZIP-Datei über „{0}“ zu veröffentlichen, ist mit HTTP-Statuscode „{1}“ fehlgeschlagen. {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + Der Versuch, die ZIP-Datei über „{0}“ zu veröffentlichen, ist mit HTTP-Statuscode „{1}“ fehlgeschlagen. Weitere Informationen finden Sie in den Protokollen unter „{2}“. {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.es.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.es.xlf index ba2f7cd060eb..273ccf4478d5 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.es.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.es.xlf @@ -1165,12 +1165,12 @@ Detalles del error: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - Error al intentar publicar el archivo ZIP a través de "{0}" con el código de estado HTTP "{1}". + Error al intentar publicar el archivo ZIP a través de "{0}" con el código de estado HTTP "{1}". {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + Error al intentar publicar el archivo ZIP a través de "{0}" con el código de estado HTTP "{1}". Consulte los registros en "{2}". {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.fr.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.fr.xlf index ccb8f32e728e..474215104337 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.fr.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.fr.xlf @@ -1165,12 +1165,12 @@ Détails de l'erreur : The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - La tentative de publication du fichier ZIP via '{0}' a échoué avec le code d'état HTTP '{1}'. + La tentative de publication du fichier ZIP via '{0}' a échoué avec le code d'état HTTP '{1}'. {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + La tentative de publication du fichier ZIP via '{0}' a échoué avec le code d'état HTTP '{1}'. Voir les journaux à '{2}'. {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.it.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.it.xlf index 61f9cf2f931e..80525ff3cd19 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.it.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.it.xlf @@ -1165,12 +1165,12 @@ Dettagli errore: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - Il tentativo di pubblicazione del file ZIP tramite '{0}' non è riuscito. Codice di stato HTTP restituito: '{1}'. + Il tentativo di pubblicazione del file ZIP tramite '{0}' non è riuscito. Codice di stato HTTP restituito: '{1}'. {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + Il tentativo di pubblicazione del file ZIP tramite '{0}' non è riuscito. Codice di stato HTTP restituito: '{1}'. Vedere i log in '{2}'. {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ja.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ja.xlf index 8dc835081de1..9e6a31245659 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ja.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ja.xlf @@ -1165,12 +1165,12 @@ Error details: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - '{0}' 経由で ZIP ファイルを公開しようとしましたが、HTTP 状態コード '{1}' で失敗しました。 + '{0}' 経由で ZIP ファイルを公開しようとしましたが、HTTP 状態コード '{1}' で失敗しました。 {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + '{0}' 経由で ZIP ファイルを公開しようとしましたが、HTTP 状態コード '{1}' で失敗しました。'{2}' のログを参照してください。 {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ko.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ko.xlf index bf4f5dbafefb..69c0f3f458fc 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ko.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ko.xlf @@ -1162,12 +1162,12 @@ Error details: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. + '{0}'을(를) 통해 ZIP 파일을 게시하려는 시도가 HTTP 상태 코드 '{1}'과(와) 함께 실패했습니다. {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + '{0}'을(를) 통해 ZIP 파일을 게시하려는 시도가 HTTP 상태 코드 '{1}'과(와) 함께 실패했습니다. '{2}'에서 로그를 참조하세요. {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.pl.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.pl.xlf index 109ad2496a31..12bb60fd137b 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.pl.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.pl.xlf @@ -1165,12 +1165,12 @@ Szczegóły błędu: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - Próba opublikowania pliku ZIP za pomocą adresu URL „{0}” nie powiodła się. Kod stanu HTTP: „{1}”. + Próba opublikowania pliku ZIP za pomocą adresu URL „{0}” nie powiodła się. Kod stanu HTTP: „{1}”. {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + Próba opublikowania pliku ZIP za pomocą polecenia „{0}” nie powiodła się. Kod stanu HTTP: „{1}”. Zobacz dzienniki pod adresem „{2}”. {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.pt-BR.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.pt-BR.xlf index 220f386e5e51..5dfc66eebbb8 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.pt-BR.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.pt-BR.xlf @@ -1165,12 +1165,12 @@ Detalhes do erro: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - A tentativa de publicar o arquivo ZIP por meio de '{0}' falhou com o código de status HTTP '{1}'. + A tentativa de publicar o arquivo ZIP por meio de '{0}' falhou com o código de status HTTP '{1}'. {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + A tentativa de publicar o arquivo ZIP por meio de '{0}' falhou com o código de status HTTP '{1}'. Veja os registros em '{2}'. {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ru.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ru.xlf index be1d4a53512e..e839b3a1965f 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ru.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.ru.xlf @@ -1165,12 +1165,12 @@ Error details: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - Попытка публикации ZIP-файла по адресу "{0}" завершилась сбоем с кодом состояния HTTP "{1}". + Попытка публикации ZIP-файла по адресу "{0}" завершилась сбоем с кодом состояния HTTP "{1}". {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + Попытка публикации ZIP-файла по адресу "{0}" завершилась сбоем с кодом состояния HTTP "{1}". Просмотрите журналы по адресу "{2}". {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.tr.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.tr.xlf index 5af87d78f7ae..a5fdc7161c84 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.tr.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.tr.xlf @@ -1165,12 +1165,12 @@ Hata ayrıntıları: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - ZIP dosyasını '{0}' aracılığıyla yayımlama girişimi '{1}' HTTP durum koduyla başarısız oldu. + ZIP dosyasını '{0}' aracılığıyla yayımlama girişimi '{1}' HTTP durum koduyla başarısız oldu. {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + ZIP dosyasını {0} aracılığıyla yayımlama girişimi {1} HTTP durum koduyla başarısız oldu. '{2}' konumundaki günlüklere bakın. {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.zh-Hans.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.zh-Hans.xlf index 25e6cc1b2652..42b9ab03d9b5 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.zh-Hans.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.zh-Hans.xlf @@ -1165,12 +1165,12 @@ Error details: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - 尝试通过“{0}”发布 ZIP 文件失败,HTTP 状态代码为“{1}”。 + 尝试通过“{0}”发布 ZIP 文件失败,HTTP 状态代码为“{1}”。 {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + 尝试通过“{0}”发布 ZIP 文件失败,HTTP 状态代码为“{1}”。请参阅位于“{2}”的日志。 {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.zh-Hant.xlf b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.zh-Hant.xlf index f7ae58347f92..db5b2441de84 100644 --- a/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.zh-Hant.xlf +++ b/src/WebSdk/Publish/Tasks/Properties/xlf/Resources.zh-Hant.xlf @@ -1165,12 +1165,12 @@ Error details: The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. - 嘗試透過 ‘{0}’ 發佈 ZIP 檔案失敗,出現 HTTP 狀態碼 ‘{1}’。 + 嘗試透過 ‘{0}’ 發佈 ZIP 檔案失敗,出現 HTTP 狀態碼 ‘{1}’。 {0} - URL to deploy zip, {1} - HTTP response code The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. - The attempt to publish the ZIP file through '{0}' failed with HTTP status code '{1}'. See the logs at '{2}'. + 嘗試透過 ‘{0}’ 發佈 ZIP 檔案失敗,出現 HTTP 狀態碼 ‘{1}’。請參閱 ‘{2}’ 上的紀錄。 {0} - URL to deploy zip, {1} - HTTP response code, {2} - Logs URL diff --git a/src/WebSdk/Publish/Tasks/WebConfigTelemetry.cs b/src/WebSdk/Publish/Tasks/WebConfigTelemetry.cs index e485e0547c8b..45cd901e3150 100644 --- a/src/WebSdk/Publish/Tasks/WebConfigTelemetry.cs +++ b/src/WebSdk/Publish/Tasks/WebConfigTelemetry.cs @@ -3,12 +3,12 @@ using System.IO; using System.Text.RegularExpressions; using System.Xml.Linq; +using Microsoft.DotNet.Cli; namespace Microsoft.NET.Sdk.Publish.Tasks { public class WebConfigTelemetry { - private const string TelemetryOptout = "DOTNET_CLI_TELEMETRY_OPTOUT"; // An example of a project line looks like this: // Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{05A5AD00-71B5-4612-AF2F-9EA9121C4111}" private static readonly Lazy s_crackProjectLine = new Lazy( @@ -31,7 +31,7 @@ public static XDocument AddTelemetry(XDocument webConfig, string projectGuid, bo { try { - bool isCLIOptOutEnabled = EnvironmentHelper.GetEnvironmentVariableAsBool(TelemetryOptout); + bool isCLIOptOutEnabled = EnvironmentHelper.GetEnvironmentVariableAsBool(EnvironmentVariableNames.TELEMETRY_OPTOUT, defaultValue: CompileOptions.TelemetryOptOutDefault); if (string.IsNullOrEmpty(projectGuid) && !ignoreProjectGuid && !isCLIOptOutEnabled) { projectGuid = GetProjectGuidFromSolutionFile(solutionFileFullPath, projectFileFullPath); diff --git a/src/WebSdk/Worker/Targets/Microsoft.NET.Sdk.Worker.targets b/src/WebSdk/Worker/Targets/Microsoft.NET.Sdk.Worker.targets index 8816f8d7b1d8..31ec4ba45f0a 100644 --- a/src/WebSdk/Worker/Targets/Microsoft.NET.Sdk.Worker.targets +++ b/src/WebSdk/Worker/Targets/Microsoft.NET.Sdk.Worker.targets @@ -14,8 +14,12 @@ Copyright (c) .NET Foundation. All rights reserved. true $(MSBuildProjectDirectory) + $(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed.Worker\ + + @@ -23,6 +27,7 @@ Copyright (c) .NET Foundation. All rights reserved. + diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/Microsoft.DotNet.Common.ItemTemplates.csproj b/template_feed/Microsoft.DotNet.Common.ItemTemplates/Microsoft.DotNet.Common.ItemTemplates.csproj index 796b826ba394..6daeb9c2efe1 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/Microsoft.DotNet.Common.ItemTemplates.csproj +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/Microsoft.DotNet.Common.ItemTemplates.csproj @@ -8,6 +8,8 @@ False true true + true + true $(NoWarn);2008;NU5105 true Microsoft.DotNet.Common.ItemTemplates diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Gitignore/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Gitignore/.template.config/localize/templatestrings.ru.json index 30ca3f155a39..f21a152563b8 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Gitignore/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Gitignore/.template.config/localize/templatestrings.ru.json @@ -1,5 +1,5 @@ { - "author": "Microsoft", + "author": "Майкрософт", "name": "файл gitignore dotnet", "description": "Создает файл gitignore для проекта dotnet." } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ru.json index eeaf5584d14a..438e9d733b29 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ru.json @@ -1,5 +1,5 @@ { - "author": "Microsoft", + "author": "Майкрософт", "name": "Файл global.json", "description": "Файл для выбора версии пакета SDK для .NET.", "symbols/SdkVersion/description": "Используемая версия пакета SDK для .NET.", diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ru.json index 13f6a372a9a9..97c939fbc9c8 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/Nuget/.template.config/localize/templatestrings.ru.json @@ -1,5 +1,5 @@ { - "author": "Microsoft", + "author": "Майкрософт", "name": "Конфигурация NuGet", "description": "Файл для настройки расположений, в которых NuGet будет искать пакеты", "postActions/open-file/description": "Открывает файл nuget.config в редакторе" diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/ToolManifest/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/ToolManifest/.template.config/localize/templatestrings.ru.json index 5555174b70c5..6c3c6284a7c5 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/ToolManifest/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/ToolManifest/.template.config/localize/templatestrings.ru.json @@ -1,5 +1,5 @@ { - "author": "Microsoft", + "author": "Майкрософт", "name": "Файл манифеста локального инструмента dotnet", "description": "Файл, определяющий доступные инструменты dotnet." } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/WebConfig/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/WebConfig/.template.config/localize/templatestrings.ru.json index 8a5beab6f646..ab5213cb72be 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/WebConfig/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/WebConfig/.template.config/localize/templatestrings.ru.json @@ -1,5 +1,5 @@ { - "author": "Microsoft", + "author": "Майкрософт", "name": "Веб-конфигурация", "description": "Файл, используемый для настройки параметров веб-приложения", "postActions/open-file/description": "Открывает файл web.config в редакторе" diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/Microsoft.DotNet.Common.ProjectTemplates.7.0.csproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/Microsoft.DotNet.Common.ProjectTemplates.7.0.csproj index de70f7451484..b43ade3c4d28 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/Microsoft.DotNet.Common.ProjectTemplates.7.0.csproj +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/Microsoft.DotNet.Common.ProjectTemplates.7.0.csproj @@ -8,6 +8,8 @@ False true true + true + true 2008;NU5105 true Microsoft.DotNet.Common.ProjectTemplates.7.0 diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.de.json index 467f69a6c567..92d581f6a8ab 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.de.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.de.json @@ -12,11 +12,11 @@ "symbols/Framework/choices/netstandard2.0/description": "Auf „netstandard2.0“ abzielen", "symbols/Framework/choices/netstandard2.0/displayName": ".NET Standard 2.0", "symbols/Framework/displayName": "Framework", - "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/description": "Legt die „LangVersion“-Eigenschaft in der erstellten Projektdatei fest", "symbols/langVersion/displayName": "Sprachversion", "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", "symbols/skipRestore/displayName": "Wiederherstellung überspringen", - "postActions/restore/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restore/description": "„NuGet-Pakete“ wiederherstellen, die für dieses Projekt erforderlich sind.", "postActions/restore/manualInstructions/default/text": "„dotnet restore“ ausführen", "postActions/open-file/description": "Öffnet „Class1.cs“ im Editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.fr.json index 9f96f687dbf7..d8a9d2da31d0 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.fr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.fr.json @@ -3,7 +3,7 @@ "name": "Bibliothèque de classe", "description": "Projet de création d'une bibliothèque de classes ciblant .NET ou .NET Standard", "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", - "symbols/TargetFrameworkOverride/displayName": "Remplacement de l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du frame cible", "symbols/Framework/description": "Framework cible du projet.", "symbols/Framework/choices/net7.0/description": "Cible net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.ja.json index 62847364e1f3..d710fc15a14d 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.ja.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.ja.json @@ -2,7 +2,7 @@ "author": "Microsoft", "name": "クラス ライブラリ", "description": ".NET または .NET Standard を対象とするクラス ライブラリを作成するためのプロジェクト", - "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドする", "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", "symbols/Framework/choices/net7.0/description": "ターゲット net7.0", @@ -12,11 +12,11 @@ "symbols/Framework/choices/netstandard2.0/description": "ターゲット netstandard2.0", "symbols/Framework/choices/netstandard2.0/displayName": ".NET Standard 2.0", "symbols/Framework/displayName": "フレームワーク", - "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定する", "symbols/langVersion/displayName": "言語バージョン", "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", "symbols/skipRestore/displayName": "復元のスキップ", "postActions/restore/description": "このプロジェクトに必要な NuGet パッケージを復元します。", "postActions/restore/manualInstructions/default/text": "'dotnet restore' を実行する", - "postActions/open-file/description": "エディターで Class1.cs を開きます" + "postActions/open-file/description": "エディターで Class1.cs を開く" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.pl.json index e3428cbef7ea..26b8cd45c863 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.pl.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.pl.json @@ -12,7 +12,7 @@ "symbols/Framework/choices/netstandard2.0/description": "Docelowy netstandard2.0", "symbols/Framework/choices/netstandard2.0/displayName": ".NET Standard 2.0", "symbols/Framework/displayName": "Platforma", - "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", "symbols/langVersion/displayName": "Wersja języka", "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", "symbols/skipRestore/displayName": "Pomiń przywracanie", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.pt-BR.json index 61d4757604e4..8d31df42c576 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.pt-BR.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.pt-BR.json @@ -2,7 +2,7 @@ "author": "Microsoft", "name": "Biblioteca de Classes", "description": "Um projeto para criar uma biblioteca de classes direcionada para o .NET ou .NET Standard", - "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", + "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", "symbols/TargetFrameworkOverride/displayName": "Substituição da estrutura de destino", "symbols/Framework/description": "A estrutura de destino do projeto.", "symbols/Framework/choices/net7.0/description": "Alvo .NET7.0", @@ -12,11 +12,11 @@ "symbols/Framework/choices/netstandard2.0/description": "Netstandard2.0 de destino", "symbols/Framework/choices/netstandard2.0/displayName": ".NET Standard 2.0", "symbols/Framework/displayName": "Framework", - "symbols/langVersion/description": "Definir a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", "symbols/langVersion/displayName": "Versão do idioma", "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", "symbols/skipRestore/displayName": "Ignorar restauração", - "postActions/restore/description": "Restaura os pacotes do NuGet exigidos por este projeto.", - "postActions/restore/manualInstructions/default/text": "Executar 'dotnet restore'", - "postActions/open-file/description": "Abrir Class1.cs no editor" + "postActions/restore/description": "Restaure os pacotes NuGet exigidos por este projeto.", + "postActions/restore/manualInstructions/default/text": "Executa 'dotnet restore'", + "postActions/open-file/description": "Abre Class1.cs no editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.ru.json index 0b8437a7861c..cf78d9e6110b 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.ru.json @@ -1,5 +1,5 @@ { - "author": "Microsoft", + "author": "Майкрософт", "name": "Библиотека классов", "description": "Проект для создания библиотеки классов, предназначенной для .NET или .NET Standard.", "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.tr.json index f2250cc6d764..48703f5702df 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.tr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/localize/templatestrings.tr.json @@ -14,9 +14,9 @@ "symbols/Framework/displayName": "Çerçeve", "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", "symbols/langVersion/displayName": "Dil sürümü", - "symbols/skipRestore/description": "Belirtilmişse, oluşturulmakta olan projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/description": "Belirtilirse, oluşturma sırasında projenin otomatik geri yüklenmesini atlar.", "symbols/skipRestore/displayName": "Geri yüklemeyi atla", "postActions/restore/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", "postActions/restore/manualInstructions/default/text": "'dotnet restore' çalıştır", - "postActions/open-file/description": "Düzenleyicide Class1.cs dosyasını açar" + "postActions/open-file/description": "Düzenleyicide Class1.cs’yi açar" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.de.json index 0cd9dbf832ae..1931e1fa7324 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.de.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.de.json @@ -14,7 +14,7 @@ "symbols/Framework/displayName": "Framework", "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", "symbols/skipRestore/displayName": "Wiederherstellung überspringen", - "postActions/restore/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restore/description": "„NuGet-Pakete“ wiederherstellen, die für dieses Projekt erforderlich sind.", "postActions/restore/manualInstructions/default/text": "„dotnet restore“ ausführen", "postActions/open-file/description": "Öffnet „Library.fs“ im Editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.fr.json index 362cd4272b9e..3c28d700a08c 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.fr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.fr.json @@ -3,7 +3,7 @@ "name": "Bibliothèque de classe", "description": "Projet de création d'une bibliothèque de classes ciblant .NET ou .NET Standard", "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", - "symbols/TargetFrameworkOverride/displayName": "Remplacement de l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du frame cible", "symbols/Framework/description": "Framework cible du projet.", "symbols/Framework/choices/net7.0/description": "Cible net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.ja.json index 01c82367d97a..8d4f570477c1 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.ja.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.ja.json @@ -2,7 +2,7 @@ "author": "Microsoft", "name": "クラス ライブラリ", "description": ".NET または .NET Standard を対象とするクラス ライブラリを作成するためのプロジェクト", - "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドする", "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", "symbols/Framework/choices/net7.0/description": "ターゲット net7.0", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.pt-BR.json index a139da29889b..7eeefb7ec7fa 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.pt-BR.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.pt-BR.json @@ -2,7 +2,7 @@ "author": "Microsoft", "name": "Biblioteca de Classes", "description": "Um projeto para criar uma biblioteca de classes direcionada para o .NET ou .NET Standard", - "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", + "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", "symbols/TargetFrameworkOverride/displayName": "Substituição da estrutura de destino", "symbols/Framework/description": "A estrutura de destino do projeto.", "symbols/Framework/choices/net7.0/description": "Alvo .NET7.0", @@ -14,7 +14,7 @@ "symbols/Framework/displayName": "Framework", "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", "symbols/skipRestore/displayName": "Ignorar restauração", - "postActions/restore/description": "Restaura os pacotes do NuGet exigidos por este projeto.", - "postActions/restore/manualInstructions/default/text": "Executar 'dotnet restore'", + "postActions/restore/description": "Restaure os pacotes NuGet exigidos por este projeto.", + "postActions/restore/manualInstructions/default/text": "Executa 'dotnet restore'", "postActions/open-file/description": "Abre Library.fs no editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.ru.json index baf38e951afc..0acd904ad148 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.ru.json @@ -1,5 +1,5 @@ { - "author": "Microsoft", + "author": "Майкрософт", "name": "Библиотека классов", "description": "Проект для создания библиотеки классов, предназначенной для .NET или .NET Standard.", "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.tr.json index c155f9c767af..2f4771afd12f 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.tr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-FSharp/.template.config/localize/templatestrings.tr.json @@ -12,7 +12,7 @@ "symbols/Framework/choices/netstandard2.0/description": "Hedef netstandard2.0", "symbols/Framework/choices/netstandard2.0/displayName": ".NET Standard 2.0", "symbols/Framework/displayName": "Çerçeve", - "symbols/skipRestore/description": "Belirtilmişse, oluşturulmakta olan projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/description": "Belirtilirse, oluşturma sırasında projenin otomatik geri yüklenmesini atlar.", "symbols/skipRestore/displayName": "Geri yüklemeyi atla", "postActions/restore/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", "postActions/restore/manualInstructions/default/text": "'dotnet restore' çalıştır", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.de.json index 765100ce9e1d..eea2d97cd4b2 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.de.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.de.json @@ -12,11 +12,11 @@ "symbols/Framework/choices/netstandard2.0/description": "Auf „netstandard2.0“ abzielen", "symbols/Framework/choices/netstandard2.0/displayName": ".NET Standard 2.0", "symbols/Framework/displayName": "Framework", - "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/description": "Legt die „LangVersion“-Eigenschaft in der erstellten Projektdatei fest", "symbols/langVersion/displayName": "Sprachversion", "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", "symbols/skipRestore/displayName": "Wiederherstellung überspringen", - "postActions/restore/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restore/description": "„NuGet-Pakete“ wiederherstellen, die für dieses Projekt erforderlich sind.", "postActions/restore/manualInstructions/default/text": "„dotnet restore“ ausführen", "postActions/open-file/description": "Öffnet „Class1.vb“ im Editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.fr.json index 1bbd7389b219..c4e4fc90f1f0 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.fr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.fr.json @@ -3,7 +3,7 @@ "name": "Bibliothèque de classe", "description": "Projet de création d'une bibliothèque de classes ciblant .NET ou .NET Standard", "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", - "symbols/TargetFrameworkOverride/displayName": "Remplacement de l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du frame cible", "symbols/Framework/description": "Framework cible du projet.", "symbols/Framework/choices/net7.0/description": "Cible net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.ja.json index 9efca1dc6387..667861ac0a91 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.ja.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.ja.json @@ -2,7 +2,7 @@ "author": "Microsoft", "name": "クラス ライブラリ", "description": ".NET または .NET Standard を対象とするクラス ライブラリを作成するためのプロジェクト", - "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドする", "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", "symbols/Framework/choices/net7.0/description": "ターゲット net7.0", @@ -12,11 +12,11 @@ "symbols/Framework/choices/netstandard2.0/description": "ターゲット netstandard2.0", "symbols/Framework/choices/netstandard2.0/displayName": ".NET Standard 2.0", "symbols/Framework/displayName": "フレームワーク", - "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定する", "symbols/langVersion/displayName": "言語バージョン", "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", "symbols/skipRestore/displayName": "復元のスキップ", "postActions/restore/description": "このプロジェクトに必要な NuGet パッケージを復元します。", "postActions/restore/manualInstructions/default/text": "'dotnet restore' を実行する", - "postActions/open-file/description": "エディターで Class1.vb を開きます" + "postActions/open-file/description": "エディターで Class1.vb を開く" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.pl.json index b0a8fee0cabe..ee580683f1d6 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.pl.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.pl.json @@ -12,11 +12,11 @@ "symbols/Framework/choices/netstandard2.0/description": "Docelowy netstandard2.0", "symbols/Framework/choices/netstandard2.0/displayName": ".NET Standard 2.0", "symbols/Framework/displayName": "Platforma", - "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", "symbols/langVersion/displayName": "Wersja języka", "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", "symbols/skipRestore/displayName": "Pomiń przywracanie", "postActions/restore/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", "postActions/restore/manualInstructions/default/text": "Uruchom polecenie \"dotnet restore\"", - "postActions/open-file/description": "Otwiera plik Class1.vb w edytorze" + "postActions/open-file/description": "Otwiera plik Class1.cs w edytorze" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.pt-BR.json index 7eb70f0a1bcc..0e0c9a7f11bf 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.pt-BR.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.pt-BR.json @@ -2,7 +2,7 @@ "author": "Microsoft", "name": "Biblioteca de Classes", "description": "Um projeto para criar uma biblioteca de classes direcionada para o .NET ou .NET Standard", - "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", + "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", "symbols/TargetFrameworkOverride/displayName": "Substituição da estrutura de destino", "symbols/Framework/description": "A estrutura de destino do projeto.", "symbols/Framework/choices/net7.0/description": "Alvo .NET7.0", @@ -12,11 +12,11 @@ "symbols/Framework/choices/netstandard2.0/description": "Netstandard2.0 de destino", "symbols/Framework/choices/netstandard2.0/displayName": ".NET Standard 2.0", "symbols/Framework/displayName": "Framework", - "symbols/langVersion/description": "Definir a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", "symbols/langVersion/displayName": "Versão do idioma", "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", "symbols/skipRestore/displayName": "Ignorar restauração", - "postActions/restore/description": "Restaura os pacotes do NuGet exigidos por este projeto.", - "postActions/restore/manualInstructions/default/text": "Executar 'dotnet restore'", + "postActions/restore/description": "Restaure os pacotes NuGet exigidos por este projeto.", + "postActions/restore/manualInstructions/default/text": "Executa 'dotnet restore'", "postActions/open-file/description": "Abre Class1.vb no editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.ru.json index e2d85ea32492..dae4785a0e00 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.ru.json @@ -1,5 +1,5 @@ { - "author": "Microsoft", + "author": "Майкрософт", "name": "Библиотека классов", "description": "Проект для создания библиотеки классов, предназначенной для .NET или .NET Standard.", "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.tr.json index cbe2e016083f..634e9b3b87bd 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.tr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-VisualBasic/.template.config/localize/templatestrings.tr.json @@ -14,9 +14,9 @@ "symbols/Framework/displayName": "Çerçeve", "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", "symbols/langVersion/displayName": "Dil sürümü", - "symbols/skipRestore/description": "Belirtilmişse, oluşturulmakta olan projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/description": "Belirtilirse, oluşturma sırasında projenin otomatik geri yüklenmesini atlar.", "symbols/skipRestore/displayName": "Geri yüklemeyi atla", "postActions/restore/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", "postActions/restore/manualInstructions/default/text": "'dotnet restore' çalıştır", - "postActions/open-file/description": "Düzenleyicide Class1.vb dosyasını açar" + "postActions/open-file/description": "Düzenleyicide Class1.vb’yi açar" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.cs.json index 11c991533a96..deba43f5bcea 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.cs.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.cs.json @@ -13,7 +13,7 @@ "symbols/skipRestore/description": "Pokud se tato možnost zadá, přeskočí automatické obnovení projektu při vytvoření.", "symbols/skipRestore/displayName": "Přeskočit obnovení", "symbols/UseProgramMain/description": "Určuje, jestli se má místo příkazů nejvyšší úrovně generovat explicitní třída Program a metoda Main.", - "symbols/UseProgramMain/displayName": "Nepoužívat příkazy nejvyšší úrovně", + "symbols/UseProgramMain/displayName": "Nepoužívat _příkazy nejvyšší úrovně", "postActions/restore/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", "postActions/restore/manualInstructions/default/text": "Spustit dotnet restore", "postActions/open-file/description": "Otevře Program.cs v editoru." diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.de.json index b6485f1be0ee..b67e8fb283ac 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.de.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.de.json @@ -8,13 +8,13 @@ "symbols/Framework/choices/net7.0/description": "Target net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", "symbols/Framework/displayName": "Framework", - "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/description": "Legt die „LangVersion“-Eigenschaft in der erstellten Projektdatei fest", "symbols/langVersion/displayName": "Sprachversion", "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", "symbols/skipRestore/displayName": "Wiederherstellung überspringen", "symbols/UseProgramMain/description": "Gibt an, ob anstelle von Anweisungen der obersten Ebene eine explizite Programmklasse und eine Main-Methode generiert werden soll.", - "symbols/UseProgramMain/displayName": "Keine Anweisungen der obersten Ebene verwenden", - "postActions/restore/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "symbols/UseProgramMain/displayName": "Keine Anweisungen_der obersten Ebene verwenden", + "postActions/restore/description": "„NuGet-Pakete“ wiederherstellen, die für dieses Projekt erforderlich sind.", "postActions/restore/manualInstructions/default/text": "„dotnet restore“ ausführen", - "postActions/open-file/description": "Öffnet „Program.cs“ im Editor" + "postActions/open-file/description": "Öffnet „Program.cs“ im Editor." } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.es.json index 290f19b03a28..d30b4421530d 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.es.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.es.json @@ -13,7 +13,7 @@ "symbols/skipRestore/description": "Si se especifica, se omite la restauración automática del proyecto durante la creación.", "symbols/skipRestore/displayName": "Omitir restauración", "symbols/UseProgramMain/description": "Indica si se debe generar una clase Program explícita y un método Main en lugar de instrucciones de nivel superior.", - "symbols/UseProgramMain/displayName": "No usar instrucciones de nivel superior", + "symbols/UseProgramMain/displayName": "No usar instrucciones de _nivel superior", "postActions/restore/description": "Restaure los paquetes NuGet necesarios para este proyecto.", "postActions/restore/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", "postActions/open-file/description": "Abre Program.cs en el editor" diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.fr.json index 91e0b08c8d6c..20954bf36e1a 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.fr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.fr.json @@ -3,7 +3,7 @@ "name": "Application console", "description": "Projet de création d'une application en ligne de commande pouvant s'exécuter sur .NET sur Windows, Linux et macOS", "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", - "symbols/TargetFrameworkOverride/displayName": "Remplacement de l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du frame cible", "symbols/Framework/description": "Framework cible du projet.", "symbols/Framework/choices/net7.0/description": "Cible net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", @@ -13,7 +13,7 @@ "symbols/skipRestore/description": "S’il est spécifié, ignore la restauration automatique du projet lors de la création.", "symbols/skipRestore/displayName": "Ignorer la restauration", "symbols/UseProgramMain/description": "Indique s’il faut générer une classe Programme explicite et une méthode Main au lieu d’instructions de niveau supérieur.", - "symbols/UseProgramMain/displayName": "N’utilisez pas d’instructions de niveau supérieur", + "symbols/UseProgramMain/displayName": "N’utilisez pas _d’instructions de niveau supérieur.", "postActions/restore/description": "Restaurez les packages NuGet requis par ce projet.", "postActions/restore/manualInstructions/default/text": "Exécuter « dotnet restore »", "postActions/open-file/description": "Ouvre Program.cs dans l’éditeur" diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.it.json index 36a0637ae18d..0dde5d728c6b 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.it.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.it.json @@ -13,7 +13,7 @@ "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", "symbols/skipRestore/displayName": "Salta ripristino", "symbols/UseProgramMain/description": "Indica se generare una classe Program esplicita e un metodo Main anziché istruzioni di primo livello.", - "symbols/UseProgramMain/displayName": "Non usare istruzioni di primo livello", + "symbols/UseProgramMain/displayName": "Non usare_istruzioni di primo livello", "postActions/restore/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", "postActions/restore/manualInstructions/default/text": "Esegui 'dotnet restore'", "postActions/open-file/description": "Apre Program.cs nell'editor" diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ja.json index 5b3259dc0b58..ade5db9bb4ca 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ja.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ja.json @@ -2,19 +2,19 @@ "author": "Microsoft", "name": "コンソール アプリ", "description": "Windows、Linux、macOS 上の .NET で実行できるコマンド ライン アプリケーションを作成するためのプロジェクト", - "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドする", "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", "symbols/Framework/choices/net7.0/description": "ターゲット net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", "symbols/Framework/displayName": "フレームワーク", - "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定する", "symbols/langVersion/displayName": "言語バージョン", "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", "symbols/skipRestore/displayName": "復元のスキップ", "symbols/UseProgramMain/description": "最上位レベルのステートメントではなく、明示的な Program クラスと Main メソッドを生成するかどうか。", - "symbols/UseProgramMain/displayName": "最上位レベルのステートメントを使用しない", + "symbols/UseProgramMain/displayName": "最上位レベルのステートメントを使用しない(_T)", "postActions/restore/description": "このプロジェクトに必要な NuGet パッケージを復元します。", "postActions/restore/manualInstructions/default/text": "'dotnet restore' を実行する", - "postActions/open-file/description": "エディターで Program.cs を開きます" + "postActions/open-file/description": "エディターで Program.cs を開く" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ko.json index c8ae7db4bbc5..392c59a4c22e 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ko.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ko.json @@ -13,7 +13,7 @@ "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", "symbols/skipRestore/displayName": "복원 건너뛰기", "symbols/UseProgramMain/description": "최상위 문 대신 명시적 Program 클래스 및 Main 메서드를 생성할지 여부입니다.", - "symbols/UseProgramMain/displayName": "최상위 문 사용 안 함", + "symbols/UseProgramMain/displayName": "최상위 문 사용 안 함(_T)", "postActions/restore/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", "postActions/restore/manualInstructions/default/text": "'dotnet restore' 실행", "postActions/open-file/description": "편집기에서 Program.cs를 엽니다" diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.pl.json index f985d9289af8..6026dfb68b14 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.pl.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.pl.json @@ -8,12 +8,12 @@ "symbols/Framework/choices/net7.0/description": "Docelowe środowisko net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", "symbols/Framework/displayName": "Platforma", - "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", "symbols/langVersion/displayName": "Wersja języka", "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", "symbols/skipRestore/displayName": "Pomiń przywracanie", "symbols/UseProgramMain/description": "Określa, czy wygenerować jawną klasę Program i metodę Main zamiast instrukcji najwyższego poziomu.", - "symbols/UseProgramMain/displayName": "Nie używaj instrukcji najwyższego poziomu", + "symbols/UseProgramMain/displayName": "Nie używaj ins_trukcji najwyższego poziomu", "postActions/restore/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", "postActions/restore/manualInstructions/default/text": "Uruchom polecenie \"dotnet restore\"", "postActions/open-file/description": "Otwiera plik Program.cs w edytorze" diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.pt-BR.json index 78a75fd700de..4e74af880f36 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.pt-BR.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.pt-BR.json @@ -2,19 +2,19 @@ "author": "Microsoft", "name": "Aplicativo do Console", "description": "Um projeto para criar um aplicativo de linha de comando que pode ser executado no .NET no Windows, Linux e macOS", - "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", + "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", "symbols/TargetFrameworkOverride/displayName": "Substituição da estrutura de destino", "symbols/Framework/description": "A estrutura de destino do projeto.", "symbols/Framework/choices/net7.0/description": "Alvo .NET7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", "symbols/Framework/displayName": "Framework", - "symbols/langVersion/description": "Definir a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", "symbols/langVersion/displayName": "Versão do idioma", "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", "symbols/skipRestore/displayName": "Ignorar restauração", "symbols/UseProgramMain/description": "Se deve gerar uma classe de Programa explícita e um método principal em vez de instruções de nível superior.", - "symbols/UseProgramMain/displayName": "Não usar instruções de nível superior", - "postActions/restore/description": "Restaura os pacotes do NuGet exigidos por este projeto.", - "postActions/restore/manualInstructions/default/text": "Executar 'dotnet restore'", - "postActions/open-file/description": "Abrir Program.cs no editor" + "symbols/UseProgramMain/displayName": "Não use ins_truções de nível superior", + "postActions/restore/description": "Restaure os pacotes NuGet exigidos por este projeto.", + "postActions/restore/manualInstructions/default/text": "Executa 'dotnet restore'", + "postActions/open-file/description": "Abre Program.cs no editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ru.json index 0a213cc53d14..26941e1f0b92 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.ru.json @@ -1,5 +1,5 @@ { - "author": "Microsoft", + "author": "Майкрософт", "name": "Консольное приложение", "description": "Проект для создания приложения командной строки, которое может выполняться в среде .NET в Windows, Linux и macOS", "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", @@ -13,7 +13,7 @@ "symbols/skipRestore/description": "Если установлено, автоматическое восстановление проекта при создании пропускается.", "symbols/skipRestore/displayName": "Пропустить восстановление", "symbols/UseProgramMain/description": "Следует ли создавать явный класс Program и метод Main вместо операторов верхнего уровня.", - "symbols/UseProgramMain/displayName": "Не использовать операторы верхнего уровня", + "symbols/UseProgramMain/displayName": "Не использовать _операторы верхнего уровня", "postActions/restore/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", "postActions/restore/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", "postActions/open-file/description": "Открывает файл Program.cs в редакторе" diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.tr.json index ed48a9ab01ae..feae5bb1aaf5 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.tr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.tr.json @@ -10,11 +10,11 @@ "symbols/Framework/displayName": "Çerçeve", "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", "symbols/langVersion/displayName": "Dil sürümü", - "symbols/skipRestore/description": "Belirtilmişse, oluşturulmakta olan projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/description": "Belirtilirse, oluşturma sırasında projenin otomatik geri yüklenmesini atlar.", "symbols/skipRestore/displayName": "Geri yüklemeyi atla", "symbols/UseProgramMain/description": "Üst düzey deyimler yerine açık bir Program sınıfı ve Ana yöntem oluşturup oluşturulmayacağını belirtir.", - "symbols/UseProgramMain/displayName": "Üst düzey deyimler kullanmayın", + "symbols/UseProgramMain/displayName": "_Üst düzey deyimler kullanmayın", "postActions/restore/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", "postActions/restore/manualInstructions/default/text": "'dotnet restore' çalıştır", - "postActions/open-file/description": "Düzenleyicide Program.cs dosyasını açar" + "postActions/open-file/description": "Düzenleyicide Program.cs’yi açar" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.zh-Hans.json index bd12a2bba01a..220ec8eb1e42 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.zh-Hans.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.zh-Hans.json @@ -13,7 +13,7 @@ "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", "symbols/skipRestore/displayName": "跳过还原", "symbols/UseProgramMain/description": "是否生成显式程序类和主方法,而不是顶级语句。", - "symbols/UseProgramMain/displayName": "不使用顶级语句", + "symbols/UseProgramMain/displayName": "不使用顶级语句(_T)", "postActions/restore/description": "还原此项目所需的 NuGet 包。", "postActions/restore/manualInstructions/default/text": "运行 \"dotnet restore\"", "postActions/open-file/description": "在编辑器中打开 Program.cs" diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.zh-Hant.json index faa911f3f31b..9dd579e1869a 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.zh-Hant.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-CSharp/.template.config/localize/templatestrings.zh-Hant.json @@ -13,7 +13,7 @@ "symbols/skipRestore/description": "若指定,會在建立時跳過專案的自動還原。", "symbols/skipRestore/displayName": "略過還原", "symbols/UseProgramMain/description": "是否要產生明確的 Program 類別和 Main 方法,而非最上層語句。", - "symbols/UseProgramMain/displayName": "不要使用最上層語句", + "symbols/UseProgramMain/displayName": "不要使用最上層陳述式(_T)", "postActions/restore/description": "還原此專案所需的 NuGet 套件。", "postActions/restore/manualInstructions/default/text": "執行 'dotnet restore'", "postActions/open-file/description": "在編輯器中開啟 Program.cs" diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.de.json index 407dd8c90557..fa808e014ec8 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.de.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.de.json @@ -10,7 +10,7 @@ "symbols/Framework/displayName": "Framework", "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", "symbols/skipRestore/displayName": "Wiederherstellung überspringen", - "postActions/restore/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restore/description": "„NuGet-Pakete“ wiederherstellen, die für dieses Projekt erforderlich sind.", "postActions/restore/manualInstructions/default/text": "„dotnet restore“ ausführen", "postActions/open-file/description": "Öffnet „Program.fs“ im Editor." } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.fr.json index 38f22d9d0ef6..b69b5c82c1aa 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.fr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.fr.json @@ -3,7 +3,7 @@ "name": "Application console", "description": "Projet de création d'une application en ligne de commande pouvant s'exécuter sur .NET sur Windows, Linux et macOS", "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", - "symbols/TargetFrameworkOverride/displayName": "Remplacement de l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du frame cible", "symbols/Framework/description": "Framework cible du projet.", "symbols/Framework/choices/net7.0/description": "Cible net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.ja.json index d6c9267c22d2..508080f0d1a1 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.ja.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.ja.json @@ -2,7 +2,7 @@ "author": "Microsoft", "name": "コンソール アプリ", "description": "Windows、Linux、macOS 上の .NET で実行できるコマンド ライン アプリケーションを作成するためのプロジェクト", - "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドする", "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", "symbols/Framework/choices/net7.0/description": "ターゲット net7.0", @@ -12,5 +12,5 @@ "symbols/skipRestore/displayName": "復元のスキップ", "postActions/restore/description": "このプロジェクトに必要な NuGet パッケージを復元します。", "postActions/restore/manualInstructions/default/text": "'dotnet restore' を実行する", - "postActions/open-file/description": "エディターで Program.fs を開きます" + "postActions/open-file/description": "エディターで Program.fs を開く" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.pt-BR.json index 6243ae128260..5597507d5a00 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.pt-BR.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.pt-BR.json @@ -2,7 +2,7 @@ "author": "Microsoft", "name": "Aplicativo do Console", "description": "Um projeto para criar um aplicativo de linha de comando que pode ser executado no .NET no Windows, Linux e macOS", - "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", + "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", "symbols/TargetFrameworkOverride/displayName": "Substituição da estrutura de destino", "symbols/Framework/description": "A estrutura de destino do projeto.", "symbols/Framework/choices/net7.0/description": "Alvo .NET7.0", @@ -10,7 +10,7 @@ "symbols/Framework/displayName": "Framework", "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", "symbols/skipRestore/displayName": "Ignorar restauração", - "postActions/restore/description": "Restaura os pacotes do NuGet exigidos por este projeto.", - "postActions/restore/manualInstructions/default/text": "Executar 'dotnet restore'", + "postActions/restore/description": "Restaure os pacotes NuGet exigidos por este projeto.", + "postActions/restore/manualInstructions/default/text": "Executa 'dotnet restore'", "postActions/open-file/description": "Abre Program.fs no editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.ru.json index 7709071ea7e1..f3a5b225167b 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.ru.json @@ -1,5 +1,5 @@ { - "author": "Microsoft", + "author": "Майкрософт", "name": "Консольное приложение", "description": "Проект для создания приложения командной строки, которое может выполняться в среде .NET в Windows, Linux и macOS", "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.tr.json index d0d79a4ea8bf..b8e2feaa77b9 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.tr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-FSharp/.template.config/localize/templatestrings.tr.json @@ -8,7 +8,7 @@ "symbols/Framework/choices/net7.0/description": "Hedef net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", "symbols/Framework/displayName": "Çerçeve", - "symbols/skipRestore/description": "Belirtilmişse, oluşturulmakta olan projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/description": "Belirtilirse, oluşturma sırasında projenin otomatik geri yüklenmesini atlar.", "symbols/skipRestore/displayName": "Geri yüklemeyi atla", "postActions/restore/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", "postActions/restore/manualInstructions/default/text": "'dotnet restore' çalıştır", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.de.json index 548e6da5c619..dc8cb9d2cfef 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.de.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.de.json @@ -8,11 +8,11 @@ "symbols/Framework/choices/net7.0/description": "Target net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", "symbols/Framework/displayName": "Framework", - "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/description": "Legt die „LangVersion“-Eigenschaft in der erstellten Projektdatei fest", "symbols/langVersion/displayName": "Sprachversion", "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", "symbols/skipRestore/displayName": "Wiederherstellung überspringen", - "postActions/restore/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restore/description": "„NuGet-Pakete“ wiederherstellen, die für dieses Projekt erforderlich sind.", "postActions/restore/manualInstructions/default/text": "„dotnet restore“ ausführen", "postActions/open-file/description": "Öffnet „Program.vb“ im Editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.fr.json index 3735726bd4ae..4d0a596b1686 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.fr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.fr.json @@ -3,7 +3,7 @@ "name": "Application console", "description": "Projet de création d'une application en ligne de commande pouvant s'exécuter sur .NET sur Windows, Linux et macOS", "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", - "symbols/TargetFrameworkOverride/displayName": "Remplacement de l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du frame cible", "symbols/Framework/description": "Framework cible du projet.", "symbols/Framework/choices/net7.0/description": "Cible net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.ja.json index be02c5af9c0f..1eec79232093 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.ja.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.ja.json @@ -2,17 +2,17 @@ "author": "Microsoft", "name": "コンソール アプリ", "description": "Windows、Linux、macOS 上の .NET で実行できるコマンド ライン アプリケーションを作成するためのプロジェクト", - "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドする", "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", "symbols/Framework/choices/net7.0/description": "ターゲット net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", "symbols/Framework/displayName": "フレームワーク", - "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定する", "symbols/langVersion/displayName": "言語バージョン", "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", "symbols/skipRestore/displayName": "復元のスキップ", "postActions/restore/description": "このプロジェクトに必要な NuGet パッケージを復元します。", "postActions/restore/manualInstructions/default/text": "'dotnet restore' を実行する", - "postActions/open-file/description": "エディターで Program.vb を開きます" + "postActions/open-file/description": "エディターで Program.vb を開く" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.pl.json index 302c97a3e446..087b62fdc267 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.pl.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.pl.json @@ -8,7 +8,7 @@ "symbols/Framework/choices/net7.0/description": "Docelowe środowisko net7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", "symbols/Framework/displayName": "Platforma", - "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", "symbols/langVersion/displayName": "Wersja języka", "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", "symbols/skipRestore/displayName": "Pomiń przywracanie", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.pt-BR.json index 16f9418043ff..9437c9125aa2 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.pt-BR.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.pt-BR.json @@ -2,17 +2,17 @@ "author": "Microsoft", "name": "Aplicativo do Console", "description": "Um projeto para criar um aplicativo de linha de comando que pode ser executado no .NET no Windows, Linux e macOS", - "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", + "symbols/TargetFrameworkOverride/description": "Substitui a estrutura de destino", "symbols/TargetFrameworkOverride/displayName": "Substituição da estrutura de destino", "symbols/Framework/description": "A estrutura de destino do projeto.", "symbols/Framework/choices/net7.0/description": "Alvo .NET7.0", "symbols/Framework/choices/net7.0/displayName": ".NET 7.0", "symbols/Framework/displayName": "Framework", - "symbols/langVersion/description": "Definir a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", "symbols/langVersion/displayName": "Versão do idioma", "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", "symbols/skipRestore/displayName": "Ignorar restauração", - "postActions/restore/description": "Restaura os pacotes do NuGet exigidos por este projeto.", - "postActions/restore/manualInstructions/default/text": "Executar 'dotnet restore'", + "postActions/restore/description": "Restaure os pacotes NuGet exigidos por este projeto.", + "postActions/restore/manualInstructions/default/text": "Executa 'dotnet restore'", "postActions/open-file/description": "Abre Program.vb no editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.ru.json index c5b50bc535bb..dcc991b31ed3 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.ru.json @@ -1,5 +1,5 @@ { - "author": "Microsoft", + "author": "Майкрософт", "name": "Консольное приложение", "description": "Проект для создания приложения командной строки, которое может выполняться в среде .NET в Windows, Linux и macOS", "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.tr.json index 6d0f721c2cb5..8460082a7bc9 100644 --- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.tr.json +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ConsoleApplication-VisualBasic/.template.config/localize/templatestrings.tr.json @@ -10,9 +10,9 @@ "symbols/Framework/displayName": "Çerçeve", "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", "symbols/langVersion/displayName": "Dil sürümü", - "symbols/skipRestore/description": "Belirtilmişse, oluşturulmakta olan projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/description": "Belirtilirse, oluşturma sırasında projenin otomatik geri yüklenmesini atlar.", "symbols/skipRestore/displayName": "Geri yüklemeyi atla", "postActions/restore/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", "postActions/restore/manualInstructions/default/text": "'dotnet restore' çalıştır", - "postActions/open-file/description": "Düzenleyicide Program.vb dosyasını açar" + "postActions/open-file/description": "Düzenleyicide Program.vb’yi açar" } \ No newline at end of file