diff --git a/.vsts-ci.yml b/.vsts-ci.yml index e1c91bc3c632..f847be64847c 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -93,14 +93,14 @@ extends: parameters: pool: name: $(DncEngInternalBuildPool) - image: 1es-windows-2022 + image: windows.vs2022.amd64 os: windows helixTargetQueue: windows.amd64.vs2022.pre oneESCompat: templateFolderName: templates-official publishTaskPrefix: 1ES. runtimeSourceProperties: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - locBranch: release/9.0.1xx + locBranch: release/9.0.2xx ${{ if and(eq(parameters.runTestBuild, false), ne(variables['Build.Reason'], 'PullRequest')) }}: timeoutInMinutes: 90 windowsJobParameterSets: diff --git a/CODEOWNERS b/CODEOWNERS index 0dbaa7209013..fa2131b2509c 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -50,6 +50,10 @@ /src/Cli/dotnet/commands/dotnet-vstest @dotnet/dotnet-testing-admin /test/dotnet-test.Tests @dotnet/dotnet-testing-admin /test/dotnet-vstest.Tests @dotnet/dotnet-testing-admin +/test/dotnet-new.Tests @dotnet/dotnet-testing-admin +/template_feed/Microsoft.DotNet.Common.*/content/MSTest* @dotnet/dotnet-testing-admin +/template_feed/Microsoft.DotNet.Common.*/content/NUnit* @dotnet/dotnet-testing-admin +/template_feed/Microsoft.DotNet.Common.*/content/XUnit* @dotnet/dotnet-testing-admin # Area-Templates /src/Cli/dotnet/commands/dotnet-new @dotnet/templating-engine-maintainers diff --git a/eng/ManualVersions.props b/eng/ManualVersions.props index e0f285d96bdc..9b67e035d26a 100644 --- a/eng/ManualVersions.props +++ b/eng/ManualVersions.props @@ -9,20 +9,20 @@ Basically: In this file, choose the highest version when resolving merge conflicts. --> - 10.0.17763.54 - 10.0.18362.54 - 10.0.19041.54 - 10.0.20348.54 - 10.0.22000.54 - 10.0.22621.54 - 10.0.26100.54 - 10.0.17763.52 - 10.0.18362.52 - 10.0.19041.52 - 10.0.20348.52 - 10.0.22000.52 - 10.0.22621.52 - 10.0.26100.52 + 10.0.17763.57 + 10.0.18362.57 + 10.0.19041.57 + 10.0.20348.57 + 10.0.22000.57 + 10.0.22621.57 + 10.0.26100.57 + 10.0.17763.55 + 10.0.18362.55 + 10.0.19041.55 + 10.0.20348.55 + 10.0.22000.55 + 10.0.22621.55 + 10.0.26100.55 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 98f9ebc70637..39317697780d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -97,43 +97,43 @@ 5af96504f10836eca6ce804ab3cdd28c042fa35a - + https://github.com/dotnet/roslyn - 543cb4568f28b0d2f2cfecdf2d56365b9252e848 + d94a5505a6515a2d5350c7055853fc431e6dcfa4 - + https://github.com/dotnet/roslyn - 543cb4568f28b0d2f2cfecdf2d56365b9252e848 + d94a5505a6515a2d5350c7055853fc431e6dcfa4 - + https://github.com/dotnet/roslyn - 543cb4568f28b0d2f2cfecdf2d56365b9252e848 + d94a5505a6515a2d5350c7055853fc431e6dcfa4 - + https://github.com/dotnet/roslyn - 543cb4568f28b0d2f2cfecdf2d56365b9252e848 + d94a5505a6515a2d5350c7055853fc431e6dcfa4 - + https://github.com/dotnet/roslyn - 543cb4568f28b0d2f2cfecdf2d56365b9252e848 + d94a5505a6515a2d5350c7055853fc431e6dcfa4 - + https://github.com/dotnet/roslyn - 543cb4568f28b0d2f2cfecdf2d56365b9252e848 + d94a5505a6515a2d5350c7055853fc431e6dcfa4 - + https://github.com/dotnet/roslyn - 543cb4568f28b0d2f2cfecdf2d56365b9252e848 + d94a5505a6515a2d5350c7055853fc431e6dcfa4 - + https://github.com/dotnet/roslyn - 543cb4568f28b0d2f2cfecdf2d56365b9252e848 + d94a5505a6515a2d5350c7055853fc431e6dcfa4 - + https://github.com/dotnet/roslyn - 543cb4568f28b0d2f2cfecdf2d56365b9252e848 + d94a5505a6515a2d5350c7055853fc431e6dcfa4 https://github.com/dotnet/aspnetcore @@ -359,36 +359,6 @@ https://github.com/dotnet/aspnetcore e0ee9e981e4c90e78a31b36e41aecd9144119c77 - - https://github.com/dotnet/test-templates - 0385265f4d0b6413d64aea0223172366a9b9858c - - - https://github.com/dotnet/test-templates - 307b8f538d83a955d8f6dd909eee41a5555f2f4d - - - https://github.com/dotnet/test-templates - becc4bd157cd6608b51a5ffe414a5d2de6330272 - - - https://github.com/dotnet/test-templates - becc4bd157cd6608b51a5ffe414a5d2de6330272 - - - https://github.com/dotnet/test-templates - 49c9ad01f057b3c6352bbec12b117acc2224493c - - - https://github.com/dotnet/test-templates - 01712257e7ac9363b002637d399206fd93fc724b - - - - https://github.com/dotnet/test-templates - 01712257e7ac9363b002637d399206fd93fc724b - - https://github.com/dotnet/winforms diff --git a/eng/Versions.props b/eng/Versions.props index c9932950ac99..60a9e9d6f1e1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -34,30 +34,14 @@ 30 32 17 - 35 + 36 20 - 10 + 11 0 <_NET70ILLinkPackVersion>7.0.100-1.23211.1 - - - $(VersionFeature) - - true - true - true - https://dotnetbuilds.blob.core.windows.net/public/ @@ -94,13 +78,12 @@ 1.1.0-beta.24613.2 - - 10.0.0-alpha.1.24605.2 + + 9.1.0-preview.1.24555.3 - - - 1.1.0-rtm.24576.1 + + 10.0.0-alpha.1.24605.2 @@ -192,14 +175,16 @@ Some .NET Framework tasks and the resolver will need to run in a VS/MSBuild that is older than the very latest, based on what we want the SDK to support. So use a version that matches the version - in minimumMSBuildVersion. Note that MSBuild has started versioning before release so the version we use as the Minimum should be .0 - to ensure we load in VS but the version we build against should be the version of MSBuild that ships in the .0 VS release. + in minimumMSBuildVersion. Note that MSBuild has started versioning before release so the version we use as the Minimum should be .0 + to ensure we load in VS but the version we build against should be the version of MSBuild that ships in the .0 VS release. In these cases, we don't want to use MicrosoftBuildVersion and other associated properties that are updated by the VMR infrastructure. So, we read this version from the 'minimumMSBuildVersion' file in non-source-only cases into MicrosoftBuildMinimumVersion, then use that in Directory.Packages.props. - At usage sites, either we use MicrosoftBuildMinimumVersion, or MicrosoftBuildVersion in source-only modes. --> + At usage sites, either we use MicrosoftBuildMinimumVersion, or MicrosoftBuildVersion in source-only modes. + + Additionally, set the MinimumVSVersion for the installer UI that's required for targeting NetCurrent --> 17.13.0-preview-24612-02 17.13.0-preview-24612-02 17.11.4 @@ -224,14 +209,14 @@ - 4.13.0-2.24561.1 - 4.13.0-2.24561.1 - 4.13.0-2.24561.1 - 4.13.0-2.24561.1 - 4.13.0-2.24561.1 - 4.13.0-2.24561.1 - 4.13.0-2.24561.1 - 4.13.0-2.24561.1 + 4.13.0-3.24603.5 + 4.13.0-3.24603.5 + 4.13.0-3.24603.5 + 4.13.0-3.24603.5 + 4.13.0-3.24603.5 + 4.13.0-3.24603.5 + 4.13.0-3.24603.5 + 4.13.0-3.24603.5 diff --git a/eng/pipelines/templates/jobs/sdk-job-matrix.yml b/eng/pipelines/templates/jobs/sdk-job-matrix.yml index 8a7c75d1ba21..0d863564b914 100644 --- a/eng/pipelines/templates/jobs/sdk-job-matrix.yml +++ b/eng/pipelines/templates/jobs/sdk-job-matrix.yml @@ -12,9 +12,10 @@ parameters: runTestsAsTool: true # This job uses the build step for testing, so the extra test step is not necessary. runTests: false - - categoryName: TemplateEngine - testProjects: $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj;$(Build.SourcesDirectory)/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj - publishXunitResults: true + # Turn off template engine runs on Windows temporarily until agent images are updated + #- categoryName: TemplateEngine + # testProjects: $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj;$(Build.SourcesDirectory)/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj + # publishXunitResults: true - categoryName: AoT runAoTTests: true ### LINUX ### diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index e94468470b1c..e7413aa02435 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -194,6 +194,7 @@ jobs: path: $(artifactsStagingDir) artifact: $(Agent.JobName)_Artifacts displayName: Publish Artifacts + condition: succeededOrFailed() sbomEnabled: true # Using build artifacts to enable publishing the vertical manifests to a single artifact from different jobs @@ -567,6 +568,7 @@ jobs: - publish: $(artifactsStagingDir) artifact: $(Agent.JobName)_Artifacts displayName: Publish Artifacts + condition: succeededOrFailed() continueOnError: true # Using build artifacts to enable publishing the vertical manifests to a single artifact from different jobs diff --git a/eng/pipelines/vmr-build-pr-internal.yml b/eng/pipelines/vmr-build-pr-internal.yml new file mode 100644 index 000000000000..61a764d172f6 --- /dev/null +++ b/eng/pipelines/vmr-build-pr-internal.yml @@ -0,0 +1,73 @@ +# This YAML is used by these PR pipelines: +# +# - dotnet-sdk-source-build-internal +# https://dev.azure.com/dnceng/internal/_build?definitionId=1378 + +trigger: none +pr: + branches: + include: + - internal/release/* + exclude: + - internal/release/*.0.2xx + - internal/release/*.0.3xx + - internal/release/*.0.4xx + +parameters: +- name: vmrBranch + displayName: dotnet/dotnet branch to push to + type: string + default: ' ' + +- name: disableBuild + displayName: Skip the VMR Build stage + type: boolean + default: false + +variables: +- template: /eng/common/templates/variables/pool-providers.yml@self + +- ${{ if ne(parameters.vmrBranch, ' ') }}: + - name: VmrBranch + value: ${{ replace(parameters.vmrBranch, ' ', '') }} +- ${{ else }}: + - name: VmrBranch + value: ${{ replace(replace(variables['System.PullRequest.TargetBranch'], 'refs/heads/', ''), 'refs/pull/', '') }} + +# enable source-only build for pipelines with the -source-build suffix +- name: isSourceOnlyBuild + value: ${{ contains(variables['Build.DefinitionName'], '-source-build') }} + +resources: + repositories: + - repository: vmr + name: dotnet-dotnet + type: git + ref: ${{ variables.VmrBranch }} + +stages: +# You can temporarily disable the VMR Build stage by setting the disableBuild variable +- ${{ if not(parameters.disableBuild) }}: + - template: templates/stages/vmr-build.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} + isBuiltFromVmr: false + isSourceOnlyBuild: ${{ variables.isSourceOnlyBuild }} + ${{ if contains(variables['Build.DefinitionName'], '-full') }}: + scope: full + ${{ elseif eq(variables.isSourceOnlyBuild, 'true') }}: + scope: ultralite + ${{ else }}: + scope: lite + +# In case the VMR Build stage is temporarily disabled, the VMR synchronization step is run to validate +# that the PR can be merged and later synchronized into the VMR without problems. +- ${{ else }}: + - stage: Synchronize_VMR + displayName: Synchronize VMR + dependsOn: [] + jobs: + - template: templates/jobs/vmr-synchronization.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} + noPush: true diff --git a/sdk.sln b/sdk.sln index 63ba87eea2d3..bb50c11fcfe4 100644 --- a/sdk.sln +++ b/sdk.sln @@ -512,6 +512,9 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.WebTools.AspireService.Tests", "test\Microsoft.WebTools.AspireService.Tests\Microsoft.WebTools.AspireService.Tests.csproj", "{1F0B4B3C-DC88-4740-B04F-1707102E9930}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSMSBuildExtensions", "src\VSMSBuildExtensions\VSMSBuildExtensions.proj", "{D9617F63-15F4-4CA2-8ECF-728A94B45D82}" +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.DotNet.HotReload.Agent", "src\BuiltInTools\HotReloadAgent\Microsoft.DotNet.HotReload.Agent.shproj", "{418B10BD-CA42-49F3-8F4A-D8CC90C8A17D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.HotReload.Agent.Package", "src\BuiltInTools\HotReloadAgent.Package\Microsoft.DotNet.HotReload.Agent.Package.csproj", "{2FF79F82-60C1-349A-4726-7783D5A6D5DF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -971,6 +974,10 @@ Global {8D6A9984-118D-4415-A8FA-AB1F26CF5C44}.Debug|Any CPU.Build.0 = Debug|Any CPU {8D6A9984-118D-4415-A8FA-AB1F26CF5C44}.Release|Any CPU.ActiveCfg = Release|Any CPU {8D6A9984-118D-4415-A8FA-AB1F26CF5C44}.Release|Any CPU.Build.0 = Release|Any CPU + {2FF79F82-60C1-349A-4726-7783D5A6D5DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2FF79F82-60C1-349A-4726-7783D5A6D5DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2FF79F82-60C1-349A-4726-7783D5A6D5DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2FF79F82-60C1-349A-4726-7783D5A6D5DF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1149,6 +1156,8 @@ Global {1F0B4B3C-DC88-4740-B04F-1707102E9930} = {580D1AE7-AA8F-4912-8B76-105594E00B3B} {D9617F63-15F4-4CA2-8ECF-728A94B45D82} = {3FA6F1CB-295B-4414-B18F-93845917A8CD} {8D6A9984-118D-4415-A8FA-AB1F26CF5C44} = {3FA6F1CB-295B-4414-B18F-93845917A8CD} + {418B10BD-CA42-49F3-8F4A-D8CC90C8A17D} = {71A9F549-0EB6-41F9-BC16-4A6C5007FC91} + {2FF79F82-60C1-349A-4726-7783D5A6D5DF} = {71A9F549-0EB6-41F9-BC16-4A6C5007FC91} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FB8F26CE-4DE6-433F-B32A-79183020BBD6} @@ -1156,7 +1165,10 @@ Global GlobalSection(SharedMSBuildProjectFiles) = preSolution src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\Microsoft.DotNet.ApiCompat.Shared.projitems*{03c5a84a-982b-4f38-ac73-ab832c645c4a}*SharedItemsImports = 5 src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\Microsoft.DotNet.ApiCompat.Shared.projitems*{0a3c9afd-f6e6-4a5d-83fb-93bf66732696}*SharedItemsImports = 5 + src\BuiltInTools\HotReloadAgent\Microsoft.DotNet.HotReload.Agent.projitems*{1bbfa19c-03f0-4d27-9d0d-0f8172642107}*SharedItemsImports = 5 src\BuiltInTools\AspireService\Microsoft.WebTools.AspireService.projitems*{1f0b4b3c-dc88-4740-b04f-1707102e9930}*SharedItemsImports = 5 + src\BuiltInTools\HotReloadAgent\Microsoft.DotNet.HotReload.Agent.projitems*{2ff79f82-60c1-349a-4726-7783d5a6d5df}*SharedItemsImports = 5 + src\BuiltInTools\HotReloadAgent\Microsoft.DotNet.HotReload.Agent.projitems*{418b10bd-ca42-49f3-8f4a-d8cc90c8a17d}*SharedItemsImports = 13 src\BuiltInTools\AspireService\Microsoft.WebTools.AspireService.projitems*{445efbd5-6730-4f09-943d-278e77501ffd}*SharedItemsImports = 5 src\BuiltInTools\AspireService\Microsoft.WebTools.AspireService.projitems*{94c8526e-dcc2-442f-9868-3dd0ba2688be}*SharedItemsImports = 13 src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\Microsoft.DotNet.ApiCompat.Shared.projitems*{9d36039f-d0a1-462f-85b4-81763c6b02cb}*SharedItemsImports = 13 diff --git a/src/BuiltInTools/AspireService/AspireServerService.cs b/src/BuiltInTools/AspireService/AspireServerService.cs index d3450d65ad18..9543b0cda9cd 100644 --- a/src/BuiltInTools/AspireService/AspireServerService.cs +++ b/src/BuiltInTools/AspireService/AspireServerService.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Immutable; using System.Net; using System.Net.WebSockets; using System.Security.Cryptography; @@ -13,13 +12,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using Microsoft.WebTools.AspireServer.Contracts; -using Microsoft.WebTools.AspireServer.Helpers; -using Microsoft.WebTools.AspireServer.Models; -using Microsoft.WebTools.AspireService.Helpers; using IAsyncDisposable = System.IAsyncDisposable; -namespace Microsoft.WebTools.AspireServer; +namespace Aspire.Tools.Service; /// /// Implementation of the AspireServerService. A new instance of this service will be created for each diff --git a/src/BuiltInTools/AspireService/Contracts/IAspireServerEvents.cs b/src/BuiltInTools/AspireService/Contracts/IAspireServerEvents.cs index 1a4b5b6ddee2..82f000261a9e 100644 --- a/src/BuiltInTools/AspireService/Contracts/IAspireServerEvents.cs +++ b/src/BuiltInTools/AspireService/Contracts/IAspireServerEvents.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.WebTools.AspireServer.Contracts; +namespace Aspire.Tools.Service; internal interface IAspireServerEvents { diff --git a/src/BuiltInTools/AspireService/Helpers/CertGenerator.cs b/src/BuiltInTools/AspireService/Helpers/CertGenerator.cs index a0b0f7766d48..e3785b9ecc19 100644 --- a/src/BuiltInTools/AspireService/Helpers/CertGenerator.cs +++ b/src/BuiltInTools/AspireService/Helpers/CertGenerator.cs @@ -4,7 +4,7 @@ using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -namespace Microsoft.WebTools.AspireServer; +namespace Aspire.Tools.Service; internal static class CertGenerator { diff --git a/src/BuiltInTools/AspireService/Helpers/ExceptionExtensions.cs b/src/BuiltInTools/AspireService/Helpers/ExceptionExtensions.cs index ed3fc9321271..d667c50819e4 100644 --- a/src/BuiltInTools/AspireService/Helpers/ExceptionExtensions.cs +++ b/src/BuiltInTools/AspireService/Helpers/ExceptionExtensions.cs @@ -1,9 +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 System; - -namespace Microsoft.WebTools.AspireServer.Helpers; +namespace Aspire.Tools.Service; internal static class ExceptionExtensions { diff --git a/src/BuiltInTools/AspireService/Helpers/HttpContextExtensions.cs b/src/BuiltInTools/AspireService/Helpers/HttpContextExtensions.cs index 6c04e6553f66..13ddb6b5cd23 100644 --- a/src/BuiltInTools/AspireService/Helpers/HttpContextExtensions.cs +++ b/src/BuiltInTools/AspireService/Helpers/HttpContextExtensions.cs @@ -1,14 +1,9 @@ // 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.Threading; -using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Microsoft.WebTools.AspireServer.Contracts; -using Microsoft.WebTools.AspireServer.Models; -namespace Microsoft.WebTools.AspireServer.Helpers; +namespace Aspire.Tools.Service; internal static class HttpContextExtensions { diff --git a/src/BuiltInTools/AspireService/Helpers/LoggerProvider.cs b/src/BuiltInTools/AspireService/Helpers/LoggerProvider.cs index 52953e211022..c190354635b6 100644 --- a/src/BuiltInTools/AspireService/Helpers/LoggerProvider.cs +++ b/src/BuiltInTools/AspireService/Helpers/LoggerProvider.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Logging; -namespace Microsoft.WebTools.AspireService.Helpers; +namespace Aspire.Tools.Service; internal sealed class LoggerProvider(Action reporter) : ILoggerProvider { diff --git a/src/BuiltInTools/AspireService/Helpers/SocketConnectionManager.cs b/src/BuiltInTools/AspireService/Helpers/SocketConnectionManager.cs index 8f088759a6a0..46e6388a58c3 100644 --- a/src/BuiltInTools/AspireService/Helpers/SocketConnectionManager.cs +++ b/src/BuiltInTools/AspireService/Helpers/SocketConnectionManager.cs @@ -7,7 +7,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Microsoft.WebTools.AspireServer; +namespace Aspire.Tools.Service; /// /// Manages the set of active socket connections. Since it registers to be notified when a socket has gone bad, diff --git a/src/BuiltInTools/AspireService/Helpers/SocketUtilities.cs b/src/BuiltInTools/AspireService/Helpers/SocketUtilities.cs index 76921f3a6a65..3ac8c1034703 100644 --- a/src/BuiltInTools/AspireService/Helpers/SocketUtilities.cs +++ b/src/BuiltInTools/AspireService/Helpers/SocketUtilities.cs @@ -1,13 +1,10 @@ // 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.Linq; using System.Net; using System.Net.Sockets; -namespace Microsoft.WebTools.AspireServer.Helpers; +namespace Aspire.Tools.Service; internal class SocketUtilities { diff --git a/src/BuiltInTools/AspireService/Helpers/WebSocketConnection.cs b/src/BuiltInTools/AspireService/Helpers/WebSocketConnection.cs index bf41ac6ded5c..e82da71764d1 100644 --- a/src/BuiltInTools/AspireService/Helpers/WebSocketConnection.cs +++ b/src/BuiltInTools/AspireService/Helpers/WebSocketConnection.cs @@ -1,12 +1,9 @@ // 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.Net.WebSockets; -using System.Threading; -using System.Threading.Tasks; -namespace Microsoft.WebTools.AspireServer; +namespace Aspire.Tools.Service; /// /// Used by the SocketConnectionManager to track one socket connection. It needs to be disposed when done with it diff --git a/src/BuiltInTools/AspireService/Models/ErrorResponse.cs b/src/BuiltInTools/AspireService/Models/ErrorResponse.cs index 0f5094ef1940..7eb0bcc46a6d 100644 --- a/src/BuiltInTools/AspireService/Models/ErrorResponse.cs +++ b/src/BuiltInTools/AspireService/Models/ErrorResponse.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; -namespace Microsoft.WebTools.AspireServer.Models; +namespace Aspire.Tools.Service; /// /// Detailed error information serialized into the body of the response diff --git a/src/BuiltInTools/AspireService/Models/InfoResponse.cs b/src/BuiltInTools/AspireService/Models/InfoResponse.cs index ef05bcd6cb11..dda6f8bc3a97 100644 --- a/src/BuiltInTools/AspireService/Models/InfoResponse.cs +++ b/src/BuiltInTools/AspireService/Models/InfoResponse.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; -namespace Microsoft.WebTools.AspireServer.Models; +namespace Aspire.Tools.Service; /// /// Response when asked for /info diff --git a/src/BuiltInTools/AspireService/Models/RunSessionRequest.cs b/src/BuiltInTools/AspireService/Models/RunSessionRequest.cs index 1d0d55fb2d5f..7f31a2113fe0 100644 --- a/src/BuiltInTools/AspireService/Models/RunSessionRequest.cs +++ b/src/BuiltInTools/AspireService/Models/RunSessionRequest.cs @@ -1,15 +1,11 @@ // 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.ComponentModel.DataAnnotations; using System.Diagnostics; -using System.Linq; using System.Text.Json.Serialization; -using Microsoft.WebTools.AspireServer.Contracts; -namespace Microsoft.WebTools.AspireServer.Models; +namespace Aspire.Tools.Service; internal class EnvVar { diff --git a/src/BuiltInTools/AspireService/Models/SessionChangeNotification.cs b/src/BuiltInTools/AspireService/Models/SessionChangeNotification.cs index d20e38f3360f..fd9803c6e4a3 100644 --- a/src/BuiltInTools/AspireService/Models/SessionChangeNotification.cs +++ b/src/BuiltInTools/AspireService/Models/SessionChangeNotification.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; -namespace Microsoft.WebTools.AspireServer.Models; +namespace Aspire.Tools.Service; internal static class NotificationType { diff --git a/src/BuiltInTools/BrowserRefresh/.editorconfig b/src/BuiltInTools/BrowserRefresh/.editorconfig new file mode 100644 index 000000000000..4ae90dd7a7a0 --- /dev/null +++ b/src/BuiltInTools/BrowserRefresh/.editorconfig @@ -0,0 +1,2 @@ +[*.js] +indent_size = 2 diff --git a/src/BuiltInTools/BrowserRefresh/BlazorHotReload.js b/src/BuiltInTools/BrowserRefresh/BlazorHotReload.js index 0c979861ea82..87a203450f01 100644 --- a/src/BuiltInTools/BrowserRefresh/BlazorHotReload.js +++ b/src/BuiltInTools/BrowserRefresh/BlazorHotReload.js @@ -1,3 +1,6 @@ +// Used by older versions of Microsoft.AspNetCore.Components.WebAssembly. +// For back compat only to support WASM packages older than the SDK. + export function receiveHotReload() { return BINDING.js_to_mono_obj(new Promise((resolve) => receiveHotReloadAsync().then(resolve(0)))); } @@ -5,10 +8,12 @@ export function receiveHotReload() { export async function receiveHotReloadAsync() { const response = await fetch('/_framework/blazor-hotreload'); if (response.status === 200) { - const deltas = await response.json(); - if (deltas) { + const updates = await response.json(); + if (updates) { try { - deltas.forEach(d => window.Blazor._internal.applyHotReload(d.moduleId, d.metadataDelta, d.ilDelta, d.pdbDelta, d.updatedTypes)); + updates.forEach(u => { + u.deltas.forEach(d => window.Blazor._internal.applyHotReload(d.moduleId, d.metadataDelta, d.ilDelta, d.pdbDelta, d.updatedTypes)); + }) } catch (error) { console.warn(error); return; diff --git a/src/BuiltInTools/BrowserRefresh/BlazorWasmHotReloadMiddleware.cs b/src/BuiltInTools/BrowserRefresh/BlazorWasmHotReloadMiddleware.cs index f5b4da6f12bf..6ccdd09f6bc3 100644 --- a/src/BuiltInTools/BrowserRefresh/BlazorWasmHotReloadMiddleware.cs +++ b/src/BuiltInTools/BrowserRefresh/BlazorWasmHotReloadMiddleware.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.Text.Json; using Microsoft.AspNetCore.Http; -using Microsoft.Net.Http.Headers; +using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Watch.BrowserRefresh { @@ -12,27 +11,43 @@ namespace Microsoft.AspNetCore.Watch.BrowserRefresh /// A middleware that manages receiving and sending deltas from a BlazorWebAssembly app. /// This assembly is shared between Visual Studio and dotnet-watch. By putting some of the complexity /// in here, we can avoid duplicating work in watch and VS. + /// + /// Mapped to . /// internal sealed class BlazorWasmHotReloadMiddleware { - private readonly object @lock = new(); - private readonly string EtagDiscriminator = Guid.NewGuid().ToString(); - private readonly JsonSerializerOptions _jsonSerializerOptions = new() + internal sealed class Update + { + public int Id { get; set; } + public Delta[] Deltas { get; set; } = default!; + } + + internal sealed class Delta + { + public string ModuleId { get; set; } = default!; + public string MetadataDelta { get; set; } = default!; + public string ILDelta { get; set; } = default!; + public string PdbDelta { get; set; } = default!; + public int[] UpdatedTypes { get; set; } = default!; + } + + private static readonly JsonSerializerOptions s_jsonSerializerOptions = new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase, }; - public BlazorWasmHotReloadMiddleware(RequestDelegate next) + public BlazorWasmHotReloadMiddleware(RequestDelegate next, ILogger logger) { + logger.LogDebug("Middleware loaded"); } - internal List Deltas { get; } = new(); + internal List Updates { get; } = []; public Task InvokeAsync(HttpContext context) { // Multiple instances of the BlazorWebAssembly app could be running (multiple tabs or multiple browsers). // We want to avoid serialize reads and writes between then - lock (@lock) + lock (Updates) { if (HttpMethods.IsGet(context.Request.Method)) { @@ -54,85 +69,31 @@ public Task InvokeAsync(HttpContext context) private async Task OnGet(HttpContext context) { - if (Deltas.Count == 0) + if (Updates.Count == 0) { context.Response.StatusCode = StatusCodes.Status204NoContent; return; } - if (EtagMatches(context)) - { - context.Response.StatusCode = StatusCodes.Status304NotModified; - return; - } - - WriteETag(context); - await JsonSerializer.SerializeAsync(context.Response.Body, Deltas, _jsonSerializerOptions); - } - - private bool EtagMatches(HttpContext context) - { - if (context.Request.Headers[HeaderNames.IfNoneMatch] is not { Count: 1 } ifNoneMatch) - { - return false; - } - - var expected = GetETag(); - return string.Equals(expected, ifNoneMatch[0], StringComparison.Ordinal); + await JsonSerializer.SerializeAsync(context.Response.Body, Updates, s_jsonSerializerOptions); } private async Task OnPost(HttpContext context) { - var updateDeltas = await JsonSerializer.DeserializeAsync(context.Request.Body, _jsonSerializerOptions); - AppendDeltas(updateDeltas); - - WriteETag(context); - } - - private void WriteETag(HttpContext context) - { - var etag = GetETag(); - if (etag is not null) - { - context.Response.Headers[HeaderNames.ETag] = etag; - } - } - - private string? GetETag() - { - if (Deltas.Count == 0) - { - return null; - } - - return string.Format(CultureInfo.InvariantCulture, "W/\"{0}{1}\"", EtagDiscriminator, Deltas[^1].SequenceId); - } - - private void AppendDeltas(UpdateDelta[]? updateDeltas) - { - if (updateDeltas == null || updateDeltas.Length == 0) + var update = await JsonSerializer.DeserializeAsync(context.Request.Body, s_jsonSerializerOptions); + if (update == null) { + context.Response.StatusCode = StatusCodes.Status400BadRequest; return; } // It's possible that multiple instances of the BlazorWasm are simultaneously executing and could be posting the same deltas // We'll use the sequence id to ensure that we're not recording duplicate entries. Replaying duplicated values would cause // ApplyDelta to fail. - // It's currently not possible to receive different ranges of sequences from different clients (for e.g client 1 sends deltas 1 - 3, - // and client 2 sends deltas 2 - 4, client 3 sends 1 - 5 etc), so we only need to verify that the first item in the sequence has not already been seen. - if (Deltas.Count == 0 || Deltas[^1].SequenceId < updateDeltas[0].SequenceId) + if (Updates is [] || Updates[^1].Id < update.Id) { - Deltas.AddRange(updateDeltas); + Updates.Add(update); } } - - internal class UpdateDelta - { - public int SequenceId { get; set; } - public string ModuleId { get; set; } = default!; - public string MetadataDelta { get; set; } = default!; - public string ILDelta { get; set; } = default!; - public int[]? UpdatedTypes { get; set; } = default!; - } } } diff --git a/src/BuiltInTools/BrowserRefresh/BrowserRefreshMiddleware.cs b/src/BuiltInTools/BrowserRefresh/BrowserRefreshMiddleware.cs index 4e37ff24ed6a..8def7c99c239 100644 --- a/src/BuiltInTools/BrowserRefresh/BrowserRefreshMiddleware.cs +++ b/src/BuiltInTools/BrowserRefresh/BrowserRefreshMiddleware.cs @@ -9,22 +9,26 @@ namespace Microsoft.AspNetCore.Watch.BrowserRefresh { - public class BrowserRefreshMiddleware + public sealed class BrowserRefreshMiddleware { - private static readonly MediaTypeHeaderValue _textHtmlMediaType = new("text/html"); - private static readonly MediaTypeHeaderValue _applicationJsonMediaType = new("application/json"); - private readonly string? _dotnetModifiableAssemblies = GetNonEmptyEnvironmentVariableValue("DOTNET_MODIFIABLE_ASSEMBLIES"); - private readonly string? _aspnetcoreBrowserTools = GetNonEmptyEnvironmentVariableValue("__ASPNETCORE_BROWSER_TOOLS"); - + private static readonly MediaTypeHeaderValue s_textHtmlMediaType = new("text/html"); + private static readonly MediaTypeHeaderValue s_applicationJsonMediaType = new("application/json"); private readonly RequestDelegate _next; - private readonly ILogger _logger; + private readonly ILogger _logger; + private string? _dotnetModifiableAssemblies = GetNonEmptyEnvironmentVariableValue("DOTNET_MODIFIABLE_ASSEMBLIES"); + private string? _aspnetcoreBrowserTools = GetNonEmptyEnvironmentVariableValue("__ASPNETCORE_BROWSER_TOOLS"); + + public BrowserRefreshMiddleware(RequestDelegate next, ILogger logger) + { + _next = next; + _logger = logger; + + logger.LogDebug("Middleware loaded: DOTNET_MODIFIABLE_ASSEMBLIES={ModifiableAssemblies}, __ASPNETCORE_BROWSER_TOOLS={BrowserTools}", _dotnetModifiableAssemblies, _aspnetcoreBrowserTools); + } private static string? GetNonEmptyEnvironmentVariableValue(string name) => Environment.GetEnvironmentVariable(name) is { Length: > 0 } value ? value : null; - public BrowserRefreshMiddleware(RequestDelegate next, ILogger logger) => - (_next, _logger) = (next, logger); - public async Task InvokeAsync(HttpContext context) { if (IsWebAssemblyBootRequest(context)) @@ -76,7 +80,7 @@ private void AttachWebAssemblyHeaders(HttpContext context) { if (!context.Response.Headers.ContainsKey("DOTNET-MODIFIABLE-ASSEMBLIES")) { - if(_dotnetModifiableAssemblies != null) + if (_dotnetModifiableAssemblies != null) { context.Response.Headers.Add("DOTNET-MODIFIABLE-ASSEMBLIES", _dotnetModifiableAssemblies); } @@ -141,7 +145,7 @@ internal static bool IsWebAssemblyBootRequest(HttpContext context) for (var i = 0; i < acceptHeaders.Count; i++) { - if (acceptHeaders[i].MatchesAllTypes || acceptHeaders[i].IsSubsetOf(_applicationJsonMediaType)) + if (acceptHeaders[i].MatchesAllTypes || acceptHeaders[i].IsSubsetOf(s_applicationJsonMediaType)) { return true; } @@ -175,7 +179,7 @@ internal static bool IsBrowserDocumentRequest(HttpContext context) for (var i = 0; i < acceptHeaders.Count; i++) { - if (acceptHeaders[i].IsSubsetOf(_textHtmlMediaType)) + if (acceptHeaders[i].IsSubsetOf(s_textHtmlMediaType)) { return true; } @@ -184,6 +188,12 @@ internal static bool IsBrowserDocumentRequest(HttpContext context) return false; } + internal void Test_SetEnvironment(string dotnetModifiableAssemblies, string aspnetcoreBrowserTools) + { + _dotnetModifiableAssemblies = dotnetModifiableAssemblies; + _aspnetcoreBrowserTools = aspnetcoreBrowserTools; + } + internal static class Log { private static readonly Action _setupResponseForBrowserRefresh = LoggerMessage.Define( diff --git a/src/BuiltInTools/BrowserRefresh/BrowserScriptMiddleware.cs b/src/BuiltInTools/BrowserRefresh/BrowserScriptMiddleware.cs index aa82bf273d0c..167be5d4aec6 100644 --- a/src/BuiltInTools/BrowserRefresh/BrowserScriptMiddleware.cs +++ b/src/BuiltInTools/BrowserRefresh/BrowserScriptMiddleware.cs @@ -3,6 +3,7 @@ using System.Globalization; using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Watch.BrowserRefresh { @@ -12,13 +13,19 @@ namespace Microsoft.AspNetCore.Watch.BrowserRefresh /// public sealed class BrowserScriptMiddleware { - private readonly byte[] _scriptBytes; + private readonly PathString _scriptPath; + private readonly ReadOnlyMemory _scriptBytes; + private readonly ILogger _logger; private readonly string _contentLength; - public BrowserScriptMiddleware(RequestDelegate next, byte[] scriptBytes) + public BrowserScriptMiddleware(RequestDelegate next, PathString scriptPath, ReadOnlyMemory scriptBytes, ILogger logger) { + _scriptPath = scriptPath; _scriptBytes = scriptBytes; + _logger = logger; _contentLength = _scriptBytes.Length.ToString(CultureInfo.InvariantCulture); + + logger.LogDebug("Middleware loaded. Script {scriptPath} ({size} B).", scriptPath, _contentLength); } public async Task InvokeAsync(HttpContext context) @@ -27,10 +34,13 @@ public async Task InvokeAsync(HttpContext context) context.Response.Headers["Content-Length"] = _contentLength; context.Response.Headers["Content-Type"] = "application/javascript; charset=utf-8"; - await context.Response.Body.WriteAsync(_scriptBytes.AsMemory(), context.RequestAborted); + await context.Response.Body.WriteAsync(_scriptBytes, context.RequestAborted); + + _logger.LogDebug("Script injected: {scriptPath}", _scriptPath); } - internal static byte[] GetBlazorHotReloadJS() + // for backwards compat only + internal static ReadOnlyMemory GetBlazorHotReloadJS() { var jsFileName = "Microsoft.AspNetCore.Watch.BrowserRefresh.BlazorHotReload.js"; using var stream = new MemoryStream(); @@ -40,7 +50,7 @@ internal static byte[] GetBlazorHotReloadJS() return stream.ToArray(); } - internal static byte[] GetBrowserRefreshJS() + internal static ReadOnlyMemory GetBrowserRefreshJS() { var endpoint = Environment.GetEnvironmentVariable("ASPNETCORE_AUTO_RELOAD_WS_ENDPOINT")!; var serverKey = Environment.GetEnvironmentVariable("ASPNETCORE_AUTO_RELOAD_WS_KEY") ?? string.Empty; @@ -48,7 +58,7 @@ internal static byte[] GetBrowserRefreshJS() return GetWebSocketClientJavaScript(endpoint, serverKey); } - internal static byte[] GetWebSocketClientJavaScript(string hostString, string serverKey) + internal static ReadOnlyMemory GetWebSocketClientJavaScript(string hostString, string serverKey) { var jsFileName = "Microsoft.AspNetCore.Watch.BrowserRefresh.WebSocketScriptInjection.js"; using var reader = new StreamReader(typeof(WebSocketScriptInjection).Assembly.GetManifestResourceStream(jsFileName)!); diff --git a/src/BuiltInTools/BrowserRefresh/HostingStartup.cs b/src/BuiltInTools/BrowserRefresh/HostingStartup.cs index 06d400d26578..369133ccbec3 100644 --- a/src/BuiltInTools/BrowserRefresh/HostingStartup.cs +++ b/src/BuiltInTools/BrowserRefresh/HostingStartup.cs @@ -44,10 +44,11 @@ public Action Configure(Action next) app.Map(ApplicationPaths.BlazorHotReloadMiddleware, static app => app.UseMiddleware()); app.Map(ApplicationPaths.BrowserRefreshJS, - static app => app.UseMiddleware(BrowserScriptMiddleware.GetBrowserRefreshJS())); + static app => app.UseMiddleware(ApplicationPaths.BrowserRefreshJS, BrowserScriptMiddleware.GetBrowserRefreshJS())); + // backwards compat only: app.Map(ApplicationPaths.BlazorHotReloadJS, - static app => app.UseMiddleware(BrowserScriptMiddleware.GetBlazorHotReloadJS())); + static app => app.UseMiddleware(ApplicationPaths.BlazorHotReloadJS, BrowserScriptMiddleware.GetBlazorHotReloadJS())); }); app.UseMiddleware(); diff --git a/src/BuiltInTools/BrowserRefresh/Microsoft.AspNetCore.Watch.BrowserRefresh.csproj b/src/BuiltInTools/BrowserRefresh/Microsoft.AspNetCore.Watch.BrowserRefresh.csproj index 1bcb35c0ad9d..c0074ad0fc3d 100644 --- a/src/BuiltInTools/BrowserRefresh/Microsoft.AspNetCore.Watch.BrowserRefresh.csproj +++ b/src/BuiltInTools/BrowserRefresh/Microsoft.AspNetCore.Watch.BrowserRefresh.csproj @@ -11,17 +11,19 @@ + + - - + + + + + + diff --git a/src/BuiltInTools/BrowserRefresh/WebSocketScriptInjection.js b/src/BuiltInTools/BrowserRefresh/WebSocketScriptInjection.js index 6530cd2c8ae0..befd2f818976 100644 --- a/src/BuiltInTools/BrowserRefresh/WebSocketScriptInjection.js +++ b/src/BuiltInTools/BrowserRefresh/WebSocketScriptInjection.js @@ -44,8 +44,9 @@ setTimeout(async function () { const payload = JSON.parse(message.data); const action = { 'UpdateStaticFile': () => updateStaticFile(payload.path), - 'BlazorHotReloadDeltav1': () => applyBlazorDeltas(payload.sharedSecret, payload.deltas, false), - 'BlazorHotReloadDeltav2': () => applyBlazorDeltas(payload.sharedSecret, payload.deltas, true), + 'BlazorHotReloadDeltav1': () => applyBlazorDeltas_legacy(payload.sharedSecret, payload.deltas, false), + 'BlazorHotReloadDeltav2': () => applyBlazorDeltas_legacy(payload.sharedSecret, payload.deltas, true), + 'BlazorHotReloadDeltav3': () => applyBlazorDeltas(payload.sharedSecret, payload.updateId, payload.deltas, payload.responseLoggingLevel), 'HotReloadDiagnosticsv1': () => displayDiagnostics(payload.diagnostics), 'BlazorRequestApplyUpdateCapabilities': () => getBlazorWasmApplyUpdateCapabilities(false), 'BlazorRequestApplyUpdateCapabilities2': () => getBlazorWasmApplyUpdateCapabilities(true), @@ -95,19 +96,22 @@ setTimeout(async function () { .forEach(e => updateCssElement(e)); } + function getMessageAndStack(error) { + const message = error.message || '' + let messageAndStack = error.stack || message + if (!messageAndStack.includes(message)) { + messageAndStack = message + "\n" + messageAndStack; + } + + return messageAndStack + } + function getBlazorWasmApplyUpdateCapabilities(sendErrorToClient) { let applyUpdateCapabilities; try { applyUpdateCapabilities = window.Blazor._internal.getApplyUpdateCapabilities(); } catch (error) { - const message = error.message || '' - let messageAndStack = error.stack || message - if (!messageAndStack.includes(message)) - { - messageAndStack = message + "\n" + messageAndStack; - } - - applyUpdateCapabilities = sendErrorToClient ? "!" + messageAndStack : ''; + applyUpdateCapabilities = sendErrorToClient ? "!" + getMessageAndStack(error) : ''; } connection.send(applyUpdateCapabilities); } @@ -133,7 +137,7 @@ setTimeout(async function () { styleElement.parentNode.insertBefore(newElement, styleElement.nextSibling); } - async function applyBlazorDeltas(serverSecret, deltas, sendErrorToClient) { + async function applyBlazorDeltas_legacy(serverSecret, deltas, sendErrorToClient) { if (sharedSecret && (serverSecret != sharedSecret.encodedSharedSecret)) { // Validate the shared secret if it was specified. It might be unspecified in older versions of VS // that do not support this feature as yet. @@ -170,6 +174,76 @@ setTimeout(async function () { } } + function sendDeltaApplied() { + connection.send(new Uint8Array([1]).buffer); + } + + function sendDeltaNotApplied(error) { + if (error) { + let encoder = new TextEncoder() + connection.send(encoder.encode("\0" + error.message + "\0" + error.stack)); + } else { + connection.send(new Uint8Array([0]).buffer); + } + } + + async function applyBlazorDeltas(serverSecret, updateId, deltas, responseLoggingLevel) { + if (sharedSecret && (serverSecret != sharedSecret.encodedSharedSecret)) { + // Validate the shared secret if it was specified. It might be unspecified in older versions of VS + // that do not support this feature as yet. + throw 'Unable to validate the server. Rejecting apply-update payload.'; + } + + const AgentMessageSeverity_Error = 2 + + let applyError = undefined; + let log = []; + if (window.Blazor?._internal?.applyHotReloadDeltas) { + // Only apply hot reload deltas if Blazor has been initialized. + // It's possible for Blazor to start after the initial page load, so we don't consider skipping this step + // to be a failure. These deltas will get applied later, when Blazor completes initialization. + try { + let wasmDeltas = deltas.map(delta => { + return { + "moduleId": delta.moduleId, + "metadataDelta": delta.metadataDelta, + "ilDelta": delta.ilDelta, + "pdbDelta": delta.pdbDelta, + "updatedTypes": delta.updatedTypes, + }; + }); + + log = window.Blazor._internal.applyHotReloadDeltas(wasmDeltas, responseLoggingLevel); + } catch (error) { + console.warn(error); + applyError = error; + log.push({ "message": getMessageAndStack(error), "severity": AgentMessageSeverity_Error }); + } + } + + try { + let body = JSON.stringify({ + "id": updateId, + "deltas": deltas + }); + + await fetch('/_framework/blazor-hotreload', { method: 'post', headers: { 'content-type': 'application/json' }, body: body }); + } catch (error) { + console.warn(error); + applyError = error; + log.push({ "message": getMessageAndStack(error), "severity": AgentMessageSeverity_Error }); + } + + connection.send(JSON.stringify({ + "success": !applyError, + "log": log + })); + + if (!applyError) { + notifyHotReloadApplied(); + } + } + function displayDiagnostics(diagnostics) { document.querySelectorAll('#dotnet-compile-error').forEach(el => el.remove()); const el = document.body.appendChild(document.createElement('div')); @@ -222,19 +296,6 @@ setTimeout(async function () { } } - function sendDeltaApplied() { - connection.send(new Uint8Array([1]).buffer); - } - - function sendDeltaNotApplied(error) { - if (error) { - let encoder = new TextEncoder() - connection.send(encoder.encode("\0" + error.message + "\0" + error.stack)); - } else { - connection.send(new Uint8Array([0]).buffer); - } - } - async function getSecret(serverKeyString) { if (!serverKeyString || !window.crypto || !window.crypto.subtle) { return null; diff --git a/src/BuiltInTools/DotNetDeltaApplier/HotReloadAgent.cs b/src/BuiltInTools/DotNetDeltaApplier/HotReloadAgent.cs deleted file mode 100644 index 36dbbae52846..000000000000 --- a/src/BuiltInTools/DotNetDeltaApplier/HotReloadAgent.cs +++ /dev/null @@ -1,217 +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 System.Collections.Concurrent; -using System.Diagnostics; -using System.IO.Pipes; -using System.Reflection; - -namespace Microsoft.Extensions.HotReload -{ - internal sealed class HotReloadAgent : IDisposable - { - private const string MetadataUpdaterTypeName = "System.Reflection.Metadata.MetadataUpdater"; - private const string ApplyUpdateMethodName = "ApplyUpdate"; - private const string GetCapabilitiesMethodName = "GetCapabilities"; - - private delegate void ApplyUpdateDelegate(Assembly assembly, ReadOnlySpan metadataDelta, ReadOnlySpan ilDelta, ReadOnlySpan pdbDelta); - - private readonly AgentReporter _reporter = new(); - private readonly NamedPipeClientStream _pipeClient; - private readonly Action _stdOutLog; - private readonly AssemblyLoadEventHandler _assemblyLoad; - private readonly ConcurrentDictionary> _deltas = new(); - private readonly ConcurrentDictionary _appliedAssemblies = new(); - private readonly ApplyUpdateDelegate? _applyUpdate; - private readonly string? _capabilities; - private readonly MetadataUpdateHandlerInvoker _metadataUpdateHandlerInvoker; - - public HotReloadAgent(NamedPipeClientStream pipeClient, Action stdOutLog) - { - _assemblyLoad = OnAssemblyLoad; - _pipeClient = pipeClient; - _stdOutLog = stdOutLog; - _metadataUpdateHandlerInvoker = new(_reporter); - - GetUpdaterMethods(out _applyUpdate, out _capabilities); - AppDomain.CurrentDomain.AssemblyLoad += _assemblyLoad; - } - - private void GetUpdaterMethods(out ApplyUpdateDelegate? applyUpdate, out string? capabilities) - { - applyUpdate = null; - capabilities = null; - - var metadataUpdater = Type.GetType(MetadataUpdaterTypeName + ", System.Runtime.Loader", throwOnError: false); - if (metadataUpdater == null) - { - _reporter.Report($"Type not found: {MetadataUpdaterTypeName}", AgentMessageSeverity.Error); - return; - } - - var applyUpdateMethod = metadataUpdater.GetMethod(ApplyUpdateMethodName, BindingFlags.Public | BindingFlags.Static, binder: null, [typeof(Assembly), typeof(ReadOnlySpan), typeof(ReadOnlySpan), typeof(ReadOnlySpan)], modifiers: null); - if (applyUpdateMethod == null) - { - _reporter.Report($"{MetadataUpdaterTypeName}.{ApplyUpdateMethodName} not found.", AgentMessageSeverity.Error); - return; - } - - applyUpdate = (ApplyUpdateDelegate)applyUpdateMethod.CreateDelegate(typeof(ApplyUpdateDelegate)); - - var getCapabilities = metadataUpdater.GetMethod(GetCapabilitiesMethodName, BindingFlags.NonPublic | BindingFlags.Static, binder: null, Type.EmptyTypes, modifiers: null); - if (getCapabilities == null) - { - _reporter.Report($"{MetadataUpdaterTypeName}.{GetCapabilitiesMethodName} not found.", AgentMessageSeverity.Error); - return; - } - - try - { - capabilities = getCapabilities.Invoke(obj: null, parameters: null) as string; - } - catch (Exception e) - { - _reporter.Report($"Error retrieving capabilities: {e.Message}", AgentMessageSeverity.Error); - } - } - - public async Task ReceiveDeltasAsync() - { - _reporter.Report("Writing capabilities: " + Capabilities, AgentMessageSeverity.Verbose); - - var initPayload = new ClientInitializationPayload(Capabilities); - initPayload.Write(_pipeClient); - - while (_pipeClient.IsConnected) - { - var update = await UpdatePayload.ReadAsync(_pipeClient, CancellationToken.None); - - _stdOutLog($"ResponseLoggingLevel = {update.ResponseLoggingLevel}"); - - _reporter.Report("Attempting to apply deltas.", AgentMessageSeverity.Verbose); - - ApplyDeltas(update.Deltas); - - _pipeClient.WriteByte(UpdatePayload.ApplySuccessValue); - - UpdatePayload.WriteLog(_pipeClient, _reporter.GetAndClearLogEntries(update.ResponseLoggingLevel)); - } - } - - public string Capabilities => _capabilities ?? string.Empty; - - private void OnAssemblyLoad(object? _, AssemblyLoadEventArgs eventArgs) - { - _metadataUpdateHandlerInvoker.Clear(); - - var loadedAssembly = eventArgs.LoadedAssembly; - var moduleId = TryGetModuleId(loadedAssembly); - if (moduleId is null) - { - return; - } - - if (_deltas.TryGetValue(moduleId.Value, out var updateDeltas) && _appliedAssemblies.TryAdd(loadedAssembly, loadedAssembly)) - { - // A delta for this specific Module exists and we haven't called ApplyUpdate on this instance of Assembly as yet. - ApplyDeltas(loadedAssembly, updateDeltas); - } - } - - public void ApplyDeltas(IReadOnlyList deltas) - { - Debug.Assert(Capabilities.Length > 0); - Debug.Assert(_applyUpdate != null); - - for (var i = 0; i < deltas.Count; i++) - { - var item = deltas[i]; - foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) - { - if (TryGetModuleId(assembly) is Guid moduleId && moduleId == item.ModuleId) - { - _applyUpdate(assembly, item.MetadataDelta, item.ILDelta, pdbDelta: []); - } - } - - // Additionally stash the deltas away so it may be applied to assemblies loaded later. - var cachedDeltas = _deltas.GetOrAdd(item.ModuleId, static _ => new()); - cachedDeltas.Add(item); - } - - _metadataUpdateHandlerInvoker.Invoke(GetMetadataUpdateTypes(deltas)); - } - - private Type[] GetMetadataUpdateTypes(IReadOnlyList deltas) - { - List? types = null; - - foreach (var delta in deltas) - { - var assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => TryGetModuleId(assembly) is Guid moduleId && moduleId == delta.ModuleId); - if (assembly is null) - { - continue; - } - - foreach (var updatedType in delta.UpdatedTypes) - { - // Must be a TypeDef. - Debug.Assert(updatedType >> 24 == 0x02); - - // The type has to be in the manifest module since Hot Reload does not support multi-module assemblies: - try - { - var type = assembly.ManifestModule.ResolveType(updatedType); - types ??= new(); - types.Add(type); - } - catch (Exception e) - { - _reporter.Report($"Failed to load type 0x{updatedType:X8}: {e.Message}", AgentMessageSeverity.Warning); - } - } - } - - return types?.ToArray() ?? Type.EmptyTypes; - } - - public void ApplyDeltas(Assembly assembly, IReadOnlyList deltas) - { - Debug.Assert(_applyUpdate != null); - - try - { - foreach (var item in deltas) - { - _applyUpdate(assembly, item.MetadataDelta, item.ILDelta, ReadOnlySpan.Empty); - } - - _reporter.Report("Deltas applied.", AgentMessageSeverity.Verbose); - } - catch (Exception ex) - { - _reporter.Report(ex.ToString(), AgentMessageSeverity.Warning); - } - } - - public void Dispose() - { - AppDomain.CurrentDomain.AssemblyLoad -= _assemblyLoad; - } - - private static Guid? TryGetModuleId(Assembly loadedAssembly) - { - try - { - return loadedAssembly.Modules.FirstOrDefault()?.ModuleVersionId; - } - catch - { - // Assembly.Modules might throw. See https://github.com/dotnet/aspnetcore/issues/33152 - } - - return default; - } - } -} diff --git a/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj b/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj index 097eb0287927..c59a80a6e1c1 100644 --- a/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj +++ b/src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj @@ -1,4 +1,5 @@  + + $(VisualStudioServiceTargetFramework) + false + none + false + enable + preview + + + true + true + Microsoft.DotNet.HotReload.Agent + false + + Package containing sources of Hot Reload agent. + + + $(NoWarn);NU5128 + + + + + + diff --git a/src/BuiltInTools/HotReloadAgent/AgentMessageSeverity.cs b/src/BuiltInTools/HotReloadAgent/AgentMessageSeverity.cs new file mode 100644 index 000000000000..d6c23929b7b4 --- /dev/null +++ b/src/BuiltInTools/HotReloadAgent/AgentMessageSeverity.cs @@ -0,0 +1,10 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + + +internal enum AgentMessageSeverity : byte +{ + Verbose = 0, + Warning = 1, + Error = 2, +} diff --git a/src/BuiltInTools/DotNetDeltaApplier/AgentReporter.cs b/src/BuiltInTools/HotReloadAgent/AgentReporter.cs similarity index 95% rename from src/BuiltInTools/DotNetDeltaApplier/AgentReporter.cs rename to src/BuiltInTools/HotReloadAgent/AgentReporter.cs index 37b50cd78318..794a23956359 100644 --- a/src/BuiltInTools/DotNetDeltaApplier/AgentReporter.cs +++ b/src/BuiltInTools/HotReloadAgent/AgentReporter.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.Extensions.HotReload; +namespace Microsoft.DotNet.HotReload; internal sealed class AgentReporter { diff --git a/src/BuiltInTools/HotReloadAgent/HotReloadAgent.cs b/src/BuiltInTools/HotReloadAgent/HotReloadAgent.cs new file mode 100644 index 000000000000..5350c0ae2d8d --- /dev/null +++ b/src/BuiltInTools/HotReloadAgent/HotReloadAgent.cs @@ -0,0 +1,196 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Concurrent; +using System.Diagnostics; +using System.Reflection; +using Microsoft.DotNet.Watch; + +namespace Microsoft.DotNet.HotReload; + +#if NET +[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Hot reload is only expected to work when trimming is disabled.")] +#endif +internal sealed class HotReloadAgent : IDisposable +{ + private const string MetadataUpdaterTypeName = "System.Reflection.Metadata.MetadataUpdater"; + private const string ApplyUpdateMethodName = "ApplyUpdate"; + private const string GetCapabilitiesMethodName = "GetCapabilities"; + + private delegate void ApplyUpdateDelegate(Assembly assembly, ReadOnlySpan metadataDelta, ReadOnlySpan ilDelta, ReadOnlySpan pdbDelta); + + public AgentReporter Reporter { get; } = new(); + + private readonly ConcurrentDictionary> _deltas = new(); + private readonly ConcurrentDictionary _appliedAssemblies = new(); + private readonly ApplyUpdateDelegate? _applyUpdate; + private readonly string? _capabilities; + private readonly MetadataUpdateHandlerInvoker _metadataUpdateHandlerInvoker; + + public HotReloadAgent() + { + _metadataUpdateHandlerInvoker = new(Reporter); + + GetUpdaterMethodsAndCapabilities(out _applyUpdate, out _capabilities); + + AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; + } + + public void Dispose() + { + AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoad; + } + + private void GetUpdaterMethodsAndCapabilities(out ApplyUpdateDelegate? applyUpdate, out string? capabilities) + { + applyUpdate = null; + capabilities = null; + + var metadataUpdater = Type.GetType(MetadataUpdaterTypeName + ", System.Runtime.Loader", throwOnError: false); + if (metadataUpdater == null) + { + Reporter.Report($"Type not found: {MetadataUpdaterTypeName}", AgentMessageSeverity.Error); + return; + } + + var applyUpdateMethod = metadataUpdater.GetMethod(ApplyUpdateMethodName, BindingFlags.Public | BindingFlags.Static, binder: null, [typeof(Assembly), typeof(ReadOnlySpan), typeof(ReadOnlySpan), typeof(ReadOnlySpan)], modifiers: null); + if (applyUpdateMethod == null) + { + Reporter.Report($"{MetadataUpdaterTypeName}.{ApplyUpdateMethodName} not found.", AgentMessageSeverity.Error); + return; + } + + applyUpdate = (ApplyUpdateDelegate)applyUpdateMethod.CreateDelegate(typeof(ApplyUpdateDelegate)); + + var getCapabilities = metadataUpdater.GetMethod(GetCapabilitiesMethodName, BindingFlags.NonPublic | BindingFlags.Static, binder: null, Type.EmptyTypes, modifiers: null); + if (getCapabilities == null) + { + Reporter.Report($"{MetadataUpdaterTypeName}.{GetCapabilitiesMethodName} not found.", AgentMessageSeverity.Error); + return; + } + + try + { + capabilities = getCapabilities.Invoke(obj: null, parameters: null) as string; + } + catch (Exception e) + { + Reporter.Report($"Error retrieving capabilities: {e.Message}", AgentMessageSeverity.Error); + } + } + + public string Capabilities => _capabilities ?? string.Empty; + + private void OnAssemblyLoad(object? _, AssemblyLoadEventArgs eventArgs) + { + _metadataUpdateHandlerInvoker.Clear(); + + var loadedAssembly = eventArgs.LoadedAssembly; + var moduleId = TryGetModuleId(loadedAssembly); + if (moduleId is null) + { + return; + } + + if (_deltas.TryGetValue(moduleId.Value, out var updateDeltas) && _appliedAssemblies.TryAdd(loadedAssembly, loadedAssembly)) + { + // A delta for this specific Module exists and we haven't called ApplyUpdate on this instance of Assembly as yet. + ApplyDeltas(loadedAssembly, updateDeltas); + } + } + + public IReadOnlyCollection<(string message, AgentMessageSeverity severity)> GetAndClearLogEntries(ResponseLoggingLevel loggingLevel) + => Reporter.GetAndClearLogEntries(loggingLevel); + + public void ApplyDeltas(IEnumerable deltas) + { + Debug.Assert(Capabilities.Length > 0); + Debug.Assert(_applyUpdate != null); + + foreach (var delta in deltas) + { + Reporter.Report($"Applying delta to module {delta.ModuleId}.", AgentMessageSeverity.Verbose); + + foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) + { + if (TryGetModuleId(assembly) is Guid moduleId && moduleId == delta.ModuleId) + { + _applyUpdate(assembly, delta.MetadataDelta, delta.ILDelta, delta.PdbDelta); + } + } + + // Additionally stash the deltas away so it may be applied to assemblies loaded later. + var cachedDeltas = _deltas.GetOrAdd(delta.ModuleId, static _ => new()); + cachedDeltas.Add(delta); + } + + _metadataUpdateHandlerInvoker.Invoke(GetMetadataUpdateTypes(deltas)); + } + + private Type[] GetMetadataUpdateTypes(IEnumerable deltas) + { + List? types = null; + + foreach (var delta in deltas) + { + var assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(assembly => TryGetModuleId(assembly) is Guid moduleId && moduleId == delta.ModuleId); + if (assembly is null) + { + continue; + } + + foreach (var updatedType in delta.UpdatedTypes) + { + // Must be a TypeDef. + Debug.Assert(updatedType >> 24 == 0x02); + + // The type has to be in the manifest module since Hot Reload does not support multi-module assemblies: + try + { + var type = assembly.ManifestModule.ResolveType(updatedType); + types ??= new(); + types.Add(type); + } + catch (Exception e) + { + Reporter.Report($"Failed to load type 0x{updatedType:X8}: {e.Message}", AgentMessageSeverity.Warning); + } + } + } + + return types?.ToArray() ?? Type.EmptyTypes; + } + + private void ApplyDeltas(Assembly assembly, IReadOnlyList deltas) + { + Debug.Assert(_applyUpdate != null); + + try + { + foreach (var item in deltas) + { + _applyUpdate(assembly, item.MetadataDelta, item.ILDelta, item.PdbDelta); + } + + Reporter.Report("Deltas applied.", AgentMessageSeverity.Verbose); + } + catch (Exception ex) + { + Reporter.Report(ex.ToString(), AgentMessageSeverity.Warning); + } + } + + private static Guid? TryGetModuleId(Assembly loadedAssembly) + { + try + { + return loadedAssembly.Modules.FirstOrDefault()?.ModuleVersionId; + } + catch + { + // Assembly.Modules might throw. See https://github.com/dotnet/aspnetcore/issues/33152 + } + + return default; + } +} diff --git a/src/BuiltInTools/DotNetDeltaApplier/MetadataUpdateHandlerInvoker.cs b/src/BuiltInTools/HotReloadAgent/MetadataUpdateHandlerInvoker.cs similarity index 94% rename from src/BuiltInTools/DotNetDeltaApplier/MetadataUpdateHandlerInvoker.cs rename to src/BuiltInTools/HotReloadAgent/MetadataUpdateHandlerInvoker.cs index 223960330e82..3c3583949130 100644 --- a/src/BuiltInTools/DotNetDeltaApplier/MetadataUpdateHandlerInvoker.cs +++ b/src/BuiltInTools/HotReloadAgent/MetadataUpdateHandlerInvoker.cs @@ -1,13 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; using System.Reflection; -namespace Microsoft.Extensions.HotReload; +namespace Microsoft.DotNet.HotReload; /// /// Finds and invokes metadata update handlers. /// +#if NET +[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Hot reload is only expected to work when trimming is disabled.")] +[UnconditionalSuppressMessage("Trimming", "IL2070", Justification = "Hot reload is only expected to work when trimming is disabled.")] +#endif internal sealed class MetadataUpdateHandlerInvoker(AgentReporter reporter) { internal sealed class RegisteredActions(IReadOnlyList> clearCache, IReadOnlyList> updateApplication) @@ -163,7 +168,7 @@ internal RegisteredActions GetMetadataUpdateHandlerActions(IEnumerable han MethodInfo? GetUpdateMethod(Type handlerType, string name) { - if (handlerType.GetMethod(name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static, binder: null, new[] { typeof(Type[]) }, modifiers: null) is MethodInfo updateMethod && + if (handlerType.GetMethod(name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static, binder: null, [typeof(Type[])], modifiers: null) is MethodInfo updateMethod && updateMethod.ReturnType == typeof(void)) { return updateMethod; diff --git a/src/BuiltInTools/HotReloadAgent/Microsoft.DotNet.HotReload.Agent.projitems b/src/BuiltInTools/HotReloadAgent/Microsoft.DotNet.HotReload.Agent.projitems new file mode 100644 index 000000000000..c28d7de9cdf7 --- /dev/null +++ b/src/BuiltInTools/HotReloadAgent/Microsoft.DotNet.HotReload.Agent.projitems @@ -0,0 +1,14 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 418B10BD-CA42-49F3-8F4A-D8CC90C8A17D + + + Microsoft.DotNet.HotReload + + + + + \ No newline at end of file diff --git a/src/BuiltInTools/HotReloadAgent/Microsoft.DotNet.HotReload.Agent.shproj b/src/BuiltInTools/HotReloadAgent/Microsoft.DotNet.HotReload.Agent.shproj new file mode 100644 index 000000000000..8bec0ced75ec --- /dev/null +++ b/src/BuiltInTools/HotReloadAgent/Microsoft.DotNet.HotReload.Agent.shproj @@ -0,0 +1,13 @@ + + + + {418B10BD-CA42-49F3-8F4A-D8CC90C8A17D} + 14.0 + + + + + + + + \ No newline at end of file diff --git a/src/BuiltInTools/HotReloadAgent/ResponseLoggingLevel.cs b/src/BuiltInTools/HotReloadAgent/ResponseLoggingLevel.cs new file mode 100644 index 000000000000..b081d74326f1 --- /dev/null +++ b/src/BuiltInTools/HotReloadAgent/ResponseLoggingLevel.cs @@ -0,0 +1,10 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.DotNet.HotReload; + +internal enum ResponseLoggingLevel : byte +{ + WarningsAndErrors = 0, + Verbose = 1, +} diff --git a/src/BuiltInTools/HotReloadAgent/UpdateDelta.cs b/src/BuiltInTools/HotReloadAgent/UpdateDelta.cs new file mode 100644 index 000000000000..f5bba35278ac --- /dev/null +++ b/src/BuiltInTools/HotReloadAgent/UpdateDelta.cs @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.DotNet.Watch; +internal readonly struct UpdateDelta(Guid moduleId, byte[] metadataDelta, byte[] ilDelta, byte[] pdbDelta, int[] updatedTypes) +{ + public Guid ModuleId { get; } = moduleId; + public byte[] MetadataDelta { get; } = metadataDelta; + public byte[] ILDelta { get; } = ilDelta; + public byte[] PdbDelta { get; } = pdbDelta; + public int[] UpdatedTypes { get; } = updatedTypes; +} diff --git a/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs b/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs index 20486f7baa0e..a801de15dfbf 100644 --- a/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs +++ b/src/BuiltInTools/dotnet-format/Commands/FormatCommandCommon.cs @@ -15,7 +15,6 @@ internal static class FormatCommandCommon internal const int UnhandledExceptionExitCode = 1; internal const int CheckFailedExitCode = 2; internal const int UnableToLocateMSBuildExitCode = 3; - internal const int UnableToLocateDotNetCliExitCode = 4; private static string[] VerbosityLevels => new[] { "q", "quiet", "m", "minimal", "n", "normal", "d", "detailed", "diag", "diagnostic" }; private static string[] SeverityLevels => new[] { "info", "warn", "error" }; @@ -102,14 +101,6 @@ internal static async Task FormatAsync(FormatOptions formatOptions, ILogger var runtimeVersion = GetRuntimeVersion(); logger.LogDebug(Resources.The_dotnet_runtime_version_is_0, runtimeVersion); - if (!TryGetDotNetCliVersion(out var dotnetVersion)) - { - logger.LogError(Resources.Unable_to_locate_dotnet_CLI_Ensure_that_it_is_on_the_PATH); - return UnableToLocateDotNetCliExitCode; - } - - logger.LogTrace(Resources.The_dotnet_CLI_version_is_0, dotnetVersion); - if (!TryLoadMSBuild(out var msBuildPath)) { logger.LogError(Resources.Unable_to_locate_MSBuild_Ensure_the_NET_SDK_was_installed_with_the_official_installer); @@ -354,23 +345,6 @@ private static string EnsureTrailingSlash(string path) ?.InformationalVersion; } - internal static bool TryGetDotNetCliVersion([NotNullWhen(returnValue: true)] out string? dotnetVersion) - { - try - { - var processInfo = ProcessRunner.CreateProcess("dotnet", "--version", captureOutput: true, displayWindow: false); - var versionResult = processInfo.Result.GetAwaiter().GetResult(); - - dotnetVersion = versionResult.OutputLines[0].Trim(); - return true; - } - catch - { - dotnetVersion = null; - return false; - } - } - internal static bool TryLoadMSBuild([NotNullWhen(returnValue: true)] out string? msBuildPath) { try diff --git a/src/BuiltInTools/dotnet-format/Resources.resx b/src/BuiltInTools/dotnet-format/Resources.resx index 999aa66a5a2d..ec627d90ce53 100644 --- a/src/BuiltInTools/dotnet-format/Resources.resx +++ b/src/BuiltInTools/dotnet-format/Resources.resx @@ -225,9 +225,6 @@ Standard input markers ('/dev/stdin', '-') can only be used either with `--include` or `--exclude`, but not both. - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - The dotnet CLI version is '{0}'. diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.cs.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.cs.xlf index f86d04054ce8..f3a21d499b4d 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.cs.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.cs.xlf @@ -377,11 +377,6 @@ Nepovedlo se najít MSBuild. Ujistěte se, že se sada .NET SDK nainstalovala pomocí oficiálního instalačního programu. - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - Nepovedlo se najít .NET CLI. Ujistěte se, že se nachází v proměnné PATH. - - Unable to organize imports for '{0}'. The document is too complex. Nepovedlo se uspořádat importy pro {0}. Dokument je příliš složitý. diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.de.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.de.xlf index 677400e07673..40a49347e259 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.de.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.de.xlf @@ -377,11 +377,6 @@ MSBuild wurde nicht gefunden. Stellen Sie sicher, dass das .NET SDK mit dem offiziellen Installationsprogramm installiert wurde. - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - Die dotnet-CLI wurde nicht gefunden. Stellen Sie sicher, dass sie sich im Pfad befindet. - - Unable to organize imports for '{0}'. The document is too complex. Importe für "{0}" können nicht organisiert werden. Das Dokument ist zu komplex. diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.es.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.es.xlf index 79008550cfdd..775cdef7cdf3 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.es.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.es.xlf @@ -377,11 +377,6 @@ No se encuentra MSBuild. Asegúrese de que el SDK de .NET se haya instalado con el instalador oficial. - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - No se encuentra la CLI de dotnet. Asegúrese de que esté en la ruta de acceso (PATH). - - Unable to organize imports for '{0}'. The document is too complex. No se pueden organizar las importaciones para "{0}". El documento es demasiado complejo. diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.fr.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.fr.xlf index 7115ef2dd68a..c29da3ec3b44 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.fr.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.fr.xlf @@ -377,11 +377,6 @@ Impossible de localiser MSBuild. Vérifiez que le SDK .NET a été installé avec le programme d'installation officiel. - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - Impossible de localiser l'interface CLI dotnet. Vérifiez qu'elle est dans le chemin. - - Unable to organize imports for '{0}'. The document is too complex. Impossible d'organiser les importations pour '{0}'. Le document est trop complexe. diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.it.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.it.xlf index 3ffa3a39380f..2aeb29336f18 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.it.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.it.xlf @@ -377,11 +377,6 @@ Non è possibile individuare MSBuild. Assicurarsi che .NET SDK sia stato installato con il programma di installazione ufficiale. - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - Non è possibile individuare l'interfaccia della riga di comando di dotnet. Assicurarsi che sia indicata in PATH. - - Unable to organize imports for '{0}'. The document is too complex. Non è possibile organizzare le importazioni per '{0}'. Il documento è troppo complesso. diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.ja.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.ja.xlf index 11fa905930d7..4cf225955ceb 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.ja.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.ja.xlf @@ -377,11 +377,6 @@ MSBuild が見つかりません。.NET SDK が正式なインストーラーでインストールされたことを確認してください。 - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - dotnet CLI が見つかりません。PATH 上にあることを確認してください。 - - Unable to organize imports for '{0}'. The document is too complex. '{0}' のインポートを整理できません。ドキュメントが複雑すぎます。 diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.ko.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.ko.xlf index e8d31acc2adb..5fe1286052e1 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.ko.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.ko.xlf @@ -377,11 +377,6 @@ MSBuild를 찾을 수 없습니다. 공식 설치 관리자를 사용하여 .NET SDK를 설치했는지 확인하세요. - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - dotnet CLI를 찾을 수 없습니다. PATH에 있는지 확인하세요. - - Unable to organize imports for '{0}'. The document is too complex. '{0}'에 대한 가져오기를 구성할 수 없습니다. 문서가 너무 복잡합니다. diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.pl.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.pl.xlf index 936d356f2ac0..37b8a4e1f484 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.pl.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.pl.xlf @@ -377,11 +377,6 @@ Nie można zlokalizować programu MSBuild. Upewnij się, że zestaw .NET SDK został zainstalowany przy użyciu oficjalnego instalatora. - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - Nie można zlokalizować wiersza polecenia dotnet. Upewnij się, że znajduje się on w ścieżce. - - Unable to organize imports for '{0}'. The document is too complex. Nie można zorganizować importów dla elementu „{0}”. Dokument jest zbyt złożony. diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.pt-BR.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.pt-BR.xlf index 8061e736ecbe..b57c3e3b44f4 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.pt-BR.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.pt-BR.xlf @@ -377,11 +377,6 @@ Não é possível localizar o MSBuild. Verifique se o SDK do .NET foi instalado com o instalador oficial. - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - Não é possível localizar a CLI do dotnet. Verifique se está no CAMINHO. - - Unable to organize imports for '{0}'. The document is too complex. Não é possível organizar importações para '{0}'. O documento é muito complexo. diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.ru.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.ru.xlf index 738cdc715ecd..876497b11b1e 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.ru.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.ru.xlf @@ -377,11 +377,6 @@ Не удается найти MSBuild. Убедитесь, что пакет SDK для .NET был установлен с официальным установщиком. - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - Не удалось найти CLI dotnet. Убедитесь, что путь к нему добавлен в переменную среды PATH. - - Unable to organize imports for '{0}'. The document is too complex. Не удается организовать импорты для "{0}". Слишком сложный документ. diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.tr.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.tr.xlf index a2e299a0719d..c20259208904 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.tr.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.tr.xlf @@ -377,11 +377,6 @@ MSBuild bulunamıyor. .NET SDK'nın resmi yükleyici kullanılarak yüklendiğinden emin olun. - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - dotnet CLI bulunamıyor. dotnet CLI'nin PATH üzerinde olduğundan emin olun. - - Unable to organize imports for '{0}'. The document is too complex. '{0}' için içeri aktarmalar düzenlenemiyor. Belge çok karmaşık. diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.zh-Hans.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.zh-Hans.xlf index 2159fb65a4d1..88482781e59c 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.zh-Hans.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.zh-Hans.xlf @@ -377,11 +377,6 @@ 无法找到 MSBuild。请确保 .NET SDK 是与官方安装程序一起安装的。 - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - 找不到 dotnet CLI。请确保它在路径上。 - - Unable to organize imports for '{0}'. The document is too complex. 无法整理“{0}”的导入项。文档太复杂。 diff --git a/src/BuiltInTools/dotnet-format/xlf/Resources.zh-Hant.xlf b/src/BuiltInTools/dotnet-format/xlf/Resources.zh-Hant.xlf index 68ef3223f390..10d7cfa16699 100644 --- a/src/BuiltInTools/dotnet-format/xlf/Resources.zh-Hant.xlf +++ b/src/BuiltInTools/dotnet-format/xlf/Resources.zh-Hant.xlf @@ -377,11 +377,6 @@ 找不到 MSBuild。請確認已使用正式安裝程式安裝了 .NET SDK。 - - Unable to locate dotnet CLI. Ensure that it is on the PATH. - 找不到 dotnet CLI。請確認其位於 PATH 上。 - - Unable to organize imports for '{0}'. The document is too complex. 無法組織 '{0}' 的匯入。文件太複雜。 diff --git a/src/BuiltInTools/dotnet-watch.slnf b/src/BuiltInTools/dotnet-watch.slnf index 5baaf69115c2..e18611cb6620 100644 --- a/src/BuiltInTools/dotnet-watch.slnf +++ b/src/BuiltInTools/dotnet-watch.slnf @@ -7,12 +7,14 @@ "src\\BuiltInTools\\BrowserRefresh\\Microsoft.AspNetCore.Watch.BrowserRefresh.csproj", "src\\BuiltInTools\\DotNetDeltaApplier\\Microsoft.Extensions.DotNetDeltaApplier.csproj", "src\\BuiltInTools\\DotNetWatchTasks\\DotNetWatchTasks.csproj", + "src\\BuiltInTools\\HotReloadAgent.Package\\Microsoft.DotNet.HotReload.Agent.Package.csproj", + "src\\BuiltInTools\\HotReloadAgent\\Microsoft.DotNet.HotReload.Agent.shproj", "src\\BuiltInTools\\dotnet-watch\\dotnet-watch.csproj", "test\\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests\\Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj", "test\\Microsoft.Extensions.DotNetDeltaApplier.Tests\\Microsoft.Extensions.DotNetDeltaApplier.Tests.csproj", "test\\Microsoft.NET.TestFramework\\Microsoft.NET.TestFramework.csproj", - "test\\dotnet-watch.Tests\\dotnet-watch.Tests.csproj", - "test\\Microsoft.WebTools.AspireService.Tests\\Microsoft.WebTools.AspireService.Tests.csproj" + "test\\Microsoft.WebTools.AspireService.Tests\\Microsoft.WebTools.AspireService.Tests.csproj", + "test\\dotnet-watch.Tests\\dotnet-watch.Tests.csproj" ] } } \ No newline at end of file diff --git a/src/BuiltInTools/dotnet-watch/Aspire/AspireServiceFactory.cs b/src/BuiltInTools/dotnet-watch/Aspire/AspireServiceFactory.cs index 753d6dd66cfb..d806dd11ba45 100644 --- a/src/BuiltInTools/dotnet-watch/Aspire/AspireServiceFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Aspire/AspireServiceFactory.cs @@ -5,14 +5,10 @@ using System.Diagnostics; using System.Globalization; using System.Threading.Channels; +using Aspire.Tools.Service; using Microsoft.Build.Graph; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; -using Microsoft.WebTools.AspireServer; -using Microsoft.WebTools.AspireServer.Contracts; -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal class AspireServiceFactory : IRuntimeProcessLauncherFactory { @@ -34,7 +30,7 @@ private readonly struct Session(string dcpId, string sessionId, RunningProject r private readonly ProjectLauncher _projectLauncher; private readonly AspireServerService _service; - private readonly IReadOnlyList<(string name, string value)> _buildProperties; + private readonly IReadOnlyList _buildArguments; /// /// Lock to access: @@ -47,10 +43,10 @@ private readonly struct Session(string dcpId, string sessionId, RunningProject r private int _sessionIdDispenser; private volatile bool _isDisposed; - public SessionManager(ProjectLauncher projectLauncher, IReadOnlyList<(string name, string value)> buildProperties) + public SessionManager(ProjectLauncher projectLauncher, IReadOnlyList buildArguments) { _projectLauncher = projectLauncher; - _buildProperties = buildProperties; + _buildArguments = buildArguments; _service = new AspireServerService( this, @@ -104,11 +100,11 @@ async ValueTask IAspireServerEvents.StartProjectAsync(string dcpId, Proj var projectOptions = GetProjectOptions(projectLaunchInfo); var sessionId = Interlocked.Increment(ref _sessionIdDispenser).ToString(CultureInfo.InvariantCulture); - await StartProjectAsync(dcpId, sessionId, projectOptions, build: false, isRestart: false, cancellationToken); + await StartProjectAsync(dcpId, sessionId, projectOptions, isRestart: false, cancellationToken); return sessionId; } - public async ValueTask StartProjectAsync(string dcpId, string sessionId, ProjectOptions projectOptions, bool build, bool isRestart, CancellationToken cancellationToken) + public async ValueTask StartProjectAsync(string dcpId, string sessionId, ProjectOptions projectOptions, bool isRestart, CancellationToken cancellationToken) { ObjectDisposedException.ThrowIf(_isDisposed, this); @@ -125,9 +121,8 @@ public async ValueTask StartProjectAsync(string dcpId, string se var writeResult = outputChannel.Writer.TryWrite(line); Debug.Assert(writeResult); }, - restartOperation: (build, cancellationToken) => - StartProjectAsync(dcpId, sessionId, projectOptions, build, isRestart: true, cancellationToken), - build: build, + restartOperation: cancellationToken => + StartProjectAsync(dcpId, sessionId, projectOptions, isRestart: true, cancellationToken), cancellationToken); if (runningProject == null) @@ -239,7 +234,7 @@ private ProjectOptions GetProjectOptions(ProjectLaunchRequest projectLaunchInfo) IsRootProject = false, ProjectPath = projectLaunchInfo.ProjectPath, WorkingDirectory = _projectLauncher.EnvironmentOptions.WorkingDirectory, // TODO: Should DCP protocol specify? - BuildProperties = _buildProperties, // TODO: Should DCP protocol specify? + BuildArguments = _buildArguments, // TODO: Should DCP protocol specify? Command = "run", CommandArguments = arguments, LaunchEnvironmentVariables = projectLaunchInfo.Environment?.Select(kvp => (kvp.Key, kvp.Value)).ToArray() ?? [], @@ -255,8 +250,8 @@ private ProjectOptions GetProjectOptions(ProjectLaunchRequest projectLaunchInfo) public static readonly AspireServiceFactory Instance = new(); public const string AppHostProjectCapability = "Aspire"; - public IRuntimeProcessLauncher? TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, IReadOnlyList<(string name, string value)> buildProperties) + public IRuntimeProcessLauncher? TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, IReadOnlyList buildArguments) => projectNode.GetCapabilities().Contains(AppHostProjectCapability) - ? new SessionManager(projectLauncher, buildProperties) + ? new SessionManager(projectLauncher, buildArguments) : null; } diff --git a/src/BuiltInTools/dotnet-watch/Browser/BrowserConnection.cs b/src/BuiltInTools/dotnet-watch/Browser/BrowserConnection.cs new file mode 100644 index 000000000000..b7824f636011 --- /dev/null +++ b/src/BuiltInTools/dotnet-watch/Browser/BrowserConnection.cs @@ -0,0 +1,84 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + + +using System.Buffers; +using System.Net.WebSockets; + +namespace Microsoft.DotNet.Watch; + +internal readonly struct BrowserConnection : IAsyncDisposable +{ + private static int s_lastId; + + public WebSocket ClientSocket { get; } + public string? SharedSecret { get; } + public int Id { get; } + public IReporter Reporter { get; } + + public BrowserConnection(WebSocket clientSocket, string? sharedSecret, IReporter reporter) + { + ClientSocket = clientSocket; + SharedSecret = sharedSecret; + Id = Interlocked.Increment(ref s_lastId); + Reporter = new BrowserSpecificReporter(Id, reporter); + + Reporter.Verbose($"Connected to referesh server."); + } + + public async ValueTask DisposeAsync() + { + await ClientSocket.CloseOutputAsync(WebSocketCloseStatus.Empty, null, default); + ClientSocket.Dispose(); + + Reporter.Verbose($"Disconnected."); + } + + internal async ValueTask TrySendMessageAsync(ReadOnlyMemory messageBytes, CancellationToken cancellationToken) + { + try + { + await ClientSocket.SendAsync(messageBytes, WebSocketMessageType.Text, endOfMessage: true, cancellationToken); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Reporter.Verbose($"Failed to send message: {e.Message}"); + return false; + } + + return true; + } + + internal async ValueTask TryReceiveMessageAsync(Action, IReporter> receiver, CancellationToken cancellationToken) + { + var writer = new ArrayBufferWriter(initialCapacity: 1024); + + while (true) + { + ValueWebSocketReceiveResult result; + try + { + result = await ClientSocket.ReceiveAsync(writer.GetMemory(), cancellationToken); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Reporter.Verbose($"Failed to receive response: {e.Message}"); + return false; + } + + if (result.MessageType == WebSocketMessageType.Close) + { + return false; + } + + writer.Advance(result.Count); + if (result.EndOfMessage) + { + break; + } + } + + receiver(writer.WrittenSpan, Reporter); + return true; + } +} diff --git a/src/BuiltInTools/dotnet-watch/Browser/BrowserConnector.cs b/src/BuiltInTools/dotnet-watch/Browser/BrowserConnector.cs index 21d2f2cfce13..dc120099b3b7 100644 --- a/src/BuiltInTools/dotnet-watch/Browser/BrowserConnector.cs +++ b/src/BuiltInTools/dotnet-watch/Browser/BrowserConnector.cs @@ -6,10 +6,8 @@ using System.Diagnostics.CodeAnalysis; using System.Text.RegularExpressions; using Microsoft.Build.Graph; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal sealed partial class BrowserConnector(DotNetWatchContext context) : IAsyncDisposable { @@ -150,7 +148,7 @@ void handler(OutputLine line) // Subsequent iterations (project has been rebuilt and relaunched). // Use refresh server to reload the browser, if available. context.Reporter.Verbose("Reloading browser."); - _ = server.ReloadAsync(cancellationToken); + _ = server.SendReloadMessageAsync(cancellationToken); } } } @@ -223,9 +221,9 @@ private bool CanLaunchBrowser(DotNetWatchContext context, ProjectGraphNode proje return false; } - if (projectOptions.Command != "run") + if (!CommandLineOptions.IsCodeExecutionCommand(projectOptions.Command)) { - reporter.Verbose("Browser refresh is only supported for run commands."); + reporter.Verbose($"Command '{projectOptions.Command}' does not support browser refresh."); return false; } diff --git a/src/BuiltInTools/dotnet-watch/Browser/BrowserRefreshServer.cs b/src/BuiltInTools/dotnet-watch/Browser/BrowserRefreshServer.cs index c3547bd5b146..0f7c737e5687 100644 --- a/src/BuiltInTools/dotnet-watch/Browser/BrowserRefreshServer.cs +++ b/src/BuiltInTools/dotnet-watch/Browser/BrowserRefreshServer.cs @@ -16,24 +16,23 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { /// /// Communicates with aspnetcore-browser-refresh.js loaded in the browser. /// internal sealed class BrowserRefreshServer : IAsyncDisposable { - private readonly byte[] ReloadMessage = Encoding.UTF8.GetBytes("Reload"); - private readonly byte[] WaitMessage = Encoding.UTF8.GetBytes("Wait"); - private readonly JsonSerializerOptions _jsonSerializerOptions = new(JsonSerializerDefaults.Web); - private readonly List<(WebSocket clientSocket, string? sharedSecret)> _clientSockets = new(); - private readonly RSA _rsa; + private static readonly ReadOnlyMemory s_reloadMessage = Encoding.UTF8.GetBytes("Reload"); + private static readonly ReadOnlyMemory s_waitMessage = Encoding.UTF8.GetBytes("Wait"); + private static readonly JsonSerializerOptions s_jsonSerializerOptions = new(JsonSerializerDefaults.Web); + private readonly List _activeConnections = []; + private readonly RSA _rsa; private readonly IReporter _reporter; private readonly TaskCompletionSource _terminateWebSocket; - private readonly TaskCompletionSource _clientConnected; + private readonly TaskCompletionSource _browserConnected; private readonly string? _environmentHostName; // initialized by StartAsync @@ -48,10 +47,32 @@ public BrowserRefreshServer(EnvironmentOptions options, IReporter reporter) Options = options; _reporter = reporter; _terminateWebSocket = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - _clientConnected = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + _browserConnected = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); _environmentHostName = EnvironmentVariables.AutoReloadWSHostName; } + public async ValueTask DisposeAsync() + { + _rsa.Dispose(); + + BrowserConnection[] connectionsToDispose; + lock (_activeConnections) + { + connectionsToDispose = [.. _activeConnections]; + _activeConnections.Clear(); + } + + foreach (var connection in connectionsToDispose) + { + _reporter.Verbose($"Disconnecting from browser #{connection.Id}."); + await connection.DisposeAsync(); + } + + _refreshServer?.Dispose(); + + _terminateWebSocket.TrySetResult(); + } + public void SetEnvironmentVariables(EnvironmentVariablesBuilder environmentBuilder) { Debug.Assert(_refreshServer != null); @@ -62,6 +83,12 @@ public void SetEnvironmentVariables(EnvironmentVariablesBuilder environmentBuild environmentBuilder.DotNetStartupHookDirective.Add(Path.Combine(AppContext.BaseDirectory, "middleware", "Microsoft.AspNetCore.Watch.BrowserRefresh.dll")); environmentBuilder.AspNetCoreHostingStartupAssembliesVariable.Add("Microsoft.AspNetCore.Watch.BrowserRefresh"); + + if (_reporter.IsVerbose) + { + // enable debug logging from middleware: + environmentBuilder.SetVariable("Logging__LogLevel__Microsoft.AspNetCore.Watch", "Debug"); + } } public string GetServerKey() @@ -73,7 +100,7 @@ public async ValueTask StartAsync(CancellationToken cancellationToken) var hostName = _environmentHostName ?? "127.0.0.1"; - var supportsTLS = await SupportsTLS(); + var supportsTLS = await SupportsTlsAsync(); _refreshServer = new HostBuilder() .ConfigureWebHost(builder => @@ -91,7 +118,7 @@ public async ValueTask StartAsync(CancellationToken cancellationToken) builder.Configure(app => { app.UseWebSockets(); - app.Run(WebSocketRequest); + app.Run(WebSocketRequestAsync); }); }) .Build(); @@ -129,7 +156,7 @@ private IEnumerable GetServerUrls(IHost server) ]; } - private async Task WebSocketRequest(HttpContext context) + private async Task WebSocketRequestAsync(HttpContext context) { if (!context.WebSockets.IsWebSocketRequest) { @@ -147,8 +174,14 @@ private async Task WebSocketRequest(HttpContext context) } var clientSocket = await context.WebSockets.AcceptWebSocketAsync(subProtocol); - _clientSockets.Add((clientSocket, sharedSecret)); - _clientConnected.TrySetResult(); + var connection = new BrowserConnection(clientSocket, sharedSecret, _reporter); + + lock (_activeConnections) + { + _activeConnections.Add(connection); + } + + _browserConnected.TrySetResult(); await _terminateWebSocket.Task; } @@ -157,7 +190,7 @@ private async Task WebSocketRequest(HttpContext context) /// internal void EmulateClientConnected() { - _clientConnected.TrySetResult(); + _browserConnected.TrySetResult(); } public async Task WaitForClientConnectionAsync(CancellationToken cancellationToken) @@ -186,7 +219,7 @@ public async Task WaitForClientConnectionAsync(CancellationToken cancellationTok try { - await _clientConnected.Task.WaitAsync(cancellationToken); + await _browserConnected.Task.WaitAsync(cancellationToken); } finally { @@ -199,127 +232,99 @@ public async Task WaitForClientConnectionAsync(CancellationToken cancellationTok } } - public ValueTask SendJsonSerlialized(TValue value, CancellationToken cancellationToken = default) + private IReadOnlyCollection GetOpenBrowserConnections() { - var jsonSerialized = JsonSerializer.SerializeToUtf8Bytes(value, _jsonSerializerOptions); - return SendMessage(jsonSerialized, cancellationToken); + lock (_activeConnections) + { + return [.. _activeConnections.Where(b => b.ClientSocket.State == WebSocketState.Open)]; + } } - public async ValueTask SendJsonWithSecret(Func valueFactory, CancellationToken cancellationToken = default) + private async ValueTask DisposeClosedBrowserConnectionsAsync() { - try - { - bool messageSent = false; + List? lazyConnectionsToDispose = null; - for (var i = 0; i < _clientSockets.Count; i++) + lock (_activeConnections) + { + var j = 0; + for (var i = 0; i < _activeConnections.Count; i++) { - var (clientSocket, secret) = _clientSockets[i]; - if (clientSocket.State is not WebSocketState.Open) + var connection = _activeConnections[i]; + if (connection.ClientSocket.State == WebSocketState.Open) { - continue; + _activeConnections[j++] = connection; + } + else + { + lazyConnectionsToDispose ??= []; + lazyConnectionsToDispose.Add(connection); } - - var value = valueFactory(secret); - var messageBytes = JsonSerializer.SerializeToUtf8Bytes(value, _jsonSerializerOptions); - - await clientSocket.SendAsync(messageBytes, WebSocketMessageType.Text, endOfMessage: true, cancellationToken); - messageSent = true; } - _reporter.Verbose(messageSent ? "Browser message sent." : "Unable to send message to browser, no socket is open."); - } - catch (TaskCanceledException) - { - _reporter.Verbose("WebSocket connection has been terminated."); + _activeConnections.RemoveRange(j, _activeConnections.Count - j); } - catch (Exception ex) - { - _reporter.Verbose($"Refresh server error: {ex}"); - } - } - public async ValueTask SendMessage(ReadOnlyMemory messageBytes, CancellationToken cancellationToken = default) - { - try + if (lazyConnectionsToDispose != null) { - bool messageSent = false; - - for (var i = 0; i < _clientSockets.Count; i++) + foreach (var connection in lazyConnectionsToDispose) { - var (clientSocket, _) = _clientSockets[i]; - if (clientSocket.State is not WebSocketState.Open) - { - continue; - } - - await clientSocket.SendAsync(messageBytes, WebSocketMessageType.Text, endOfMessage: true, cancellationToken); - messageSent = true; + await connection.DisposeAsync(); } - - _reporter.Verbose(messageSent ? "Browser message sent." : "Unable to send message to browser, no socket is open."); - } - catch (TaskCanceledException) - { - _reporter.Verbose("WebSocket connection has been terminated."); - } - catch (Exception ex) - { - _reporter.Verbose($"Refresh server error: {ex}"); } } - public async ValueTask DisposeAsync() - { - _rsa.Dispose(); + public static ReadOnlyMemory SerializeJson(TValue value) + => JsonSerializer.SerializeToUtf8Bytes(value, s_jsonSerializerOptions); - for (var i = 0; i < _clientSockets.Count; i++) - { - var (clientSocket, _) = _clientSockets[i]; - await clientSocket.CloseOutputAsync(WebSocketCloseStatus.Empty, null, default); - clientSocket.Dispose(); - } + public static TValue DeserializeJson(ReadOnlySpan value) + => JsonSerializer.Deserialize(value, s_jsonSerializerOptions) ?? throw new InvalidDataException("Unexpected null object"); - _refreshServer?.Dispose(); + public ValueTask SendJsonMessageAsync(TValue value, CancellationToken cancellationToken) + => SendAsync(SerializeJson(value), cancellationToken); - _terminateWebSocket.TrySetResult(); - } + public ValueTask SendReloadMessageAsync(CancellationToken cancellationToken) + => SendAsync(s_reloadMessage, cancellationToken); + + public ValueTask SendWaitMessageAsync(CancellationToken cancellationToken) + => SendAsync(s_waitMessage, cancellationToken); - public async ValueTask ReceiveAsync(Memory buffer, CancellationToken cancellationToken) + public ValueTask SendAsync(ReadOnlyMemory messageBytes, CancellationToken cancellationToken) + => SendAndReceiveAsync(request: _ => messageBytes, response: null, cancellationToken); + + public async ValueTask SendAndReceiveAsync( + Func request, + Action, IReporter>? response, + CancellationToken cancellationToken) { - for (int i = 0; i < _clientSockets.Count; i++) + var responded = false; + + foreach (var connection in GetOpenBrowserConnections()) { - var (clientSocket, _) = _clientSockets[i]; + var requestValue = request(connection.SharedSecret); + var requestBytes = requestValue is ReadOnlyMemory bytes ? bytes : SerializeJson(requestValue); - if (clientSocket.State != WebSocketState.Open) + if (!await connection.TrySendMessageAsync(requestBytes, cancellationToken)) { continue; } - try + if (response != null && !await connection.TryReceiveMessageAsync(response, cancellationToken)) { - var result = await clientSocket.ReceiveAsync(buffer, cancellationToken); + continue; + } - if (result.MessageType == WebSocketMessageType.Close) - { - continue; - } + responded = true; + } - return result; - } - catch (Exception ex) - { - _reporter.Verbose($"Refresh server error: {ex}"); - } + if (!responded) + { + _reporter.Verbose($"Failed to receive response from a connected browser."); } - return default; + await DisposeClosedBrowserConnectionsAsync(); } - public ValueTask ReloadAsync(CancellationToken cancellationToken) => SendMessage(ReloadMessage, cancellationToken); - - public ValueTask SendWaitMessageAsync(CancellationToken cancellationToken) => SendMessage(WaitMessage, cancellationToken); - - private async Task SupportsTLS() + private async Task SupportsTlsAsync() { try { @@ -334,18 +339,18 @@ private async Task SupportsTLS() } public ValueTask RefreshBrowserAsync(CancellationToken cancellationToken) - => SendJsonSerlialized(new AspNetCoreHotReloadApplied(), cancellationToken); + => SendJsonMessageAsync(new AspNetCoreHotReloadApplied(), cancellationToken); public ValueTask ReportCompilationErrorsInBrowserAsync(ImmutableArray compilationErrors, CancellationToken cancellationToken) { _reporter.Verbose($"Updating diagnostics in the browser."); if (compilationErrors.IsEmpty) { - return SendJsonSerlialized(new AspNetCoreHotReloadApplied(), cancellationToken); + return SendJsonMessageAsync(new AspNetCoreHotReloadApplied(), cancellationToken); } else { - return SendJsonSerlialized(new HotReloadDiagnostics { Diagnostics = compilationErrors }, cancellationToken); + return SendJsonMessageAsync(new HotReloadDiagnostics { Diagnostics = compilationErrors }, cancellationToken); } } diff --git a/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs b/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs index 497fb41c3b66..7441aaaa0496 100644 --- a/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs +++ b/src/BuiltInTools/dotnet-watch/CommandLineOptions.cs @@ -7,53 +7,28 @@ using System.CommandLine.Parsing; using System.Data; using System.Diagnostics; -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; +using Microsoft.DotNet.Cli; +using Microsoft.DotNet.Tools.Run; +using NuGet.Common; -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal sealed class CommandLineOptions { public const string DefaultCommand = "run"; - private static readonly ImmutableArray s_knownCommands = - [ - "add", - "build", - "build-server", - "clean", - "format", - "help", - "list", - "msbuild", - "new", - "nuget", - "pack", - "publish", - "remove", - "restore", - "run", - "sdk", - "solution", - "store", - "test", - "tool", - "vstest", - "workload" - ]; - public bool List { get; init; } required public GlobalOptions GlobalOptions { get; init; } public string? ProjectPath { get; init; } public string? TargetFramework { get; init; } - public IReadOnlyList<(string name, string value)>? BuildProperties { get; init; } public bool NoLaunchProfile { get; init; } public string? LaunchProfileName { get; init; } public string? ExplicitCommand { get; init; } public required IReadOnlyList CommandArguments { get; init; } + public required IReadOnlyList BuildArguments { get; init; } public string Command => ExplicitCommand ?? DefaultCommand; @@ -90,12 +65,10 @@ internal sealed class CommandLineOptions var longProjectOption = new CliOption("--project") { Hidden = true, Arity = ArgumentArity.ZeroOrOne, AllowMultipleArgumentsPerToken = false }; var launchProfileOption = new CliOption("--launch-profile", "-lp") { Hidden = true, Arity = ArgumentArity.ZeroOrOne, AllowMultipleArgumentsPerToken = false }; var noLaunchProfileOption = new CliOption("--no-launch-profile") { Hidden = true }; - var targetFrameworkOption = new CliOption("--framework", "-f") { Hidden = true, Arity = ArgumentArity.ZeroOrOne, AllowMultipleArgumentsPerToken = false }; - var propertyOption = new CliOption("--property") { Hidden = true, Arity = ArgumentArity.OneOrMore, AllowMultipleArgumentsPerToken = false }; var rootCommand = new CliRootCommand(Resources.Help) { - Directives = { new EnvironmentVariablesDirective() } + Directives = { new EnvironmentVariablesDirective() }, }; foreach (var watchOption in watchOptions) @@ -107,8 +80,6 @@ internal sealed class CommandLineOptions rootCommand.Options.Add(shortProjectOption); rootCommand.Options.Add(launchProfileOption); rootCommand.Options.Add(noLaunchProfileOption); - rootCommand.Options.Add(targetFrameworkOption); - rootCommand.Options.Add(propertyOption); // We process all tokens that do not match any of the above options // to find the subcommand (the first unmatched token preceding "--") @@ -125,16 +96,33 @@ internal sealed class CommandLineOptions { Output = output, Error = output, + + // To match dotnet command line parsing (see https://github.com/dotnet/sdk/blob/4712b35b94f2ad672e69ec35097cf86fc16c2e5e/src/Cli/dotnet/Parser.cs#L169): + EnablePosixBundling = false, }; + // parse without forwarded options first: var parseResult = rootCommand.Parse(args, cliConfig); - if (parseResult.Errors.Any()) + if (ReportErrors(parseResult, reporter)) { - foreach (var error in parseResult.Errors) - { - reporter.Error(error.Message); - } + errorCode = 1; + return null; + } + + // determine subcommand: + var explicitCommand = TryGetSubcommand(parseResult); + var command = explicitCommand ?? RunCommandParser.GetCommand(); + var buildOptions = command.Options.Where(o => o is IForwardedOption); + + foreach (var buildOption in buildOptions) + { + rootCommand.Options.Add(buildOption); + } + // reparse with forwarded options: + parseResult = rootCommand.Parse(args, cliConfig); + if (ReportErrors(parseResult, reporter)) + { errorCode = 1; return null; } @@ -158,6 +146,12 @@ internal sealed class CommandLineOptions } } + var commandArguments = GetCommandArguments(parseResult, watchOptions, explicitCommand); + + // We assume that forwarded options, if any, are intended for dotnet build. + var buildArguments = buildOptions.Select(option => ((IForwardedOption)option).GetForwardingFunction()(parseResult)).SelectMany(args => args).ToArray(); + var targetFrameworkOption = (CliOption?)buildOptions.SingleOrDefault(option => option.Name == "--framework"); + return new() { List = parseResult.GetValue(listOption), @@ -169,32 +163,21 @@ internal sealed class CommandLineOptions Verbose = parseResult.GetValue(verboseOption), }, - CommandArguments = GetCommandArguments(parseResult, watchOptions, out var explicitCommand), - ExplicitCommand = explicitCommand, + CommandArguments = commandArguments, + ExplicitCommand = explicitCommand?.Name, ProjectPath = projectValue, LaunchProfileName = parseResult.GetValue(launchProfileOption), NoLaunchProfile = parseResult.GetValue(noLaunchProfileOption), - TargetFramework = parseResult.GetValue(targetFrameworkOption), - BuildProperties = ParseBuildProperties(parseResult.GetValue(propertyOption) ?? []).ToArray(), + BuildArguments = buildArguments, + TargetFramework = targetFrameworkOption != null ? parseResult.GetValue(targetFrameworkOption) : null, }; - - // Parses name=value pairs passed to --property. Skips invalid input. - // We don't report error here as it will be reported by dotnet run. - static IEnumerable<(string key, string value)> ParseBuildProperties(string[] properties) - => from property in properties - let index = property.IndexOf('=') - where index >= 0 - let name = property[..index].Trim() - let value = property[(index + 1)..] - where name is not [] - select (name, value); } private static IReadOnlyList GetCommandArguments( ParseResult parseResult, IReadOnlyList watchOptions, - out string? explicitCommand) + CliCommand? explicitCommand) { var arguments = new List(); @@ -211,6 +194,16 @@ private static IReadOnlyList GetCommandArguments( { arguments.Add(optionResult.IdentifierToken.Value); } + else if (optionResult.Option.Name == "--property") + { + foreach (var token in optionResult.Tokens) + { + // While dotnet-build allows "/p Name=Value", dotnet-msbuild does not. + // Any command that forwards args to dotnet-msbuild will fail if we don't use colon. + // See https://github.com/dotnet/sdk/issues/44655. + arguments.Add($"{optionResult.IdentifierToken.Value}:{token.Value}"); + } + } else { foreach (var token in optionResult.Tokens) @@ -228,33 +221,66 @@ private static IReadOnlyList GetCommandArguments( var dashDashIndex = IndexOf(parseResult.Tokens, t => t.Value == "--"); var unmatchedTokensBeforeDashDash = parseResult.UnmatchedTokens.Count - (dashDashIndex >= 0 ? parseResult.Tokens.Count - dashDashIndex - 1 : 0); - explicitCommand = null; + var seenCommand = false; var dashDashInserted = false; for (int i = 0; i < parseResult.UnmatchedTokens.Count; i++) { var token = parseResult.UnmatchedTokens[i]; - // command token can't follow "--" - if (i < unmatchedTokensBeforeDashDash && explicitCommand == null && s_knownCommands.Contains(token)) + if (i < unmatchedTokensBeforeDashDash && !seenCommand && token == explicitCommand?.Name) { - explicitCommand = token; + seenCommand = true; + continue; } - else - { - if (!dashDashInserted && i >= unmatchedTokensBeforeDashDash) - { - arguments.Add("--"); - dashDashInserted = true; - } - arguments.Add(token); + if (!dashDashInserted && i >= unmatchedTokensBeforeDashDash) + { + arguments.Add("--"); + dashDashInserted = true; } + + arguments.Add(token); } return arguments; } + private static CliCommand? TryGetSubcommand(ParseResult parseResult) + { + // Assuming that all tokens after "--" are unmatched: + var dashDashIndex = IndexOf(parseResult.Tokens, t => t.Value == "--"); + var unmatchedTokensBeforeDashDash = parseResult.UnmatchedTokens.Count - (dashDashIndex >= 0 ? parseResult.Tokens.Count - dashDashIndex - 1 : 0); + + var knownCommandsByName = Parser.Subcommands.ToDictionary(keySelector: c => c.Name, elementSelector: c => c); + + for (int i = 0; i < unmatchedTokensBeforeDashDash; i++) + { + // command token can't follow "--" + if (knownCommandsByName.TryGetValue(parseResult.UnmatchedTokens[i], out var explicitCommand)) + { + return explicitCommand; + } + } + + return null; + } + + private static bool ReportErrors(ParseResult parseResult, IReporter reporter) + { + if (parseResult.Errors.Any()) + { + foreach (var error in parseResult.Errors) + { + reporter.Error(error.Message); + } + + return true; + } + + return false; + } + private static int IndexOf(IReadOnlyList list, Func predicate) { for (var i = 0; i < list.Count; i++) @@ -274,12 +300,30 @@ public ProjectOptions GetProjectOptions(string projectPath, string workingDirect IsRootProject = true, ProjectPath = projectPath, WorkingDirectory = workingDirectory, - BuildProperties = BuildProperties ?? [], Command = Command, CommandArguments = CommandArguments, LaunchEnvironmentVariables = [], LaunchProfileName = LaunchProfileName, NoLaunchProfile = NoLaunchProfile, + BuildArguments = BuildArguments, TargetFramework = TargetFramework, }; + + // Parses name=value pairs passed to --property. Skips invalid input. + public static IEnumerable<(string key, string value)> ParseBuildProperties(IEnumerable arguments) + => from argument in arguments + let colon = argument.IndexOf(':') + where colon >= 0 && argument[0..colon] is "--property" or "-property" or "/property" or "/p" or "-p" or "--p" + let eq = argument.IndexOf('=', colon) + where eq >= 0 + let name = argument[(colon + 1)..eq].Trim() + let value = argument[(eq + 1)..] + where name is not [] + select (name, value); + + /// + /// Returns true if the command executes the code of the target project. + /// + public static bool IsCodeExecutionCommand(string commandName) + => commandName is "run" or "test"; } diff --git a/src/BuiltInTools/dotnet-watch/DotNetWatchContext.cs b/src/BuiltInTools/dotnet-watch/DotNetWatchContext.cs index 95fd1ccb98ed..5b875b1181e3 100644 --- a/src/BuiltInTools/dotnet-watch/DotNetWatchContext.cs +++ b/src/BuiltInTools/dotnet-watch/DotNetWatchContext.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal sealed class DotNetWatchContext { diff --git a/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs b/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs index 9c4ab9f433c7..321ad2924813 100644 --- a/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/DotNetWatcher.cs @@ -4,11 +4,8 @@ using System.Diagnostics; using System.Globalization; using Microsoft.Build.Graph; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher +namespace Microsoft.DotNet.Watch { internal sealed class DotNetWatcher(DotNetWatchContext context, MSBuildFileSetFactory fileSetFactory) : Watcher(context, fileSetFactory) { @@ -80,7 +77,9 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke using var currentRunCancellationSource = new CancellationTokenSource(); using var combinedCancellationSource = CancellationTokenSource.CreateLinkedTokenSource(shutdownCancellationToken, currentRunCancellationSource.Token); - using var fileSetWatcher = new FileWatcher(evaluationResult.Files, Context.Reporter); + using var fileSetWatcher = new FileWatcher(Context.Reporter); + + fileSetWatcher.WatchContainingDirectories(evaluationResult.Files.Keys); var processTask = ProcessRunner.RunAsync(processSpec, Context.Reporter, isUserApplication: true, launchResult: null, combinedCancellationSource.Token); @@ -89,7 +88,7 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke while (true) { - fileSetTask = fileSetWatcher.GetChangedFileAsync(startedWatching: null, combinedCancellationSource.Token); + fileSetTask = fileSetWatcher.WaitForFileChangeAsync(evaluationResult.Files, startedWatching: null, combinedCancellationSource.Token); finishedTask = await Task.WhenAny(processTask, fileSetTask, cancelledTaskSource.Task); if (staticFileHandler != null && finishedTask == fileSetTask && fileSetTask.Result.HasValue) @@ -119,9 +118,11 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke { // Process exited. Redo evalulation buildEvaluator.RequiresRevaluation = true; + // Now wait for a file to change before restarting process - changedFile = await fileSetWatcher.GetChangedFileAsync( - () => Context.Reporter.Report(MessageDescriptor.WaitingForFileChangeBeforeRestarting), + changedFile = await fileSetWatcher.WaitForFileChangeAsync( + evaluationResult.Files, + startedWatching: () => Context.Reporter.Report(MessageDescriptor.WaitingForFileChangeBeforeRestarting), shutdownCancellationToken); } else diff --git a/src/BuiltInTools/dotnet-watch/EnvironmentOptions.cs b/src/BuiltInTools/dotnet-watch/EnvironmentOptions.cs index f2fb13a8c123..43d17a2312cb 100644 --- a/src/BuiltInTools/dotnet-watch/EnvironmentOptions.cs +++ b/src/BuiltInTools/dotnet-watch/EnvironmentOptions.cs @@ -2,9 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher +namespace Microsoft.DotNet.Watch { [Flags] internal enum TestFlags @@ -17,6 +16,12 @@ internal enum TestFlags /// Elevates the severity of from . /// ElevateWaitingForChangesMessageSeverity = 1 << 2, + + /// + /// Instead of using to watch for Ctrl+C, Ctlr+R, and other keys, read from standard input. + /// This allows tests to trigger key based events. + /// + ReadKeyFromStdin = 1 << 3, } internal sealed record EnvironmentOptions( @@ -28,7 +33,8 @@ internal sealed record EnvironmentOptions( bool SuppressLaunchBrowser = false, bool SuppressBrowserRefresh = false, bool SuppressEmojis = false, - TestFlags TestFlags = TestFlags.None) + TestFlags TestFlags = TestFlags.None, + string TestOutput = "") { public static EnvironmentOptions FromEnvironment() => new ( @@ -40,7 +46,8 @@ internal sealed record EnvironmentOptions( SuppressLaunchBrowser: EnvironmentVariables.SuppressLaunchBrowser, SuppressBrowserRefresh: EnvironmentVariables.SuppressBrowserRefresh, SuppressEmojis: EnvironmentVariables.SuppressEmojis, - TestFlags: EnvironmentVariables.TestFlags + TestFlags: EnvironmentVariables.TestFlags, + TestOutput: EnvironmentVariables.TestOutputDir ); public bool RunningAsTest { get => (TestFlags & TestFlags.RunningAsTest) != TestFlags.None; } diff --git a/src/BuiltInTools/dotnet-watch/EnvironmentVariables.cs b/src/BuiltInTools/dotnet-watch/EnvironmentVariables.cs index f0ee60534903..c31413b1d3f2 100644 --- a/src/BuiltInTools/dotnet-watch/EnvironmentVariables.cs +++ b/src/BuiltInTools/dotnet-watch/EnvironmentVariables.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal static partial class EnvironmentVariables { @@ -36,6 +36,7 @@ public static partial class Names public static bool SuppressBrowserRefresh => ReadBool("DOTNET_WATCH_SUPPRESS_BROWSER_REFRESH"); public static TestFlags TestFlags => Environment.GetEnvironmentVariable("__DOTNET_WATCH_TEST_FLAGS") is { } value ? Enum.Parse(value) : TestFlags.None; + public static string TestOutputDir => Environment.GetEnvironmentVariable("__DOTNET_WATCH_TEST_OUTPUT_DIR") ?? ""; public static string? AutoReloadWSHostName => Environment.GetEnvironmentVariable("DOTNET_WATCH_AUTO_RELOAD_WS_HOSTNAME"); public static string? BrowserPath => Environment.GetEnvironmentVariable("DOTNET_WATCH_BROWSER_PATH"); diff --git a/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs b/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs index 37f17e94c315..aec5634a4acf 100644 --- a/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs +++ b/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs @@ -3,7 +3,7 @@ using System.Diagnostics; -namespace Microsoft.DotNet.Watcher +namespace Microsoft.DotNet.Watch { internal sealed class EnvironmentVariablesBuilder { diff --git a/src/BuiltInTools/dotnet-watch/EnvironmentVariables_StartupHook.cs b/src/BuiltInTools/dotnet-watch/EnvironmentVariables_StartupHook.cs index 9534a3694695..6a9191c1dab7 100644 --- a/src/BuiltInTools/dotnet-watch/EnvironmentVariables_StartupHook.cs +++ b/src/BuiltInTools/dotnet-watch/EnvironmentVariables_StartupHook.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal static partial class EnvironmentVariables { diff --git a/src/BuiltInTools/dotnet-watch/EvaluationResult.cs b/src/BuiltInTools/dotnet-watch/EvaluationResult.cs index 48ca7f6902af..b551c518acf5 100644 --- a/src/BuiltInTools/dotnet-watch/EvaluationResult.cs +++ b/src/BuiltInTools/dotnet-watch/EvaluationResult.cs @@ -3,7 +3,7 @@ using Microsoft.Build.Graph; -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal sealed class EvaluationResult(IReadOnlyDictionary files, ProjectGraph? projectGraph) { diff --git a/src/BuiltInTools/dotnet-watch/FileItem.cs b/src/BuiltInTools/dotnet-watch/FileItem.cs index 7fc91cd6fa1c..8e0a028d4d09 100644 --- a/src/BuiltInTools/dotnet-watch/FileItem.cs +++ b/src/BuiltInTools/dotnet-watch/FileItem.cs @@ -1,18 +1,19 @@ // 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.Watcher.Internal; -namespace Microsoft.DotNet.Watcher +namespace Microsoft.DotNet.Watch { internal readonly record struct FileItem { - public string FilePath { get; init; } + public required string FilePath { get; init; } /// /// List of all projects that contain this file (does not contain duplicates). + /// Empty if is and the + /// item has not been assigned to a project yet. /// - public List ContainingProjectPaths { get; init; } + public required List ContainingProjectPaths { get; init; } public string? StaticWebAssetPath { get; init; } diff --git a/src/BuiltInTools/dotnet-watch/Filters/BuildEvaluator.cs b/src/BuiltInTools/dotnet-watch/Filters/BuildEvaluator.cs index 3221f60278f2..ae32359c539f 100644 --- a/src/BuiltInTools/dotnet-watch/Filters/BuildEvaluator.cs +++ b/src/BuiltInTools/dotnet-watch/Filters/BuildEvaluator.cs @@ -3,9 +3,8 @@ using System.Diagnostics; -using Microsoft.DotNet.Watcher.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal class BuildEvaluator(DotNetWatchContext context, MSBuildFileSetFactory rootProjectFileSetFactory) { @@ -30,7 +29,7 @@ public IReadOnlyList GetProcessArguments(int iteration) { if (!context.EnvironmentOptions.SuppressMSBuildIncrementalism && iteration > 0 && - context.RootProjectOptions.Command is "run" or "test") + CommandLineOptions.IsCodeExecutionCommand(context.RootProjectOptions.Command)) { if (RequiresRevaluation) { @@ -84,8 +83,11 @@ private async ValueTask CreateEvaluationResult(CancellationTok return result; } - context.Reporter.Warn("Fix the error to continue or press Ctrl+C to exit."); - await FileWatcher.WaitForFileChangeAsync(rootProjectFileSetFactory.RootProjectFile, context.Reporter, cancellationToken); + await FileWatcher.WaitForFileChangeAsync( + rootProjectFileSetFactory.RootProjectFile, + context.Reporter, + startedWatching: () => context.Reporter.Report(MessageDescriptor.FixBuildError), + cancellationToken); } } diff --git a/src/BuiltInTools/dotnet-watch/GlobalOptions.cs b/src/BuiltInTools/dotnet-watch/GlobalOptions.cs index 090da3fc0c67..9012920b5d2e 100644 --- a/src/BuiltInTools/dotnet-watch/GlobalOptions.cs +++ b/src/BuiltInTools/dotnet-watch/GlobalOptions.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal sealed class GlobalOptions { diff --git a/src/BuiltInTools/dotnet-watch/HotReload/BlazorWebAssemblyDeltaApplier.cs b/src/BuiltInTools/dotnet-watch/HotReload/BlazorWebAssemblyDeltaApplier.cs index 1b9342ed8cf6..ef22b5f8ffc5 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/BlazorWebAssemblyDeltaApplier.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/BlazorWebAssemblyDeltaApplier.cs @@ -1,25 +1,35 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. - using System.Buffers; using System.Collections.Immutable; -using System.Diagnostics; -using System.Net.WebSockets; +using Microsoft.Build.Graph; using Microsoft.CodeAnalysis.ExternalAccess.Watch.Api; -using Microsoft.Extensions.Tools.Internal; +using Microsoft.DotNet.HotReload; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { - internal sealed class BlazorWebAssemblyDeltaApplier(IReporter reporter, BrowserRefreshServer browserRefreshServer, Version? targetFrameworkVersion) : SingleProcessDeltaApplier(reporter) + internal sealed class BlazorWebAssemblyDeltaApplier(IReporter reporter, BrowserRefreshServer browserRefreshServer, ProjectGraphNode project) : SingleProcessDeltaApplier(reporter) { - private const string DefaultCapabilities60 = "Baseline"; - private const string DefaultCapabilities70 = "Baseline AddMethodToExistingType AddStaticFieldToExistingType NewTypeDefinition ChangeCustomAttributes"; - private const string DefaultCapabilities80 = "Baseline AddMethodToExistingType AddStaticFieldToExistingType NewTypeDefinition ChangeCustomAttributes AddInstanceFieldToExistingType GenericAddMethodToExistingType GenericUpdateMethod UpdateParameters GenericAddFieldToExistingType"; + private static readonly ImmutableArray s_defaultCapabilities60 = + ["Baseline"]; + + private static readonly ImmutableArray s_defaultCapabilities70 = + ["Baseline", "AddMethodToExistingType", "AddStaticFieldToExistingType", "NewTypeDefinition", "ChangeCustomAttributes"]; + + private static readonly ImmutableArray s_defaultCapabilities80 = + ["Baseline", "AddMethodToExistingType", "AddStaticFieldToExistingType", "NewTypeDefinition", "ChangeCustomAttributes", + "AddInstanceFieldToExistingType", "GenericAddMethodToExistingType", "GenericUpdateMethod", "UpdateParameters", "GenericAddFieldToExistingType"]; + + private static readonly ImmutableArray s_defaultCapabilities90 = + s_defaultCapabilities80; - private ImmutableArray _cachedCapabilities; - private readonly SemaphoreSlim _capabilityRetrievalSemaphore = new(initialCount: 1); - private int _sequenceId; + private int _updateId; + + public override void Dispose() + { + // Do nothing. + } public override void CreateConnection(string namedPipeName, CancellationToken cancellationToken) { @@ -30,104 +40,31 @@ public override async Task WaitForProcessRunningAsync(CancellationToken cancella // Alternatively, we could inject agent into blazor-devserver.dll and establish a connection on the named pipe. => await browserRefreshServer.WaitForClientConnectionAsync(cancellationToken); - public override async Task> GetApplyUpdateCapabilitiesAsync(CancellationToken cancellationToken) + public override Task> GetApplyUpdateCapabilitiesAsync(CancellationToken cancellationToken) { - var cachedCapabilities = _cachedCapabilities; - if (!cachedCapabilities.IsDefault) - { - return cachedCapabilities; - } - - await _capabilityRetrievalSemaphore.WaitAsync(cancellationToken); - try - { - if (_cachedCapabilities.IsDefault) - { - _cachedCapabilities = await RetrieveAsync(cancellationToken); - } - } - finally - { - _capabilityRetrievalSemaphore.Release(); - } - - return _cachedCapabilities; + var capabilities = project.GetWebAssemblyCapabilities(); - async Task> RetrieveAsync(CancellationToken cancellationToken) + if (capabilities.IsEmpty) { - var buffer = ArrayPool.Shared.Rent(32 * 1024); - - try - { - Reporter.Verbose("Connecting to the browser."); - - await browserRefreshServer.WaitForClientConnectionAsync(cancellationToken); - - string capabilities; - if (browserRefreshServer.Options.TestFlags.HasFlag(TestFlags.MockBrowser)) - { - // When testing return default capabilities without connecting to an actual browser. - capabilities = GetDefaultCapabilities(targetFrameworkVersion); - } - else - { - await browserRefreshServer.SendJsonSerlialized(default(BlazorRequestApplyUpdateCapabilities), cancellationToken); - - // We'll query the browser and ask it send capabilities. - var response = await browserRefreshServer.ReceiveAsync(buffer, cancellationToken); - if (!response.HasValue || !response.Value.EndOfMessage || response.Value.MessageType != WebSocketMessageType.Text) - { - throw new ApplicationException("Unable to connect to the browser refresh server."); - } - - capabilities = Encoding.UTF8.GetString(buffer.AsSpan(0, response.Value.Count)); - - var shouldFallBackToDefaultCapabilities = false; - - // error while fetching capabilities from WASM: - if (capabilities.StartsWith('!')) - { - Reporter.Verbose($"Exception while reading WASM runtime capabilities: {capabilities[1..]}"); - shouldFallBackToDefaultCapabilities = true; - } - else if (capabilities.Length == 0) - { - Reporter.Verbose($"Unable to read WASM runtime capabilities"); - shouldFallBackToDefaultCapabilities = true; - } - - if (shouldFallBackToDefaultCapabilities) - { - capabilities = GetDefaultCapabilities(targetFrameworkVersion); - Reporter.Verbose($"Falling back to default WASM capabilities: '{capabilities}'"); - } - } + var targetFramework = project.GetTargetFrameworkVersion(); - // Capabilities are expressed a space-separated string. - // e.g. https://github.com/dotnet/runtime/blob/14343bdc281102bf6fffa1ecdd920221d46761bc/src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/AssemblyExtensions.cs#L87 - return capabilities.Split(' ').ToImmutableArray(); - } - catch (Exception e) when (!cancellationToken.IsCancellationRequested) - { - Reporter.Error($"Failed to read capabilities: {e.Message}"); + Reporter.Verbose($"Using capabilities based on target framework: '{targetFramework}'."); - // Do not attempt to retrieve capabilities again if it fails once, unless the operation is canceled. - return []; - } - finally + capabilities = targetFramework?.Major switch { - ArrayPool.Shared.Return(buffer); - } + 9 => s_defaultCapabilities90, + 8 => s_defaultCapabilities80, + 7 => s_defaultCapabilities70, + 6 => s_defaultCapabilities60, + _ => [], + }; + } + else + { + Reporter.Verbose($"Project specifies capabilities."); } - static string GetDefaultCapabilities(Version? targetFrameworkVersion) - => targetFrameworkVersion?.Major switch - { - >= 8 => DefaultCapabilities80, - >= 7 => DefaultCapabilities70, - >= 6 => DefaultCapabilities60, - _ => string.Empty, - }; + return Task.FromResult(capabilities); } public override async Task Apply(ImmutableArray updates, CancellationToken cancellationToken) @@ -144,91 +81,89 @@ public override async Task Apply(ImmutableArray new UpdatePayload - { - SharedSecret = sharedSecret, - Deltas = updates.Select(update => new UpdateDelta - { - SequenceId = _sequenceId++, - ModuleId = update.ModuleId, - MetadataDelta = update.MetadataDelta.ToArray(), - ILDelta = update.ILDelta.ToArray(), - UpdatedTypes = update.UpdatedTypes.ToArray(), - }) - }, cancellationToken); - - bool result = await ReceiveApplyUpdateResult(browserRefreshServer, cancellationToken); - - return !result ? ApplyStatus.Failed : (applicableUpdates.Count < updates.Length) ? ApplyStatus.SomeChangesApplied : ApplyStatus.AllChangesApplied; - } - - private async Task ReceiveApplyUpdateResult(BrowserRefreshServer browserRefresh, CancellationToken cancellationToken) - { - var buffer = new byte[1]; + var anySuccess = false; + var anyFailure = false; - var result = await browserRefresh.ReceiveAsync(buffer, cancellationToken); - if (result is not { MessageType: WebSocketMessageType.Binary }) - { - // A null result indicates no clients are connected. No deltas could have been applied in this state. - Reporter.Verbose("Apply confirmation: No browser is connected"); - return false; - } + // Make sure to send the same update to all browsers, the only difference is the shared secret. - if (result is { Count: 1, EndOfMessage: true }) + var updateId = _updateId++; + var deltas = updates.Select(update => new JsonDelta { - return buffer[0] == 1; - } - - Reporter.Verbose("Browser failed to apply the change and reported error:"); + ModuleId = update.ModuleId, + MetadataDelta = [.. update.MetadataDelta], + ILDelta = [.. update.ILDelta], + PdbDelta = [.. update.PdbDelta], + UpdatedTypes = [.. update.UpdatedTypes], + }).ToArray(); - buffer = new byte[1024]; - var messageStream = new MemoryStream(); + var loggingLevel = Reporter.IsVerbose ? ResponseLoggingLevel.Verbose : ResponseLoggingLevel.WarningsAndErrors; - while (true) - { - result = await browserRefresh.ReceiveAsync(buffer, cancellationToken); - if (result is not { MessageType: WebSocketMessageType.Binary }) + await browserRefreshServer.SendAndReceiveAsync( + request: sharedSecret => new JsonApplyHotReloadDeltasRequest { - Reporter.Verbose("Failed to receive error message"); - break; - } - - messageStream.Write(buffer, 0, result.Value.Count); - - if (result is { EndOfMessage: true }) + SharedSecret = sharedSecret, + UpdateId = updateId, + Deltas = deltas, + ResponseLoggingLevel = (int)loggingLevel + }, + response: (value, reporter) => { - // message and stack trace are separated by '\0' - Reporter.Verbose(Encoding.UTF8.GetString(messageStream.ToArray()).Replace("\0", Environment.NewLine)); - break; - } - } + var data = BrowserRefreshServer.DeserializeJson(value); - return false; - } + if (data.Success) + { + anySuccess = true; + } + else + { + anyFailure = true; + } - public override void Dispose() - { - // Do nothing. + ReportLog(reporter, data.Log.Select(entry => (entry.Message, (AgentMessageSeverity)entry.Severity))); + }, + cancellationToken); + + // If no browser is connected we assume the changes have been applied. + // If at least one browser suceeds we consider the changes successfully applied. + // TODO: + // The refresh server should remember the deltas and apply them to browsers connected in future. + // Currently the changes are remembered on the dev server and sent over there from the browser. + // If no browser is connected the changes are not sent though. + return (!anySuccess && anyFailure) ? ApplyStatus.Failed : (applicableUpdates.Count < updates.Length) ? ApplyStatus.SomeChangesApplied : ApplyStatus.AllChangesApplied; } - private readonly struct UpdatePayload + private readonly struct JsonApplyHotReloadDeltasRequest { - public string Type => "BlazorHotReloadDeltav2"; + public string Type => "BlazorHotReloadDeltav3"; public string? SharedSecret { get; init; } - public IEnumerable Deltas { get; init; } + + public int UpdateId { get; init; } + public JsonDelta[] Deltas { get; init; } + public int ResponseLoggingLevel { get; init; } } - private readonly struct UpdateDelta + private readonly struct JsonDelta { - public int SequenceId { get; init; } - public string ServerId { get; init; } public Guid ModuleId { get; init; } public byte[] MetadataDelta { get; init; } public byte[] ILDelta { get; init; } + public byte[] PdbDelta { get; init; } public int[] UpdatedTypes { get; init; } } - private readonly struct BlazorRequestApplyUpdateCapabilities + private readonly struct JsonApplyDeltasResponse + { + public bool Success { get; init; } + public IEnumerable Log { get; init; } + } + + private readonly struct JsonLogEntry + { + public string Message { get; init; } + public int Severity { get; init; } + } + + private readonly struct JsonGetApplyUpdateCapabilitiesRequest { public string Type => "BlazorRequestApplyUpdateCapabilities2"; } diff --git a/src/BuiltInTools/dotnet-watch/HotReload/BlazorWebAssemblyHostedDeltaApplier.cs b/src/BuiltInTools/dotnet-watch/HotReload/BlazorWebAssemblyHostedDeltaApplier.cs index 630cf05a85c6..f2eb00de24bc 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/BlazorWebAssemblyHostedDeltaApplier.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/BlazorWebAssemblyHostedDeltaApplier.cs @@ -3,14 +3,14 @@ using System.Collections.Immutable; +using Microsoft.Build.Graph; using Microsoft.CodeAnalysis.ExternalAccess.Watch.Api; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { - internal sealed class BlazorWebAssemblyHostedDeltaApplier(IReporter reporter, BrowserRefreshServer browserRefreshServer, Version? targetFrameworkVersion) : DeltaApplier(reporter) + internal sealed class BlazorWebAssemblyHostedDeltaApplier(IReporter reporter, BrowserRefreshServer browserRefreshServer, ProjectGraphNode project) : DeltaApplier(reporter) { - private readonly BlazorWebAssemblyDeltaApplier _wasmApplier = new(reporter, browserRefreshServer, targetFrameworkVersion); + private readonly BlazorWebAssemblyDeltaApplier _wasmApplier = new(reporter, browserRefreshServer, project); private readonly DefaultDeltaApplier _hostApplier = new(reporter); public override void Dispose() diff --git a/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs b/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs index 73b3329f8fdb..a2c8b0a906ff 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs @@ -9,10 +9,8 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.EditAndContinue; using Microsoft.CodeAnalysis.ExternalAccess.Watch.Api; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal sealed class CompilationHandler : IDisposable { @@ -74,7 +72,7 @@ public async ValueTask TerminateNonRootProcessesAndDispose(CancellationToken can Dispose(); } - public ValueTask RestartSessionAsync(IReadOnlySet projectsToBeRebuilt, CancellationToken cancellationToken) + public void DiscardProjectBaselines(ImmutableDictionary projectsToBeRebuilt, CancellationToken cancellationToken) { // Remove previous updates to all modules that were affected by rude edits. // All running projects that statically reference these modules have been terminated. @@ -84,12 +82,16 @@ public ValueTask RestartSessionAsync(IReadOnlySet projectsToBeRebuilt lock (_runningProjectsAndUpdatesGuard) { - _previousUpdates = _previousUpdates.RemoveAll(update => projectsToBeRebuilt.Contains(update.ProjectId)); + _previousUpdates = _previousUpdates.RemoveAll(update => projectsToBeRebuilt.ContainsKey(update.ProjectId)); } - _hotReloadService.EndSession(); - _reporter.Report(MessageDescriptor.HotReloadSessionEnded); - return StartSessionAsync(cancellationToken); + _hotReloadService.UpdateBaselines(Workspace.CurrentSolution, projectsToBeRebuilt.Keys.ToImmutableArray()); + } + + public void UpdateProjectBaselines(ImmutableDictionary projectsToBeRebuilt, CancellationToken cancellationToken) + { + _hotReloadService.UpdateBaselines(Workspace.CurrentSolution, projectsToBeRebuilt.Keys.ToImmutableArray()); + _reporter.Report(MessageDescriptor.ProjectBaselinesUpdated); } public async ValueTask StartSessionAsync(CancellationToken cancellationToken) @@ -101,17 +103,18 @@ public async ValueTask StartSessionAsync(CancellationToken cancellationToken) _reporter.Report(MessageDescriptor.HotReloadSessionStarted); } - private DeltaApplier CreateDeltaApplier(ProjectGraphNode projectNode, BrowserRefreshServer? browserRefreshServer, IReporter processReporter) - => HotReloadProfileReader.InferHotReloadProfile(projectNode, _reporter) switch + private static DeltaApplier CreateDeltaApplier(HotReloadProfile profile, ProjectGraphNode project, BrowserRefreshServer? browserRefreshServer, IReporter processReporter) + => profile switch { - HotReloadProfile.BlazorWebAssembly => new BlazorWebAssemblyDeltaApplier(processReporter, browserRefreshServer!, projectNode.GetTargetFrameworkVersion()), - HotReloadProfile.BlazorHosted => new BlazorWebAssemblyHostedDeltaApplier(processReporter, browserRefreshServer!, projectNode.GetTargetFrameworkVersion()), + HotReloadProfile.BlazorWebAssembly => new BlazorWebAssemblyDeltaApplier(processReporter, browserRefreshServer!, project), + HotReloadProfile.BlazorHosted => new BlazorWebAssemblyHostedDeltaApplier(processReporter, browserRefreshServer!, project), _ => new DefaultDeltaApplier(processReporter), }; public async Task TrackRunningProjectAsync( ProjectGraphNode projectNode, ProjectOptions projectOptions, + HotReloadProfile profile, string namedPipeName, BrowserRefreshServer? browserRefreshServer, ProcessSpec processSpec, @@ -122,7 +125,7 @@ private DeltaApplier CreateDeltaApplier(ProjectGraphNode projectNode, BrowserRef { var projectPath = projectNode.ProjectInstance.FullPath; - var deltaApplier = CreateDeltaApplier(projectNode, browserRefreshServer, processReporter); + var deltaApplier = CreateDeltaApplier(profile, projectNode, browserRefreshServer, processReporter); var processExitedSource = new CancellationTokenSource(); var processCommunicationCancellationSource = CancellationTokenSource.CreateLinkedTokenSource(processExitedSource.Token, cancellationToken); @@ -274,15 +277,20 @@ private static void PrepareCompilations(Solution solution, string projectPath, C } } - public async ValueTask<(IReadOnlySet projectsToBeRebuilt, IEnumerable terminatedProjects)> HandleFileChangesAsync( - Func, CancellationToken, Task> restartPrompt, + public async ValueTask<(ImmutableDictionary projectsToRebuild, ImmutableArray terminatedProjects)> HandleFileChangesAsync( + Func, CancellationToken, Task> restartPrompt, CancellationToken cancellationToken) { var currentSolution = Workspace.CurrentSolution; var runningProjects = _runningProjects; - var updates = await _hotReloadService.GetUpdatesAsync(currentSolution, isRunningProject: p => runningProjects.ContainsKey(p.FilePath!), cancellationToken); - var anyProcessNeedsRestart = updates.ProjectsToRestart.Count > 0; + var runningProjectIds = currentSolution.Projects + .Where(project => project.FilePath != null && runningProjects.ContainsKey(project.FilePath)) + .Select(project => project.Id) + .ToImmutableHashSet(); + + var updates = await _hotReloadService.GetUpdatesAsync(currentSolution, runningProjectIds, cancellationToken); + var anyProcessNeedsRestart = !updates.ProjectIdsToRestart.IsEmpty; await DisplayResultsAsync(updates, cancellationToken); @@ -290,23 +298,23 @@ private static void PrepareCompilations(Solution solution, string projectPath, C { // If Hot Reload is blocked (due to compilation error) we ignore the current // changes and await the next file change. - return (ImmutableHashSet.Empty, []); + return (ImmutableDictionary.Empty, []); } if (updates.Status == ModuleUpdateStatus.RestartRequired) { if (!anyProcessNeedsRestart) { - return (ImmutableHashSet.Empty, []); + return (ImmutableDictionary.Empty, []); } - await restartPrompt.Invoke(updates.ProjectsToRestart, cancellationToken); + await restartPrompt.Invoke(updates.ProjectIdsToRestart.Select(id => currentSolution.GetProject(id)!.Name), cancellationToken); // Terminate all tracked processes that need to be restarted, // except for the root process, which will terminate later on. - var terminatedProjects = await TerminateNonRootProcessesAsync(updates.ProjectsToRestart.Select(p => p.FilePath!), cancellationToken); + var terminatedProjects = await TerminateNonRootProcessesAsync(updates.ProjectIdsToRestart.Select(id => currentSolution.GetProject(id)!.FilePath!), cancellationToken); - return (updates.ProjectsToRebuild.Select(p => p.Id).ToHashSet(), terminatedProjects); + return (updates.ProjectIdsToRebuild.ToImmutableDictionary(keySelector: id => id, elementSelector: id => currentSolution.GetProject(id)!.FilePath!), terminatedProjects); } Debug.Assert(updates.Status == ModuleUpdateStatus.Ready); @@ -346,17 +354,17 @@ await ForEachProjectAsync(projectsToUpdate, async (runningProject, cancellationT } }, cancellationToken); - return (ImmutableHashSet.Empty, []); + return (ImmutableDictionary.Empty, []); } private async ValueTask DisplayResultsAsync(WatchHotReloadService.Updates updates, CancellationToken cancellationToken) { - var anyProcessNeedsRestart = updates.ProjectsToRestart.Count > 0; + var anyProcessNeedsRestart = !updates.ProjectIdsToRestart.IsEmpty; switch (updates.Status) { case ModuleUpdateStatus.None: - _reporter.Output("No hot reload changes to apply."); + _reporter.Output("No C# changes to apply."); break; case ModuleUpdateStatus.Ready: diff --git a/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs b/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs index 0bdceee705ca..2fade347530f 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs @@ -7,10 +7,9 @@ using System.Diagnostics; using System.IO.Pipes; using Microsoft.CodeAnalysis.ExternalAccess.Watch.Api; -using Microsoft.Extensions.HotReload; -using Microsoft.Extensions.Tools.Internal; +using Microsoft.DotNet.HotReload; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal sealed class DefaultDeltaApplier(IReporter reporter) : SingleProcessDeltaApplier(reporter) { @@ -41,6 +40,11 @@ async Task> ConnectAsync() Reporter.Verbose($"Capabilities: '{capabilities}'"); return capabilities.Split(' ').ToImmutableArray(); } + catch (EndOfStreamException) + { + // process terminated before capabilities sent: + return []; + } catch (Exception e) when (e is not OperationCanceledException) { // pipe might throw another exception when forcibly closed on process termination: @@ -88,6 +92,7 @@ public override async Task Apply(ImmutableArray ReceiveApplyUpdateResult(CancellationToken cancellation var status = ArrayPool.Shared.Rent(1); try { - var statusBytesRead = await _pipe.ReadAsync(status, cancellationToken); + var statusBytesRead = await _pipe.ReadAsync(status, offset: 0, count: 1, cancellationToken); if (statusBytesRead != 1 || status[0] != UpdatePayload.ApplySuccessValue) { - Reporter.Error($"Change failed to apply (error code: '{BitConverter.ToString(status, 0, statusBytesRead)}'). Further changes won't be applied to this process."); + var message = (statusBytesRead == 0) ? "received no data" : $"received status 0x{status[0]:x2}"; + Reporter.Error($"Change failed to apply ({message}). Further changes won't be applied to this process."); return false; } - foreach (var (message, severity) in UpdatePayload.ReadLog(_pipe)) - { - switch (severity) - { - case AgentMessageSeverity.Verbose: - Reporter.Verbose(message, emoji: "🕵️"); - break; - - case AgentMessageSeverity.Error: - Reporter.Error(message); - break; - - case AgentMessageSeverity.Warning: - Reporter.Warn(message, emoji: "⚠"); - break; - - default: - Reporter.Error($"Unexpected message severity: {severity}"); - return false; - } - } - + ReportLog(Reporter, UpdatePayload.ReadLog(_pipe)); return true; } finally diff --git a/src/BuiltInTools/dotnet-watch/HotReload/DeltaApplier.cs b/src/BuiltInTools/dotnet-watch/HotReload/DeltaApplier.cs index 8dfd06743312..897dc710d841 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/DeltaApplier.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/DeltaApplier.cs @@ -4,9 +4,9 @@ using System.Collections.Immutable; using Microsoft.CodeAnalysis.ExternalAccess.Watch.Api; -using Microsoft.Extensions.Tools.Internal; +using Microsoft.DotNet.HotReload; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal abstract class DeltaApplier(IReporter reporter) : IDisposable { @@ -27,6 +27,27 @@ internal abstract class DeltaApplier(IReporter reporter) : IDisposable public abstract Task Apply(ImmutableArray updates, CancellationToken cancellationToken); public abstract void Dispose(); + + public static void ReportLog(IReporter reporter, IEnumerable<(string message, AgentMessageSeverity severity)> log) + { + foreach (var (message, severity) in log) + { + switch (severity) + { + case AgentMessageSeverity.Error: + reporter.Error(message); + break; + + case AgentMessageSeverity.Warning: + reporter.Warn(message, emoji: "⚠"); + break; + + default: + reporter.Verbose(message, emoji: "🕵️"); + break; + } + } + } } internal enum ApplyStatus diff --git a/src/BuiltInTools/dotnet-watch/HotReload/HotReloadEventSource.cs b/src/BuiltInTools/dotnet-watch/HotReload/HotReloadEventSource.cs index 2aff913ac55a..04b3dbb70d52 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/HotReloadEventSource.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/HotReloadEventSource.cs @@ -4,7 +4,7 @@ using System.Diagnostics.Tracing; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { [EventSource(Name = "HotReload")] internal sealed class HotReloadEventSource : EventSource diff --git a/src/BuiltInTools/dotnet-watch/HotReload/HotReloadProfile.cs b/src/BuiltInTools/dotnet-watch/HotReload/HotReloadProfile.cs index cf56c3819975..898148d2f331 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/HotReloadProfile.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/HotReloadProfile.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal enum HotReloadProfile { diff --git a/src/BuiltInTools/dotnet-watch/HotReload/HotReloadProfileReader.cs b/src/BuiltInTools/dotnet-watch/HotReload/HotReloadProfileReader.cs index 38755a8c795b..fe8e9a968e01 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/HotReloadProfileReader.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/HotReloadProfileReader.cs @@ -4,9 +4,8 @@ using Microsoft.Build.Execution; using Microsoft.Build.Graph; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal static class HotReloadProfileReader { diff --git a/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncher.cs b/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncher.cs index 375e2a9b3248..f91f9342155b 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncher.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncher.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; /// /// Process launcher that triggers process launches at runtime of the watched application, diff --git a/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncherFactory.cs b/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncherFactory.cs index e805e1c3652f..431e79830ae3 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncherFactory.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/IRuntimeProcessLauncherFactory.cs @@ -3,7 +3,7 @@ using Microsoft.Build.Graph; -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; /// /// Creates for a given root project. @@ -12,5 +12,5 @@ namespace Microsoft.DotNet.Watcher; /// internal interface IRuntimeProcessLauncherFactory { - public IRuntimeProcessLauncher? TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, IReadOnlyList<(string name, string value)> buildProperties); + public IRuntimeProcessLauncher? TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, IReadOnlyList buildArguments); } diff --git a/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs b/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs index 90ec68694946..38fcc3cc1afc 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs @@ -8,10 +8,8 @@ using Microsoft.CodeAnalysis.Host.Mef; using Microsoft.CodeAnalysis.MSBuild; using Microsoft.CodeAnalysis.Text; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools; +namespace Microsoft.DotNet.Watch; internal class IncrementalMSBuildWorkspace : Workspace { @@ -38,7 +36,17 @@ public async Task UpdateProjectConeAsync(string rootProjectPath, CancellationTok var loader = new MSBuildProjectLoader(this); var projectMap = ProjectMap.Create(); - var projectInfos = await loader.LoadProjectInfoAsync(rootProjectPath, projectMap, progress: null, msbuildLogger: null, cancellationToken).ConfigureAwait(false); + + ImmutableArray projectInfos; + try + { + projectInfos = await loader.LoadProjectInfoAsync(rootProjectPath, projectMap, progress: null, msbuildLogger: null, cancellationToken).ConfigureAwait(false); + } + catch (InvalidOperationException) + { + // TODO: workaround for https://github.com/dotnet/roslyn/issues/75956 + projectInfos = []; + } var oldProjectIdsByPath = oldSolution.Projects.ToDictionary(keySelector: static p => p.FilePath!, elementSelector: static p => p.Id); diff --git a/src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs b/src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs index d5ce198f6518..d241241cc7de 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/NamedPipeContract.cs @@ -1,21 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.Extensions.HotReload -{ - internal enum ResponseLoggingLevel : byte - { - WarningsAndErrors = 0, - Verbose = 1, - } - - internal enum AgentMessageSeverity : byte - { - Verbose = 0, - Warning = 1, - Error = 2, - } +using Microsoft.DotNet.HotReload; +namespace Microsoft.DotNet.Watch +{ internal readonly struct UpdatePayload(IReadOnlyList deltas, ResponseLoggingLevel responseLoggingLevel) { public const byte ApplySuccessValue = 0; @@ -40,6 +29,7 @@ public async ValueTask WriteAsync(Stream stream, CancellationToken cancellationT binaryWriter.Write(delta.ModuleId.ToString()); await WriteBytesAsync(binaryWriter, delta.MetadataDelta, cancellationToken); await WriteBytesAsync(binaryWriter, delta.ILDelta, cancellationToken); + await WriteBytesAsync(binaryWriter, delta.PdbDelta, cancellationToken); WriteIntArray(binaryWriter, delta.UpdatedTypes); } @@ -104,9 +94,10 @@ public static async ValueTask ReadAsync(Stream stream, Cancellati var moduleId = Guid.Parse(binaryReader.ReadString()); var metadataDelta = await ReadBytesAsync(binaryReader, cancellationToken); var ilDelta = await ReadBytesAsync(binaryReader, cancellationToken); + var pdbDelta = await ReadBytesAsync(binaryReader, cancellationToken); var updatedTypes = ReadIntArray(binaryReader); - deltas[i] = new UpdateDelta(moduleId, metadataDelta: metadataDelta, ilDelta: ilDelta, updatedTypes); + deltas[i] = new UpdateDelta(moduleId, metadataDelta: metadataDelta, ilDelta: ilDelta, pdbDelta: pdbDelta, updatedTypes); } var responseLoggingLevel = (ResponseLoggingLevel)binaryReader.ReadByte(); @@ -163,22 +154,6 @@ static int[] ReadIntArray(BinaryReader binaryReader) } } - internal readonly struct UpdateDelta - { - public Guid ModuleId { get; } - public byte[] MetadataDelta { get; } - public byte[] ILDelta { get; } - public int[] UpdatedTypes { get; } - - public UpdateDelta(Guid moduleId, byte[] metadataDelta, byte[] ilDelta, int[] updatedTypes) - { - ModuleId = moduleId; - MetadataDelta = metadataDelta; - ILDelta = ilDelta; - UpdatedTypes = updatedTypes; - } - } - internal readonly struct ClientInitializationPayload { private const byte Version = 0; diff --git a/src/BuiltInTools/dotnet-watch/HotReload/ProjectLauncher.cs b/src/BuiltInTools/dotnet-watch/HotReload/ProjectLauncher.cs index 9185f32044c2..46a33b2b301d 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/ProjectLauncher.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/ProjectLauncher.cs @@ -3,11 +3,8 @@ using System.Globalization; using Microsoft.Build.Graph; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal delegate ValueTask ProcessExitAction(int processId, int? exitCode); @@ -31,7 +28,6 @@ public EnvironmentOptions EnvironmentOptions CancellationTokenSource processTerminationSource, Action? onOutput, RestartOperation restartOperation, - bool build, CancellationToken cancellationToken) { var projectNode = projectMap.TryGetProjectNode(projectOptions.ProjectPath, projectOptions.TargetFramework); @@ -47,14 +43,18 @@ public EnvironmentOptions EnvironmentOptions return null; } + var profile = HotReloadProfileReader.InferHotReloadProfile(projectNode, Reporter); + + // Blazor WASM does not need dotnet applier as all changes are applied in the browser, + // the process being launched is a dev server. + var injectDeltaApplier = profile != HotReloadProfile.BlazorWebAssembly; + var processSpec = new ProcessSpec { Executable = EnvironmentOptions.MuxerPath, WorkingDirectory = projectOptions.WorkingDirectory, OnOutput = onOutput, - Arguments = build || projectOptions.Command is not ("run" or "test") - ? [projectOptions.Command, .. projectOptions.CommandArguments] - : [projectOptions.Command, "--no-build", .. projectOptions.CommandArguments] + Arguments = [projectOptions.Command, "--no-build", .. projectOptions.CommandArguments] }; var environmentBuilder = EnvironmentVariablesBuilder.FromCurrentEnvironment(); @@ -62,10 +62,6 @@ public EnvironmentOptions EnvironmentOptions // Directives: - environmentBuilder.DotNetStartupHookDirective.Add(DeltaApplier.StartupHookPath); - environmentBuilder.SetDirective(EnvironmentVariables.Names.DotnetModifiableAssemblies, "debug"); - environmentBuilder.SetDirective(EnvironmentVariables.Names.DotnetWatchHotReloadNamedPipeName, namedPipeName); - // Variables: foreach (var (name, value) in projectOptions.LaunchEnvironmentVariables) @@ -84,19 +80,32 @@ public EnvironmentOptions EnvironmentOptions environmentBuilder.SetVariable(EnvironmentVariables.Names.DotnetWatch, "1"); environmentBuilder.SetVariable(EnvironmentVariables.Names.DotnetWatchIteration, (Iteration + 1).ToString(CultureInfo.InvariantCulture)); - // Do not ask agent to log to stdout until https://github.com/dotnet/sdk/issues/40484 is fixed. - // For now we need to set the env variable explicitly when we need to diagnose issue with the agent. - // Build targets might launch a process and read it's stdout. If the agent is loaded into such process and starts logging - // to stdout it might interfere with the expected output. - //if (context.Options.Verbose) - //{ - // environmentBuilder.SetVariable(EnvironmentVariables.Names.HotReloadDeltaClientLogMessages, "1"); - //} + // Note: + // Microsoft.AspNetCore.Components.WebAssembly.Server.ComponentWebAssemblyConventions and Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware + // expect DOTNET_MODIFIABLE_ASSEMBLIES to be set in the blazor-devserver process, even though we are not performing Hot Reload in this process. + // The value is converted to DOTNET-MODIFIABLE-ASSEMBLIES header, which is in turn converted back to environment variable in Mono browser runtime loader: + // https://github.com/dotnet/runtime/blob/342936c5a88653f0f622e9d6cb727a0e59279b31/src/mono/browser/runtime/loader/config.ts#L330 + environmentBuilder.SetDirective(EnvironmentVariables.Names.DotnetModifiableAssemblies, "debug"); - // TODO: workaround for https://github.com/dotnet/sdk/issues/40484 - var targetPath = projectNode.ProjectInstance.GetPropertyValue("RunCommand"); - environmentBuilder.SetVariable(EnvironmentVariables.Names.DotnetWatchHotReloadTargetProcessPath, targetPath); - Reporter.Verbose($"Target process is '{targetPath}'"); + if (injectDeltaApplier) + { + environmentBuilder.DotNetStartupHookDirective.Add(DeltaApplier.StartupHookPath); + environmentBuilder.SetDirective(EnvironmentVariables.Names.DotnetWatchHotReloadNamedPipeName, namedPipeName); + + // Do not ask agent to log to stdout until https://github.com/dotnet/sdk/issues/40484 is fixed. + // For now we need to set the env variable explicitly when we need to diagnose issue with the agent. + // Build targets might launch a process and read it's stdout. If the agent is loaded into such process and starts logging + // to stdout it might interfere with the expected output. + //if (context.Options.Verbose) + //{ + // environmentBuilder.SetVariable(EnvironmentVariables.Names.HotReloadDeltaClientLogMessages, "1"); + //} + + // TODO: workaround for https://github.com/dotnet/sdk/issues/40484 + var targetPath = projectNode.ProjectInstance.GetPropertyValue("RunCommand"); + environmentBuilder.SetVariable(EnvironmentVariables.Names.DotnetWatchHotReloadTargetProcessPath, targetPath); + Reporter.Verbose($"Target process is '{targetPath}'"); + } var browserRefreshServer = await browserConnector.LaunchOrRefreshBrowserAsync(projectNode, processSpec, environmentBuilder, projectOptions, cancellationToken); environmentBuilder.ConfigureProcess(processSpec); @@ -106,6 +115,7 @@ public EnvironmentOptions EnvironmentOptions return await compilationHandler.TrackRunningProjectAsync( projectNode, projectOptions, + profile, namedPipeName, browserRefreshServer, processSpec, diff --git a/src/BuiltInTools/dotnet-watch/HotReload/ProjectNodeMap.cs b/src/BuiltInTools/dotnet-watch/HotReload/ProjectNodeMap.cs index d84046666ccf..40412bb9978f 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/ProjectNodeMap.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/ProjectNodeMap.cs @@ -3,14 +3,14 @@ using Microsoft.Build.Graph; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal readonly struct ProjectNodeMap(ProjectGraph graph, IReporter reporter) { public readonly ProjectGraph Graph = graph; + // full path of proj file to list of nodes representing all target frameworks of the project: public readonly IReadOnlyDictionary> Map = graph.ProjectNodes.GroupBy(n => n.ProjectInstance.FullPath).ToDictionary( keySelector: static g => g.Key, diff --git a/src/BuiltInTools/dotnet-watch/HotReload/RestartPrompt.cs b/src/BuiltInTools/dotnet-watch/HotReload/RestartPrompt.cs index d64a10b80ec3..488a7b5018b7 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/RestartPrompt.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/RestartPrompt.cs @@ -2,9 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.Build.Tasks; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher +namespace Microsoft.DotNet.Watch { internal sealed class RestartPrompt(IReporter reporter, ConsoleInputReader requester, bool? noPrompt) { diff --git a/src/BuiltInTools/dotnet-watch/HotReload/RunningProject.cs b/src/BuiltInTools/dotnet-watch/HotReload/RunningProject.cs index 99b04b828a63..49d8268cf0cf 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/RunningProject.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/RunningProject.cs @@ -4,11 +4,10 @@ using System.Collections.Immutable; using Microsoft.Build.Graph; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { - internal delegate ValueTask RestartOperation(bool build, CancellationToken cancellationToken); + internal delegate ValueTask RestartOperation(CancellationToken cancellationToken); internal sealed class RunningProject( ProjectGraphNode projectNode, @@ -68,7 +67,6 @@ public void Dispose() public async ValueTask WaitForProcessRunningAsync(CancellationToken cancellationToken) { await DeltaApplier.WaitForProcessRunningAsync(cancellationToken); - Reporter.Report(MessageDescriptor.BuildCompleted); } } } diff --git a/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs b/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs index 3a6961854987..d9f241eb0fab 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs @@ -2,13 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections; -using System.Diagnostics; +using Microsoft.Build.Framework; using Microsoft.Build.Graph; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.Extensions.Tools.Internal; +using Microsoft.TemplateEngine.Utils; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal sealed class ScopedCssFileHandler(IReporter reporter, ProjectNodeMap projectMap, BrowserConnector browserConnector) { @@ -52,41 +50,61 @@ public async ValueTask HandleFileChangesAsync(IReadOnlyList files, } } - var logger = reporter.IsVerbose ? new[] { new Build.Logging.ConsoleLogger() } : null; + if (!hasApplicableFiles) + { + return; + } + + var logger = reporter.IsVerbose ? new[] { new Build.Logging.ConsoleLogger(LoggerVerbosity.Minimal) } : null; - var tasks = projectsToRefresh.Select(async projectNode => + var buildTasks = projectsToRefresh.Select(projectNode => Task.Run(() => { - if (!projectNode.ProjectInstance.DeepCopy().Build(BuildTargetName, logger)) + try { - return false; + if (!projectNode.ProjectInstance.DeepCopy().Build(BuildTargetName, logger)) + { + return null; + } } - - if (browserConnector.TryGetRefreshServer(projectNode, out var browserRefreshServer)) + catch (Exception e) { - await HandleBrowserRefresh(browserRefreshServer, projectNode.ProjectInstance.FullPath, cancellationToken); + reporter.Error($"[{projectNode.GetDisplayName()}] Target {BuildTargetName} failed to build: {e}"); + return null; } - return true; - }); + return projectNode; + })); - var results = await Task.WhenAll(tasks).WaitAsync(cancellationToken); + var buildResults = await Task.WhenAll(buildTasks).WaitAsync(cancellationToken); - if (hasApplicableFiles) + var browserRefreshTasks = buildResults.Where(p => p != null)!.GetTransitivelyReferencingProjects().Select(async projectNode => { - var successfulCount = results.Sum(r => r ? 1 : 0); - - if (successfulCount == results.Length) - { - reporter.Output("Hot reload of scoped css succeeded.", emoji: "🔥"); - } - else if (successfulCount > 0) + if (browserConnector.TryGetRefreshServer(projectNode, out var browserRefreshServer)) { - reporter.Output($"Hot reload of scoped css partially succeeded: {successfulCount} project(s) out of {results.Length} were updated.", emoji: "🔥"); + reporter.Verbose($"[{projectNode.GetDisplayName()}] Refreshing browser."); + await HandleBrowserRefresh(browserRefreshServer, projectNode.ProjectInstance.FullPath, cancellationToken); } else { - reporter.Output("Hot reload of scoped css failed.", emoji: "🔥"); + reporter.Verbose($"[{projectNode.GetDisplayName()}] No refresh server."); } + }); + + await Task.WhenAll(browserRefreshTasks).WaitAsync(cancellationToken); + + var successfulCount = buildResults.Sum(r => r != null ? 1 : 0); + + if (successfulCount == buildResults.Length) + { + reporter.Output("Hot reload of scoped css succeeded.", emoji: "🔥"); + } + else if (successfulCount > 0) + { + reporter.Output($"Hot reload of scoped css partially succeeded: {successfulCount} project(s) out of {buildResults.Length} were updated.", emoji: "🔥"); + } + else + { + reporter.Output("Hot reload of scoped css failed.", emoji: "🔥"); } } @@ -99,7 +117,7 @@ private static async Task HandleBrowserRefresh(BrowserRefreshServer browserRefre // referenced project. var cssFilePath = Path.GetFileNameWithoutExtension(containingProjectPath) + ".css"; var message = new UpdateStaticFileMessage { Path = cssFilePath }; - await browserRefreshServer.SendJsonSerlialized(message, cancellationToken); + await browserRefreshServer.SendJsonMessageAsync(message, cancellationToken); } private readonly struct UpdateStaticFileMessage diff --git a/src/BuiltInTools/dotnet-watch/HotReload/SingleProcessDeltaApplier.cs b/src/BuiltInTools/dotnet-watch/HotReload/SingleProcessDeltaApplier.cs index f83d52ee2784..5ddd10428664 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/SingleProcessDeltaApplier.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/SingleProcessDeltaApplier.cs @@ -5,9 +5,8 @@ using System.Collections.Immutable; using Microsoft.CodeAnalysis.ExternalAccess.Watch.Api; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal abstract class SingleProcessDeltaApplier(IReporter reporter) : DeltaApplier(reporter) { diff --git a/src/BuiltInTools/dotnet-watch/HotReload/StaticFileHandler.cs b/src/BuiltInTools/dotnet-watch/HotReload/StaticFileHandler.cs index ce53bc8a7ce3..05fde9ab4001 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/StaticFileHandler.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/StaticFileHandler.cs @@ -2,15 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections; -using System.Diagnostics; using System.Text.Json; using System.Text.Json.Serialization; -using Microsoft.CodeAnalysis.StackTraceExplorer; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.Extensions.Tools.Internal; +using Microsoft.Build.Graph; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal sealed class StaticFileHandler(IReporter reporter, ProjectNodeMap projectMap, BrowserConnector browserConnector) { @@ -23,6 +19,8 @@ public async ValueTask HandleFileChangesAsync(IReadOnlyList f { var allFilesHandled = true; var refreshRequests = new Dictionary>(); + var projectsWithoutRefreshServer = new HashSet(); + for (int i = 0; i < files.Count; i++) { var file = files[i].Item; @@ -50,11 +48,16 @@ public async ValueTask HandleFileChangesAsync(IReadOnlyList f { if (!refreshRequests.TryGetValue(refreshServer, out var filesPerServer)) { + reporter.Verbose($"[{projectNode.GetDisplayName()}] Refreshing browser."); refreshRequests.Add(refreshServer, filesPerServer = []); } filesPerServer.Add(file.StaticWebAssetPath); } + else if (projectsWithoutRefreshServer.Add(projectNode)) + { + reporter.Verbose($"[{projectNode.GetDisplayName()}] No refresh server."); + } } } } @@ -69,9 +72,9 @@ public async ValueTask HandleFileChangesAsync(IReadOnlyList f // Serialize all requests sent to a single server: foreach (var path in request.Value) { - reporter.Verbose($"Sending static file update request for asset '{path}'"); + reporter.Verbose($"Sending static file update request for asset '{path}'."); var message = JsonSerializer.SerializeToUtf8Bytes(new UpdateStaticFileMessage { Path = path }, s_jsonSerializerOptions); - await request.Key.SendMessage(message, cancellationToken); + await request.Key.SendAsync(message, cancellationToken); } }); diff --git a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs index 3ca446c43b30..ca5348aea93b 100644 --- a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs @@ -1,15 +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.Collections.Immutable; using System.Diagnostics; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; +using Microsoft.CodeAnalysis; -namespace Microsoft.DotNet.Watcher +namespace Microsoft.DotNet.Watch { - internal sealed class HotReloadDotNetWatcher : Watcher + internal sealed partial class HotReloadDotNetWatcher : Watcher { + private static readonly DateTime s_fileNotExistFileTime = DateTime.FromFileTime(0); + private readonly IConsole _console; private readonly IRuntimeProcessLauncherFactory? _runtimeProcessLauncherFactory; private readonly RestartPrompt? _rudeEditRestartPrompt; @@ -44,8 +45,7 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke _console.KeyPressed += (key) => { - var modifiers = ConsoleModifiers.Control; - if ((key.Modifiers & modifiers) == modifiers && key.Key == ConsoleKey.R && forceRestartCancellationSource is { } source) + if (key.Modifiers.HasFlag(ConsoleModifiers.Control) && key.Key == ConsoleKey.R && forceRestartCancellationSource is { } source) { // provide immediate feedback to the user: Context.Reporter.Report(source.IsCancellationRequested ? MessageDescriptor.RestartInProgress : MessageDescriptor.RestartRequested); @@ -58,6 +58,8 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke Context.Reporter.Output(hotReloadEnabledMessage, emoji: "🔥"); } + using var fileWatcher = new FileWatcher(Context.Reporter); + for (var iteration = 0; !shutdownCancellationToken.IsCancellationRequested; iteration++) { Interlocked.Exchange(ref forceRestartCancellationSource, new CancellationTokenSource())?.Dispose(); @@ -69,12 +71,12 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke var iterationCancellationToken = iterationCancellationSource.Token; var waitForFileChangeBeforeRestarting = true; - HotReloadFileSetWatcher? fileSetWatcher = null; EvaluationResult? evaluationResult = null; RunningProject? rootRunningProject = null; - Task? fileSetWatcherTask = null; + Task>? fileWatcherTask = null; IRuntimeProcessLauncher? runtimeProcessLauncher = null; CompilationHandler? compilationHandler = null; + Action? fileChangedCallback = null; try { @@ -91,12 +93,13 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke // use normalized MSBuild path so that we can index into the ProjectGraph rootProjectOptions = rootProjectOptions with { ProjectPath = rootProject.ProjectInstance.FullPath }; - if (rootProject.GetCapabilities().Contains(AspireServiceFactory.AppHostProjectCapability)) + var rootProjectCapabilities = rootProject.GetCapabilities(); + if (rootProjectCapabilities.Contains(AspireServiceFactory.AppHostProjectCapability)) { runtimeProcessLauncherFactory ??= AspireServiceFactory.Instance; Context.Reporter.Verbose("Using Aspire process launcher."); } - + await using var browserConnector = new BrowserConnector(Context); var projectMap = new ProjectNodeMap(evaluationResult.ProjectGraph, Context.Reporter); compilationHandler = new CompilationHandler(Context.Reporter); @@ -106,7 +109,7 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke var rootProjectNode = evaluationResult.ProjectGraph.GraphRoots.Single(); - runtimeProcessLauncher = runtimeProcessLauncherFactory?.TryCreate(rootProjectNode, projectLauncher, rootProjectOptions.BuildProperties); + runtimeProcessLauncher = runtimeProcessLauncherFactory?.TryCreate(rootProjectNode, projectLauncher, rootProjectOptions.BuildArguments); if (runtimeProcessLauncher != null) { var launcherEnvironment = runtimeProcessLauncher.GetEnvironmentVariables(); @@ -116,12 +119,17 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke }; } + if (!await BuildProjectAsync(rootProjectOptions.ProjectPath, rootProjectOptions.BuildArguments, iterationCancellationToken)) + { + // error has been reported: + continue; + } + rootRunningProject = await projectLauncher.TryLaunchProcessAsync( rootProjectOptions, rootProcessTerminationSource, onOutput: null, - restartOperation: new RestartOperation((_, _) => throw new InvalidOperationException("Root project shouldn't be restarted")), - build: true, + restartOperation: new RestartOperation(_ => throw new InvalidOperationException("Root project shouldn't be restarted")), iterationCancellationToken); if (rootRunningProject == null) @@ -172,65 +180,65 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke return; } - fileSetWatcher = new HotReloadFileSetWatcher(evaluationResult.Files, buildCompletionTime, Context.Reporter, Context.EnvironmentOptions.TestFlags); + fileWatcher.WatchContainingDirectories(evaluationResult.Files.Keys); + + var changedFilesAccumulator = ImmutableList.Empty; + + void FileChangedCallback(string path, ChangeKind kind) + { + if (TryGetChangedFile(evaluationResult.Files, buildCompletionTime, path, kind) is { } changedFile) + { + ImmutableInterlocked.Update(ref changedFilesAccumulator, changedFiles => changedFiles.Add(changedFile)); + } + else + { + Context.Reporter.Verbose($"Change ignored: {kind} '{path}'."); + } + } + + fileChangedCallback = FileChangedCallback; + fileWatcher.OnFileChange += fileChangedCallback; + ReportWatchingForChanges(); // Hot Reload loop - exits when the root process needs to be restarted. while (true) { - fileSetWatcherTask = fileSetWatcher.GetChangedFilesAsync(iterationCancellationToken); - - var finishedTask = await Task.WhenAny(rootRunningProject.RunningProcess, fileSetWatcherTask).WaitAsync(iterationCancellationToken); - if (finishedTask == rootRunningProject.RunningProcess) + try { - // Cancel the iteration, but wait for a file change before starting a new one. + // Use timeout to batch file changes. If the process doesn't exit within the given timespan we'll check + // for accumulated file changes. If there are any we attempt Hot Reload. Otherwise we come back here to wait again. + _ = await rootRunningProject.RunningProcess.WaitAsync(TimeSpan.FromMilliseconds(50), iterationCancellationToken); + + // Process exited: cancel the iteration, but wait for a file change before starting a new one + waitForFileChangeBeforeRestarting = true; iterationCancellationSource.Cancel(); break; } - - // File watcher returns null when canceled: - if (fileSetWatcherTask.Result is not { } changedFiles) + catch (TimeoutException) + { + // check for changed files + } + catch (OperationCanceledException) { Debug.Assert(iterationCancellationToken.IsCancellationRequested); waitForFileChangeBeforeRestarting = false; break; } - ReportFileChanges(changedFiles); - - // When a new file is added we need to run design-time build to find out - // what kind of the file it is and which project(s) does it belong to (can be linked, web asset, etc.). - // We don't need to rebuild and restart the application though. - if (changedFiles.Any(f => f.Change is ChangeKind.Add)) + var changedFiles = await CaptureChangedFilesSnapshot(rebuiltProjects: null); + if (changedFiles is []) { - Context.Reporter.Verbose("File addition triggered re-evaluation."); - - evaluationResult = await EvaluateRootProjectAsync(iterationCancellationToken); - - await compilationHandler.Workspace.UpdateProjectConeAsync(RootFileSetFactory.RootProjectFile, iterationCancellationToken); - - if (shutdownCancellationToken.IsCancellationRequested) - { - // Ctrl+C: - return; - } - - // update files in the change set with new evaluation info: - for (int i = 0; i < changedFiles.Length; i++) - { - if (evaluationResult.Files.TryGetValue(changedFiles[i].Item.FilePath, out var evaluatedFile)) - { - changedFiles[i] = changedFiles[i] with { Item = evaluatedFile }; - } - } - - ReportFileChanges(changedFiles); - - fileSetWatcher = new HotReloadFileSetWatcher(evaluationResult.Files, buildCompletionTime, Context.Reporter, Context.EnvironmentOptions.TestFlags); + continue; } - else + + if (!rootProjectCapabilities.Contains("SupportsHotReload")) { - // update the workspace to reflect changes in the file content: - await compilationHandler.Workspace.UpdateFileContentAsync(changedFiles, iterationCancellationToken); + Context.Reporter.Warn($"Project '{rootProject.GetDisplayName()}' does not support Hot Reload and must be rebuilt."); + + // file change already detected + waitForFileChangeBeforeRestarting = false; + iterationCancellationSource.Cancel(); + break; } HotReloadEventSource.Log.HotReloadStart(HotReloadEventSource.StartType.Main); @@ -246,7 +254,7 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke HotReloadEventSource.Log.HotReloadStart(HotReloadEventSource.StartType.CompilationHandler); - var (projectsToBeRebuilt, projectsToRestart) = await compilationHandler.HandleFileChangesAsync(restartPrompt: async (projects, cancellationToken) => + var (projectsToRebuild, projectsToRestart) = await compilationHandler.HandleFileChangesAsync(restartPrompt: async (projectNames, cancellationToken) => { if (_rudeEditRestartPrompt != null) { @@ -262,9 +270,9 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke { Context.Reporter.Output("Affected projects:"); - foreach (var project in projects.OrderBy(p => p.Name)) + foreach (var projectName in projectNames.OrderBy(n => n)) { - Context.Reporter.Output(" " + project.Name); + Context.Reporter.Output(" " + projectName); } question = "Do you want to restart these projects?"; @@ -280,9 +288,9 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke { Context.Reporter.Verbose("Restarting without prompt since dotnet-watch is running in non-interactive mode."); - foreach (var project in projects) + foreach (var projectName in projectNames) { - Context.Reporter.Verbose($" Project to restart: '{project.Name}'"); + Context.Reporter.Verbose($" Project to restart: '{projectName}'"); } } }, iterationCancellationToken); @@ -301,23 +309,144 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke break; } - if (projectsToRestart.Any()) + if (projectsToRebuild.Count > 0) + { + // Discard baselines before build. + compilationHandler.DiscardProjectBaselines(projectsToRebuild, iterationCancellationToken); + + while (true) + { + iterationCancellationToken.ThrowIfCancellationRequested(); + + // pause accumulating file changes during build: + fileWatcher.OnFileChange -= fileChangedCallback; + try + { + var buildResults = await Task.WhenAll( + projectsToRebuild.Values.Select(projectPath => BuildProjectAsync(projectPath, rootProjectOptions.BuildArguments, iterationCancellationToken))); + + if (buildResults.All(success => success)) + { + break; + } + } + finally + { + fileWatcher.OnFileChange += fileChangedCallback; + } + + iterationCancellationToken.ThrowIfCancellationRequested(); + + _ = await fileWatcher.WaitForFileChangeAsync( + startedWatching: () => Context.Reporter.Report(MessageDescriptor.FixBuildError), + shutdownCancellationToken); + } + + // Update build completion time, so that file changes caused by the rebuild do not affect our file watcher: + buildCompletionTime = DateTime.UtcNow; + + // Changes made since last snapshot of the accumulator shouldn't be included in next Hot Reload update. + // Apply them to the workspace. + _ = await CaptureChangedFilesSnapshot(projectsToRebuild); + + // Update project baselines to reflect changes to the restarted projects. + compilationHandler.UpdateProjectBaselines(projectsToRebuild, iterationCancellationToken); + } + + if (projectsToRestart is not []) { - // Restart all terminated child processes and wait until their build completes: await Task.WhenAll( projectsToRestart.Select(async runningProject => { - var newRunningProject = await runningProject.RestartOperation(build: true, shutdownCancellationToken); - runningProject.Dispose(); - await newRunningProject.WaitForProcessRunningAsync(shutdownCancellationToken); + var newRunningProject = await runningProject.RestartOperation(shutdownCancellationToken); + + try + { + await newRunningProject.WaitForProcessRunningAsync(shutdownCancellationToken); + } + catch (OperationCanceledException) when (!shutdownCancellationToken.IsCancellationRequested) + { + // Process might have exited while we were trying to communicate with it. + } + finally + { + runningProject.Dispose(); + } })) .WaitAsync(shutdownCancellationToken); + } - // Update build completion time, so that file changes caused by the rebuild do not affect our file watcher: - fileSetWatcher.UpdateBuildCompletionTime(DateTime.UtcNow); + async Task> CaptureChangedFilesSnapshot(ImmutableDictionary? rebuiltProjects) + { + var changedFiles = Interlocked.Exchange(ref changedFilesAccumulator, []); + if (changedFiles is []) + { + return []; + } + + // When a new file is added we need to run design-time build to find out + // what kind of the file it is and which project(s) does it belong to (can be linked, web asset, etc.). + // We don't need to rebuild and restart the application though. + var hasAddedFile = changedFiles.Any(f => f.Change is ChangeKind.Add); + + if (hasAddedFile) + { + Context.Reporter.Verbose("File addition triggered re-evaluation."); + + evaluationResult = await EvaluateRootProjectAsync(iterationCancellationToken); + + // additional directories may have been added: + fileWatcher.WatchContainingDirectories(evaluationResult.Files.Keys); + + await compilationHandler.Workspace.UpdateProjectConeAsync(RootFileSetFactory.RootProjectFile, iterationCancellationToken); + + if (shutdownCancellationToken.IsCancellationRequested) + { + // Ctrl+C: + return []; + } + + // Update files in the change set with new evaluation info. + changedFiles = changedFiles + .Select(f => evaluationResult.Files.TryGetValue(f.Item.FilePath, out var evaluatedFile) ? f with { Item = evaluatedFile } : f) + .ToImmutableList(); + } + + if (rebuiltProjects != null) + { + // Filter changed files down to those contained in projects being rebuilt. + // File changes that affect projects that are not being rebuilt will stay in the accumulator + // and be included in the next Hot Reload change set. + var rebuiltProjectPaths = rebuiltProjects.Values.ToHashSet(); + + var newAccumulator = ImmutableList.Empty; + var newChangedFiles = ImmutableList.Empty; - // Restart session to capture new baseline that reflects the changes to the restarted projects. - await compilationHandler.RestartSessionAsync(projectsToBeRebuilt, iterationCancellationToken); + foreach (var file in changedFiles) + { + if (file.Item.ContainingProjectPaths.All(containingProjectPath => rebuiltProjectPaths.Contains(containingProjectPath))) + { + newChangedFiles = newChangedFiles.Add(file); + } + else + { + newAccumulator = newAccumulator.Add(file); + } + } + + changedFiles = newChangedFiles; + ImmutableInterlocked.Update(ref changedFilesAccumulator, accumulator => accumulator.AddRange(newAccumulator)); + } + + ReportFileChanges(changedFiles); + + if (!hasAddedFile) + { + // update the workspace to reflect changes in the file content: + await compilationHandler.Workspace.UpdateFileContentAsync(changedFiles, iterationCancellationToken); + } + + return changedFiles; } } } @@ -327,9 +456,10 @@ await Task.WhenAll( } finally { - if (!rootProcessTerminationSource.IsCancellationRequested) + // stop watching file changes: + if (fileChangedCallback != null) { - rootProcessTerminationSource.Cancel(); + fileWatcher.OnFileChange -= fileChangedCallback; } if (runtimeProcessLauncher != null) @@ -345,10 +475,15 @@ await Task.WhenAll( await compilationHandler.TerminateNonRootProcessesAndDispose(CancellationToken.None); } + if (!rootProcessTerminationSource.IsCancellationRequested) + { + rootProcessTerminationSource.Cancel(); + } + try { // Wait for the root process to exit. - await Task.WhenAll(new[] { (Task?)rootRunningProject?.RunningProcess, fileSetWatcherTask }.Where(t => t != null)!); + await Task.WhenAll(new[] { (Task?)rootRunningProject?.RunningProcess, fileWatcherTask }.Where(t => t != null)!); } catch (OperationCanceledException) when (!shutdownCancellationToken.IsCancellationRequested) { @@ -356,7 +491,7 @@ await Task.WhenAll( } finally { - fileSetWatcherTask = null; + fileWatcherTask = null; if (runtimeProcessLauncher != null) { @@ -365,22 +500,119 @@ await Task.WhenAll( rootRunningProject?.Dispose(); - if (evaluationResult != null && - waitForFileChangeBeforeRestarting && + if (waitForFileChangeBeforeRestarting && !shutdownCancellationToken.IsCancellationRequested && !forceRestartCancellationSource.IsCancellationRequested) { - fileSetWatcher ??= new HotReloadFileSetWatcher(evaluationResult.Files, DateTime.MinValue, Context.Reporter, Context.EnvironmentOptions.TestFlags); - Context.Reporter.Report(MessageDescriptor.WaitingForFileChangeBeforeRestarting); - using var shutdownOrForcedRestartSource = CancellationTokenSource.CreateLinkedTokenSource(shutdownCancellationToken, forceRestartCancellationSource.Token); - await fileSetWatcher.GetChangedFilesAsync(shutdownOrForcedRestartSource.Token, forceWaitForNewUpdate: true); + await WaitForFileChangeBeforeRestarting(fileWatcher, evaluationResult, shutdownOrForcedRestartSource.Token); } + } + } + } + } + + private async ValueTask WaitForFileChangeBeforeRestarting(FileWatcher fileWatcher, EvaluationResult? evaluationResult, CancellationToken cancellationToken) + { + if (evaluationResult != null) + { + if (!fileWatcher.WatchingDirectories) + { + fileWatcher.WatchContainingDirectories(evaluationResult.Files.Keys); + } + + _ = await fileWatcher.WaitForFileChangeAsync( + evaluationResult.Files, + startedWatching: () => Context.Reporter.Report(MessageDescriptor.WaitingForFileChangeBeforeRestarting), + cancellationToken); + } + else + { + // evaluation cancelled - watch for any changes in the directory containing the root project: + fileWatcher.WatchContainingDirectories([RootFileSetFactory.RootProjectFile]); + + _ = await fileWatcher.WaitForFileChangeAsync( + startedWatching: () => Context.Reporter.Report(MessageDescriptor.WaitingForFileChangeBeforeRestarting), + cancellationToken); + } + } - fileSetWatcher?.Dispose(); + private ChangedFile? TryGetChangedFile(IReadOnlyDictionary fileSet, DateTime buildCompletionTime, string path, ChangeKind kind) + { + // only handle file changes: + if (Directory.Exists(path)) + { + return null; + } + + if (kind != ChangeKind.Delete) + { + try + { + // Do not report changes to files that happened during build: + var creationTime = File.GetCreationTimeUtc(path); + var writeTime = File.GetLastWriteTimeUtc(path); + + if (creationTime == s_fileNotExistFileTime || writeTime == s_fileNotExistFileTime) + { + // file might have been deleted since we received the event + kind = ChangeKind.Delete; + } + else if (creationTime.Ticks < buildCompletionTime.Ticks && writeTime.Ticks < buildCompletionTime.Ticks) + { + Context.Reporter.Verbose( + $"Ignoring file change during build: {kind} '{path}' " + + $"(created {FormatTimestamp(creationTime)} and written {FormatTimestamp(writeTime)} before {FormatTimestamp(buildCompletionTime)})."); + + return null; } + else if (writeTime > creationTime) + { + Context.Reporter.Verbose($"File change: {kind} '{path}' (written {FormatTimestamp(writeTime)} after {FormatTimestamp(buildCompletionTime)})."); + } + else + { + Context.Reporter.Verbose($"File change: {kind} '{path}' (created {FormatTimestamp(creationTime)} after {FormatTimestamp(buildCompletionTime)})."); + } + } + catch (Exception e) + { + Context.Reporter.Verbose($"Ignoring file '{path}' due to access error: {e.Message}."); + return null; } } + + if (kind == ChangeKind.Delete) + { + Context.Reporter.Verbose($"File '{path}' deleted after {FormatTimestamp(buildCompletionTime)}."); + } + + if (fileSet.TryGetValue(path, out var fileItem)) + { + // For some reason we are sometimes seeing Add events raised whan an existing file is updated: + return new ChangedFile(fileItem, (kind == ChangeKind.Add) ? ChangeKind.Update : kind); + } + + if (kind == ChangeKind.Add) + { + return new ChangedFile(new FileItem { FilePath = path, ContainingProjectPaths = [] }, kind); + } + + return null; + } + + internal static string FormatTimestamp(DateTime time) + => time.ToString("HH:mm:ss.fffffff"); + + private void ReportWatchingForChanges() + { + var waitingForChanges = MessageDescriptor.WaitingForChanges; + if (Context.EnvironmentOptions.TestFlags.HasFlag(TestFlags.ElevateWaitingForChangesMessageSeverity)) + { + waitingForChanges = waitingForChanges with { Severity = MessageSeverity.Output }; + } + + Context.Reporter.Report(waitingForChanges); } private void ReportFileChanges(IReadOnlyList changedFiles) @@ -435,11 +667,46 @@ private async ValueTask EvaluateRootProjectAsync(CancellationT return result; } - Context.Reporter.Report(MessageDescriptor.FixBuildError); - await FileWatcher.WaitForFileChangeAsync(RootFileSetFactory.RootProjectFile, Context.Reporter, cancellationToken); + await FileWatcher.WaitForFileChangeAsync( + RootFileSetFactory.RootProjectFile, + Context.Reporter, + startedWatching: () => Context.Reporter.Report(MessageDescriptor.FixBuildError), + cancellationToken); } } + private async Task BuildProjectAsync(string projectPath, IReadOnlyList buildArguments, CancellationToken cancellationToken) + { + var buildOutput = new List(); + + var processSpec = new ProcessSpec + { + Executable = Context.EnvironmentOptions.MuxerPath, + WorkingDirectory = Path.GetDirectoryName(projectPath)!, + OnOutput = line => + { + lock (buildOutput) + { + buildOutput.Add(line); + } + }, + // pass user-specified build arguments last to override defaults: + Arguments = ["build", projectPath, "-consoleLoggerParameters:NoSummary;Verbosity=minimal", .. buildArguments] + }; + + Context.Reporter.Output($"Building '{projectPath}' ..."); + + var exitCode = await ProcessRunner.RunAsync(processSpec, Context.Reporter, isUserApplication: false, launchResult: null, cancellationToken); + BuildUtilities.ReportBuildOutput(Context.Reporter, buildOutput, verboseOutput: exitCode == 0); + + if (exitCode == 0) + { + Context.Reporter.Output("Build succeeded."); + } + + return exitCode == 0; + } + private string GetRelativeFilePath(string path) { var relativePath = path; diff --git a/src/BuiltInTools/dotnet-watch/Internal/BrowserSpecificReporter.cs b/src/BuiltInTools/dotnet-watch/Internal/BrowserSpecificReporter.cs new file mode 100644 index 000000000000..2d15a2d78ba8 --- /dev/null +++ b/src/BuiltInTools/dotnet-watch/Internal/BrowserSpecificReporter.cs @@ -0,0 +1,26 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.Build.Graph; + +namespace Microsoft.DotNet.Watch; + +internal sealed class BrowserSpecificReporter(int browserId, IReporter underlyingReporter) : IReporter +{ + private readonly string _prefix = $"[Browser #{browserId}] "; + + public bool IsVerbose + => underlyingReporter.IsVerbose; + + public bool EnableProcessOutputReporting + => false; + + public void ReportProcessOutput(ProjectGraphNode project, OutputLine line) + => throw new InvalidOperationException(); + + public void ReportProcessOutput(OutputLine line) + => throw new InvalidOperationException(); + + public void Report(MessageDescriptor descriptor, string prefix, object?[] args) + => underlyingReporter.Report(descriptor, _prefix + prefix, args); +} diff --git a/src/BuiltInTools/dotnet-watch/Internal/CommandLineUtilities.cs b/src/BuiltInTools/dotnet-watch/Internal/CommandLineUtilities.cs index ff710c7666b8..587087f49365 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/CommandLineUtilities.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/CommandLineUtilities.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // Copied from dotnet/runtime/src/libraries/System.Private.CoreLib/src/System/PasteArguments.cs -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal static class CommandLineUtilities { diff --git a/src/BuiltInTools/dotnet-watch/Internal/ConsoleInputReader.cs b/src/BuiltInTools/dotnet-watch/Internal/ConsoleInputReader.cs index c9483fe920ef..3d9a3d4eb09b 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/ConsoleInputReader.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/ConsoleInputReader.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.Extensions.Tools.Internal +namespace Microsoft.DotNet.Watch { internal sealed class ConsoleInputReader(IConsole console, bool quiet, bool suppressEmojis) { diff --git a/src/BuiltInTools/dotnet-watch/Internal/ConsoleReporter.cs b/src/BuiltInTools/dotnet-watch/Internal/ConsoleReporter.cs index 0d1b8be10797..d50f49e8b1cc 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/ConsoleReporter.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/ConsoleReporter.cs @@ -2,9 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.Build.Graph; -using Microsoft.DotNet.Watcher.Internal; -namespace Microsoft.Extensions.Tools.Internal +namespace Microsoft.DotNet.Watch { /// /// This API supports infrastructure and is not intended to be used diff --git a/src/BuiltInTools/dotnet-watch/Internal/Ensure.cs b/src/BuiltInTools/dotnet-watch/Internal/Ensure.cs index fdd7bfaa33f9..21ab1478ab41 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/Ensure.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/Ensure.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.Extensions.Tools.Internal +namespace Microsoft.DotNet.Watch { internal static class Ensure { diff --git a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher.cs b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher.cs index 3a339bf63fb1..94d4323096f4 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher.cs @@ -1,13 +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.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Internal +namespace Microsoft.DotNet.Watch { - internal sealed class FileWatcher(IReadOnlyDictionary fileSet, IReporter reporter) : IDisposable + internal sealed class FileWatcher(IReporter reporter) : IDisposable { - private readonly Dictionary _watchers = []; + // Directory watcher for each watched directory + private readonly Dictionary _watchers = []; private bool _disposed; public event Action? OnFileChange; @@ -29,13 +28,19 @@ public void Dispose() } } - public void StartWatching() + public bool WatchingDirectories + => _watchers.Count > 0; + + public void WatchContainingDirectories(IEnumerable filePaths) + => WatchDirectories(filePaths.Select(path => Path.GetDirectoryName(path)!)); + + public void WatchDirectories(IEnumerable directories) { - EnsureNotDisposed(); + ObjectDisposedException.ThrowIf(_disposed, this); - foreach (var (filePath, _) in fileSet) + foreach (var dir in directories) { - var directory = EnsureTrailingSlash(Path.GetDirectoryName(filePath)!); + var directory = EnsureTrailingSlash(dir); var alreadyWatched = _watchers .Where(d => directory.StartsWith(d.Key)) @@ -67,9 +72,9 @@ public void StartWatching() private void WatcherErrorHandler(object? sender, Exception error) { - if (sender is IFileSystemWatcher watcher) + if (sender is IDirectoryWatcher watcher) { - reporter.Warn($"The file watcher observing '{watcher.BasePath}' encountered an error: {error.Message}"); + reporter.Warn($"The file watcher observing '{watcher.WatchedDirectory}' encountered an error: {error.Message}"); } } @@ -90,29 +95,31 @@ private void DisposeWatcher(string directory) watcher.Dispose(); } - private void EnsureNotDisposed() - { - if (_disposed) - { - throw new ObjectDisposedException(nameof(FileWatcher)); - } - } - private static string EnsureTrailingSlash(string path) => (path is [.., var last] && last != Path.DirectorySeparatorChar) ? path + Path.DirectorySeparatorChar : path; - public async Task GetChangedFileAsync(Action? startedWatching, CancellationToken cancellationToken) - { - StartWatching(); + public Task WaitForFileChangeAsync(Action? startedWatching, CancellationToken cancellationToken) + => WaitForFileChangeAsync( + changeFilter: (path, kind) => new ChangedFile(new FileItem() { FilePath = path, ContainingProjectPaths = [] }, kind), + startedWatching, + cancellationToken); + public Task WaitForFileChangeAsync(IReadOnlyDictionary fileSet, Action? startedWatching, CancellationToken cancellationToken) + => WaitForFileChangeAsync( + changeFilter: (path, kind) => fileSet.TryGetValue(path, out var fileItem) ? new ChangedFile(fileItem, kind) : null, + startedWatching, + cancellationToken); + + public async Task WaitForFileChangeAsync(Func changeFilter, Action? startedWatching, CancellationToken cancellationToken) + { var fileChangedSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); cancellationToken.Register(() => fileChangedSource.TrySetResult(null)); void FileChangedCallback(string path, ChangeKind kind) { - if (fileSet.TryGetValue(path, out var fileItem)) + if (changeFilter(path, kind) is { } changedFile) { - fileChangedSource.TrySetResult(new ChangedFile(fileItem, kind)); + fileChangedSource.TrySetResult(changedFile); } } @@ -132,14 +139,21 @@ void FileChangedCallback(string path, ChangeKind kind) return changedFile; } - public static async ValueTask WaitForFileChangeAsync(string path, IReporter reporter, CancellationToken cancellationToken) + public static async ValueTask WaitForFileChangeAsync(string filePath, IReporter reporter, Action? startedWatching, CancellationToken cancellationToken) { - var fileSet = new Dictionary() { { path, new FileItem { FilePath = path } } }; + using var watcher = new FileWatcher(reporter); - using var watcher = new FileWatcher(fileSet, reporter); - await watcher.GetChangedFileAsync(startedWatching: null, cancellationToken); + watcher.WatchDirectories([Path.GetDirectoryName(filePath)!]); - reporter.Output($"File changed: {path}"); + var fileChange = await watcher.WaitForFileChangeAsync( + changeFilter: (path, kind) => path == filePath ? new ChangedFile(new FileItem { FilePath = path, ContainingProjectPaths = [] }, kind) : null, + startedWatching, + cancellationToken); + + if (fileChange != null) + { + reporter.Output($"File changed: {filePath}"); + } } } } diff --git a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/ChangeKind.cs b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/ChangeKind.cs index 5fef3b698624..ca4cd28c9171 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/ChangeKind.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/ChangeKind.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher.Internal; +namespace Microsoft.DotNet.Watch; internal enum ChangeKind { diff --git a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/DotnetFileWatcher.cs b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/EventBasedDirectoryWatcher.cs similarity index 79% rename from src/BuiltInTools/dotnet-watch/Internal/FileWatcher/DotnetFileWatcher.cs rename to src/BuiltInTools/dotnet-watch/Internal/FileWatcher/EventBasedDirectoryWatcher.cs index 7040fe1a0763..508475247cc7 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/DotnetFileWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/EventBasedDirectoryWatcher.cs @@ -2,48 +2,35 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Internal +namespace Microsoft.DotNet.Watch { - internal class DotnetFileWatcher : IFileSystemWatcher + internal sealed class EventBasedDirectoryWatcher : IDirectoryWatcher { - internal Action? Logger { get; set; } + public event EventHandler<(string filePath, ChangeKind kind)>? OnFileChange; - private volatile bool _disposed; + public event EventHandler? OnError; + + public string WatchedDirectory { get; } - private readonly Func _watcherFactory; + internal Action? Logger { get; set; } + + private volatile bool _disposed; private FileSystemWatcher? _fileSystemWatcher; private readonly object _createLock = new(); - public DotnetFileWatcher(string watchedDirectory) - : this(watchedDirectory, DefaultWatcherFactory) + internal EventBasedDirectoryWatcher(string watchedDirectory) { - } - - internal DotnetFileWatcher(string watchedDirectory, Func fileSystemWatcherFactory) - { - Ensure.NotNull(fileSystemWatcherFactory, nameof(fileSystemWatcherFactory)); - Ensure.NotNullOrEmpty(watchedDirectory, nameof(watchedDirectory)); - - BasePath = watchedDirectory; - _watcherFactory = fileSystemWatcherFactory; + WatchedDirectory = watchedDirectory; CreateFileSystemWatcher(); } - public event EventHandler<(string filePath, ChangeKind kind)>? OnFileChange; - - public event EventHandler? OnError; - - public string BasePath { get; } - - private static FileSystemWatcher DefaultWatcherFactory(string watchedDirectory) + public void Dispose() { - Ensure.NotNullOrEmpty(watchedDirectory, nameof(watchedDirectory)); - - return new FileSystemWatcher(watchedDirectory); + _disposed = true; + DisposeInnerWatcher(); } private void WatcherErrorHandler(object sender, ErrorEventArgs e) @@ -62,7 +49,7 @@ private void WatcherErrorHandler(object sender, ErrorEventArgs e) // Win32Exception may be triggered when setting EnableRaisingEvents on a file system type // that is not supported, such as a network share. Don't attempt to recreate the watcher // in this case as it will cause a StackOverflowException - if (!(exception is Win32Exception)) + if (exception is not Win32Exception) { // Recreate the watcher if it is a recoverable error. CreateFileSystemWatcher(); @@ -147,8 +134,10 @@ private void CreateFileSystemWatcher() DisposeInnerWatcher(); } - _fileSystemWatcher = _watcherFactory(BasePath); - _fileSystemWatcher.IncludeSubdirectories = true; + _fileSystemWatcher = new FileSystemWatcher(WatchedDirectory) + { + IncludeSubdirectories = true + }; _fileSystemWatcher.Created += WatcherAddedHandler; _fileSystemWatcher.Deleted += WatcherDeletedHandler; @@ -162,7 +151,7 @@ private void CreateFileSystemWatcher() private void DisposeInnerWatcher() { - if ( _fileSystemWatcher != null ) + if (_fileSystemWatcher != null) { _fileSystemWatcher.EnableRaisingEvents = false; @@ -181,11 +170,5 @@ public bool EnableRaisingEvents get => _fileSystemWatcher!.EnableRaisingEvents; set => _fileSystemWatcher!.EnableRaisingEvents = value; } - - public void Dispose() - { - _disposed = true; - DisposeInnerWatcher(); - } } } diff --git a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/FileWatcherFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/FileWatcherFactory.cs index b05242d80ecd..7baa775806eb 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/FileWatcherFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/FileWatcherFactory.cs @@ -1,18 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher.Internal +namespace Microsoft.DotNet.Watch { internal static class FileWatcherFactory { - public static IFileSystemWatcher CreateWatcher(string watchedDirectory) + public static IDirectoryWatcher CreateWatcher(string watchedDirectory) => CreateWatcher(watchedDirectory, EnvironmentVariables.IsPollingEnabled); - public static IFileSystemWatcher CreateWatcher(string watchedDirectory, bool usePollingWatcher) + public static IDirectoryWatcher CreateWatcher(string watchedDirectory, bool usePollingWatcher) { return usePollingWatcher ? - new PollingFileWatcher(watchedDirectory) : - new DotnetFileWatcher(watchedDirectory); + new PollingDirectoryWatcher(watchedDirectory) : + new EventBasedDirectoryWatcher(watchedDirectory); } } } diff --git a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/IFileSystemWatcher.cs b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/IDirectoryWatcher.cs similarity index 71% rename from src/BuiltInTools/dotnet-watch/Internal/FileWatcher/IFileSystemWatcher.cs rename to src/BuiltInTools/dotnet-watch/Internal/FileWatcher/IDirectoryWatcher.cs index ebdef49913ff..6b1eb73671a9 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/IFileSystemWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/IDirectoryWatcher.cs @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher.Internal +namespace Microsoft.DotNet.Watch { - internal interface IFileSystemWatcher : IDisposable + internal interface IDirectoryWatcher : IDisposable { event EventHandler<(string filePath, ChangeKind kind)> OnFileChange; event EventHandler OnError; - string BasePath { get; } + string WatchedDirectory { get; } bool EnableRaisingEvents { get; set; } } diff --git a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/PollingFileWatcher.cs b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/PollingDirectoryWatcher.cs similarity index 78% rename from src/BuiltInTools/dotnet-watch/Internal/FileWatcher/PollingFileWatcher.cs rename to src/BuiltInTools/dotnet-watch/Internal/FileWatcher/PollingDirectoryWatcher.cs index 2df2004ee84b..1477e7239783 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/PollingFileWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/FileWatcher/PollingDirectoryWatcher.cs @@ -2,37 +2,44 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Internal +namespace Microsoft.DotNet.Watch { - internal class PollingFileWatcher : IFileSystemWatcher + internal sealed class PollingDirectoryWatcher : IDirectoryWatcher { // The minimum interval to rerun the scan private static readonly TimeSpan _minRunInternal = TimeSpan.FromSeconds(.5); private readonly DirectoryInfo _watchedDirectory; - private Dictionary _knownEntities = new(); - private Dictionary _tempDictionary = new(); - private Dictionary _changes = new(); + private Dictionary _knownEntities = []; + private Dictionary _tempDictionary = []; + private readonly Dictionary _changes = []; private Thread _pollingThread; private bool _raiseEvents; - private bool _disposed; + private volatile bool _disposed; - public PollingFileWatcher(string watchedDirectory) + public event EventHandler<(string filePath, ChangeKind kind)>? OnFileChange; + +#pragma warning disable CS0067 // not used + public event EventHandler? OnError; +#pragma warning restore + + public string WatchedDirectory { get; } + + public PollingDirectoryWatcher(string watchedDirectory) { Ensure.NotNullOrEmpty(watchedDirectory, nameof(watchedDirectory)); _watchedDirectory = new DirectoryInfo(watchedDirectory); - BasePath = _watchedDirectory.FullName; + WatchedDirectory = _watchedDirectory.FullName; _pollingThread = new Thread(new ThreadStart(PollingLoop)) { IsBackground = true, - Name = nameof(PollingFileWatcher) + Name = nameof(PollingDirectoryWatcher) }; CreateKnownFilesSnapshot(); @@ -40,20 +47,18 @@ public PollingFileWatcher(string watchedDirectory) _pollingThread.Start(); } - public event EventHandler<(string filePath, ChangeKind kind)>? OnFileChange; - -#pragma warning disable CS0067 // not used - public event EventHandler? OnError; -#pragma warning restore - - public string BasePath { get; } + public void Dispose() + { + EnableRaisingEvents = false; + _disposed = true; + } public bool EnableRaisingEvents { get => _raiseEvents; set { - EnsureNotDisposed(); + ObjectDisposedException.ThrowIf(_disposed, this); _raiseEvents = value; } } @@ -90,9 +95,9 @@ private void CreateKnownFilesSnapshot() { _knownEntities.Clear(); - ForeachEntityInDirectory(_watchedDirectory, f => + ForeachEntityInDirectory(_watchedDirectory, fileInfo => { - _knownEntities.Add(f.FullName, new FileMeta(f)); + _knownEntities.Add(fileInfo.FullName, new FileMeta(fileInfo, foundAgain: false)); }); } @@ -100,14 +105,14 @@ private void CheckForChangedFiles() { _changes.Clear(); - ForeachEntityInDirectory(_watchedDirectory, f => + ForeachEntityInDirectory(_watchedDirectory, fileInfo => { - var fullFilePath = f.FullName; + var fullFilePath = fileInfo.FullName; if (!_knownEntities.ContainsKey(fullFilePath)) { // New file or directory - RecordChange(f, ChangeKind.Add); + RecordChange(fileInfo, ChangeKind.Add); } else { @@ -116,10 +121,10 @@ private void CheckForChangedFiles() try { if (!fileMeta.FileInfo.Attributes.HasFlag(FileAttributes.Directory) && - fileMeta.FileInfo.LastWriteTime != f.LastWriteTime) + fileMeta.FileInfo.LastWriteTime != fileInfo.LastWriteTime) { // File changed - RecordChange(f, ChangeKind.Update); + RecordChange(fileInfo, ChangeKind.Update); } _knownEntities[fullFilePath] = new FileMeta(fileMeta.FileInfo, foundAgain: true); @@ -130,7 +135,7 @@ private void CheckForChangedFiles() } } - _tempDictionary.Add(f.FullName, new FileMeta(f)); + _tempDictionary.Add(fileInfo.FullName, new FileMeta(fileInfo, foundAgain: false)); }); foreach (var file in _knownEntities) @@ -211,31 +216,10 @@ private void NotifyChanges() } } - private void EnsureNotDisposed() - { - if (_disposed) - { - throw new ObjectDisposedException(nameof(PollingFileWatcher)); - } - } - - public void Dispose() - { - EnableRaisingEvents = false; - _disposed = true; - } - - private struct FileMeta + private readonly struct FileMeta(FileSystemInfo fileInfo, bool foundAgain) { - public FileMeta(FileSystemInfo fileInfo, bool foundAgain = false) - { - FileInfo = fileInfo; - FoundAgain = foundAgain; - } - - public FileSystemInfo FileInfo; - - public bool FoundAgain; + public readonly FileSystemInfo FileInfo = fileInfo; + public readonly bool FoundAgain = foundAgain; } } } diff --git a/src/BuiltInTools/dotnet-watch/Internal/HotReloadFileSetWatcher.cs b/src/BuiltInTools/dotnet-watch/Internal/HotReloadFileSetWatcher.cs deleted file mode 100644 index 255f7c1474f1..000000000000 --- a/src/BuiltInTools/dotnet-watch/Internal/HotReloadFileSetWatcher.cs +++ /dev/null @@ -1,178 +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 System.Collections.Concurrent; -using System.Diagnostics; -using Microsoft.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Internal -{ - internal sealed class HotReloadFileSetWatcher(IReadOnlyDictionary fileSet, DateTime buildCompletionTime, IReporter reporter, TestFlags testFlags) : IDisposable - { - private static readonly TimeSpan s_debounceInterval = TimeSpan.FromMilliseconds(50); - private static readonly DateTime s_fileNotExistFileTime = DateTime.FromFileTime(0); - - private readonly FileWatcher _fileWatcher = new(fileSet, reporter); - private readonly object _changedFilesLock = new(); - private readonly ConcurrentDictionary _changedFiles = new(StringComparer.Ordinal); - - private TaskCompletionSource? _tcs; - private bool _initialized; - private bool _disposed; - - public void Dispose() - { - _disposed = true; - _fileWatcher.Dispose(); - } - - public void UpdateBuildCompletionTime(DateTime value) - { - lock (_changedFilesLock) - { - buildCompletionTime = value; - _changedFiles.Clear(); - } - } - - private void EnsureInitialized() - { - if (_initialized) - { - return; - } - - _initialized = true; - - _fileWatcher.StartWatching(); - _fileWatcher.OnFileChange += FileChangedCallback; - - var waitingForChanges = MessageDescriptor.WaitingForChanges; - if (testFlags.HasFlag(TestFlags.ElevateWaitingForChangesMessageSeverity)) - { - waitingForChanges = waitingForChanges with { Severity = MessageSeverity.Output }; - } - - reporter.Report(waitingForChanges); - - Task.Factory.StartNew(async () => - { - // Debounce / polling loop - while (!_disposed) - { - await Task.Delay(s_debounceInterval); - if (_changedFiles.IsEmpty) - { - continue; - } - - var tcs = Interlocked.Exchange(ref _tcs, null!); - if (tcs is null) - { - continue; - } - - ChangedFile[] changedFiles; - lock (_changedFilesLock) - { - changedFiles = _changedFiles.Values.ToArray(); - _changedFiles.Clear(); - } - - if (changedFiles is []) - { - continue; - } - - tcs.TrySetResult(changedFiles); - } - - }, default, TaskCreationOptions.LongRunning, TaskScheduler.Default); - - void FileChangedCallback(string path, ChangeKind kind) - { - // only handle file changes: - if (Directory.Exists(path)) - { - return; - } - - if (kind != ChangeKind.Delete) - { - try - { - // Do not report changes to files that happened during build: - var creationTime = File.GetCreationTimeUtc(path); - var writeTime = File.GetLastWriteTimeUtc(path); - - if (creationTime == s_fileNotExistFileTime || writeTime == s_fileNotExistFileTime) - { - // file might have been deleted since we received the event - kind = ChangeKind.Delete; - } - else if (creationTime.Ticks < buildCompletionTime.Ticks && writeTime.Ticks < buildCompletionTime.Ticks) - { - reporter.Verbose( - $"Ignoring file change during build: {kind} '{path}' " + - $"(created {FormatTimestamp(creationTime)} and written {FormatTimestamp(writeTime)} before {FormatTimestamp(buildCompletionTime)})."); - - return; - } - else if (writeTime > creationTime) - { - reporter.Verbose($"File change: {kind} '{path}' (written {FormatTimestamp(writeTime)} after {FormatTimestamp(buildCompletionTime)})."); - } - else - { - reporter.Verbose($"File change: {kind} '{path}' (created {FormatTimestamp(creationTime)} after {FormatTimestamp(buildCompletionTime)})."); - } - } - catch (Exception e) - { - reporter.Verbose($"Ignoring file '{path}' due to access error: {e.Message}."); - return; - } - } - - if (kind == ChangeKind.Delete) - { - reporter.Verbose($"File '{path}' deleted after {FormatTimestamp(buildCompletionTime)}."); - } - - if (kind == ChangeKind.Add) - { - lock (_changedFilesLock) - { - _changedFiles.TryAdd(path, new ChangedFile(new FileItem { FilePath = path }, kind)); - } - } - else if (fileSet.TryGetValue(path, out var fileItem)) - { - lock (_changedFilesLock) - { - _changedFiles.TryAdd(path, new ChangedFile(fileItem, kind)); - } - } - } - } - - public Task GetChangedFilesAsync(CancellationToken cancellationToken, bool forceWaitForNewUpdate = false) - { - EnsureInitialized(); - - var tcs = _tcs; - if (!forceWaitForNewUpdate && tcs is not null) - { - return tcs.Task; - } - - _tcs = tcs = new(TaskCreationOptions.RunContinuationsAsynchronously); - cancellationToken.Register(() => tcs.TrySetResult(null)); - return tcs.Task; - } - - internal static string FormatTimestamp(DateTime time) - => time.ToString("HH:mm:ss.fffffff"); - } -} diff --git a/src/BuiltInTools/dotnet-watch/Internal/IConsole.cs b/src/BuiltInTools/dotnet-watch/Internal/IConsole.cs index b166d6ce93b8..0860a30eeae6 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/IConsole.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/IConsole.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.Extensions.Tools.Internal +namespace Microsoft.DotNet.Watch { /// /// This API supports infrastructure and is not intended to be used @@ -9,14 +9,9 @@ namespace Microsoft.Extensions.Tools.Internal /// internal interface IConsole { - event ConsoleCancelEventHandler CancelKeyPress; event Action KeyPressed; TextWriter Out { get; } TextWriter Error { get; } - TextReader In { get; } - bool IsInputRedirected { get; } - bool IsOutputRedirected { get; } - bool IsErrorRedirected { get; } ConsoleColor ForegroundColor { get; set; } void ResetColor(); void Clear(); diff --git a/src/BuiltInTools/dotnet-watch/Internal/IReporter.cs b/src/BuiltInTools/dotnet-watch/Internal/IReporter.cs index 892d21e5b2e0..932c92d59fdd 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/IReporter.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/IReporter.cs @@ -4,11 +4,8 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using Microsoft.Build.Graph; -using Microsoft.Build.Tasks; -using Microsoft.DotNet.Watcher; -using Microsoft.DotNet.Watcher.Internal; -namespace Microsoft.Extensions.Tools.Internal +namespace Microsoft.DotNet.Watch { internal enum MessageSeverity { @@ -55,16 +52,15 @@ public bool TryGetMessage(string? prefix, object?[] args, [NotNullWhen(true)] ou // predefined messages used for testing: public static readonly MessageDescriptor HotReloadSessionStarting = new(Format: null, Emoji: null, MessageSeverity.None, s_id++); public static readonly MessageDescriptor HotReloadSessionStarted = new("Hot reload session started.", "🔥", MessageSeverity.Verbose, s_id++); - public static readonly MessageDescriptor HotReloadSessionEnded = new("Hot reload session ended.", "🔥", MessageSeverity.Verbose, s_id++); + public static readonly MessageDescriptor ProjectBaselinesUpdated = new("Project baselines updated.", "🔥", MessageSeverity.Verbose, s_id++); public static readonly MessageDescriptor FixBuildError = new("Fix the error to continue or press Ctrl+C to exit.", "⌚", MessageSeverity.Warning, s_id++); public static readonly MessageDescriptor WaitingForChanges = new("Waiting for changes", "⌚", MessageSeverity.Verbose, s_id++); public static readonly MessageDescriptor LaunchedProcess = new("Launched '{0}' with arguments '{1}': process id {2}", "🚀", MessageSeverity.Verbose, s_id++); public static readonly MessageDescriptor KillingProcess = new("Killing process {0}", "⌚", MessageSeverity.Verbose, s_id++); public static readonly MessageDescriptor HotReloadChangeHandled = new("Hot reload change handled in {0}ms.", "🔥", MessageSeverity.Verbose, s_id++); public static readonly MessageDescriptor HotReloadSucceeded = new("Hot reload succeeded.", "🔥", MessageSeverity.Output, s_id++); - public static readonly MessageDescriptor BuildCompleted = new("Build completed.", "⌚", MessageSeverity.Verbose, s_id++); public static readonly MessageDescriptor UpdatesApplied = new("Updates applied: {0} out of {1}.", "🔥", MessageSeverity.Verbose, s_id++); - public static readonly MessageDescriptor WaitingForFileChangeBeforeRestarting = new("Waiting for a file to change before restarting dotnet...", "⏳", MessageSeverity.Warning, s_id++); + public static readonly MessageDescriptor WaitingForFileChangeBeforeRestarting = new("Waiting for a file to change before restarting ...", "⏳", MessageSeverity.Warning, s_id++); public static readonly MessageDescriptor WatchingWithHotReload = new("Watching with Hot Reload.", "⌚", MessageSeverity.Verbose, s_id++); public static readonly MessageDescriptor RestartInProgress = new("Restart in progress.", "🔄", MessageSeverity.Output, s_id++); public static readonly MessageDescriptor RestartRequested = new("Restart requested.", "🔄", MessageSeverity.Output, s_id++); diff --git a/src/BuiltInTools/dotnet-watch/Internal/MSBuildFileSetResult.cs b/src/BuiltInTools/dotnet-watch/Internal/MSBuildFileSetResult.cs index c214abea2938..0067b8542d34 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MSBuildFileSetResult.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MSBuildFileSetResult.cs @@ -3,7 +3,7 @@ using System.Runtime.Serialization; -namespace Microsoft.DotNet.Watcher.Internal +namespace Microsoft.DotNet.Watch { [DataContract] internal sealed class MSBuildFileSetResult diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs index 85405a76f4a7..e2be958e813a 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildFileSetFactory.cs @@ -4,10 +4,8 @@ using System.Diagnostics; using System.Text.Json; using Microsoft.Build.Graph; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { /// /// Used to collect a set of files to watch. @@ -20,8 +18,7 @@ namespace Microsoft.DotNet.Watcher.Tools /// internal class MSBuildFileSetFactory( string rootProjectFile, - string? targetFramework, - IReadOnlyList<(string name, string value)> buildProperties, + IEnumerable buildArguments, EnvironmentOptions environmentOptions, IReporter reporter) { @@ -58,28 +55,17 @@ internal class MSBuildFileSetFactory( var exitCode = await ProcessRunner.RunAsync(processSpec, reporter, isUserApplication: false, launchResult: null, cancellationToken); - if (exitCode != 0 || !File.Exists(watchList)) - { - reporter.Error($"Error(s) finding watch items project file '{Path.GetFileName(rootProjectFile)}'"); + var success = exitCode == 0 && File.Exists(watchList); + if (!success) + { + reporter.Error($"Error(s) finding watch items project file '{Path.GetFileName(rootProjectFile)}'."); reporter.Output($"MSBuild output from target '{TargetName}':"); - reporter.Output(string.Empty); - - foreach (var (line, isError) in capturedOutput) - { - var message = " " + line; - if (isError) - { - reporter.Error(message); - } - else - { - reporter.Output(message); - } - } - - reporter.Output(string.Empty); + } + BuildUtilities.ReportBuildOutput(reporter, capturedOutput, verboseOutput: success); + if (!success) + { return null; } @@ -167,10 +153,10 @@ private IReadOnlyList GetMSBuildArguments(string watchListFilePath) if (environmentOptions.TestFlags.HasFlag(TestFlags.RunningAsTest)) #endif { - arguments.Add("/bl:DotnetWatch.GenerateWatchList.binlog"); + arguments.Add($"/bl:{Path.Combine(environmentOptions.TestOutput, "DotnetWatch.GenerateWatchList.binlog")}"); } - arguments.AddRange(buildProperties.Select(p => $"/p:{p.name}={p.value}")); + arguments.AddRange(buildArguments); // Set dotnet-watch reserved properties after the user specified propeties, // so that the former take precedence. @@ -180,11 +166,6 @@ private IReadOnlyList GetMSBuildArguments(string watchListFilePath) arguments.Add("/p:DotNetWatchContentFiles=false"); } - if (targetFramework != null) - { - arguments.Add("/p:TargetFramework=" + targetFramework); - } - arguments.Add("/p:_DotNetWatchListFile=" + watchListFilePath); arguments.Add("/p:DotNetWatchBuild=true"); // extensibility point for users arguments.Add("/p:DesignTimeBuild=true"); // don't do expensive things @@ -215,12 +196,8 @@ private static string FindTargetsFile() internal ProjectGraph? TryLoadProjectGraph(bool projectGraphRequired) { var globalOptions = new Dictionary(); - if (targetFramework != null) - { - globalOptions.Add("TargetFramework", targetFramework); - } - foreach (var (name, value) in buildProperties) + foreach (var (name, value) in CommandLineOptions.ParseBuildProperties(buildArguments)) { globalOptions[name] = value; } diff --git a/src/BuiltInTools/dotnet-watch/Internal/MsBuildProjectFinder.cs b/src/BuiltInTools/dotnet-watch/Internal/MsBuildProjectFinder.cs index 0ee164e0233b..eb7ba724fa5c 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/MsBuildProjectFinder.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/MsBuildProjectFinder.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Globalization; -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Internal +namespace Microsoft.DotNet.Watch { internal class MsBuildProjectFinder { diff --git a/src/BuiltInTools/dotnet-watch/Internal/NullReporter.cs b/src/BuiltInTools/dotnet-watch/Internal/NullReporter.cs index 6812973c3b80..4e9ead24dcce 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/NullReporter.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/NullReporter.cs @@ -2,9 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.Build.Graph; -using Microsoft.DotNet.Watcher.Internal; -namespace Microsoft.Extensions.Tools.Internal +namespace Microsoft.DotNet.Watch { /// /// This API supports infrastructure and is not intended to be used diff --git a/src/BuiltInTools/dotnet-watch/Internal/OutputLine.cs b/src/BuiltInTools/dotnet-watch/Internal/OutputLine.cs index f80037321819..be29eb65cfc8 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/OutputLine.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/OutputLine.cs @@ -1,6 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher.Internal; +namespace Microsoft.DotNet.Watch; internal readonly record struct OutputLine(string Content, bool IsError); diff --git a/src/BuiltInTools/dotnet-watch/Internal/PhysicalConsole.cs b/src/BuiltInTools/dotnet-watch/Internal/PhysicalConsole.cs index c78bb694b219..3e3e14195dec 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/PhysicalConsole.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/PhysicalConsole.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.Extensions.Tools.Internal +namespace Microsoft.DotNet.Watch { /// /// This API supports infrastructure and is not intended to be used @@ -9,52 +9,82 @@ namespace Microsoft.Extensions.Tools.Internal /// internal sealed class PhysicalConsole : IConsole { - private readonly List> _keyPressedListeners = new(); + public const char CtrlC = '\x03'; + public const char CtrlR = '\x12'; - private PhysicalConsole() + public event Action? KeyPressed; + + public PhysicalConsole(TestFlags testFlags) { Console.OutputEncoding = Encoding.UTF8; - Console.CancelKeyPress += (o, e) => + + bool readFromStdin; + if (testFlags.HasFlag(TestFlags.ReadKeyFromStdin)) + { + readFromStdin = true; + } + else { - CancelKeyPress?.Invoke(o, e); - }; + try + { + Console.TreatControlCAsInput = true; + readFromStdin = false; + } + catch + { + // fails when stdin is redirected + readFromStdin = true; + } + } + + _ = readFromStdin ? ListenToStandardInputAsync() : ListenToConsoleKeyPressAsync(); } - public event Action KeyPressed + private async Task ListenToStandardInputAsync() { - add + using var stream = Console.OpenStandardInput(); + var buffer = new byte[1]; + + while (true) { - _keyPressedListeners.Add(value); - ListenToConsoleKeyPress(); - } + var bytesRead = await stream.ReadAsync(buffer, CancellationToken.None); + if (bytesRead != 1) + { + break; + } + + var c = (char)buffer[0]; - remove => _keyPressedListeners.Remove(value); + // handle all input keys that watcher might consume: + var key = c switch + { + CtrlC => new ConsoleKeyInfo('C', ConsoleKey.C, shift: false, alt: false, control: true), + CtrlR => new ConsoleKeyInfo('R', ConsoleKey.R, shift: false, alt: false, control: true), + >= 'a' and <= 'z' => new ConsoleKeyInfo(c, ConsoleKey.A + (c - 'a'), shift: false, alt: false, control: false), + >= 'A' and <= 'Z' => new ConsoleKeyInfo(c, ConsoleKey.A + (c - 'A'), shift: true, alt: false, control: false), + _ => default + }; + + if (key.Key != ConsoleKey.None) + { + KeyPressed?.Invoke(key); + } + } } - private void ListenToConsoleKeyPress() - { - Task.Factory.StartNew(() => + private Task ListenToConsoleKeyPressAsync() + => Task.Factory.StartNew(() => { while (true) { var key = Console.ReadKey(intercept: true); - for (var i = 0; i < _keyPressedListeners.Count; i++) - { - _keyPressedListeners[i](key); - } + KeyPressed?.Invoke(key); } }, TaskCreationOptions.LongRunning); - } - - public static IConsole Singleton { get; } = new PhysicalConsole(); - public event ConsoleCancelEventHandler? CancelKeyPress; public TextWriter Error => Console.Error; - public TextReader In => Console.In; public TextWriter Out => Console.Out; - public bool IsInputRedirected => Console.IsInputRedirected; - public bool IsOutputRedirected => Console.IsOutputRedirected; - public bool IsErrorRedirected => Console.IsErrorRedirected; + public ConsoleColor ForegroundColor { get => Console.ForegroundColor; diff --git a/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs b/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs index 06d9fd194327..40a42278e38f 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/ProcessRunner.cs @@ -3,9 +3,8 @@ using System.Diagnostics; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Internal +namespace Microsoft.DotNet.Watch { internal sealed class ProcessRunner { @@ -246,19 +245,11 @@ private static void TerminateProcess(Process process, ProcessState state, IRepor if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - process.Kill(); + TerminateWindowsProcess(process, state, reporter); } else { - [DllImport("libc", SetLastError = true, EntryPoint = "kill")] - static extern int sys_kill(int pid, int sig); - - var result = sys_kill(state.ProcessId, state.ForceExit ? SIGKILL : SIGTERM); - if (result != 0) - { - var error = Marshal.GetLastPInvokeError(); - reporter.Verbose($"Error while sending SIGTERM to process {state.ProcessId}: {Marshal.GetPInvokeErrorMessage(error)} (code {error})."); - } + TerminateUnixProcess(state, reporter); } reporter.Verbose($"Process {state.ProcessId} killed."); @@ -272,5 +263,51 @@ private static void TerminateProcess(Process process, ProcessState state, IRepor #endif } } + + private static void TerminateWindowsProcess(Process process, ProcessState state, IReporter reporter) + { + // Needs API: https://github.com/dotnet/runtime/issues/109432 + // Code below does not work because the process creation needs CREATE_NEW_PROCESS_GROUP flag. +#if TODO + if (!state.ForceExit) + { + const uint CTRL_C_EVENT = 0; + + [DllImport("kernel32.dll", SetLastError = true)] + static extern bool GenerateConsoleCtrlEvent(uint dwCtrlEvent, uint dwProcessGroupId); + + [DllImport("kernel32.dll", SetLastError = true)] + static extern bool AttachConsole(uint dwProcessId); + + [DllImport("kernel32.dll", SetLastError = true)] + static extern bool FreeConsole(); + + if (AttachConsole((uint)state.ProcessId) && + GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0) && + FreeConsole()) + { + return; + } + + var error = Marshal.GetLastPInvokeError(); + reporter.Verbose($"Failed to send Ctrl+C to process {state.ProcessId}: {Marshal.GetPInvokeErrorMessage(error)} (code {error})"); + } +#endif + + process.Kill(); + } + + private static void TerminateUnixProcess(ProcessState state, IReporter reporter) + { + [DllImport("libc", SetLastError = true, EntryPoint = "kill")] + static extern int sys_kill(int pid, int sig); + + var result = sys_kill(state.ProcessId, state.ForceExit ? SIGKILL : SIGTERM); + if (result != 0) + { + var error = Marshal.GetLastPInvokeError(); + reporter.Verbose($"Error while sending SIGTERM to process {state.ProcessId}: {Marshal.GetPInvokeErrorMessage(error)} (code {error})."); + } + } } } diff --git a/src/BuiltInTools/dotnet-watch/Internal/ProjectSpecificReporter.cs b/src/BuiltInTools/dotnet-watch/Internal/ProjectSpecificReporter.cs index a46b9d078904..e2746996b589 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/ProjectSpecificReporter.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/ProjectSpecificReporter.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.Build.Graph; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal sealed class ProjectSpecificReporter(ProjectGraphNode node, IReporter underlyingReporter) : IReporter { diff --git a/src/BuiltInTools/dotnet-watch/Internal/ReporterTraceListener.cs b/src/BuiltInTools/dotnet-watch/Internal/ReporterTraceListener.cs index 756b62be0160..f67f58af6708 100644 --- a/src/BuiltInTools/dotnet-watch/Internal/ReporterTraceListener.cs +++ b/src/BuiltInTools/dotnet-watch/Internal/ReporterTraceListener.cs @@ -2,9 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal class ReporterTraceListener(IReporter reporter, string emoji) : TraceListener { diff --git a/src/BuiltInTools/dotnet-watch/LaunchSettingsProfile.cs b/src/BuiltInTools/dotnet-watch/LaunchSettingsProfile.cs index 0579ab45f0eb..c1ee9346924f 100644 --- a/src/BuiltInTools/dotnet-watch/LaunchSettingsProfile.cs +++ b/src/BuiltInTools/dotnet-watch/LaunchSettingsProfile.cs @@ -4,9 +4,8 @@ using System.Text.Json; using System.Text.Json.Serialization; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch { internal sealed class LaunchSettingsProfile { diff --git a/src/BuiltInTools/dotnet-watch/ProcessLaunchResult.cs b/src/BuiltInTools/dotnet-watch/ProcessLaunchResult.cs index 3c58c69946a9..6084bc11b213 100644 --- a/src/BuiltInTools/dotnet-watch/ProcessLaunchResult.cs +++ b/src/BuiltInTools/dotnet-watch/ProcessLaunchResult.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher +namespace Microsoft.DotNet.Watch { internal sealed class ProcessLaunchResult { diff --git a/src/BuiltInTools/dotnet-watch/ProcessSpec.cs b/src/BuiltInTools/dotnet-watch/ProcessSpec.cs index c6b651c91b55..e8b9f7c53a7b 100644 --- a/src/BuiltInTools/dotnet-watch/ProcessSpec.cs +++ b/src/BuiltInTools/dotnet-watch/ProcessSpec.cs @@ -1,9 +1,8 @@ // 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.Watcher.Internal; -namespace Microsoft.DotNet.Watcher +namespace Microsoft.DotNet.Watch { internal sealed class ProcessSpec { diff --git a/src/BuiltInTools/dotnet-watch/Program.cs b/src/BuiltInTools/dotnet-watch/Program.cs index 75106f6e67f8..ffe38eea3a13 100644 --- a/src/BuiltInTools/dotnet-watch/Program.cs +++ b/src/BuiltInTools/dotnet-watch/Program.cs @@ -2,17 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.Loader; -using Microsoft.Build.Graph; using Microsoft.Build.Locator; -using Microsoft.CodeAnalysis.ChangeSignature; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; -using IConsole = Microsoft.Extensions.Tools.Internal.IConsole; -namespace Microsoft.DotNet.Watcher +namespace Microsoft.DotNet.Watch { internal sealed class Program(IConsole console, IReporter reporter, ProjectOptions rootProjectOptions, CommandLineOptions options, EnvironmentOptions environmentOptions) { @@ -36,10 +31,12 @@ public static async Task Main(string[] args) // Register listeners that load Roslyn-related assemblies from the `Roslyn/bincore` directory. RegisterAssemblyResolutionEvents(sdkRootDirectory); + var environmentOptions = EnvironmentOptions.FromEnvironment(); + var program = TryCreate( args, - PhysicalConsole.Singleton, - EnvironmentOptions.FromEnvironment(), + new PhysicalConsole(environmentOptions.TestFlags), + environmentOptions, EnvironmentVariables.VerboseCliOutput, out var exitCode); @@ -77,6 +74,11 @@ public static async Task Main(string[] args) var workingDirectory = environmentOptions.WorkingDirectory; reporter.Verbose($"Working directory: '{workingDirectory}'"); + if (environmentOptions.TestFlags != TestFlags.None) + { + reporter.Verbose($"Test flags: {environmentOptions.TestFlags}"); + } + string projectPath; try { @@ -97,9 +99,28 @@ public static async Task Main(string[] args) // internal for testing internal async Task RunAsync() { + var shutdownCancellationSourceDisposed = false; var shutdownCancellationSource = new CancellationTokenSource(); var shutdownCancellationToken = shutdownCancellationSource.Token; - console.CancelKeyPress += OnCancelKeyPress; + + console.KeyPressed += key => + { + if (!shutdownCancellationSourceDisposed && key.Modifiers.HasFlag(ConsoleModifiers.Control) && key.Key == ConsoleKey.C) + { + // if we already canceled, we force immediate shutdown: + var forceShutdown = shutdownCancellationSource.IsCancellationRequested; + + if (!forceShutdown) + { + reporter.Report(MessageDescriptor.ShutdownRequested); + shutdownCancellationSource.Cancel(); + } + else + { + Environment.Exit(0); + } + } + }; try { @@ -130,26 +151,9 @@ internal async Task RunAsync() } finally { - console.CancelKeyPress -= OnCancelKeyPress; + shutdownCancellationSourceDisposed = true; shutdownCancellationSource.Dispose(); } - - void OnCancelKeyPress(object? sender, ConsoleCancelEventArgs args) - { - // if we already canceled, we force immediate shutdown: - var forceShutdown = shutdownCancellationSource.IsCancellationRequested; - - if (!forceShutdown) - { - reporter.Report(MessageDescriptor.ShutdownRequested); - shutdownCancellationSource.Cancel(); - args.Cancel = true; - } - else - { - Environment.Exit(0); - } - } } // internal for testing @@ -162,8 +166,7 @@ internal Watcher CreateWatcher(IRuntimeProcessLauncherFactory? runtimeProcessLau var fileSetFactory = new MSBuildFileSetFactory( rootProjectOptions.ProjectPath, - rootProjectOptions.TargetFramework, - rootProjectOptions.BuildProperties, + rootProjectOptions.BuildArguments, environmentOptions, reporter); @@ -201,8 +204,7 @@ private async Task ListFilesAsync(CancellationToken cancellationToken) { var fileSetFactory = new MSBuildFileSetFactory( rootProjectOptions.ProjectPath, - rootProjectOptions.TargetFramework, - rootProjectOptions.BuildProperties, + rootProjectOptions.BuildArguments, environmentOptions, reporter); diff --git a/src/BuiltInTools/dotnet-watch/ProjectOptions.cs b/src/BuiltInTools/dotnet-watch/ProjectOptions.cs index 1e231f807eb1..12b8b889f1f7 100644 --- a/src/BuiltInTools/dotnet-watch/ProjectOptions.cs +++ b/src/BuiltInTools/dotnet-watch/ProjectOptions.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal sealed record ProjectOptions { @@ -9,7 +9,7 @@ internal sealed record ProjectOptions public required string ProjectPath { get; init; } public required string WorkingDirectory { get; init; } public required string? TargetFramework { get; init; } - public required IReadOnlyList<(string name, string value)> BuildProperties { get; init; } + public required IReadOnlyList BuildArguments { get; init; } public required bool NoLaunchProfile { get; init; } public required string? LaunchProfileName { get; init; } diff --git a/src/BuiltInTools/dotnet-watch/Properties/launchSettings.json b/src/BuiltInTools/dotnet-watch/Properties/launchSettings.json index dafd8c0ab7ef..de41cecc021a 100644 --- a/src/BuiltInTools/dotnet-watch/Properties/launchSettings.json +++ b/src/BuiltInTools/dotnet-watch/Properties/launchSettings.json @@ -5,7 +5,10 @@ "commandLineArgs": "--verbose /bl:DotnetRun.binlog", "workingDirectory": "$(RepoRoot)src\\Assets\\TestProjects\\BlazorWasmWithLibrary\\blazorwasm", "environmentVariables": { - "DOTNET_WATCH_DEBUG_SDK_DIRECTORY": "$(RepoRoot)artifacts\\bin\\redist\\$(Configuration)\\dotnet\\sdk\\$(Version)" + "DOTNET_WATCH_DEBUG_SDK_DIRECTORY": "$(RepoRoot)artifacts\\bin\\redist\\$(Configuration)\\dotnet\\sdk\\$(Version)", + "DCP_IDE_REQUEST_TIMEOUT_SECONDS": "100000", + "DCP_IDE_NOTIFICATION_TIMEOUT_SECONDS": "100000", + "DCP_IDE_NOTIFICATION_KEEPALIVE_SECONDS": "100000" } } } diff --git a/src/BuiltInTools/dotnet-watch/Utilities/BuildUtilities.cs b/src/BuiltInTools/dotnet-watch/Utilities/BuildUtilities.cs new file mode 100644 index 000000000000..3c9d85e0be4b --- /dev/null +++ b/src/BuiltInTools/dotnet-watch/Utilities/BuildUtilities.cs @@ -0,0 +1,46 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Text.RegularExpressions; + +namespace Microsoft.DotNet.Watch; + +internal static partial class BuildUtilities +{ + private static readonly Regex s_buildDiagnosticRegex = GetBuildDiagnosticRegex(); + + [GeneratedRegex(@"[^:]+: (error|warning) [A-Za-z]+[0-9]+: .+")] + private static partial Regex GetBuildDiagnosticRegex(); + + public static void ReportBuildOutput(IReporter reporter, IEnumerable buildOutput, bool verboseOutput) + { + const string BuildEmoji = "🔨"; + + foreach (var (line, isError) in buildOutput) + { + if (isError) + { + reporter.Error(line); + } + else if (s_buildDiagnosticRegex.Match(line) is { Success: true } match) + { + if (match.Groups[1].Value == "error") + { + reporter.Error(line); + } + else + { + reporter.Warn(line); + } + } + else if (verboseOutput) + { + reporter.Verbose(line, BuildEmoji); + } + else + { + reporter.Output(line, BuildEmoji); + } + } + } +} diff --git a/src/BuiltInTools/dotnet-watch/Utilities/Disposables.cs b/src/BuiltInTools/dotnet-watch/Utilities/Disposables.cs index 88f5373cdaf0..7aa9de719419 100644 --- a/src/BuiltInTools/dotnet-watch/Utilities/Disposables.cs +++ b/src/BuiltInTools/dotnet-watch/Utilities/Disposables.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal readonly record struct Disposables(List disposables) : IDisposable { diff --git a/src/BuiltInTools/dotnet-watch/Utilities/ProjectGraphNodeExtensions.cs b/src/BuiltInTools/dotnet-watch/Utilities/ProjectGraphNodeExtensions.cs index 762811f2d372..9df4691e434c 100644 --- a/src/BuiltInTools/dotnet-watch/Utilities/ProjectGraphNodeExtensions.cs +++ b/src/BuiltInTools/dotnet-watch/Utilities/ProjectGraphNodeExtensions.cs @@ -1,10 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Immutable; using Microsoft.Build.Graph; using Microsoft.DotNet.Cli; -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal static class ProjectGraphNodeExtensions { @@ -17,6 +18,9 @@ public static string GetTargetFramework(this ProjectGraphNode projectNode) public static Version? GetTargetFrameworkVersion(this ProjectGraphNode projectNode) => EnvironmentVariableNames.TryParseTargetFrameworkVersion(projectNode.ProjectInstance.GetPropertyValue("TargetFrameworkVersion")); + public static ImmutableArray GetWebAssemblyCapabilities(this ProjectGraphNode projectNode) + => [.. projectNode.ProjectInstance.GetPropertyValue("WebAssemblyHotReloadCapabilities").Split(';').Select(static c => c.Trim()).Where(static c => c != "")]; + public static bool IsTargetFrameworkVersionOrNewer(this ProjectGraphNode projectNode, Version minVersion) => GetTargetFrameworkVersion(projectNode) is { } version && version >= minVersion; @@ -31,4 +35,28 @@ public static bool IsNetCoreApp(this ProjectGraphNode projectNode, Version minVe public static IEnumerable GetCapabilities(this ProjectGraphNode projectNode) => projectNode.ProjectInstance.GetItems("ProjectCapability").Select(item => item.EvaluatedInclude); + + public static IEnumerable GetTransitivelyReferencingProjects(this IEnumerable projects) + { + var visited = new HashSet(); + var queue = new Queue(); + foreach (var project in projects) + { + queue.Enqueue(project); + } + + while (queue.Count > 0) + { + var project = queue.Dequeue(); + if (visited.Add(project)) + { + foreach (var referencingProject in project.ReferencingProjects) + { + queue.Enqueue(referencingProject); + } + } + } + + return visited; + } } diff --git a/src/BuiltInTools/dotnet-watch/Utilities/Versions.cs b/src/BuiltInTools/dotnet-watch/Utilities/Versions.cs index 4a6f1acf29a2..3f32b1b7d9ad 100644 --- a/src/BuiltInTools/dotnet-watch/Utilities/Versions.cs +++ b/src/BuiltInTools/dotnet-watch/Utilities/Versions.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch; internal static class Versions { diff --git a/src/BuiltInTools/dotnet-watch/Watcher.cs b/src/BuiltInTools/dotnet-watch/Watcher.cs index b24a93f700e5..5a6f3240b20b 100644 --- a/src/BuiltInTools/dotnet-watch/Watcher.cs +++ b/src/BuiltInTools/dotnet-watch/Watcher.cs @@ -1,9 +1,8 @@ // 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.Watcher.Tools; -namespace Microsoft.DotNet.Watcher +namespace Microsoft.DotNet.Watch { internal abstract class Watcher(DotNetWatchContext context, MSBuildFileSetFactory rootFileSetFactory) { diff --git a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj index 299353a7fb71..ee602dbfc053 100644 --- a/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj +++ b/src/BuiltInTools/dotnet-watch/dotnet-watch.csproj @@ -6,7 +6,7 @@ $(SdkTargetFramework) exe Command line tool to watch for source file changes during development and restart the dotnet command. - Microsoft.DotNet.Watcher.Tools + Microsoft.DotNet.Watch MicrosoftAspNetCore false @@ -16,10 +16,6 @@ false - - - - @@ -42,9 +38,15 @@ + + + + + + new Muxer().MuxerPath; } } diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/Muxer.cs b/src/Cli/Microsoft.DotNet.Cli.Utils/Muxer.cs index 9a2189f90a7b..f4f799111624 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/Muxer.cs +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/Muxer.cs @@ -34,11 +34,31 @@ public string MuxerPath public Muxer() { + // Best-effort search for muxer. + // SDK sets DOTNET_HOST_PATH as absolute path to current dotnet executable #if NET6_0_OR_GREATER - _muxerPath = Environment.ProcessPath; + string? processPath = Environment.ProcessPath; #else - _muxerPath = Process.GetCurrentProcess().MainModule.FileName; + string processPath = Process.GetCurrentProcess().MainModule.FileName; #endif + + // The current process should be dotnet in most normal scenarios except when dotnet.dll is loaded in a custom host like the testhost + if (processPath is not null && !Path.GetFileNameWithoutExtension(processPath).Equals("dotnet", StringComparison.OrdinalIgnoreCase)) + { + // SDK sets DOTNET_HOST_PATH as absolute path to current dotnet executable + processPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH"); + if (processPath is null) + { + // fallback to DOTNET_ROOT which typically holds some dotnet executable + var root = Environment.GetEnvironmentVariable("DOTNET_ROOT"); + if (root is not null) + { + processPath = Path.Combine(root, $"dotnet{Constants.ExeSuffix}"); + } + } + } + + _muxerPath = processPath; } public static string? GetDataFromAppDomain(string propertyName) diff --git a/src/Cli/dotnet/CommandFactory/CommandResolution/CompositeCommandResolver.cs b/src/Cli/dotnet/CommandFactory/CommandResolution/CompositeCommandResolver.cs index 8aea52d488c7..df5e1b8426db 100644 --- a/src/Cli/dotnet/CommandFactory/CommandResolution/CompositeCommandResolver.cs +++ b/src/Cli/dotnet/CommandFactory/CommandResolution/CompositeCommandResolver.cs @@ -1,10 +1,13 @@ // 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; + namespace Microsoft.DotNet.CommandFactory { public class CompositeCommandResolver : ICommandResolver { + private const string CommandResolveEvent = "commandresolution/commandresolved"; private IList _orderedCommandResolvers; public IEnumerable OrderedCommandResolvers @@ -33,6 +36,12 @@ public CommandSpec Resolve(CommandResolverArguments commandResolverArguments) if (commandSpec != null) { + TelemetryEventEntry.TrackEvent(CommandResolveEvent, new Dictionary() + { + { "commandName", commandResolverArguments is null ? string.Empty : Sha256Hasher.HashWithNormalizedCasing(commandResolverArguments.CommandName) }, + { "commandResolver", commandResolver.GetType().ToString() } + }); + return commandSpec; } } diff --git a/src/Cli/dotnet/OptionForwardingExtensions.cs b/src/Cli/dotnet/OptionForwardingExtensions.cs index 3864aaa26f71..864c26e78acb 100644 --- a/src/Cli/dotnet/OptionForwardingExtensions.cs +++ b/src/Cli/dotnet/OptionForwardingExtensions.cs @@ -77,15 +77,17 @@ public static CliOption Hide(this CliOption option) return option; } + internal static Dictionary> HelpDescriptionCustomizations = new(); + public static CliOption WithHelpDescription(this CliOption option, CliCommand command, string helpText) { - if (Parser.HelpDescriptionCustomizations.ContainsKey(option)) + if (HelpDescriptionCustomizations.ContainsKey(option)) { - Parser.HelpDescriptionCustomizations[option].Add(command, helpText); + HelpDescriptionCustomizations[option].Add(command, helpText); } else { - Parser.HelpDescriptionCustomizations.Add(option, new Dictionary() { { command, helpText } }); + HelpDescriptionCustomizations.Add(option, new Dictionary() { { command, helpText } }); } return option; diff --git a/src/Cli/dotnet/Parser.cs b/src/Cli/dotnet/Parser.cs index 08936d61ba95..04374a3e44ea 100644 --- a/src/Cli/dotnet/Parser.cs +++ b/src/Cli/dotnet/Parser.cs @@ -22,8 +22,6 @@ public static class Parser Directives = { new DiagramDirective(), new SuggestDirective(), new EnvironmentVariablesDirective() } }; - internal static Dictionary> HelpDescriptionCustomizations = new(); - public static readonly CliCommand InstallSuccessCommand = InternalReportinstallsuccessCommandParser.GetCommand(); // Subcommands @@ -224,11 +222,11 @@ private DotnetHelpBuilder(int maxWidth = int.MaxValue) : base(maxWidth) { } private static void SetHelpCustomizations(HelpBuilder builder) { - foreach (var option in HelpDescriptionCustomizations.Keys) + foreach (var option in OptionForwardingExtensions.HelpDescriptionCustomizations.Keys) { Func descriptionCallback = (HelpContext context) => { - foreach (var (command, helpText) in HelpDescriptionCustomizations[option]) + foreach (var (command, helpText) in OptionForwardingExtensions.HelpDescriptionCustomizations[option]) { if (context.ParseResult.CommandResult.Command.Equals(command)) { diff --git a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs index 39152b02200f..8f8f2295333b 100644 --- a/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs +++ b/src/Cli/dotnet/commands/InstallingWorkloadCommand.cs @@ -221,6 +221,18 @@ protected void UpdateWorkloadManifests(WorkloadHistoryRecorder recorder, ITransa if (updateToLatestWorkloadSet) { resolvedWorkloadSetVersion = _workloadManifestUpdater.GetAdvertisedWorkloadSetVersion(); + var currentWorkloadVersionInfo = _workloadResolver.GetWorkloadVersion(); + if (resolvedWorkloadSetVersion != null && currentWorkloadVersionInfo.IsInstalled && !currentWorkloadVersionInfo.WorkloadSetsEnabledWithoutWorkloadSet) + { + var currentPackageVersion = WorkloadSetVersion.ToWorkloadSetPackageVersion(currentWorkloadVersionInfo.Version, out var currentWorkloadSetSdkFeatureBand); + var advertisedPackageVersion = WorkloadSetVersion.ToWorkloadSetPackageVersion(resolvedWorkloadSetVersion, out var advertisedWorkloadSetSdkFeatureBand); + + if (currentWorkloadSetSdkFeatureBand > advertisedWorkloadSetSdkFeatureBand || + new NuGetVersion(currentPackageVersion) >= new NuGetVersion(advertisedPackageVersion)) + { + resolvedWorkloadSetVersion = null; + } + } } } diff --git a/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs b/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs index 56e10007691a..9f3d8e728201 100644 --- a/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs @@ -480,7 +480,9 @@ public void Shutdown() static ILogger MakeTerminalLogger(VerbosityOptions? verbosity) { var msbuildVerbosity = ToLoggerVerbosity(verbosity); - var thing = Assembly.Load("MSBuild").GetType("Microsoft.Build.Logging.TerminalLogger.TerminalLogger")!.GetConstructor([typeof(LoggerVerbosity)])!.Invoke([msbuildVerbosity]) as ILogger; + + // Temporary fix for 9.0.1xx. 9.0.2xx will use the TerminalLogger in the safe way. + var thing = new ConsoleLogger(msbuildVerbosity); return thing!; } diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateGlobalOrToolPathCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateGlobalOrToolPathCommand.cs index 307d35d5c155..98fcb78b166f 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateGlobalOrToolPathCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateGlobalOrToolPathCommand.cs @@ -10,6 +10,7 @@ using Microsoft.DotNet.Tools.Tool.Uninstall; using Microsoft.Extensions.EnvironmentAbstractions; using Microsoft.DotNet.Cli.ToolPackage; +using Microsoft.DotNet.Cli.NuGetPackageDownloader; using CreateShellShimRepository = Microsoft.DotNet.Tools.Tool.Install.CreateShellShimRepository; namespace Microsoft.DotNet.Tools.Tool.Update @@ -23,7 +24,7 @@ internal class ToolUpdateGlobalOrToolPathCommand : CommandBase { private readonly CreateShellShimRepository _createShellShimRepository; private readonly CreateToolPackageStoresAndDownloaderAndUninstaller _createToolPackageStoreDownloaderUninstaller; - private readonly ToolInstallGlobalOrToolPathCommand _toolInstallGlobalOrToolPathCommand; + internal readonly ToolInstallGlobalOrToolPathCommand _toolInstallGlobalOrToolPathCommand; public ToolUpdateGlobalOrToolPathCommand(ParseResult parseResult, CreateToolPackageStoresAndDownloaderAndUninstaller createToolPackageStoreDownloaderUninstaller = null, diff --git a/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateLocalCommand.cs b/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateLocalCommand.cs index f3ec31a6bbc7..0e89823ead59 100644 --- a/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateLocalCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-tool/update/ToolUpdateLocalCommand.cs @@ -3,6 +3,7 @@ using System.CommandLine; using Microsoft.DotNet.Cli; +using Microsoft.DotNet.Cli.NuGetPackageDownloader; using Microsoft.DotNet.Cli.ToolPackage; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.ToolManifest; @@ -19,7 +20,7 @@ internal class ToolUpdateLocalCommand : CommandBase private readonly IToolManifestEditor _toolManifestEditor; private readonly ILocalToolsResolverCache _localToolsResolverCache; private readonly IToolPackageDownloader _toolPackageDownloader; - private readonly Lazy _toolInstallLocalCommand; + internal readonly Lazy _toolInstallLocalCommand; private readonly IReporter _reporter; public ToolUpdateLocalCommand( diff --git a/src/Cli/dotnet/commands/dotnet-workload/WorkloadUtilities.cs b/src/Cli/dotnet/commands/dotnet-workload/WorkloadUtilities.cs new file mode 100644 index 000000000000..b621d0939767 --- /dev/null +++ b/src/Cli/dotnet/commands/dotnet-workload/WorkloadUtilities.cs @@ -0,0 +1,37 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.Deployment.DotNet.Releases; + +namespace Microsoft.DotNet.Workloads.Workload +{ + internal class WorkloadUtilities + { + internal static int VersionCompare(string first, string second) + { + if (first.Equals(second)) + { + return 0; + } + + var firstDash = first.IndexOf('-'); + var secondDash = second.IndexOf('-'); + firstDash = firstDash < 0 ? first.Length : firstDash; + secondDash = secondDash < 0 ? second.Length : secondDash; + + var firstVersion = new Version(first.Substring(0, firstDash)); + var secondVersion = new Version(second.Substring(0, secondDash)); + + var comparison = firstVersion.CompareTo(secondVersion); + if (comparison != 0) + { + return comparison; + } + + var modifiedFirst = new ReleaseVersion(1, 1, 1, firstDash == first.Length ? null : first.Substring(firstDash)); + var modifiedSecond = new ReleaseVersion(1, 1, 1, secondDash == second.Length ? null : second.Substring(secondDash)); + + return modifiedFirst.CompareTo(modifiedSecond); + } + } +} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs index 6ba629c06799..1585c5e33f1f 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/FileBasedInstaller.cs @@ -133,6 +133,11 @@ public async Task GetWorkloadSetContentsAsync(string workloadSetVer } public void InstallWorkloads(IEnumerable workloadIds, SdkFeatureBand sdkFeatureBand, ITransactionContext transactionContext, DirectoryPath? offlineCache = null) + { + InstallWorkloads(workloadIds, sdkFeatureBand, transactionContext, overwriteExistingPacks: false, offlineCache); + } + + public void InstallWorkloads(IEnumerable workloadIds, SdkFeatureBand sdkFeatureBand, ITransactionContext transactionContext, bool overwriteExistingPacks, DirectoryPath? offlineCache = null) { var packInfos = GetPacksInWorkloads(workloadIds); @@ -146,7 +151,11 @@ public void InstallWorkloads(IEnumerable workloadIds, SdkFeatureBand transactionContext.Run( action: () => { - if (!PackIsInstalled(packInfo)) + if (PackIsInstalled(packInfo) && !overwriteExistingPacks) + { + _reporter.WriteLine(string.Format(LocalizableStrings.WorkloadPackAlreadyInstalledMessage, packInfo.ResolvedPackageId, packInfo.Version)); + } + else { shouldRollBackPack = true; string packagePath; @@ -175,22 +184,30 @@ public void InstallWorkloads(IEnumerable workloadIds, SdkFeatureBand if (IsSingleFilePack(packInfo)) { - File.Copy(packagePath, packInfo.Path); + File.Copy(packagePath, packInfo.Path, overwrite: overwriteExistingPacks); } else { var tempExtractionDir = Path.Combine(_tempPackagesDir.Value, $"{packInfo.ResolvedPackageId}-{packInfo.Version}-extracted"); tempDirsToDelete.Add(tempExtractionDir); + + // This directory should have been deleted, but remove it just in case + if (overwriteExistingPacks && Directory.Exists(tempExtractionDir)) + { + Directory.Delete(tempExtractionDir, recursive: true); + } + Directory.CreateDirectory(tempExtractionDir); var packFiles = _nugetPackageDownloader.ExtractPackageAsync(packagePath, new DirectoryPath(tempExtractionDir)).GetAwaiter().GetResult(); + if (overwriteExistingPacks && Directory.Exists(packInfo.Path)) + { + Directory.Delete(packInfo.Path, recursive: true); + } + FileAccessRetrier.RetryOnMoveAccessFailure(() => DirectoryPath.MoveDirectory(tempExtractionDir, packInfo.Path)); } - } - else - { - _reporter.WriteLine(string.Format(LocalizableStrings.WorkloadPackAlreadyInstalledMessage, packInfo.ResolvedPackageId, packInfo.Version)); - } + } WritePackInstallationRecord(packInfo, sdkFeatureBand); }, @@ -237,8 +254,7 @@ public void InstallWorkloads(IEnumerable workloadIds, SdkFeatureBand public void RepairWorkloads(IEnumerable workloadIds, SdkFeatureBand sdkFeatureBand, DirectoryPath? offlineCache = null) { - // TODO: Actually re-extract the packs to fix any corrupted files. - CliTransaction.RunNew(context => InstallWorkloads(workloadIds, sdkFeatureBand, context, offlineCache)); + CliTransaction.RunNew(context => InstallWorkloads(workloadIds, sdkFeatureBand, context, overwriteExistingPacks: true, offlineCache)); } string GetManifestInstallDirForFeatureBand(string sdkFeatureBand) diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadGarbageCollector.cs b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadGarbageCollector.cs index d9d72f80154f..0b74c06101d6 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadGarbageCollector.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadGarbageCollector.cs @@ -115,7 +115,7 @@ void GarbageCollectWorkloadSets() // If there isn't a rollback state file, don't garbage collect the latest workload set installed for the feature band if (installedWorkloadSets.Any()) { - var latestWorkloadSetVersion = installedWorkloadSets.Keys.MaxBy(k => new ReleaseVersion(k)); + var latestWorkloadSetVersion = installedWorkloadSets.Keys.Aggregate((s1, s2) => WorkloadUtilities.VersionCompare(s1, s2) >= 0 ? s1 : s2); _workloadSets[latestWorkloadSetVersion] = GCAction.Keep; _verboseReporter.WriteLine($"GC: Keeping latest installed workload set version {latestWorkloadSetVersion}"); } diff --git a/src/Cli/dotnet/commands/dotnet-workload/restore/WorkloadRestoreCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/restore/WorkloadRestoreCommand.cs index 94c40d95dc4c..41fa1049bf3b 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/restore/WorkloadRestoreCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/restore/WorkloadRestoreCommand.cs @@ -50,10 +50,12 @@ public override int Execute() recorder.Run(() => { - // First update manifests and install a workload set as necessary + // First discover projects. This may return an error if no projects are found, and we shouldn't delay until after Update if that's the case. + var allProjects = DiscoverAllProjects(Directory.GetCurrentDirectory(), _slnOrProjectArgument).Distinct(); + + // Then update manifests and install a workload set as necessary new WorkloadUpdateCommand(_result, recorder: recorder, isRestoring: true).Execute(); - var allProjects = DiscoverAllProjects(Directory.GetCurrentDirectory(), _slnOrProjectArgument).Distinct(); List allWorkloadId = RunTargetToGetWorkloadIds(allProjects); Reporter.WriteLine(string.Format(LocalizableStrings.InstallingWorkloads, string.Join(" ", allWorkloadId))); diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommand.cs b/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommand.cs index d9e3667c963b..64e14d4fc4d1 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommand.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommand.cs @@ -26,6 +26,7 @@ internal class WorkloadSearchVersionsCommand : WorkloadCommandBase private readonly string _workloadSetOutputFormat; private readonly FileBasedInstaller _installer; private readonly string _workloadVersion; + private readonly bool _includePreviews; public WorkloadSearchVersionsCommand( ParseResult result, @@ -64,6 +65,10 @@ public WorkloadSearchVersionsCommand( ); _workloadVersion = result.GetValue(WorkloadSearchVersionsCommandParser.WorkloadVersionArgument); + + _includePreviews = result.HasOption(WorkloadSearchVersionsCommandParser.IncludePreviewsOption) ? + result.GetValue(WorkloadSearchVersionsCommandParser.IncludePreviewsOption) : + new SdkFeatureBand(_sdkVersion).IsPrerelease; } public override int Execute() @@ -76,7 +81,7 @@ public override int Execute() List versions; try { - versions = PackageDownloader.GetLatestPackageVersions(packageId, _numberOfWorkloadSetsToTake, packageSourceLocation: null, includePreview: !string.IsNullOrWhiteSpace(_sdkVersion.Prerelease)) + versions = PackageDownloader.GetLatestPackageVersions(packageId, _numberOfWorkloadSetsToTake, packageSourceLocation: null, includePreview: _includePreviews) .GetAwaiter().GetResult() .Select(version => WorkloadSetVersion.FromWorkloadSetPackageVersion(featureBand, version.ToString())) .ToList(); diff --git a/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommandParser.cs b/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommandParser.cs index d40d53193457..b733f0e01a93 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommandParser.cs +++ b/src/Cli/dotnet/commands/dotnet-workload/search/WorkloadSearchVersionsCommandParser.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.CommandLine; +using Microsoft.DotNet.Workloads.Workload; using Microsoft.DotNet.Workloads.Workload.Search; using LocalizableStrings = Microsoft.DotNet.Workloads.Workload.Search.LocalizableStrings; @@ -23,6 +24,8 @@ internal static class WorkloadSearchVersionsCommandParser Description = LocalizableStrings.FormatOptionDescription }; + public static readonly CliOption IncludePreviewsOption = new("--include-previews"); + private static readonly CliCommand Command = ConstructCommand(); public static CliCommand GetCommand() @@ -36,6 +39,7 @@ private static CliCommand ConstructCommand() command.Arguments.Add(WorkloadVersionArgument); command.Options.Add(FormatOption); command.Options.Add(TakeOption); + command.Options.Add(IncludePreviewsOption); TakeOption.Validators.Add(optionResult => { @@ -53,6 +57,15 @@ private static CliCommand ConstructCommand() } }); + command.Validators.Add(result => + { + var versionArgument = result.GetValue(WorkloadVersionArgument); + if (versionArgument is not null && !WorkloadSetVersion.IsWorkloadSetPackageVersion(versionArgument)) + { + result.AddError(string.Format(CommandLineValidation.LocalizableStrings.UnrecognizedCommandOrArgument, versionArgument)); + } + }); + command.SetAction(parseResult => new WorkloadSearchVersionsCommand(parseResult).Execute()); return command; diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj index f4316cbaee9f..7b258f8f8a0e 100644 --- a/src/Cli/dotnet/dotnet.csproj +++ b/src/Cli/dotnet/dotnet.csproj @@ -127,6 +127,8 @@ + + diff --git a/src/Common/WorkloadSetVersion.cs b/src/Common/WorkloadSetVersion.cs index 0fa5fb6756a7..035396e14787 100644 --- a/src/Common/WorkloadSetVersion.cs +++ b/src/Common/WorkloadSetVersion.cs @@ -12,23 +12,29 @@ namespace Microsoft.DotNet.Workloads.Workload { static class WorkloadSetVersion { - public static string ToWorkloadSetPackageVersion(string workloadSetVersion, out SdkFeatureBand sdkFeatureBand) + private static string[] SeparateCoreComponents(string workloadSetVersion, out string[] sections) + { + sections = workloadSetVersion.Split(['-', '+'], 2); + return sections[0].Split('.'); + } + + public static bool IsWorkloadSetPackageVersion(string workloadSetVersion) { - string[] sections = workloadSetVersion.Split(new char[] { '-', '+' }, 2); - string versionCore = sections[0]; - string? preReleaseOrBuild = sections.Length > 1 ? sections[1] : null; + int coreComponentsLength = SeparateCoreComponents(workloadSetVersion, out _).Length; + return coreComponentsLength >= 3 && coreComponentsLength <= 4; + } - string[] coreComponents = versionCore.Split('.'); + public static string ToWorkloadSetPackageVersion(string workloadSetVersion, out SdkFeatureBand sdkFeatureBand) + { + string[] coreComponents = SeparateCoreComponents(workloadSetVersion, out string[] sections); string major = coreComponents[0]; string minor = coreComponents[1]; string patch = coreComponents[2]; - string packageVersion = $"{major}.{patch}."; if (coreComponents.Length == 3) { // No workload set patch version packageVersion += "0"; - // Use preview specifier (if any) from workload set version as part of SDK feature band sdkFeatureBand = new SdkFeatureBand(workloadSetVersion); } @@ -36,18 +42,16 @@ public static string ToWorkloadSetPackageVersion(string workloadSetVersion, out { // Workload set version has workload patch version (ie 4 components) packageVersion += coreComponents[3]; - // Don't include any preview specifiers in SDK feature band sdkFeatureBand = new SdkFeatureBand($"{major}.{minor}.{patch}"); } - if (preReleaseOrBuild != null) + if (sections.Length > 1) { // Figure out if we split on a '-' or '+' char separator = workloadSetVersion[sections[0].Length]; - packageVersion += separator + preReleaseOrBuild; + packageVersion += separator + sections[1]; } - return packageVersion; } diff --git a/src/Containers/Microsoft.NET.Build.Containers/BuiltImage.cs b/src/Containers/Microsoft.NET.Build.Containers/BuiltImage.cs index b3bb668fca28..64d4e9a528ef 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/BuiltImage.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/BuiltImage.cs @@ -33,6 +33,11 @@ internal readonly struct BuiltImage /// internal required ManifestV2 Manifest { get; init; } + /// + /// Gets manifest mediaType. + /// + internal required string ManifestMediaType { get; init; } + /// /// Gets layers descriptors. /// diff --git a/src/Containers/Microsoft.NET.Build.Containers/ImageBuilder.cs b/src/Containers/Microsoft.NET.Build.Containers/ImageBuilder.cs index e41db3fb0bc1..096f70610377 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/ImageBuilder.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/ImageBuilder.cs @@ -19,6 +19,7 @@ internal sealed class ImageBuilder // the mutable internal manifest that we're building by modifying the base and applying customizations private readonly ManifestV2 _manifest; + private readonly string _manifestMediaType; private readonly ImageConfig _baseImageConfig; private readonly ILogger _logger; @@ -33,12 +34,13 @@ internal sealed class ImageBuilder /// /// MediaType of the output manifest. /// - public string ManifestMediaType => _manifest.MediaType; // output the same media type as the base image manifest. + public string ManifestMediaType => _manifestMediaType; // output the same media type as the base image manifest. - internal ImageBuilder(ManifestV2 manifest, ImageConfig baseImageConfig, ILogger logger) + internal ImageBuilder(ManifestV2 manifest, string manifestMediaType, ImageConfig baseImageConfig, ILogger logger) { _baseImageManifest = manifest; _manifest = new ManifestV2() { SchemaVersion = manifest.SchemaVersion, Config = manifest.Config, Layers = new(manifest.Layers), MediaType = manifest.MediaType }; + _manifestMediaType = manifestMediaType; _baseImageConfig = baseImageConfig; _logger = logger; } @@ -83,6 +85,7 @@ internal BuiltImage Build() ImageSha = imageSha, ImageSize = imageSize, Manifest = newManifest, + ManifestMediaType = ManifestMediaType }; } diff --git a/src/Containers/Microsoft.NET.Build.Containers/LocalDaemons/DockerCli.cs b/src/Containers/Microsoft.NET.Build.Containers/LocalDaemons/DockerCli.cs index 95dc99fbd9bb..0ff8f112c58b 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/LocalDaemons/DockerCli.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/LocalDaemons/DockerCli.cs @@ -33,6 +33,8 @@ internal sealed class DockerCli private string? _fullCommandPath; #endif + private const string _blobsPath = "blobs/sha256"; + public DockerCli(string? command, ILoggerFactory loggerFactory) { if (!(command == null || @@ -104,8 +106,8 @@ public async Task LoadAsync(BuiltImage image, SourceImageReference sourceReferen } // Create new stream tarball - - await WriteImageToStreamAsync(image, sourceReference, destinationReference, loadProcess.StandardInput.BaseStream, cancellationToken).ConfigureAwait(false); + // We want to be able to export to docker, even oci images. + await WriteDockerImageToStreamAsync(image, sourceReference, destinationReference, loadProcess.StandardInput.BaseStream, cancellationToken).ConfigureAwait(false); cancellationToken.ThrowIfCancellationRequested(); @@ -270,12 +272,54 @@ public static bool IsInsecureRegistry(string registryDomain) #if NET public static async Task WriteImageToStreamAsync(BuiltImage image, SourceImageReference sourceReference, DestinationImageReference destinationReference, Stream imageStream, CancellationToken cancellationToken) + { + if (image.ManifestMediaType == SchemaTypes.DockerManifestV2) + { + await WriteDockerImageToStreamAsync(image, sourceReference, destinationReference, imageStream, cancellationToken); + } + else if (image.ManifestMediaType == SchemaTypes.OciManifestV1) + { + await WriteOciImageToStreamAsync(image, sourceReference, destinationReference, imageStream, cancellationToken); + } + else + { + throw new ArgumentException(Resource.FormatString(nameof(Strings.UnsupportedMediaTypeForTarball), image.Manifest.MediaType)); + } + } + + private static async Task WriteDockerImageToStreamAsync( + BuiltImage image, + SourceImageReference sourceReference, + DestinationImageReference destinationReference, + Stream imageStream, + CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); using TarWriter writer = new(imageStream, TarEntryFormat.Pax, leaveOpen: true); // Feed each layer tarball into the stream JsonArray layerTarballPaths = new(); + await WriteImageLayers(writer, image, sourceReference, d => $"{d.Substring("sha256:".Length)}/layer.tar", cancellationToken, layerTarballPaths) + .ConfigureAwait(false); + + string configTarballPath = $"{image.ImageSha}.json"; + await WriteImageConfig(writer, image, configTarballPath, cancellationToken) + .ConfigureAwait(false); + + // Add manifest + await WriteManifestForDockerImage(writer, destinationReference, configTarballPath, layerTarballPaths, cancellationToken) + .ConfigureAwait(false); + } + + private static async Task WriteImageLayers( + TarWriter writer, + BuiltImage image, + SourceImageReference sourceReference, + Func layerPathFunc, + CancellationToken cancellationToken, + JsonArray? layerTarballPaths = null) + { + cancellationToken.ThrowIfCancellationRequested(); foreach (var d in image.LayerDescriptors) { @@ -286,9 +330,9 @@ public static async Task WriteImageToStreamAsync(BuiltImage image, SourceImageRe // Stuff that (uncompressed) tarball into the image tar stream // TODO uncompress!! - string layerTarballPath = $"{d.Digest.Substring("sha256:".Length)}/layer.tar"; + string layerTarballPath = layerPathFunc(d.Digest); await writer.WriteEntryAsync(localPath, layerTarballPath, cancellationToken).ConfigureAwait(false); - layerTarballPaths.Add(layerTarballPath); + layerTarballPaths?.Add(layerTarballPath); } else { @@ -298,21 +342,32 @@ public static async Task WriteImageToStreamAsync(BuiltImage image, SourceImageRe sourceReference.Registry?.ToString() ?? "")); } } + } - // add config - string configTarballPath = $"{image.ImageSha}.json"; + private static async Task WriteImageConfig( + TarWriter writer, + BuiltImage image, + string configPath, + CancellationToken cancellationToken) + { cancellationToken.ThrowIfCancellationRequested(); using (MemoryStream configStream = new(Encoding.UTF8.GetBytes(image.Config))) { - PaxTarEntry configEntry = new(TarEntryType.RegularFile, configTarballPath) + PaxTarEntry configEntry = new(TarEntryType.RegularFile, configPath) { DataStream = configStream }; - await writer.WriteEntryAsync(configEntry, cancellationToken).ConfigureAwait(false); } + } - // Add manifest + private static async Task WriteManifestForDockerImage( + TarWriter writer, + DestinationImageReference destinationReference, + string configTarballPath, + JsonArray layerTarballPaths, + CancellationToken cancellationToken) + { JsonArray tagsNode = new(); foreach (string tag in destinationReference.Tags) { @@ -338,6 +393,100 @@ public static async Task WriteImageToStreamAsync(BuiltImage image, SourceImageRe } } + private static async Task WriteOciImageToStreamAsync( + BuiltImage image, + SourceImageReference sourceReference, + DestinationImageReference destinationReference, + Stream imageStream, + CancellationToken cancellationToken) + { + if (destinationReference.Tags.Length > 1) + { + throw new ArgumentException(Resource.FormatString(nameof(Strings.OciImageMultipleTagsNotSupported))); + } + + cancellationToken.ThrowIfCancellationRequested(); + using TarWriter writer = new(imageStream, TarEntryFormat.Pax, leaveOpen: true); + + await WriteOciLayout(writer, cancellationToken) + .ConfigureAwait(false); + + await WriteImageLayers(writer, image, sourceReference, d => $"{_blobsPath}/{d.Substring("sha256:".Length)}", cancellationToken) + .ConfigureAwait(false); + + await WriteImageConfig(writer, image, $"{_blobsPath}/{image.ImageSha}", cancellationToken) + .ConfigureAwait(false); + + await WriteManifestForOciImage(writer, image, destinationReference, cancellationToken) + .ConfigureAwait(false); + } + + private static async Task WriteOciLayout(TarWriter writer, CancellationToken cancellationToken) + { + cancellationToken.ThrowIfCancellationRequested(); + + string ociLayoutPath = "oci-layout"; + var ociLayoutContent = "{\"imageLayoutVersion\": \"1.0.0\"}"; + using (MemoryStream ociLayoutStream = new MemoryStream(Encoding.UTF8.GetBytes(ociLayoutContent))) + { + PaxTarEntry layoutEntry = new(TarEntryType.RegularFile, ociLayoutPath) + { + DataStream = ociLayoutStream + }; + await writer.WriteEntryAsync(layoutEntry, cancellationToken).ConfigureAwait(false); + } + } + + private static async Task WriteManifestForOciImage( + TarWriter writer, + BuiltImage image, + DestinationImageReference destinationReference, + CancellationToken cancellationToken) + { + cancellationToken.ThrowIfCancellationRequested(); + + string manifestContent = JsonSerializer.SerializeToNode(image.Manifest)!.ToJsonString(); + string manifestDigest = image.Manifest.GetDigest(); + + // 1. add manifest to blobs + string manifestPath = $"{_blobsPath}/{manifestDigest.Substring("sha256:".Length)}"; + using (MemoryStream manifestStream = new MemoryStream(Encoding.UTF8.GetBytes(manifestContent))) + { + PaxTarEntry manifestEntry = new(TarEntryType.RegularFile, manifestPath) + { + DataStream = manifestStream + }; + await writer.WriteEntryAsync(manifestEntry, cancellationToken).ConfigureAwait(false); + } + + cancellationToken.ThrowIfCancellationRequested(); + + // 2. add index.json + var index = new ImageIndexV1 + { + schemaVersion = 2, + mediaType = SchemaTypes.OciImageIndexV1, + manifests = + [ + new PlatformSpecificOciManifest + { + mediaType = SchemaTypes.OciManifestV1, + size = manifestContent.Length, + digest = manifestDigest, + annotations = new Dictionary { { "org.opencontainers.image.ref.name", $"{destinationReference.Repository}:{destinationReference.Tags[0]}" } } + } + ] + }; + using (MemoryStream indexStream = new MemoryStream(Encoding.UTF8.GetBytes(JsonSerializer.SerializeToNode(index)!.ToJsonString()))) + { + PaxTarEntry indexEntry = new(TarEntryType.RegularFile, "index.json") + { + DataStream = indexStream + }; + await writer.WriteEntryAsync(indexEntry, cancellationToken).ConfigureAwait(false); + } + } + private async ValueTask GetCommandAsync(CancellationToken cancellationToken) { if (_command != null) diff --git a/src/Containers/Microsoft.NET.Build.Containers/ManifestListV2.cs b/src/Containers/Microsoft.NET.Build.Containers/ManifestListV2.cs index b75547d8f166..471f450f42d6 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/ManifestListV2.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/ManifestListV2.cs @@ -10,5 +10,6 @@ public record struct ManifestListV2(int schemaVersion, string mediaType, Platfor public record struct PlatformInformation(string architecture, string os, string? variant, string[] features, [property: JsonPropertyName("os.version")][field: JsonPropertyName("os.version")] string? version); public record struct PlatformSpecificManifest(string mediaType, long size, string digest, PlatformInformation platform); +public record struct ImageIndexV1(int schemaVersion, string mediaType, PlatformSpecificOciManifest[] manifests); -public record struct ImageIndexV1(int schemaVersion, string mediaType, PlatformSpecificManifest[] manifests); +public record struct PlatformSpecificOciManifest(string mediaType, long size, string digest, PlatformInformation platform, Dictionary annotations); diff --git a/src/Containers/Microsoft.NET.Build.Containers/ManifestV2.cs b/src/Containers/Microsoft.NET.Build.Containers/ManifestV2.cs index 30937d782a4b..b4334c5e26db 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/ManifestV2.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/ManifestV2.cs @@ -30,7 +30,7 @@ public class ManifestV2 /// When used, this field MUST contain the media type application/vnd.oci.image.manifest.v1+json. This field usage differs from the descriptor use of mediaType. /// [JsonPropertyName("mediaType")] - public required string MediaType { get; init; } + public string? MediaType { get; init; } /// /// This REQUIRED property references a configuration object for a container, by digest. diff --git a/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Unshipped.txt b/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Unshipped.txt index 8e7f42f35d3f..1522357b9a11 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Unshipped.txt +++ b/src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Unshipped.txt @@ -74,8 +74,8 @@ Microsoft.NET.Build.Containers.ManifestListV2.schemaVersion.get -> int Microsoft.NET.Build.Containers.ManifestListV2.schemaVersion.set -> void Microsoft.NET.Build.Containers.ImageIndexV1 Microsoft.NET.Build.Containers.ImageIndexV1.ImageIndexV1() -> void -Microsoft.NET.Build.Containers.ImageIndexV1.ImageIndexV1(int schemaVersion, string! mediaType, Microsoft.NET.Build.Containers.PlatformSpecificManifest[]! manifests) -> void -Microsoft.NET.Build.Containers.ImageIndexV1.manifests.get -> Microsoft.NET.Build.Containers.PlatformSpecificManifest[]! +Microsoft.NET.Build.Containers.ImageIndexV1.ImageIndexV1(int schemaVersion, string! mediaType, Microsoft.NET.Build.Containers.PlatformSpecificOciManifest[]! manifests) -> void +Microsoft.NET.Build.Containers.ImageIndexV1.manifests.get -> Microsoft.NET.Build.Containers.PlatformSpecificOciManifest[]! Microsoft.NET.Build.Containers.ImageIndexV1.manifests.set -> void Microsoft.NET.Build.Containers.ImageIndexV1.mediaType.get -> string! Microsoft.NET.Build.Containers.ImageIndexV1.mediaType.set -> void @@ -90,7 +90,7 @@ Microsoft.NET.Build.Containers.ManifestV2.KnownDigest.set -> void Microsoft.NET.Build.Containers.ManifestV2.Layers.get -> System.Collections.Generic.List! Microsoft.NET.Build.Containers.ManifestV2.Layers.init -> void Microsoft.NET.Build.Containers.ManifestV2.ManifestV2() -> void -Microsoft.NET.Build.Containers.ManifestV2.MediaType.get -> string! +Microsoft.NET.Build.Containers.ManifestV2.MediaType.get -> string? Microsoft.NET.Build.Containers.ManifestV2.MediaType.init -> void Microsoft.NET.Build.Containers.ManifestV2.SchemaVersion.get -> int Microsoft.NET.Build.Containers.ManifestV2.SchemaVersion.init -> void @@ -118,6 +118,19 @@ Microsoft.NET.Build.Containers.PlatformSpecificManifest.PlatformSpecificManifest Microsoft.NET.Build.Containers.PlatformSpecificManifest.PlatformSpecificManifest(string! mediaType, long size, string! digest, Microsoft.NET.Build.Containers.PlatformInformation platform) -> void Microsoft.NET.Build.Containers.PlatformSpecificManifest.size.get -> long Microsoft.NET.Build.Containers.PlatformSpecificManifest.size.set -> void +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.digest.get -> string! +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.digest.set -> void +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.mediaType.get -> string! +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.mediaType.set -> void +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.platform.get -> Microsoft.NET.Build.Containers.PlatformInformation +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.platform.set -> void +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.size.get -> long +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.size.set -> void +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.PlatformSpecificOciManifest() -> void +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.PlatformSpecificOciManifest(string! mediaType, long size, string! digest, Microsoft.NET.Build.Containers.PlatformInformation platform, System.Collections.Generic.Dictionary! annotations) -> void +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.annotations.get -> System.Collections.Generic.Dictionary! +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.annotations.set -> void Microsoft.NET.Build.Containers.Port Microsoft.NET.Build.Containers.Port.Deconstruct(out int Number, out Microsoft.NET.Build.Containers.PortType Type) -> void Microsoft.NET.Build.Containers.Port.Equals(Microsoft.NET.Build.Containers.Port other) -> bool @@ -239,29 +252,36 @@ static Microsoft.NET.Build.Containers.ContainerHelpers.TryParsePort(string? port static readonly Microsoft.NET.Build.Containers.KnownLocalRegistryTypes.SupportedLocalRegistryTypes -> string![]! ~override Microsoft.NET.Build.Containers.PlatformInformation.ToString() -> string ~override Microsoft.NET.Build.Containers.PlatformSpecificManifest.ToString() -> string +~override Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.ToString() -> string static Microsoft.NET.Build.Containers.PlatformInformation.operator !=(Microsoft.NET.Build.Containers.PlatformInformation left, Microsoft.NET.Build.Containers.PlatformInformation right) -> bool static Microsoft.NET.Build.Containers.PlatformSpecificManifest.operator !=(Microsoft.NET.Build.Containers.PlatformSpecificManifest left, Microsoft.NET.Build.Containers.PlatformSpecificManifest right) -> bool +static Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.operator !=(Microsoft.NET.Build.Containers.PlatformSpecificOciManifest left, Microsoft.NET.Build.Containers.PlatformSpecificOciManifest right) -> bool static Microsoft.NET.Build.Containers.PlatformInformation.operator ==(Microsoft.NET.Build.Containers.PlatformInformation left, Microsoft.NET.Build.Containers.PlatformInformation right) -> bool ~override Microsoft.NET.Build.Containers.ManifestConfig.ToString() -> string static Microsoft.NET.Build.Containers.PlatformSpecificManifest.operator ==(Microsoft.NET.Build.Containers.PlatformSpecificManifest left, Microsoft.NET.Build.Containers.PlatformSpecificManifest right) -> bool +static Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.operator ==(Microsoft.NET.Build.Containers.PlatformSpecificOciManifest left, Microsoft.NET.Build.Containers.PlatformSpecificOciManifest right) -> bool override Microsoft.NET.Build.Containers.PlatformInformation.GetHashCode() -> int static Microsoft.NET.Build.Containers.ManifestConfig.operator !=(Microsoft.NET.Build.Containers.ManifestConfig left, Microsoft.NET.Build.Containers.ManifestConfig right) -> bool override Microsoft.NET.Build.Containers.PlatformSpecificManifest.GetHashCode() -> int +override Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.GetHashCode() -> int static Microsoft.NET.Build.Containers.ManifestConfig.operator ==(Microsoft.NET.Build.Containers.ManifestConfig left, Microsoft.NET.Build.Containers.ManifestConfig right) -> bool ~override Microsoft.NET.Build.Containers.PlatformInformation.Equals(object obj) -> bool ~override Microsoft.NET.Build.Containers.Descriptor.ToString() -> string ~override Microsoft.NET.Build.Containers.ManifestLayer.ToString() -> string override Microsoft.NET.Build.Containers.ManifestConfig.GetHashCode() -> int ~override Microsoft.NET.Build.Containers.PlatformSpecificManifest.Equals(object obj) -> bool +~override Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.Equals(object obj) -> bool Microsoft.NET.Build.Containers.PlatformInformation.Equals(Microsoft.NET.Build.Containers.PlatformInformation other) -> bool ~override Microsoft.NET.Build.Containers.ManifestConfig.Equals(object obj) -> bool static Microsoft.NET.Build.Containers.ManifestLayer.operator !=(Microsoft.NET.Build.Containers.ManifestLayer left, Microsoft.NET.Build.Containers.ManifestLayer right) -> bool Microsoft.NET.Build.Containers.PlatformSpecificManifest.Equals(Microsoft.NET.Build.Containers.PlatformSpecificManifest other) -> bool +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.Equals(Microsoft.NET.Build.Containers.PlatformSpecificOciManifest other) -> bool static Microsoft.NET.Build.Containers.Descriptor.operator !=(Microsoft.NET.Build.Containers.Descriptor left, Microsoft.NET.Build.Containers.Descriptor right) -> bool Microsoft.NET.Build.Containers.PlatformInformation.Deconstruct(out string! architecture, out string! os, out string? variant, out string![]! features, out string? version) -> void Microsoft.NET.Build.Containers.ManifestConfig.Equals(Microsoft.NET.Build.Containers.ManifestConfig other) -> bool static Microsoft.NET.Build.Containers.ManifestLayer.operator ==(Microsoft.NET.Build.Containers.ManifestLayer left, Microsoft.NET.Build.Containers.ManifestLayer right) -> bool Microsoft.NET.Build.Containers.PlatformSpecificManifest.Deconstruct(out string! mediaType, out long size, out string! digest, out Microsoft.NET.Build.Containers.PlatformInformation platform) -> void +Microsoft.NET.Build.Containers.PlatformSpecificOciManifest.Deconstruct(out string! mediaType, out long size, out string! digest, out Microsoft.NET.Build.Containers.PlatformInformation platform, out System.Collections.Generic.Dictionary! annotations) -> void Microsoft.NET.Build.Containers.ManifestConfig.Deconstruct(out string! mediaType, out long size, out string! digest) -> void static Microsoft.NET.Build.Containers.Descriptor.operator ==(Microsoft.NET.Build.Containers.Descriptor left, Microsoft.NET.Build.Containers.Descriptor right) -> bool override Microsoft.NET.Build.Containers.ManifestLayer.GetHashCode() -> int @@ -284,4 +304,4 @@ static Microsoft.NET.Build.Containers.ImageIndexV1.operator ==(Microsoft.NET.Bui override Microsoft.NET.Build.Containers.ImageIndexV1.GetHashCode() -> int ~override Microsoft.NET.Build.Containers.ImageIndexV1.Equals(object obj) -> bool Microsoft.NET.Build.Containers.ImageIndexV1.Equals(Microsoft.NET.Build.Containers.ImageIndexV1 other) -> bool -Microsoft.NET.Build.Containers.ImageIndexV1.Deconstruct(out int schemaVersion, out string! mediaType, out Microsoft.NET.Build.Containers.PlatformSpecificManifest[]! manifests) -> void \ No newline at end of file +Microsoft.NET.Build.Containers.ImageIndexV1.Deconstruct(out int schemaVersion, out string! mediaType, out Microsoft.NET.Build.Containers.PlatformSpecificOciManifest[]! manifests) -> void \ No newline at end of file diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultManifestOperations.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultManifestOperations.cs index a712de302604..14889a669f34 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultManifestOperations.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultManifestOperations.cs @@ -38,11 +38,11 @@ public async Task GetAsync(string repositoryName, string re }; } - public async Task PutAsync(string repositoryName, string reference, ManifestV2 manifest, CancellationToken cancellationToken) + public async Task PutAsync(string repositoryName, string reference, ManifestV2 manifest, string mediaType, CancellationToken cancellationToken) { string jsonString = JsonSerializer.SerializeToNode(manifest)?.ToJsonString() ?? ""; HttpContent manifestUploadContent = new StringContent(jsonString); - manifestUploadContent.Headers.ContentType = new MediaTypeHeaderValue(manifest.MediaType); + manifestUploadContent.Headers.ContentType = new MediaTypeHeaderValue(mediaType); HttpResponseMessage putResponse = await _client.PutAsync(new Uri(_baseUri, $"/v2/{repositoryName}/manifests/{reference}"), manifestUploadContent, cancellationToken).ConfigureAwait(false); diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/IManifestOperations.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/IManifestOperations.cs index cec13dd68b4d..16751a5c6685 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/IManifestOperations.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/IManifestOperations.cs @@ -14,5 +14,5 @@ internal interface IManifestOperations { public Task GetAsync(string repositoryName, string reference, CancellationToken cancellationToken); - public Task PutAsync(string repositoryName, string reference, ManifestV2 manifest, CancellationToken cancellationToken); + public Task PutAsync(string repositoryName, string reference, ManifestV2 manifest, string mediaType, CancellationToken cancellationToken); } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs index 20093b764c77..6ac75508f459 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs @@ -15,6 +15,7 @@ namespace Microsoft.NET.Build.Containers; internal interface IManifestPicker { public PlatformSpecificManifest? PickBestManifestForRid(IReadOnlyDictionary manifestList, string runtimeIdentifier); + public PlatformSpecificOciManifest? PickBestManifestForRid(IReadOnlyDictionary manifestList, string runtimeIdentifier); } internal sealed class RidGraphManifestPicker : IManifestPicker @@ -35,6 +36,16 @@ public RidGraphManifestPicker(string runtimeIdentifierGraphPath) return ridManifestDict[bestManifestRid]; } + public PlatformSpecificOciManifest? PickBestManifestForRid(IReadOnlyDictionary ridManifestDict, string runtimeIdentifier) + { + var bestManifestRid = GetBestMatchingRid(_runtimeGraph, runtimeIdentifier, ridManifestDict.Keys); + if (bestManifestRid is null) + { + return null; + } + return ridManifestDict[bestManifestRid]; + } + private static string? GetBestMatchingRid(RuntimeGraph runtimeGraph, string runtimeIdentifier, IEnumerable availableRuntimeIdentifiers) { HashSet availableRids = new HashSet(availableRuntimeIdentifiers, StringComparer.Ordinal); @@ -183,6 +194,7 @@ public async Task GetImageManifestAsync(string repositoryName, str SchemaTypes.DockerManifestV2 or SchemaTypes.OciManifestV1 => await ReadSingleImageAsync( repositoryName, await ReadManifest().ConfigureAwait(false), + initialManifestResponse.Content.Headers.ContentType.MediaType, cancellationToken).ConfigureAwait(false), SchemaTypes.DockerManifestListV2 => await PickBestImageFromManifestListAsync( repositoryName, @@ -231,7 +243,7 @@ async Task ReadManifest() }; } - private async Task ReadSingleImageAsync(string repositoryName, ManifestV2 manifest, CancellationToken cancellationToken) + private async Task ReadSingleImageAsync(string repositoryName, ManifestV2 manifest, string manifestMediaType, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); ManifestConfig config = manifest.Config; @@ -240,7 +252,8 @@ private async Task ReadSingleImageAsync(string repositoryName, Man JsonNode configDoc = await _registryAPI.Blob.GetJsonAsync(repositoryName, configSha, cancellationToken).ConfigureAwait(false); cancellationToken.ThrowIfCancellationRequested(); - return new ImageBuilder(manifest, new ImageConfig(configDoc), _logger); + // ManifestV2.MediaType can be null, so we also provide manifest mediaType from http response + return new ImageBuilder(manifest, manifest.MediaType ?? manifestMediaType, new ImageConfig(configDoc), _logger); } @@ -258,6 +271,20 @@ private static IReadOnlyDictionary GetManifest return ridDict; } + private static IReadOnlyDictionary GetManifestsByRid(PlatformSpecificOciManifest[] manifestList) + { + var ridDict = new Dictionary(); + foreach (var manifest in manifestList) + { + if (CreateRidForPlatform(manifest.platform) is { } rid) + { + ridDict.TryAdd(rid, manifest); + } + } + + return ridDict; + } + private static string? CreateRidForPlatform(PlatformInformation platform) { // we only support linux and windows containers explicitly, so anything else we should skip past. @@ -302,13 +329,21 @@ private async Task PickBestImageFromManifestListAsync( { cancellationToken.ThrowIfCancellationRequested(); var ridManifestDict = GetManifestsByRid(manifestList.manifests); - return await PickBestImageFromManifestsAsync( - repositoryName, - reference, - ridManifestDict, - runtimeIdentifier, - manifestPicker, - cancellationToken).ConfigureAwait(false); + if (manifestPicker.PickBestManifestForRid(ridManifestDict, runtimeIdentifier) is PlatformSpecificManifest matchingManifest) + { + return await ReadImageFromManifest( + repositoryName, + reference, + matchingManifest.digest, + matchingManifest.mediaType, + runtimeIdentifier, + ridManifestDict.Keys, + cancellationToken); + } + else + { + throw new BaseImageNotFoundException(runtimeIdentifier, repositoryName, reference, ridManifestDict.Keys); + } } private async Task PickBestImageFromImageIndexAsync( @@ -321,41 +356,43 @@ private async Task PickBestImageFromImageIndexAsync( { cancellationToken.ThrowIfCancellationRequested(); var ridManifestDict = GetManifestsByRid(index.manifests); - return await PickBestImageFromManifestsAsync( - repositoryName, - reference, - ridManifestDict, - runtimeIdentifier, - manifestPicker, - cancellationToken).ConfigureAwait(false); + if (manifestPicker.PickBestManifestForRid(ridManifestDict, runtimeIdentifier) is PlatformSpecificOciManifest matchingManifest) + { + return await ReadImageFromManifest( + repositoryName, + reference, + matchingManifest.digest, + matchingManifest.mediaType, + runtimeIdentifier, + ridManifestDict.Keys, + cancellationToken); + } + else + { + throw new BaseImageNotFoundException(runtimeIdentifier, repositoryName, reference, ridManifestDict.Keys); + } } - private async Task PickBestImageFromManifestsAsync( + private async Task ReadImageFromManifest( string repositoryName, string reference, - IReadOnlyDictionary knownManifests, + string manifestDigest, + string mediaType, string runtimeIdentifier, - IManifestPicker manifestPicker, + IEnumerable rids, CancellationToken cancellationToken) { - cancellationToken.ThrowIfCancellationRequested(); - if (manifestPicker.PickBestManifestForRid(knownManifests, runtimeIdentifier) is PlatformSpecificManifest matchingManifest) - { - using HttpResponseMessage manifestResponse = await _registryAPI.Manifest.GetAsync(repositoryName, matchingManifest.digest, cancellationToken).ConfigureAwait(false); + using HttpResponseMessage manifestResponse = await _registryAPI.Manifest.GetAsync(repositoryName, manifestDigest, cancellationToken).ConfigureAwait(false); - cancellationToken.ThrowIfCancellationRequested(); - var manifest = await manifestResponse.Content.ReadFromJsonAsync(cancellationToken: cancellationToken).ConfigureAwait(false); - if (manifest is null) throw new BaseImageNotFoundException(runtimeIdentifier, repositoryName, reference, knownManifests.Keys); - manifest.KnownDigest = matchingManifest.digest; - return await ReadSingleImageAsync( - repositoryName, - manifest, - cancellationToken).ConfigureAwait(false); - } - else - { - throw new BaseImageNotFoundException(runtimeIdentifier, repositoryName, reference, knownManifests.Keys); - } + cancellationToken.ThrowIfCancellationRequested(); + var manifest = await manifestResponse.Content.ReadFromJsonAsync(cancellationToken: cancellationToken).ConfigureAwait(false); + if (manifest is null) throw new BaseImageNotFoundException(runtimeIdentifier, repositoryName, reference, rids); + manifest.KnownDigest = manifestDigest; + return await ReadSingleImageAsync( + repositoryName, + manifest, + mediaType, + cancellationToken).ConfigureAwait(false); } /// @@ -562,7 +599,7 @@ private async Task PushAsync(BuiltImage builtImage, SourceImageReference source, foreach (string tag in destination.Tags) { _logger.LogInformation(Strings.Registry_TagUploadStarted, tag, RegistryName); - await _registryAPI.Manifest.PutAsync(destination.Repository, tag, builtImage.Manifest, cancellationToken).ConfigureAwait(false); + await _registryAPI.Manifest.PutAsync(destination.Repository, tag, builtImage.Manifest, builtImage.ManifestMediaType, cancellationToken).ConfigureAwait(false); _logger.LogInformation(Strings.Registry_TagUploaded, tag, RegistryName); } } @@ -570,7 +607,7 @@ private async Task PushAsync(BuiltImage builtImage, SourceImageReference source, { string manifestDigest = builtImage.Manifest.GetDigest(); _logger.LogInformation(Strings.Registry_ManifestUploadStarted, RegistryName, manifestDigest); - await _registryAPI.Manifest.PutAsync(destination.Repository, manifestDigest, builtImage.Manifest, cancellationToken).ConfigureAwait(false); + await _registryAPI.Manifest.PutAsync(destination.Repository, manifestDigest, builtImage.Manifest, builtImage.ManifestMediaType, cancellationToken).ConfigureAwait(false); _logger.LogInformation(Strings.Registry_ManifestUploaded, RegistryName); } } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs index 45607eb642a2..0edd6dbaa53e 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs @@ -8,11 +8,10 @@ // //------------------------------------------------------------------------------ -namespace Microsoft.NET.Build.Containers.Resources -{ +namespace Microsoft.NET.Build.Containers.Resources { using System; - - + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -23,886 +22,744 @@ namespace Microsoft.NET.Build.Containers.Resources [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Strings - { - + internal class Strings { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Strings() - { + internal Strings() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if (object.ReferenceEquals(resourceMan, null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.NET.Build.Containers.Resources.Strings", typeof(Strings).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } - + /// /// Looks up a localized string similar to CONTAINER0000: Value for unit test {0}. /// - internal static string _Test - { - get - { + internal static string _Test { + get { return ResourceManager.GetString("_Test", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1002: Request to Amazon Elastic Container Registry failed prematurely. This is often caused when the target repository does not exist in the registry.. /// - internal static string AmazonRegistryFailed - { - get - { + internal static string AmazonRegistryFailed { + get { return ResourceManager.GetString("AmazonRegistryFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2008: Both {0} and {1} were provided, but only one or the other is allowed.. /// - internal static string AmbiguousTags - { - get - { + internal static string AmbiguousTags { + get { return ResourceManager.GetString("AmbiguousTags", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2025: ContainerAppCommandArgs are provided without specifying a ContainerAppCommand.. /// - internal static string AppCommandArgsSetNoAppCommand - { - get - { + internal static string AppCommandArgsSetNoAppCommand { + get { return ResourceManager.GetString("AppCommandArgsSetNoAppCommand", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2026: ContainerAppCommand and ContainerAppCommandArgs must be empty when ContainerAppCommandInstruction is '{0}'.. /// - internal static string AppCommandSetNotUsed - { - get - { + internal static string AppCommandSetNotUsed { + get { return ResourceManager.GetString("AppCommandSetNotUsed", resourceCulture); } } - + /// /// Looks up a localized string similar to local archive at '{0}'. /// - internal static string ArchiveRegistry_PushInfo - { - get - { + internal static string ArchiveRegistry_PushInfo { + get { return ResourceManager.GetString("ArchiveRegistry_PushInfo", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2022: The base image has an entrypoint that will be overwritten to start the application. Set ContainerAppCommandInstruction to 'Entrypoint' if this is desired. To preserve the base image entrypoint, set ContainerAppCommandInstruction to 'DefaultArgs'.. /// - internal static string BaseEntrypointOverwritten - { - get - { + internal static string BaseEntrypointOverwritten { + get { return ResourceManager.GetString("BaseEntrypointOverwritten", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2009: Could not parse {0}: {1}. /// - internal static string BaseImageNameParsingFailed - { - get - { + internal static string BaseImageNameParsingFailed { + get { return ResourceManager.GetString("BaseImageNameParsingFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2020: {0} does not specify a registry and will be pulled from Docker Hub. Please prefix the name with the image registry, for example: '{1}/<image>'.. /// - internal static string BaseImageNameRegistryFallback - { - get - { + internal static string BaseImageNameRegistryFallback { + get { return ResourceManager.GetString("BaseImageNameRegistryFallback", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2013: {0} had spaces in it, replacing with dashes.. /// - internal static string BaseImageNameWithSpaces - { - get - { + internal static string BaseImageNameWithSpaces { + get { return ResourceManager.GetString("BaseImageNameWithSpaces", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1011: Couldn't find matching base image for {0} that matches RuntimeIdentifier {1}.. /// - internal static string BaseImageNotFound - { - get - { + internal static string BaseImageNotFound { + get { return ResourceManager.GetString("BaseImageNotFound", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1001: Failed to upload blob using {0}; received status code '{1}'.. /// - internal static string BlobUploadFailed - { - get - { + internal static string BlobUploadFailed { + get { return ResourceManager.GetString("BlobUploadFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to Pushed image '{0}' to {1}.. /// - internal static string ContainerBuilder_ImageUploadedToLocalDaemon - { - get - { + internal static string ContainerBuilder_ImageUploadedToLocalDaemon { + get { return ResourceManager.GetString("ContainerBuilder_ImageUploadedToLocalDaemon", resourceCulture); } } - + /// /// Looks up a localized string similar to Pushed image '{0}' to registry '{1}'.. /// - internal static string ContainerBuilder_ImageUploadedToRegistry - { - get - { + internal static string ContainerBuilder_ImageUploadedToRegistry { + get { return ResourceManager.GetString("ContainerBuilder_ImageUploadedToRegistry", resourceCulture); } } - + /// /// Looks up a localized string similar to Building image '{0}' with tags '{1}' on top of base image '{2}'.. /// - internal static string ContainerBuilder_StartBuildingImage - { - get - { + internal static string ContainerBuilder_StartBuildingImage { + get { return ResourceManager.GetString("ContainerBuilder_StartBuildingImage", resourceCulture); } } - + + /// + /// Looks up a localized string similar to CONTAINER3001: Failed creating {0} process.. + /// + internal static string ContainerRuntimeProcessCreationFailed { + get { + return ResourceManager.GetString("ContainerRuntimeProcessCreationFailed", resourceCulture); + } + } + /// /// Looks up a localized string similar to CONTAINER1007: Could not deserialize token from JSON.. /// - internal static string CouldntDeserializeJsonToken - { - get - { + internal static string CouldntDeserializeJsonToken { + get { return ResourceManager.GetString("CouldntDeserializeJsonToken", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2012: Could not recognize registry '{0}'.. /// - internal static string CouldntRecognizeRegistry - { - get - { + internal static string CouldntRecognizeRegistry { + get { return ResourceManager.GetString("CouldntRecognizeRegistry", resourceCulture); } } - + /// /// Looks up a localized string similar to local registry via '{0}'. /// - internal static string DockerCli_PushInfo - { - get - { + internal static string DockerCli_PushInfo { + get { return ResourceManager.GetString("DockerCli_PushInfo", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER3002: Failed to get docker info({0})\n{1}\n{2}. /// - internal static string DockerInfoFailed - { - get - { + internal static string DockerInfoFailed { + get { return ResourceManager.GetString("DockerInfoFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER3002: Failed to get docker info: {0}. /// - internal static string DockerInfoFailed_Ex - { - get - { + internal static string DockerInfoFailed_Ex { + get { return ResourceManager.GetString("DockerInfoFailed_Ex", resourceCulture); } } - - /// - /// Looks up a localized string similar to CONTAINER3001: Failed creating {0} process.. - /// - internal static string ContainerRuntimeProcessCreationFailed - { - get - { - return ResourceManager.GetString("ContainerRuntimeProcessCreationFailed", resourceCulture); - } - } - + /// /// Looks up a localized string similar to CONTAINER4006: Property '{0}' is empty or contains whitespace and will be ignored.. /// - internal static string EmptyOrWhitespacePropertyIgnored - { - get - { + internal static string EmptyOrWhitespacePropertyIgnored { + get { return ResourceManager.GetString("EmptyOrWhitespacePropertyIgnored", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER4004: Items '{0}' contain empty item(s) which will be ignored.. /// - internal static string EmptyValuesIgnored - { - get - { + internal static string EmptyValuesIgnored { + get { return ResourceManager.GetString("EmptyValuesIgnored", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2023: A ContainerEntrypoint and ContainerAppCommandArgs are provided. ContainerAppInstruction must be set to configure how the application is started. Valid instructions are {0}.. /// - internal static string EntrypointAndAppCommandArgsSetNoAppCommandInstruction - { - get - { + internal static string EntrypointAndAppCommandArgsSetNoAppCommandInstruction { + get { return ResourceManager.GetString("EntrypointAndAppCommandArgsSetNoAppCommandInstruction", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2024: ContainerEntrypointArgs are provided without specifying a ContainerEntrypoint.. /// - internal static string EntrypointArgsSetNoEntrypoint - { - get - { + internal static string EntrypointArgsSetNoEntrypoint { + get { return ResourceManager.GetString("EntrypointArgsSetNoEntrypoint", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2029: ContainerEntrypointArgsSet are provided. Change to use ContainerAppCommandArgs for arguments that must always be set, or ContainerDefaultArgs for arguments that can be overridden when the container is created.. /// - internal static string EntrypointArgsSetPreferAppCommandArgs - { - get - { + internal static string EntrypointArgsSetPreferAppCommandArgs { + get { return ResourceManager.GetString("EntrypointArgsSetPreferAppCommandArgs", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2028: ContainerEntrypoint can not be combined with ContainerAppCommandInstruction '{0}'.. /// - internal static string EntrypointConflictAppCommand - { - get - { + internal static string EntrypointConflictAppCommand { + get { return ResourceManager.GetString("EntrypointConflictAppCommand", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2027: A ContainerEntrypoint is provided. ContainerAppInstruction must be set to configure how the application is started. Valid instructions are {0}.. /// - internal static string EntrypointSetNoAppCommandInstruction - { - get - { + internal static string EntrypointSetNoAppCommandInstruction { + get { return ResourceManager.GetString("EntrypointSetNoAppCommandInstruction", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1008: Failed retrieving credentials for "{0}": {1}. /// - internal static string FailedRetrievingCredentials - { - get - { + internal static string FailedRetrievingCredentials { + get { return ResourceManager.GetString("FailedRetrievingCredentials", resourceCulture); } } - + /// - /// Looks up a localized string similar to CONTAINER2030: GenerateLabels was disabled but GenerateDigestLabel was enabled - no digest label will be created. + /// Looks up a localized string similar to CONTAINER2030: GenerateLabels was disabled but GenerateDigestLabel was enabled - no digest label will be created.. /// - internal static string GenerateDigestLabelWithoutGenerateLabels - { - get - { + internal static string GenerateDigestLabelWithoutGenerateLabels { + get { return ResourceManager.GetString("GenerateDigestLabelWithoutGenerateLabels", resourceCulture); } } - + /// /// Looks up a localized string similar to No host object detected.. /// - internal static string HostObjectNotDetected - { - get - { + internal static string HostObjectNotDetected { + get { return ResourceManager.GetString("HostObjectNotDetected", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1009: Failed to load image from local registry. stdout: {0}. /// - internal static string ImageLoadFailed - { - get - { + internal static string ImageLoadFailed { + get { return ResourceManager.GetString("ImageLoadFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1010: Pulling images from local registry is not supported.. /// - internal static string ImagePullNotSupported - { - get - { + internal static string ImagePullNotSupported { + get { return ResourceManager.GetString("ImagePullNotSupported", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2015: {0}: '{1}' was not a valid Environment Variable. Ignoring.. /// - internal static string InvalidEnvVar - { - get - { + internal static string InvalidEnvVar { + get { return ResourceManager.GetString("InvalidEnvVar", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2005: The inferred image name '{0}' contains entirely invalid characters. The valid characters for an image name are alphanumeric characters, -, /, or _, and the image name must start with an alphanumeric character.. /// - internal static string InvalidImageName_EntireNameIsInvalidCharacters - { - get - { + internal static string InvalidImageName_EntireNameIsInvalidCharacters { + get { return ResourceManager.GetString("InvalidImageName_EntireNameIsInvalidCharacters", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2005: The first character of the image name '{0}' must be a lowercase letter or a digit and all characters in the name must be an alphanumeric character, -, /, or _.. /// - internal static string InvalidImageName_NonAlphanumericStartCharacter - { - get - { + internal static string InvalidImageName_NonAlphanumericStartCharacter { + get { return ResourceManager.GetString("InvalidImageName_NonAlphanumericStartCharacter", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2017: A ContainerPort item was provided with an invalid port number '{0}'. ContainerPort items must have an Include value that is an integer, and a Type value that is either 'tcp' or 'udp'.. /// - internal static string InvalidPort_Number - { - get - { + internal static string InvalidPort_Number { + get { return ResourceManager.GetString("InvalidPort_Number", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2017: A ContainerPort item was provided with an invalid port number '{0}' and an invalid port type '{1}'. ContainerPort items must have an Include value that is an integer, and a Type value that is either 'tcp' or 'udp'.. /// - internal static string InvalidPort_NumberAndType - { - get - { + internal static string InvalidPort_NumberAndType { + get { return ResourceManager.GetString("InvalidPort_NumberAndType", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2017: A ContainerPort item was provided with an invalid port type '{0}'. ContainerPort items must have an Include value that is an integer, and a Type value that is either 'tcp' or 'udp'.. /// - internal static string InvalidPort_Type - { - get - { + internal static string InvalidPort_Type { + get { return ResourceManager.GetString("InvalidPort_Type", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2018: Invalid SDK prerelease version '{0}' - only 'rc' and 'preview' are supported.. /// - internal static string InvalidSdkPrereleaseVersion - { - get - { + internal static string InvalidSdkPrereleaseVersion { + get { return ResourceManager.GetString("InvalidSdkPrereleaseVersion", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2019: Invalid SDK semantic version '{0}'.. /// - internal static string InvalidSdkVersion - { - get - { + internal static string InvalidSdkVersion { + get { return ResourceManager.GetString("InvalidSdkVersion", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2007: Invalid {0} provided: {1}. Image tags must be alphanumeric, underscore, hyphen, or period.. /// - internal static string InvalidTag - { - get - { + internal static string InvalidTag { + get { return ResourceManager.GetString("InvalidTag", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2010: Invalid {0} provided: {1}. {0} must be a semicolon-delimited list of valid image tags. Image tags must be alphanumeric, underscore, hyphen, or period.. /// - internal static string InvalidTags - { - get - { + internal static string InvalidTags { + get { return ResourceManager.GetString("InvalidTags", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1003: Token response had neither token nor access_token.. /// - internal static string InvalidTokenResponse - { - get - { + internal static string InvalidTokenResponse { + get { return ResourceManager.GetString("InvalidTokenResponse", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER4005: Item '{0}' contains items without metadata 'Value', and they will be ignored.. /// - internal static string ItemsWithoutMetadata - { - get - { + internal static string ItemsWithoutMetadata { + get { return ResourceManager.GetString("ItemsWithoutMetadata", resourceCulture); } } - + /// /// Looks up a localized string similar to Error while reading daemon config: {0}. /// - internal static string LocalDocker_FailedToGetConfig - { - get - { + internal static string LocalDocker_FailedToGetConfig { + get { return ResourceManager.GetString("LocalDocker_FailedToGetConfig", resourceCulture); } } - + /// /// Looks up a localized string similar to The daemon server reported errors: {0}. /// - internal static string LocalDocker_LocalDaemonErrors - { - get - { + internal static string LocalDocker_LocalDaemonErrors { + get { return ResourceManager.GetString("LocalDocker_LocalDaemonErrors", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1012: The local registry is not available, but pushing to a local registry was requested.. /// - internal static string LocalRegistryNotAvailable - { - get - { + internal static string LocalRegistryNotAvailable { + get { return ResourceManager.GetString("LocalRegistryNotAvailable", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2004: Unable to download layer with descriptor '{0}' from registry '{1}' because it does not exist.. /// - internal static string MissingLinkToRegistry - { - get - { + internal static string MissingLinkToRegistry { + get { return ResourceManager.GetString("MissingLinkToRegistry", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2016: ContainerPort item '{0}' does not specify the port number. Please ensure the item's Include is a port number, for example '<ContainerPort Include="80" />'. /// - internal static string MissingPortNumber - { - get - { + internal static string MissingPortNumber { + get { return ResourceManager.GetString("MissingPortNumber", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1004: No RequestUri specified.. /// - internal static string NoRequestUriSpecified - { - get - { + internal static string NoRequestUriSpecified { + get { return ResourceManager.GetString("NoRequestUriSpecified", resourceCulture); } } - + /// /// Looks up a localized string similar to '{0}' was not a valid container image name, it was normalized to '{1}'. /// - internal static string NormalizedContainerName - { - get - { + internal static string NormalizedContainerName { + get { return ResourceManager.GetString("NormalizedContainerName", resourceCulture); } } - + + /// + /// Looks up a localized string similar to Unable to create tarball for oci image with multiple tags.. + /// + internal static string OciImageMultipleTagsNotSupported { + get { + return ResourceManager.GetString("OciImageMultipleTagsNotSupported", resourceCulture); + } + } + /// /// Looks up a localized string similar to CONTAINER2011: {0} '{1}' does not exist. /// - internal static string PublishDirectoryDoesntExist - { - get - { + internal static string PublishDirectoryDoesntExist { + get { return ResourceManager.GetString("PublishDirectoryDoesntExist", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploaded config to registry.. /// - internal static string Registry_ConfigUploaded - { - get - { + internal static string Registry_ConfigUploaded { + get { return ResourceManager.GetString("Registry_ConfigUploaded", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploading config to registry at blob '{0}',. /// - internal static string Registry_ConfigUploadStarted - { - get - { + internal static string Registry_ConfigUploadStarted { + get { return ResourceManager.GetString("Registry_ConfigUploadStarted", resourceCulture); } } - + /// /// Looks up a localized string similar to Layer '{0}' already exists.. /// - internal static string Registry_LayerExists - { - get - { + internal static string Registry_LayerExists { + get { return ResourceManager.GetString("Registry_LayerExists", resourceCulture); } } - + /// /// Looks up a localized string similar to Finished uploading layer '{0}' to '{1}'.. /// - internal static string Registry_LayerUploaded - { - get - { + internal static string Registry_LayerUploaded { + get { return ResourceManager.GetString("Registry_LayerUploaded", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploading layer '{0}' to '{1}'.. /// - internal static string Registry_LayerUploadStarted - { - get - { + internal static string Registry_LayerUploadStarted { + get { return ResourceManager.GetString("Registry_LayerUploadStarted", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploaded manifest to '{0}'.. /// - internal static string Registry_ManifestUploaded - { - get - { + internal static string Registry_ManifestUploaded { + get { return ResourceManager.GetString("Registry_ManifestUploaded", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploading manifest to registry '{0}' as blob '{1}'.. /// - internal static string Registry_ManifestUploadStarted - { - get - { + internal static string Registry_ManifestUploadStarted { + get { return ResourceManager.GetString("Registry_ManifestUploadStarted", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploaded tag '{0}' to '{1}'.. /// - internal static string Registry_TagUploaded - { - get - { + internal static string Registry_TagUploaded { + get { return ResourceManager.GetString("Registry_TagUploaded", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploading tag '{0}' to '{1}'.. /// - internal static string Registry_TagUploadStarted - { - get - { + internal static string Registry_TagUploadStarted { + get { return ResourceManager.GetString("Registry_TagUploadStarted", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1017: Unable to communicate with the registry '{0}'.. /// - internal static string RegistryOperationFailed - { - get - { + internal static string RegistryOperationFailed { + get { return ResourceManager.GetString("RegistryOperationFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1013: Failed to push to the output registry: {0}. /// - internal static string RegistryOutputPushFailed - { - get - { + internal static string RegistryOutputPushFailed { + get { return ResourceManager.GetString("RegistryOutputPushFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1014: Manifest pull failed.. /// - internal static string RegistryPullFailed - { - get - { + internal static string RegistryPullFailed { + get { return ResourceManager.GetString("RegistryPullFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1005: Registry push failed; received status code '{0}'.. /// - internal static string RegistryPushFailed - { - get - { + internal static string RegistryPushFailed { + get { return ResourceManager.GetString("RegistryPushFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1015: Unable to access the repository '{0}' at tag '{1}' in the registry '{2}'. Please confirm that this name and tag are present in the registry.. /// - internal static string RepositoryNotFound - { - get - { + internal static string RepositoryNotFound { + get { return ResourceManager.GetString("RepositoryNotFound", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER4003: Required '{0}' items contain empty items.. /// - internal static string RequiredItemsContainsEmptyItems - { - get - { + internal static string RequiredItemsContainsEmptyItems { + get { return ResourceManager.GetString("RequiredItemsContainsEmptyItems", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER4002: Required '{0}' items were not set.. /// - internal static string RequiredItemsNotSet - { - get - { + internal static string RequiredItemsNotSet { + get { return ResourceManager.GetString("RequiredItemsNotSet", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER4001: Required property '{0}' was not set or empty.. /// - internal static string RequiredPropertyNotSetOrEmpty - { - get - { + internal static string RequiredPropertyNotSetOrEmpty { + get { return ResourceManager.GetString("RequiredPropertyNotSetOrEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1006: Too many retries, stopping.. /// - internal static string TooManyRetries - { - get - { + internal static string TooManyRetries { + get { return ResourceManager.GetString("TooManyRetries", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1016: Unable to access the repository '{0}' in the registry '{1}'. Please confirm your credentials are correct and that you have access to this repository and registry.. /// - internal static string UnableToAccessRepository - { - get - { + internal static string UnableToAccessRepository { + get { return ResourceManager.GetString("UnableToAccessRepository", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}.. /// - internal static string UnknownAppCommandInstruction - { - get - { + internal static string UnknownAppCommandInstruction { + get { return ResourceManager.GetString("UnknownAppCommandInstruction", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2002: Unknown local registry type '{0}'. Valid local container registry types are {1}.. /// - internal static string UnknownLocalRegistryType - { - get - { + internal static string UnknownLocalRegistryType { + get { return ResourceManager.GetString("UnknownLocalRegistryType", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2003: The manifest for {0}:{1} from registry {2} was an unknown type: {3}. Please raise an issue at https://github.com/dotnet/sdk-container-builds/issues with this message.. /// - internal static string UnknownMediaType - { - get - { + internal static string UnknownMediaType { + get { return ResourceManager.GetString("UnknownMediaType", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2001: Unrecognized mediaType '{0}'.. /// - internal static string UnrecognizedMediaType - { - get - { + internal static string UnrecognizedMediaType { + get { return ResourceManager.GetString("UnrecognizedMediaType", resourceCulture); } } + + /// + /// Looks up a localized string similar to Unable to create tarball for mediaType '{0}'.. + /// + internal static string UnsupportedMediaTypeForTarball { + get { + return ResourceManager.GetString("UnsupportedMediaTypeForTarball", resourceCulture); + } + } } } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx index f4d2e51f7d4c..ff3ca21248cd 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx @@ -241,6 +241,12 @@ CONTAINER2004: Unable to download layer with descriptor '{0}' from registry '{1}' because it does not exist. {StrBegins="CONTAINER2004: "} + + Unable to create tarball for oci image with multiple tags. + + + Unable to create tarball for mediaType '{0}'. + CONTAINER2016: ContainerPort item '{0}' does not specify the port number. Please ensure the item's Include is a port number, for example '<ContainerPort Include="80" />' {StrBegins="CONTAINER2016: "} diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf index debc49c84821..f19cef8cc149 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf @@ -257,6 +257,11 @@ '{0}' nebyl platný název image kontejneru, byl normalizován na '{1}' + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} '{1}' neexistuje. @@ -377,6 +382,11 @@ CONTAINER2001: Nerozpoznaný typ mediaType '{0}'. {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: Hodnota pro {0}testu jednotek diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf index 1ce325216acf..80fb43e87319 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf @@ -257,6 +257,11 @@ „{0}“ war kein gültiger Containerimagename, er wurde zu „{1}“ normalisiert. + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} „{1}“ ist nicht vorhanden. @@ -377,6 +382,11 @@ CONTAINER2001: Unbekannter mediaType „{0}“. {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: Wert für Komponententest {0} diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf index b55ee4a78d28..e0a08945d481 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf @@ -257,6 +257,11 @@ "{0}" no era un nombre de imagen de contenedor válido, se normalizó a "{1}" + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} "{1}" no existe @@ -377,6 +382,11 @@ CONTAINER2001: mediaType "{0}" no reconocido. {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: Valor de la prueba unitaria {0} diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf index 32970ca755f2..4b2d59b77ccc 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf @@ -257,6 +257,11 @@ '{0}' n’était pas un nom d’image conteneur valide, il a été normalisé pour '{1}' + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} '{1}' n’existe pas @@ -377,6 +382,11 @@ CONTAINER2001: '{0}' mediaType non reconnu. {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000 : valeur du {0} de test unitaire diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf index 5bc90ed6527b..58f8e6aa3df5 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf @@ -257,6 +257,11 @@ '{0}' non è un nome di immagine contenitore valido, è stato normalizzato in '{1}' + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} '{1}' non esiste @@ -377,6 +382,11 @@ CONTAINER2001: mediaType '{0}' non riconosciuto. {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: valore per unit test {0} diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf index 0624726f1ba4..a884882357a9 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf @@ -257,6 +257,11 @@ '{0}' は有効なコンテナー イメージ名ではありませんでした。'{1}' に正規化されました + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} '{1}' が存在しません @@ -377,6 +382,11 @@ CONTAINER2001: 認識されない mediaType '{0}' です。 {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: 単体テスト {0} の値 diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf index 7f89fbdee47b..3277da337672 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf @@ -257,6 +257,11 @@ '{0}'은(는) 유효한 컨테이너 이미지 이름이 아닙니다. '{1}'(으)로 정규화되었습니다. + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} '{1}'이(가) 존재하지 않습니다. @@ -377,6 +382,11 @@ CONTAINER2001: 미디어 유형 '{0}'을(를) 인식할 수 없습니다. {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: 단위 테스트 값 {0} diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf index 97e6b30b4686..f749d54b6456 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf @@ -257,6 +257,11 @@ Nazwa „{0}” nie była prawidłową nazwą obrazu kontenera, została znormalizowana do „{1}” + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} „{1}” nie istnieje @@ -377,6 +382,11 @@ CONTAINER2001: nierozpoznany typ nośnika „{0}”. {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: wartość testu jednostkowego{0} diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf index 49fb2096e3bf..7391317d6a86 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf @@ -257,6 +257,11 @@ '{0}' não era um nome de imagem de contêiner válido, foi normalizado para '{1}' + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} '{1}' não existe @@ -377,6 +382,11 @@ CONTAINER2001: MediaType não reconhecido '{0}'. {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: Valor para teste de unidade {0} diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf index 1632e686dc2b..c4de2491b871 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf @@ -257,6 +257,11 @@ "{0}" не является допустимым именем образа контейнера, оно нормализовано до "{1}" + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} "{1}" не существует @@ -377,6 +382,11 @@ CONTAINER2001: нераспознанный тип мультимедиа "{0}". {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: значение для модульного теста {0} diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf index 8612f7609a21..29f191e7e991 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf @@ -257,6 +257,11 @@ '{0}', geçerli bir kapsayıcı görüntüsü adı değildi, '{1}' olarak normalleştirildi + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} '{1}' yok @@ -377,6 +382,11 @@ CONTAINER2001: Tanınmayan mediaType ('{0}'). {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: Birim testi ({0}) değeri diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf index 66e05bef0799..f0b18185caa3 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf @@ -257,6 +257,11 @@ “{0}”不是有效的容器映像名称,已规范化为“{1}” + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} {1} 不存在 @@ -377,6 +382,11 @@ CONTAINER2001: 无法识别 mediaType“{0}”。 {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: 单元测试 {0} 的值 diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf index 9eb252891e5a..e402d6ca0525 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf @@ -257,6 +257,11 @@ '{0}' 不是有效的容器映像名稱,已標準化為 '{1}' + + Unable to create tarball for oci image with multiple tags. + Unable to create tarball for oci image with multiple tags. + + CONTAINER2011: {0} '{1}' does not exist CONTAINER2011: {0} '{1}' 不存在 @@ -377,6 +382,11 @@ CONTAINER2001: 無法辨識的 mediaType '{0}'。 {StrBegins="CONTAINER2001: "} + + Unable to create tarball for mediaType '{0}'. + Unable to create tarball for mediaType '{0}'. + + CONTAINER0000: Value for unit test {0} CONTAINER0000: 單元測試 {0} 的值 diff --git a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs index e6537b3160af..aa81ae801953 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs @@ -235,6 +235,10 @@ private async Task PushToLocalRegistryAsync(BuiltImage builtImage, SourceImageRe telemetry.LogLocalLoadError(); Log.LogErrorFromException(dle, showStackTrace: false); } + catch (ArgumentException argEx) + { + Log.LogErrorFromException(argEx, showStackTrace: false); + } } private async Task PushToRemoteRegistryAsync(BuiltImage builtImage, SourceImageReference sourceImageReference, diff --git a/src/Installer/redist-installer/targets/BundledTemplates.targets b/src/Installer/redist-installer/targets/BundledTemplates.targets index b52cb64c2ec8..281018be6211 100644 --- a/src/Installer/redist-installer/targets/BundledTemplates.targets +++ b/src/Installer/redist-installer/targets/BundledTemplates.targets @@ -24,7 +24,6 @@ - diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs index 6b01743d9fcb..d7a41a200c66 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkDirectoryWorkloadManifestProvider.cs @@ -234,10 +234,10 @@ private static int VersionCompare(string first, string second) return comparison; } - var modifiedFirst = "1.1.1" + (firstDash == first.Length ? string.Empty : first.Substring(firstDash)); - var modifiedSecond = "1.1.1" + (secondDash == second.Length ? string.Empty : second.Substring(secondDash)); + var modifiedFirst = new ReleaseVersion(1, 1, 1, firstDash == first.Length ? null : first.Substring(firstDash)); + var modifiedSecond = new ReleaseVersion(1, 1, 1, secondDash == second.Length ? null : second.Substring(secondDash)); - return new ReleaseVersion(modifiedFirst).CompareTo(new ReleaseVersion(modifiedSecond)); + return modifiedFirst.CompareTo(modifiedSecond); } void ThrowExceptionIfManifestsNotAvailable() diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkFeatureBand.cs b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkFeatureBand.cs index ee65dbf09aba..790ac03ff5a2 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkFeatureBand.cs +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/SdkFeatureBand.cs @@ -33,6 +33,7 @@ public SdkFeatureBand(ReleaseVersion version) } } + public bool IsPrerelease => !string.IsNullOrEmpty(_featureBand.Prerelease); public int Major => _featureBand.Major; public int Minor => _featureBand.Minor; diff --git a/src/SourceBuild/content/eng/allowed-vmr-binaries.txt b/src/SourceBuild/content/eng/allowed-vmr-binaries.txt index 0b3f7c3ca6cc..7a1aeec70e39 100644 --- a/src/SourceBuild/content/eng/allowed-vmr-binaries.txt +++ b/src/SourceBuild/content/eng/allowed-vmr-binaries.txt @@ -130,9 +130,6 @@ src/symreader/src/PdbTestResources/Resources/* # templating src/templating/test/Microsoft.TemplateEngine.TestTemplates/nupkg_templates/*.nupkg -# test-templates -src/test-templates/Templates/**/*.nupkg - # vstest src/vstest/samples/Microsoft.TestPlatform.*/Adapter/Microsoft.VisualStudio.TestPlatform.*.dll src/vstest/temp/cpp/**/*.dll diff --git a/src/SourceBuild/content/eng/finish-source-only.proj b/src/SourceBuild/content/eng/finish-source-only.proj index c4750bb1d7bf..77c5d5e262c0 100644 --- a/src/SourceBuild/content/eng/finish-source-only.proj +++ b/src/SourceBuild/content/eng/finish-source-only.proj @@ -30,16 +30,27 @@ OutputPath="$(ArtifactsLogDir)" /> + + + + + + + $([System.Text.RegularExpressions.Regex]::Split('$([System.IO.File]::ReadAllText('%(SdkVersionFileItem.Identity)'))', '\r\n|\r|\n')[3]) + + + + AfterTargets="Build" + DependsOnTargets="DetermineSourceBuiltSdkNonStableVersion"> - $(ArtifactsAssetsDir)dotnet-symbols-all-$(SourceBuiltSdkVersion)-$(TargetRid)$(ArchiveExtension) - $(ArtifactsAssetsDir)dotnet-symbols-sdk-$(SourceBuiltSdkVersion)-$(TargetRid)$(ArchiveExtension) + $(ArtifactsAssetsDir)dotnet-symbols-all-$(SourceBuiltSdkNonStableVersion)-$(TargetRid)$(ArchiveExtension) + $(ArtifactsAssetsDir)dotnet-symbols-sdk-$(SourceBuiltSdkNonStableVersion)-$(TargetRid)$(ArchiveExtension) @@ -172,10 +183,10 @@ - $(ArtifactsAssetsDir)$(SourceBuiltPrebuiltsTarballName).$(SourceBuiltSdkVersion).$(TargetRid)$(ArchiveExtension) + $(ArtifactsAssetsDir)$(SourceBuiltPrebuiltsTarballName).$(SourceBuiltSdkNonStableVersion).$(TargetRid)$(ArchiveExtension) $(ResultingPrebuiltPackagesDir) @@ -197,7 +208,7 @@ + DependsOnTargets="DetermineSourceBuiltSdkNonStableVersion;ResolveProjectReferences"> + - diff --git a/src/SourceBuild/content/repo-projects/test-templates.proj b/src/SourceBuild/content/repo-projects/test-templates.proj deleted file mode 100644 index 64bf44782cca..000000000000 --- a/src/SourceBuild/content/repo-projects/test-templates.proj +++ /dev/null @@ -1,15 +0,0 @@ - - - - true - - - - - - - - - - - diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/ExclusionsHelper.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/ExclusionsHelper.cs index 8c0188f5ada4..477cc70a8692 100644 --- a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/ExclusionsHelper.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/ExclusionsHelper.cs @@ -23,8 +23,8 @@ internal class ExclusionsHelper private readonly string _baselineSubDir; // Use this to narrow down the scope of exclusions to a specific category. - // For instance, setting this to "test-templates" will consider - // "src/test-templates/exclusions.txt" but not "src/arcade/exclusions.txt". + // For instance, setting this to "vstest" will consider + // "src/vstest/exclusions.txt" but not "src/arcade/exclusions.txt". private readonly Regex? _exclusionRegex; private readonly Dictionary> _suffixToExclusions; diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/assets/LicenseScanTests/LicenseExclusions.txt b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/assets/LicenseScanTests/LicenseExclusions.txt index 3e2c2cba3d86..3622170302b9 100644 --- a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/assets/LicenseScanTests/LicenseExclusions.txt +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/assets/LicenseScanTests/LicenseExclusions.txt @@ -218,13 +218,6 @@ src/source-build-reference-packages/src/textOnlyPackages/src/microsoft.private.i # False positive src/sourcelink/docs/GitSpec/GitSpec.md|unknown-license-reference -# -# test-templates -# - -# Not applicable to source -src/test-templates/Templates/**/*.vstemplate - # # vstest # diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/assets/SdkContentTests/MsftToSbSdkFiles.diff b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/assets/SdkContentTests/MsftToSbSdkFiles.diff index 8cd6f6c82125..cfd17f75bf9c 100644 --- a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/assets/SdkContentTests/MsftToSbSdkFiles.diff +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.Tests/assets/SdkContentTests/MsftToSbSdkFiles.diff @@ -44,14 +44,6 @@ index ------------ ./packs/Microsoft.NETCore.App.Ref/ ./packs/Microsoft.NETCore.App.Ref/x.y.z/ ./packs/Microsoft.NETCore.App.Ref/x.y.z/analyzers/ -@@ ------------ @@ - ./sdk-manifests/ - ./sdk-manifests/x.y.z/ - ./sdk-manifests/x.y.z/ --./sdk-manifests/x.y.z/ - ./sdk-manifests/x.y.z/microsoft.net.sdk.aspire/ - ./sdk-manifests/x.y.z/microsoft.net.sdk.aspire/x.y.z/ - ./sdk-manifests/x.y.z/microsoft.net.sdk.aspire/x.y.z/WorkloadManifest.Aspire.targets @@ ------------ @@ ./sdk/x.y.z/Microsoft.Build.NuGetSdkResolver.dll ./sdk/x.y.z/Microsoft.Build.Tasks.Core.dll diff --git a/src/SourceBuild/patches/roslyn/0001-Only-update-roslyn-dependencies-coming-from-maintena.patch b/src/SourceBuild/patches/roslyn/0001-Only-update-roslyn-dependencies-coming-from-maintena.patch deleted file mode 100644 index 69fe0a94d85c..000000000000 --- a/src/SourceBuild/patches/roslyn/0001-Only-update-roslyn-dependencies-coming-from-maintena.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 49d5aea80a1c6a9fb0f724f87c9c9e00824dfafa Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Carlos=20S=C3=A1nchez=20L=C3=B3pez?= - <1175054+carlossanlop@users.noreply.github.com> -Date: Tue, 26 Nov 2024 16:11:41 -0800 -Subject: [PATCH] Only update roslyn dependencies coming from - maintenance-packages when source build is true. Tracking issue: - https://github.com/dotnet/sdk/issues/45155 - ---- - eng/Directory.Packages.props | 18 +++++++----------- - eng/Versions.props | 26 ++++++++++++++++++++++++++ - 2 files changed, 33 insertions(+), 11 deletions(-) - -diff --git a/eng/Directory.Packages.props b/eng/Directory.Packages.props -index 1466d926085..e9cfd1c429a 100644 ---- a/eng/Directory.Packages.props -+++ b/eng/Directory.Packages.props -@@ -184,7 +184,7 @@ - - - -- -+ - - - -@@ -194,9 +194,9 @@ - - - -- -- -- -+ -+ -+ - - - -@@ -205,7 +205,7 @@ - - - -- -+ - - - -@@ -233,7 +233,7 @@ - --> - - -- -+ - - - -@@ -307,11 +307,7 @@ - - - -- -- -+ - - - -diff --git a/eng/Versions.props b/eng/Versions.props -index 3144be9ee76..97624c7e1e3 100644 ---- a/eng/Versions.props -+++ b/eng/Versions.props -@@ -16,6 +16,32 @@ - --> - $(MajorVersion).$(MinorVersion).0.0 - -+ -+ -+ 6.1.0 -+ 4.6.0 -+ 4.9.0 -+ 4.6.0 -+ 4.6.0 -+ 6.1.0 -+ 4.6.0 -+ -+ -+ 6.0.1 -+ 4.5.1 -+ -+ 4.8.6 -+ 4.5.5 -+ 4.5.0 -+ 6.0.0 -+ 4.5.4 -+ - --- -2.47.0.windows.2 - diff --git a/src/SourceBuild/patches/roslyn/0001-fix-compiler-errors-downgraded-sci-and-other-deps-again.patch b/src/SourceBuild/patches/roslyn/0001-fix-compiler-errors-downgraded-sci-and-other-deps-again.patch new file mode 100644 index 000000000000..6efd1335a2e1 --- /dev/null +++ b/src/SourceBuild/patches/roslyn/0001-fix-compiler-errors-downgraded-sci-and-other-deps-again.patch @@ -0,0 +1,61 @@ +From 7cb9fb458c533d0ba183ae84563167b365df7145 Mon Sep 17 00:00:00 2001 +From: Viktor Hofer +Date: Wed, 18 Dec 2024 14:38:02 +0100 +Subject: [PATCH] FIx build errors with newer toolset and dependencies + +Fixes the following two errors: +- src/Features/Core/Portable/ExternalAccess/Watch/Api/WatchHotReloadService.cs(217,13): error CS1503: Argument 4: cannot convert from 'System.Collections.Immutable.ImmutableHashSet' to 'System.Collections.Generic.IReadOnlySet' [src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj::TargetFramework=net9.0] +- src/roslyn/src/Features/Core/Portable/ExternalAccess/Watch/Api/WatchHotReloadService.cs(218,13): error CS1503: Argument 5: cannot convert from 'System.Collections.Immutable.ImmutableHashSet' to 'System.Collections.Generic.IReadOnlySet' [src/roslyn/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj::TargetFramework=net9.0] + +Backport: https://github.com/dotnet/roslyn/pull/76486 + +--- + src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj | 4 ++-- + .../Core/Portable/Microsoft.CodeAnalysis.Features.csproj | 2 +- + .../Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj b/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj +index 94c47e9a01e..e946b3ad490 100644 +--- a/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj ++++ b/src/Compilers/Core/Portable/Microsoft.CodeAnalysis.csproj +@@ -31,9 +31,9 @@ + will import everything but content files from Microsoft.CodeAnalysis.Analyzers, specifically, analyzers. + --> + +- ++ + +- ++ + + + +diff --git a/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj b/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj +index c3729dd7244..48a5d9c53a7 100644 +--- a/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj ++++ b/src/Features/Core/Portable/Microsoft.CodeAnalysis.Features.csproj +@@ -139,7 +139,7 @@ + + + +- ++ + + + +diff --git a/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj b/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj +index 7ddf1ce681c..9e889061c83 100644 +--- a/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj ++++ b/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj +@@ -29,8 +29,8 @@ + since it's now automatic, and Source Build will ensure we get a proper one automatically if we do nothing; if we reference the older version + then source build may only give us a reference assembly would fail if we then try to actually run that output. --> + +- +- ++ ++ + + + diff --git a/src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Compression.targets b/src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Compression.targets index a1f9325bef8b..c969520ba8f9 100644 --- a/src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Compression.targets +++ b/src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.Compression.targets @@ -14,6 +14,7 @@ Copyright (c) .NET Foundation. All rights reserved. + @@ -226,7 +227,7 @@ Copyright (c) .NET Foundation. All rights reserved. @@ -278,6 +279,27 @@ Copyright (c) .NET Foundation. All rights reserved. + + + + + + + + + + + + + + - + + + Condition="'$(_MicrosoftNetSdkCompilersToolsetPackageRootEmpty)' == 'true' and !($(MSBuildProjectFile.EndsWith('_wpftmp.csproj')) or $(MSBuildProjectFile.EndsWith('_wpftmp.vbproj')))" /> diff --git a/src/VirtualMonoRepo/source-mappings.json b/src/VirtualMonoRepo/source-mappings.json index 173bbcd4e505..482abd69ce24 100644 --- a/src/VirtualMonoRepo/source-mappings.json +++ b/src/VirtualMonoRepo/source-mappings.json @@ -154,10 +154,6 @@ "name": "templating", "defaultRemote": "https://github.com/dotnet/templating" }, - { - "name": "test-templates", - "defaultRemote": "https://github.com/dotnet/test-templates" - }, { "name": "testfx", "defaultRemote": "https://github.com/microsoft/testfx" diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..cfd70169012f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/dotnetcli.host.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "Fixture" : { + "shortName": "", + "longName": "fixture" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/ide.host.json new file mode 100644 index 000000000000..26c748107555 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/ide.host.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "itemHierarchyPaths": ["Test"], + "appliesTo": "TestContainer|TestingPlatformServer", + "defaultItemExtension": "cs", + "symbolInfo": [ + { + "id": "Fixture", + "isVisible": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/ide/icon.ico new file mode 100644 index 000000000000..6fc7823ecf27 Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..40f39e794ed8 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Třída testu MSTest", + "description": "Vytvoří novou testovací třídu MSTest.", + "symbols/Fixture/description": "Vyberte typy testovacích součástí, které se mají zahrnout do projektu.", + "symbols/Fixture/displayName": "Testovací přípravek", + "symbols/Fixture/choices/None/description": "Žádné metody testovacího přípravku", + "symbols/Fixture/choices/None/displayName": "Žádné", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metoda testovacího přípravku AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metoda testovacího přípravku AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metoda testovacího přípravku ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metoda testovacího přípravku ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metoda testovacího přípravku TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metoda testovacího přípravku TestCleanup", + "postActions/openInEditor/description": "Otevře Test1.cs v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..dbfe12cfc3b6 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.de.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Testklasse \"MSTest\"", + "description": "Erstellt eine neue MSTest-Testklasse", + "symbols/Fixture/description": "Wählen Sie die Fixturearten aus, die in das Projekt eingeschlossen werden sollen.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Keine Fixturemethoden", + "symbols/Fixture/choices/None/displayName": "Keine", + "symbols/Fixture/choices/AssemblyInitialize/description": "Fixturemethode \"AssemblyInitialize\"", + "symbols/Fixture/choices/AssemblyCleanup/description": "Fixierungsmethode \"AssemblyCleanup\"", + "symbols/Fixture/choices/ClassInitialize/description": "Fixturemethode \"ClassInitialize\"", + "symbols/Fixture/choices/ClassCleanup/description": "Fixierungsmethode \"ClassCleanup\"", + "symbols/Fixture/choices/TestInitialize/description": "Fixturemethode \"TestInitialize\"", + "symbols/Fixture/choices/TestCleanup/description": "Fixierungsmethode \"TestCleanup\"", + "postActions/openInEditor/description": "Öffnet Test1.cs im Editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..707bd60cb2b3 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.en.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Class", + "description": "Creates a new MSTest test class", + "symbols/Fixture/description": "Select the fixture kinds to include in the project.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "No fixture methods", + "symbols/Fixture/choices/None/displayName": "None", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture method", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture method", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture method", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture method", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture method", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture method", + "postActions/openInEditor/description": "Opens Test1.cs in the editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..b22a33307bdb --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.es.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Clase de prueba de MSTest", + "description": "Cree una nueva clase de prueba de MSTest", + "symbols/Fixture/description": "Seleccione los tipos de accesorio que desea incluir en el proyecto.", + "symbols/Fixture/displayName": "Accesorio", + "symbols/Fixture/choices/None/description": "No hay métodos de accesorio", + "symbols/Fixture/choices/None/displayName": "Ninguno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método de accesorio AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de accesorio AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de accesorio ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de accesorio ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de accesorio TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de accesorio TestCleanup", + "postActions/openInEditor/description": "Abrir Test1.cs en el editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..307a61aff329 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Classe de test MSTest", + "description": "Crée une classe de test MSTest", + "symbols/Fixture/description": "Sélectionnez les types de fixtures à inclure dans le projet.", + "symbols/Fixture/displayName": "Appareil", + "symbols/Fixture/choices/None/description": "Aucune méthode de fixture", + "symbols/Fixture/choices/None/displayName": "Aucun", + "symbols/Fixture/choices/AssemblyInitialize/description": "Méthode de fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Méthode de fixture assemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Méthode de fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Méthode de fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Méthode de fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Méthode de fixture TestCleanup", + "postActions/openInEditor/description": "Ouvre Test1.cs dans l’éditeur." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..d28292454fed --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.it.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Classe test MSTest", + "description": "Crea una nuova classe di test MSTest", + "symbols/Fixture/description": "Selezionare i tipi di fixture da includere nel progetto.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Nessun metodo di fixture", + "symbols/Fixture/choices/None/displayName": "Nessuno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metodo fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metodo fixture AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metodo fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metodo fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metodo fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metodo fixture TestCleanup", + "postActions/openInEditor/description": "Apre Test1.cs nell'editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..7a0344eca45c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest テスト クラス", + "description": "新しい MSTest テスト クラスを作成します", + "symbols/Fixture/description": "プロジェクトに含めるフィクスチャの種類を選択します。", + "symbols/Fixture/displayName": "フィクスチャ", + "symbols/Fixture/choices/None/description": "フィクスチャ メソッドがありません", + "symbols/Fixture/choices/None/displayName": "なし", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup フィクスチャ メソッド", + "postActions/openInEditor/description": "エディターで Test1.cs を開きます。" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..fa9f9674c1d2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest 테스트 클래스", + "description": "새 MSTest 테스트 클래스를 만듭니다.", + "symbols/Fixture/description": "프로젝트에 포함할 픽스쳐 종류를 선택합니다.", + "symbols/Fixture/displayName": "픽스쳐", + "symbols/Fixture/choices/None/description": "픽스쳐 메서드 없음", + "symbols/Fixture/choices/None/displayName": "없음", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture 메서드", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture 메서드", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture 메서드", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture 메서드", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture 메서드", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture 메서드", + "postActions/openInEditor/description": "편집기에서 Test1.cs를 엽니다." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..9943917515ed --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Klasa testowa MSTest", + "description": "Tworzy nową klasę testową MSTest", + "symbols/Fixture/description": "Wybierz rodzaje warunków początkowych do uwzględnienia w projekcie.", + "symbols/Fixture/displayName": "Warunki początkowe", + "symbols/Fixture/choices/None/description": "Brak metod początkowych", + "symbols/Fixture/choices/None/displayName": "Brak", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize — metoda początkowa", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup — metoda początkowa", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize — metoda początkowa", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup — metoda początkowa", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize — metoda początkowa", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup — metoda początkowa", + "postActions/openInEditor/description": "Otwiera plik Test1.cs w edytorze." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..8f66e68bcf25 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Classe de teste MSTest", + "description": "Cria uma nova classe de teste do MSTest", + "symbols/Fixture/description": "Selecione os tipos de acessório a serem incluídos no projeto.", + "symbols/Fixture/displayName": "Acessório", + "symbols/Fixture/choices/None/description": "Nenhum método de acessório", + "symbols/Fixture/choices/None/displayName": "Nenhum", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método acessório AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de acessório AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de acessório ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de acessório ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de acessório TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de acessório TestCleanup", + "postActions/openInEditor/description": "Abre Test1.cs no editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..bfc1725b8187 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,16 @@ +{ + "author": "Майкрософт", + "name": "Тестовый класс MSTest", + "description": "Создает новый тестовый класс MSTest", + "symbols/Fixture/description": "Выберите типы средств, которые необходимо включить в проект.", + "symbols/Fixture/displayName": "Средство", + "symbols/Fixture/choices/None/description": "Нет методов работы со средствами", + "symbols/Fixture/choices/None/displayName": "Отсутствует", + "symbols/Fixture/choices/AssemblyInitialize/description": "Метод работы со средствами AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Метод работы со средствами AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Метод работы со средствами ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Метод работы со средствами ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Метод работы со средствами TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Метод работы со средствами TestCleanup", + "postActions/openInEditor/description": "Открывает Test1.cs в редакторе." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..c77e72aa2c94 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Sınıfı", + "description": "Yeni bir MSTest test sınıfı oluşturur", + "symbols/Fixture/description": "Projeye dahil edilecek düzen türlerini seçin.", + "symbols/Fixture/displayName": "Düzen", + "symbols/Fixture/choices/None/description": "Düzen yöntemi yok", + "symbols/Fixture/choices/None/displayName": "Hiçbiri", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize düzen yöntemi", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup düzen yöntemi", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize düzen yöntemi", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup düzen yöntemi", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize düzen yöntemi", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup düzen yöntemi", + "postActions/openInEditor/description": "Test1.cs'yi düzenleyicide açar." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..401438792814 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest 测试类", + "description": "创建新的 MSTest 测试类", + "symbols/Fixture/description": "选择要包含在项目中的固定例程类型。", + "symbols/Fixture/displayName": "固定例程", + "symbols/Fixture/choices/None/description": "无固定例程方法", + "symbols/Fixture/choices/None/displayName": "无", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固定例程方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固定例程方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固定例程方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固定例程方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固定例程方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固定例程方法", + "postActions/openInEditor/description": "在编辑器中打开 Test1.cs。" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..91e47962ed14 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest 測試類別", + "description": "建立新的 MSTest 測試類別", + "symbols/Fixture/description": "選取要併入專案中的固件類型。", + "symbols/Fixture/displayName": "固件", + "symbols/Fixture/choices/None/description": "沒有固件方法", + "symbols/Fixture/choices/None/displayName": "無", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固件方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固件方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固件方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固件方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固件方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固件方法", + "postActions/openInEditor/description": "在編輯器中開啟 Test1.cs。" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/template.json new file mode 100644 index 000000000000..bf550a473f1b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/.template.config/template.json @@ -0,0 +1,131 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ "Test", "MSTest" ], + "name": "MSTest Test Class", + "generatorVersions": "[1.0.0.0-*)", + "description": "Creates a new MSTest test class", + "groupIdentity": "Microsoft.Test.MSTest.TestClass", + "precedence": "12000", + "identity": "Microsoft.Test.MSTest.TestClass.CSharp.9.0", + "shortName": "mstest-class", + "tags": { + "language": "C#", + "type": "item" + }, + "sourceName": "Test1", + "preferDefaultName": true, + "defaultName": "Test1", + "primaryOutputs": [ + { "path": "Test1.cs" } + ], + "symbols": { + "DefaultNamespace": { + "type": "bind", + "binding": "msbuild:RootNamespace", + "replaces": "Company.TestProject1" + }, + "ImplicitUsings": { + "type": "bind", + "binding": "msbuild:ImplicitUsings", + "datatype": "string", + "defaultValue": "disable" + }, + "evaluatedLangVersion": { + "type": "bind", + "binding": "msbuild:LangVersion", + "dataType": "string" + }, + "latestLangVersion": { + "type": "generated", + "generator": "constant", + "parameters": { + "value": "latest" + } + }, + "langVersion": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "evaluatedLangVersion", + "fallbackVariableName": "latestLangVersion" + } + }, + "csharp9orOlder": { + "type": "generated", + "generator": "regexMatch", + "datatype": "bool", + "parameters": { + "pattern": "^(ISO-1|ISO-2|[1-7]|[8-9]|[8-9]\\.0|7\\.[0-3])$", + "source": "langVersion" + } + }, + "csharp10orLater": { + "type": "computed", + "value": "!csharp9orOlder" + }, + "csharpFeature_FileScopedNamespaces": { + "type": "computed", + "value": "csharp10orLater == \"true\"" + }, + "Fixture": { + "type": "parameter", + "datatype": "choice", + "description": "Select the fixture kinds to include in the project.", + "displayName": "Fixture", + "allowMultipleValues": true, + "enableQuotelessLiterals": true, + "defaultValue": "None", + "choices": [ + { + "choice": "None", + "description": "No fixture methods", + "displayName": "None" + }, + { + "choice": "AssemblyInitialize", + "description": "AssemblyInitialize fixture method" + }, + { + "choice": "AssemblyCleanup", + "description": "AssemblyCleanup fixture method" + }, + { + "choice": "ClassInitialize", + "description": "ClassInitialize fixture method" + }, + { + "choice": "ClassCleanup", + "description": "ClassCleanup fixture method" + }, + { + "choice": "TestInitialize", + "description": "TestInitialize fixture method" + }, + { + "choice": "TestCleanup", + "description": "TestCleanup fixture method" + } + ] + } + }, + "constraints": { + "csharp-only": { + "type": "project-capability", + "args": "CSharp" + } + }, + "postActions": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Test1.cs in the editor.", + "manualInstructions": [ ], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "0" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/Test1.cs b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/Test1.cs new file mode 100644 index 000000000000..9c834214c229 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-CSharp-TestClass/Test1.cs @@ -0,0 +1,124 @@ +#if (ImplicitUsings != "enable") +using Microsoft.VisualStudio.TestTools.UnitTesting; + +#endif +#if (csharpFeature_FileScopedNamespaces) +namespace Company.TestProject1; + +[TestClass] +public class Test1 +{ +#if (Fixture == AssemblyInitialize) + [AssemblyInitialize] + public static void AssemblyInit(TestContext context) + { + // This method is called once for the test assembly, before any tests are run. + } + +#endif +#if (Fixture == AssemblyCleanup) + [AssemblyCleanup] + public static void AssemblyCleanup() + { + // This method is called once for the test assembly, after all tests are run. + } + +#endif +#if (Fixture == ClassInitialize) + [ClassInitialize] + public static void ClassInit(TestContext context) + { + // This method is called once for the test class, before any tests of the class are run. + } + +#endif +#if (Fixture == ClassCleanup) + [ClassCleanup] + public static void ClassCleanup() + { + // This method is called once for the test class, after all tests of the class are run. + } + +#endif +#if (Fixture == TestInitialize) + [TestInitialize] + public void TestInit() + { + // This method is called before each test method. + } + +#endif +#if (Fixture == TestCleanup) + [TestCleanup] + public void TestCleanup() + { + // This method is called after each test method. + } + +#endif + [TestMethod] + public void TestMethod1() + { + } +} +#else +namespace Company.TestProject1 +{ + [TestClass] + public class Test1 + { +#if (Fixture == AssemblyInitialize) + [AssemblyInitialize] + public static void AssemblyInit(TestContext context) + { + // This method is called once for the test assembly, before any tests are run. + } + +#endif +#if (Fixture == AssemblyCleanup) + [AssemblyCleanup] + public static void AssemblyCleanup() + { + // This method is called once for the test assembly, after all tests are run. + } + +#endif +#if (Fixture == ClassInitialize) + [ClassInitialize] + public static void ClassInit(TestContext context) + { + // This method is called once for the test class, before any tests of the class are run. + } + +#endif +#if (Fixture == ClassCleanup) + [ClassCleanup] + public static void ClassCleanup() + { + // This method is called once for the test class, after all tests of the class are run. + } + +#endif +#if (Fixture == TestInitialize) + [TestInitialize] + public void TestInit() + { + // This method is called before each test method. + } + +#endif +#if (Fixture == TestCleanup) + [TestCleanup] + public void TestCleanup() + { + // This method is called after each test method. + } + +#endif + [TestMethod] + public void TestMethod1() + { + } + } +} +#endif diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..cfd70169012f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/dotnetcli.host.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "Fixture" : { + "shortName": "", + "longName": "fixture" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/ide.host.json new file mode 100644 index 000000000000..31b8be94219f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/ide.host.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "itemHierarchyPaths": ["Test"], + "appliesTo": "TestContainer|TestingPlatformServer", + "defaultItemExtension": "fs", + "symbolInfo": [ + { + "id": "Fixture", + "isVisible": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/ide/icon.ico new file mode 100644 index 000000000000..671271e7595d Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..40f39e794ed8 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Třída testu MSTest", + "description": "Vytvoří novou testovací třídu MSTest.", + "symbols/Fixture/description": "Vyberte typy testovacích součástí, které se mají zahrnout do projektu.", + "symbols/Fixture/displayName": "Testovací přípravek", + "symbols/Fixture/choices/None/description": "Žádné metody testovacího přípravku", + "symbols/Fixture/choices/None/displayName": "Žádné", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metoda testovacího přípravku AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metoda testovacího přípravku AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metoda testovacího přípravku ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metoda testovacího přípravku ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metoda testovacího přípravku TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metoda testovacího přípravku TestCleanup", + "postActions/openInEditor/description": "Otevře Test1.cs v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..dbfe12cfc3b6 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.de.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Testklasse \"MSTest\"", + "description": "Erstellt eine neue MSTest-Testklasse", + "symbols/Fixture/description": "Wählen Sie die Fixturearten aus, die in das Projekt eingeschlossen werden sollen.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Keine Fixturemethoden", + "symbols/Fixture/choices/None/displayName": "Keine", + "symbols/Fixture/choices/AssemblyInitialize/description": "Fixturemethode \"AssemblyInitialize\"", + "symbols/Fixture/choices/AssemblyCleanup/description": "Fixierungsmethode \"AssemblyCleanup\"", + "symbols/Fixture/choices/ClassInitialize/description": "Fixturemethode \"ClassInitialize\"", + "symbols/Fixture/choices/ClassCleanup/description": "Fixierungsmethode \"ClassCleanup\"", + "symbols/Fixture/choices/TestInitialize/description": "Fixturemethode \"TestInitialize\"", + "symbols/Fixture/choices/TestCleanup/description": "Fixierungsmethode \"TestCleanup\"", + "postActions/openInEditor/description": "Öffnet Test1.cs im Editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..707bd60cb2b3 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.en.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Class", + "description": "Creates a new MSTest test class", + "symbols/Fixture/description": "Select the fixture kinds to include in the project.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "No fixture methods", + "symbols/Fixture/choices/None/displayName": "None", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture method", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture method", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture method", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture method", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture method", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture method", + "postActions/openInEditor/description": "Opens Test1.cs in the editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..b22a33307bdb --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.es.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Clase de prueba de MSTest", + "description": "Cree una nueva clase de prueba de MSTest", + "symbols/Fixture/description": "Seleccione los tipos de accesorio que desea incluir en el proyecto.", + "symbols/Fixture/displayName": "Accesorio", + "symbols/Fixture/choices/None/description": "No hay métodos de accesorio", + "symbols/Fixture/choices/None/displayName": "Ninguno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método de accesorio AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de accesorio AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de accesorio ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de accesorio ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de accesorio TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de accesorio TestCleanup", + "postActions/openInEditor/description": "Abrir Test1.cs en el editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..307a61aff329 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Classe de test MSTest", + "description": "Crée une classe de test MSTest", + "symbols/Fixture/description": "Sélectionnez les types de fixtures à inclure dans le projet.", + "symbols/Fixture/displayName": "Appareil", + "symbols/Fixture/choices/None/description": "Aucune méthode de fixture", + "symbols/Fixture/choices/None/displayName": "Aucun", + "symbols/Fixture/choices/AssemblyInitialize/description": "Méthode de fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Méthode de fixture assemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Méthode de fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Méthode de fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Méthode de fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Méthode de fixture TestCleanup", + "postActions/openInEditor/description": "Ouvre Test1.cs dans l’éditeur." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..d28292454fed --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.it.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Classe test MSTest", + "description": "Crea una nuova classe di test MSTest", + "symbols/Fixture/description": "Selezionare i tipi di fixture da includere nel progetto.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Nessun metodo di fixture", + "symbols/Fixture/choices/None/displayName": "Nessuno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metodo fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metodo fixture AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metodo fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metodo fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metodo fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metodo fixture TestCleanup", + "postActions/openInEditor/description": "Apre Test1.cs nell'editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..7a0344eca45c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest テスト クラス", + "description": "新しい MSTest テスト クラスを作成します", + "symbols/Fixture/description": "プロジェクトに含めるフィクスチャの種類を選択します。", + "symbols/Fixture/displayName": "フィクスチャ", + "symbols/Fixture/choices/None/description": "フィクスチャ メソッドがありません", + "symbols/Fixture/choices/None/displayName": "なし", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup フィクスチャ メソッド", + "postActions/openInEditor/description": "エディターで Test1.cs を開きます。" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..fa9f9674c1d2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest 테스트 클래스", + "description": "새 MSTest 테스트 클래스를 만듭니다.", + "symbols/Fixture/description": "프로젝트에 포함할 픽스쳐 종류를 선택합니다.", + "symbols/Fixture/displayName": "픽스쳐", + "symbols/Fixture/choices/None/description": "픽스쳐 메서드 없음", + "symbols/Fixture/choices/None/displayName": "없음", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture 메서드", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture 메서드", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture 메서드", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture 메서드", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture 메서드", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture 메서드", + "postActions/openInEditor/description": "편집기에서 Test1.cs를 엽니다." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..9943917515ed --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Klasa testowa MSTest", + "description": "Tworzy nową klasę testową MSTest", + "symbols/Fixture/description": "Wybierz rodzaje warunków początkowych do uwzględnienia w projekcie.", + "symbols/Fixture/displayName": "Warunki początkowe", + "symbols/Fixture/choices/None/description": "Brak metod początkowych", + "symbols/Fixture/choices/None/displayName": "Brak", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize — metoda początkowa", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup — metoda początkowa", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize — metoda początkowa", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup — metoda początkowa", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize — metoda początkowa", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup — metoda początkowa", + "postActions/openInEditor/description": "Otwiera plik Test1.cs w edytorze." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..8f66e68bcf25 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Classe de teste MSTest", + "description": "Cria uma nova classe de teste do MSTest", + "symbols/Fixture/description": "Selecione os tipos de acessório a serem incluídos no projeto.", + "symbols/Fixture/displayName": "Acessório", + "symbols/Fixture/choices/None/description": "Nenhum método de acessório", + "symbols/Fixture/choices/None/displayName": "Nenhum", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método acessório AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de acessório AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de acessório ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de acessório ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de acessório TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de acessório TestCleanup", + "postActions/openInEditor/description": "Abre Test1.cs no editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..bfc1725b8187 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,16 @@ +{ + "author": "Майкрософт", + "name": "Тестовый класс MSTest", + "description": "Создает новый тестовый класс MSTest", + "symbols/Fixture/description": "Выберите типы средств, которые необходимо включить в проект.", + "symbols/Fixture/displayName": "Средство", + "symbols/Fixture/choices/None/description": "Нет методов работы со средствами", + "symbols/Fixture/choices/None/displayName": "Отсутствует", + "symbols/Fixture/choices/AssemblyInitialize/description": "Метод работы со средствами AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Метод работы со средствами AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Метод работы со средствами ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Метод работы со средствами ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Метод работы со средствами TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Метод работы со средствами TestCleanup", + "postActions/openInEditor/description": "Открывает Test1.cs в редакторе." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..c77e72aa2c94 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Sınıfı", + "description": "Yeni bir MSTest test sınıfı oluşturur", + "symbols/Fixture/description": "Projeye dahil edilecek düzen türlerini seçin.", + "symbols/Fixture/displayName": "Düzen", + "symbols/Fixture/choices/None/description": "Düzen yöntemi yok", + "symbols/Fixture/choices/None/displayName": "Hiçbiri", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize düzen yöntemi", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup düzen yöntemi", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize düzen yöntemi", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup düzen yöntemi", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize düzen yöntemi", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup düzen yöntemi", + "postActions/openInEditor/description": "Test1.cs'yi düzenleyicide açar." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..401438792814 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest 测试类", + "description": "创建新的 MSTest 测试类", + "symbols/Fixture/description": "选择要包含在项目中的固定例程类型。", + "symbols/Fixture/displayName": "固定例程", + "symbols/Fixture/choices/None/description": "无固定例程方法", + "symbols/Fixture/choices/None/displayName": "无", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固定例程方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固定例程方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固定例程方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固定例程方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固定例程方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固定例程方法", + "postActions/openInEditor/description": "在编辑器中打开 Test1.cs。" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..91e47962ed14 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest 測試類別", + "description": "建立新的 MSTest 測試類別", + "symbols/Fixture/description": "選取要併入專案中的固件類型。", + "symbols/Fixture/displayName": "固件", + "symbols/Fixture/choices/None/description": "沒有固件方法", + "symbols/Fixture/choices/None/displayName": "無", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固件方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固件方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固件方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固件方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固件方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固件方法", + "postActions/openInEditor/description": "在編輯器中開啟 Test1.cs。" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/template.json new file mode 100644 index 000000000000..56b15dde7d79 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/.template.config/template.json @@ -0,0 +1,82 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ "Test", "MSTest" ], + "name": "MSTest Test Class", + "generatorVersions": "[1.0.0.0-*)", + "description": "Creates a new MSTest test class", + "groupIdentity": "Microsoft.Test.MSTest.TestClass", + "precedence": "10000", + "identity": "Microsoft.Test.MSTest.TestClass.FSharp.8.0", + "shortName": "mstest-class", + "tags": { + "language": "F#", + "type": "item" + }, + "sourceName": "Test1", + "preferDefaultName": true, + "defaultName": "Test1", + "primaryOutputs": [ + { "path": "Test1.fs" } + ], + "symbols": { + "DefaultNamespace": { + "type": "bind", + "binding": "msbuild:RootNamespace", + "replaces": "Company.TestProject1" + }, + "Fixture": { + "type": "parameter", + "datatype": "choice", + "description": "Select the fixture kinds to include in the project.", + "displayName": "Fixture", + "allowMultipleValues": true, + "enableQuotelessLiterals": true, + "defaultValue": "None", + "choices": [ + { + "choice": "None", + "description": "No fixture methods", + "displayName": "None" + }, + { + "choice": "AssemblyInitialize", + "description": "AssemblyInitialize fixture method" + }, + { + "choice": "AssemblyCleanup", + "description": "AssemblyCleanup fixture method" + }, + { + "choice": "ClassInitialize", + "description": "ClassInitialize fixture method" + }, + { + "choice": "ClassCleanup", + "description": "ClassCleanup fixture method" + }, + { + "choice": "TestInitialize", + "description": "TestInitialize fixture method" + }, + { + "choice": "TestCleanup", + "description": "TestCleanup fixture method" + } + ] + } + }, + "postActions": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Test1.cs in the editor.", + "manualInstructions": [ ], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "0" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/Test1.fs b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/Test1.fs new file mode 100644 index 000000000000..e890c668b48c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-FSharp-TestClass/Test1.fs @@ -0,0 +1,53 @@ +namespace Company.TestProject1 + +open System +open Microsoft.VisualStudio.TestTools.UnitTesting + +[] +type Test1 () = + +#if (Fixture == AssemblyInitialize) + [] + static member AssemblyInit (context: TestContext) = + // This method is called once for the test assembly, before any tests are run. + () + +#endif +#if (Fixture == AssemblyCleanup) + [] + static member AssemblyCleanup () = + // This method is called once for the test assembly, after all tests are run. + () + +#endif +#if (Fixture == ClassInitialize) + [] + member this.ClassInit (context: TestContext) = + // This method is called once for the test class, before any tests of the class are run. + () + +#endif +#if (Fixture == ClassCleanup) + [] + member this.ClassCleanup () = + // This method is called once for the test class, after all tests of the class are run. + () + +#endif +#if (Fixture == TestInitialize) + [] + member this.TestInit () = + // This method is called before each test method. + () + +#endif +#if (Fixture == TestCleanup) + [] + member this.TestCleanup () = + // This method is called after each test method. + () + +#endif + [] + member this.TestMethod1 () = + Assert.IsTrue(true); diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..cfd70169012f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/dotnetcli.host.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "Fixture" : { + "shortName": "", + "longName": "fixture" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/ide.host.json new file mode 100644 index 000000000000..2f4381fa43a6 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/ide.host.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "itemHierarchyPaths": ["Test"], + "appliesTo": "TestContainer|TestingPlatformServer", + "defaultItemExtension": "vb", + "symbolInfo": [ + { + "id": "Fixture", + "isVisible": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/ide/icon.ico new file mode 100644 index 000000000000..14998ba8c023 Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..70fe4ff2e351 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Třída testu MSTest", + "description": "Vytvoří novou testovací třídu MSTest.", + "symbols/Fixture/description": "Vyberte typy testovacích součástí, které se mají zahrnout do projektu.", + "symbols/Fixture/displayName": "Testovací přípravek", + "symbols/Fixture/choices/None/description": "Žádné metody testovacího přípravku", + "symbols/Fixture/choices/None/displayName": "Žádné", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metoda testovacího přípravku AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metoda testovacího přípravku AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metoda testovacího přípravku ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metoda testovacího přípravku ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metoda testovacího přípravku TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metoda testovacího přípravku TestCleanup", + "postActions/openInEditor/description": "Otevře Test1.vb v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..edd3ab0014b9 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.de.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Testklasse \"MSTest\"", + "description": "Erstellt eine neue MSTest-Testklasse", + "symbols/Fixture/description": "Wählen Sie die Fixturearten aus, die in das Projekt eingeschlossen werden sollen.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Keine Fixturemethoden", + "symbols/Fixture/choices/None/displayName": "Keine", + "symbols/Fixture/choices/AssemblyInitialize/description": "Fixturemethode \"AssemblyInitialize\"", + "symbols/Fixture/choices/AssemblyCleanup/description": "Fixierungsmethode \"AssemblyCleanup\"", + "symbols/Fixture/choices/ClassInitialize/description": "Fixturemethode \"ClassInitialize\"", + "symbols/Fixture/choices/ClassCleanup/description": "Fixierungsmethode \"ClassCleanup\"", + "symbols/Fixture/choices/TestInitialize/description": "Fixturemethode \"TestInitialize\"", + "symbols/Fixture/choices/TestCleanup/description": "Fixierungsmethode \"TestCleanup\"", + "postActions/openInEditor/description": "Öffnet Test1.vb im Editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..3e2514d1950a --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.en.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Class", + "description": "Creates a new MSTest test class", + "symbols/Fixture/description": "Select the fixture kinds to include in the project.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "No fixture methods", + "symbols/Fixture/choices/None/displayName": "None", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture method", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture method", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture method", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture method", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture method", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture method", + "postActions/openInEditor/description": "Opens Test1.vb in the editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..0c4ffc2d6d26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.es.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Clase de prueba de MSTest", + "description": "Cree una nueva clase de prueba de MSTest", + "symbols/Fixture/description": "Seleccione los tipos de accesorio que desea incluir en el proyecto.", + "symbols/Fixture/displayName": "Accesorio", + "symbols/Fixture/choices/None/description": "No hay métodos de accesorio", + "symbols/Fixture/choices/None/displayName": "Ninguno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método de accesorio AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de accesorio AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de accesorio ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de accesorio ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de accesorio TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de accesorio TestCleanup", + "postActions/openInEditor/description": "Abrir Test1.vb en el editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..a18771a9c9e4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Classe de test MSTest", + "description": "Crée une classe de test MSTest", + "symbols/Fixture/description": "Sélectionnez les types de fixtures à inclure dans le projet.", + "symbols/Fixture/displayName": "Appareil", + "symbols/Fixture/choices/None/description": "Aucune méthode de fixture", + "symbols/Fixture/choices/None/displayName": "Aucun", + "symbols/Fixture/choices/AssemblyInitialize/description": "Méthode de fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Méthode de fixture assemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Méthode de fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Méthode de fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Méthode de fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Méthode de fixture TestCleanup", + "postActions/openInEditor/description": "Ouvre Test1.vb dans l’éditeur." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..31f49f02643e --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.it.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Classe test MSTest", + "description": "Crea una nuova classe di test MSTest", + "symbols/Fixture/description": "Selezionare i tipi di fixture da includere nel progetto.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Nessun metodo di fixture", + "symbols/Fixture/choices/None/displayName": "Nessuno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metodo fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metodo fixture AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metodo fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metodo fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metodo fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metodo fixture TestCleanup", + "postActions/openInEditor/description": "Apre Test1.vb nell'editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..6c896823d76c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest テスト クラス", + "description": "新しい MSTest テスト クラスを作成します", + "symbols/Fixture/description": "プロジェクトに含めるフィクスチャの種類を選択します。", + "symbols/Fixture/displayName": "フィクスチャ", + "symbols/Fixture/choices/None/description": "フィクスチャ メソッドがありません", + "symbols/Fixture/choices/None/displayName": "なし", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup フィクスチャ メソッド", + "postActions/openInEditor/description": "エディターで Test1.vb を開きます。" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..41969b382cd3 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest 테스트 클래스", + "description": "새 MSTest 테스트 클래스를 만듭니다.", + "symbols/Fixture/description": "프로젝트에 포함할 픽스쳐 종류를 선택합니다.", + "symbols/Fixture/displayName": "픽스쳐", + "symbols/Fixture/choices/None/description": "픽스쳐 메서드 없음", + "symbols/Fixture/choices/None/displayName": "없음", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture 메서드", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture 메서드", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture 메서드", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture 메서드", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture 메서드", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture 메서드", + "postActions/openInEditor/description": "편집기에서 Test1.vb 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..a82ff69758a4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Klasa testowa MSTest", + "description": "Tworzy nową klasę testową MSTest", + "symbols/Fixture/description": "Wybierz rodzaje warunków początkowych do uwzględnienia w projekcie.", + "symbols/Fixture/displayName": "Warunki początkowe", + "symbols/Fixture/choices/None/description": "Brak metod początkowych", + "symbols/Fixture/choices/None/displayName": "Brak", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize — metoda początkowa", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup — metoda początkowa", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize — metoda początkowa", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup — metoda początkowa", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize — metoda początkowa", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup — metoda początkowa", + "postActions/openInEditor/description": "Otwiera plik Test1.vb w edytorze." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..fb2302f25989 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Classe de teste MSTest", + "description": "Cria uma nova classe de teste do MSTest", + "symbols/Fixture/description": "Selecione os tipos de acessório a serem incluídos no projeto.", + "symbols/Fixture/displayName": "Acessório", + "symbols/Fixture/choices/None/description": "Nenhum método de acessório", + "symbols/Fixture/choices/None/displayName": "Nenhum", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método acessório AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de acessório AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de acessório ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de acessório ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de acessório TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de acessório TestCleanup", + "postActions/openInEditor/description": "Abre o Test1.vb no editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..6a7787cdb168 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,16 @@ +{ + "author": "Майкрософт", + "name": "Тестовый класс MSTest", + "description": "Создает новый тестовый класс MSTest", + "symbols/Fixture/description": "Выберите типы средств, которые необходимо включить в проект.", + "symbols/Fixture/displayName": "Средство", + "symbols/Fixture/choices/None/description": "Нет методов работы со средствами", + "symbols/Fixture/choices/None/displayName": "Отсутствует", + "symbols/Fixture/choices/AssemblyInitialize/description": "Метод работы со средствами AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Метод работы со средствами AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Метод работы со средствами ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Метод работы со средствами ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Метод работы со средствами TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Метод работы со средствами TestCleanup", + "postActions/openInEditor/description": "Открывает Test1.vb в редакторе." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..bc641ca57f3b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Sınıfı", + "description": "Yeni bir MSTest test sınıfı oluşturur", + "symbols/Fixture/description": "Projeye dahil edilecek düzen türlerini seçin.", + "symbols/Fixture/displayName": "Düzen", + "symbols/Fixture/choices/None/description": "Düzen yöntemi yok", + "symbols/Fixture/choices/None/displayName": "Hiçbiri", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize düzen yöntemi", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup düzen yöntemi", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize düzen yöntemi", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup düzen yöntemi", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize düzen yöntemi", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup düzen yöntemi", + "postActions/openInEditor/description": "Test1.vb'yi düzenleyicide açar." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..72ace3ff3af4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest 测试类", + "description": "创建新的 MSTest 测试类", + "symbols/Fixture/description": "选择要包含在项目中的固定例程类型。", + "symbols/Fixture/displayName": "固定例程", + "symbols/Fixture/choices/None/description": "无固定例程方法", + "symbols/Fixture/choices/None/displayName": "无", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固定例程方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固定例程方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固定例程方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固定例程方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固定例程方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固定例程方法", + "postActions/openInEditor/description": "在编辑器中打开 Test1.vb。" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..c7b1e187f516 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "MSTest 測試類別", + "description": "建立新的 MSTest 測試類別", + "symbols/Fixture/description": "選取要併入專案中的固件類型。", + "symbols/Fixture/displayName": "固件", + "symbols/Fixture/choices/None/description": "沒有固件方法", + "symbols/Fixture/choices/None/displayName": "無", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固件方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固件方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固件方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固件方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固件方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固件方法", + "postActions/openInEditor/description": "在編輯器中開啟 Test1.vb。" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/template.json new file mode 100644 index 000000000000..3f5a93f255cf --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/.template.config/template.json @@ -0,0 +1,82 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ "Test", "MSTest" ], + "name": "MSTest Test Class", + "generatorVersions": "[1.0.0.0-*)", + "description": "Creates a new MSTest test class", + "groupIdentity": "Microsoft.Test.MSTest.TestClass", + "precedence": "10000", + "identity": "Microsoft.Test.MSTest.TestClass.VisualBasic.8.0", + "shortName": "mstest-class", + "tags": { + "language": "VB", + "type": "item" + }, + "sourceName": "Test1", + "preferDefaultName": true, + "defaultName": "Test1", + "primaryOutputs": [ + { "path": "Test1.vb" } + ], + "symbols": { + "DefaultNamespace": { + "type": "bind", + "binding": "msbuild:RootNamespace", + "replaces": "Company.TestProject1" + }, + "Fixture": { + "type": "parameter", + "datatype": "choice", + "description": "Select the fixture kinds to include in the project.", + "displayName": "Fixture", + "allowMultipleValues": true, + "enableQuotelessLiterals": true, + "defaultValue": "None", + "choices": [ + { + "choice": "None", + "description": "No fixture methods", + "displayName": "None" + }, + { + "choice": "AssemblyInitialize", + "description": "AssemblyInitialize fixture method" + }, + { + "choice": "AssemblyCleanup", + "description": "AssemblyCleanup fixture method" + }, + { + "choice": "ClassInitialize", + "description": "ClassInitialize fixture method" + }, + { + "choice": "ClassCleanup", + "description": "ClassCleanup fixture method" + }, + { + "choice": "TestInitialize", + "description": "TestInitialize fixture method" + }, + { + "choice": "TestCleanup", + "description": "TestCleanup fixture method" + } + ] + } + }, + "postActions": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Test1.vb in the editor.", + "manualInstructions": [ ], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "0" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/Test1.vb b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/Test1.vb new file mode 100644 index 000000000000..7b22355a7601 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/MSTest-VisualBasic-TestClass/Test1.vb @@ -0,0 +1,54 @@ +Imports Microsoft.VisualStudio.TestTools.UnitTesting + +Namespace Company.TestProject1 + + Public Class Test1 +#If (Fixture == AssemblyInitialize) + + Public Shared Sub AssemblyInit(ByVal testContext As TestContext) + ' This method is called once for the test assembly, before any tests are run. + End Sub + +#End If +#If (Fixture == AssemblyCleanup) + + Public Shared Sub AssemblyCleanup() + ' This method is called once for the test assembly, after all tests are run. + End Sub + +#End If +#If (Fixture == ClassInitialize) + + Public Shared Sub ClassInit(ByVal testContext As TestContext) + ' This method is called once for the test class, before any tests of the class are run. + End Sub + +#End If +#If (Fixture == ClassCleanup) + + Public Shared Sub ClassCleanup() + ' This method is called once for the test class, after all tests of the class are run. + End Sub + +#End If +#If (Fixture == TestInitialize) + + Public Sub TestInit() + ' This method is called before each test method. + End Sub + +#End If +#If (Fixture == TestCleanup) + + Public Sub TestCleanup() + ' This method is called after each test method. + End Sub + +#End If + + Sub TestSub() + + End Sub + End Class +End Namespace + diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/ide.host.json new file mode 100644 index 000000000000..89fbbf631a65 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/ide.host.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "itemHierarchyPaths": ["Test"], + "appliesTo": "TestContainer|TestingPlatformServer", + "defaultItemExtension": "cs" +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/ide/icon.ico new file mode 100644 index 000000000000..6fc7823ecf27 Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..c5ee95d983c9 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Testovací položka NUnit 3", + "description": "Vytvoří novou testovací třídu NUnit.", + "postActions/openInEditor/description": "Otevře vytvořenou třídu testovacího přípravku v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..744753e2f568 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.de.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3-Testelement", + "description": "Erstellt eine neue NUnit-Testklasse", + "postActions/openInEditor/description": "Öffnet die erstellte Testfixture-Klasse im Editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..94aac9c09194 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.en.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Item", + "description": "Creates a new NUnit test class", + "postActions/openInEditor/description": "Opens created test fixture class in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..5fad26e60da0 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.es.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Elemento de prueba de NUnit 3", + "description": "Crea una nueva clase de prueba NUnit", + "postActions/openInEditor/description": "Abrir la clase de accesorio de prueba creada en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..b6c999c4cc5b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov alias halex2005 (codeofclimber.ru)", + "name": "Élément de test NUnit 3", + "description": "Crée une classe de test NUnit.", + "postActions/openInEditor/description": "Ouvre la classe de fixture de test créée dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..938c218e8331 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.it.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Elemento di test NUnit 3", + "description": "Crea una nuova classe di test NUnit", + "postActions/openInEditor/description": "Apre la classe di fixture di test creata nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..3c9a7c6b243c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 テスト項目", + "description": "新しい NUnit テスト クラスを作成します", + "postActions/openInEditor/description": "作成されたテスト フィクスチャ クラスをエディターで開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..4fa392e66d26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 테스트 항목", + "description": "새 NUnit 테스트 클래스를 만듭니다.", + "postActions/openInEditor/description": "편집기에서 만든 테스트 픽스쳐 클래스 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..3afcfe4c5d4d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 — element testowy", + "description": "Tworzy nową klasę testu NUnit", + "postActions/openInEditor/description": "Otwiera utworzoną klasę warunków początkowych w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..0ae34a3a82a8 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov, também conhecido como halex2005 (codeofclimber.ru)", + "name": "Item de Teste NUnit 3", + "description": "Cria uma nova classe de teste NUnit", + "postActions/openInEditor/description": "Abre a classe de acessório de teste criada no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..77a8c283caf6 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,6 @@ +{ + "author": "Алексей Харлов aka halex2005 (codeofclimber.ru)", + "name": "Тестовый элемент NUnit 3", + "description": "Создает тестовый класс NUnit", + "postActions/openInEditor/description": "Открывает созданный класс тестового приспособления в редакторе." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..92f13df6879e --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov, halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Öğesi", + "description": "Yeni bir NUnit test sınıfı oluşturur", + "postActions/openInEditor/description": "Oluşturulan test düzeni sınıfını düzenleyicide açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..1d2b7791893f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 测试项", + "description": "创建新的 NUnit 测试类", + "postActions/openInEditor/description": "在编辑器中打开创建的测试固定例程类" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..588770b41936 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 測試項目", + "description": "建立新的 NUnit 測試類別", + "postActions/openInEditor/description": "在編輯器中開啟建立的測試固件類別" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/template.json new file mode 100644 index 000000000000..f2de209e44d8 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/.template.config/template.json @@ -0,0 +1,91 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "classifications": [ "Test", "NUnit" ], + "name": "NUnit 3 Test Item", + "defaultName": "NUnitTestItem", + "generatorVersions": "[1.0.0.0-*)", + "description": "Creates a new NUnit test class", + "groupIdentity": "NUnit3.DotNetNew.ItemTemplate", + "precedence": "12000", + "identity": "NUnit3.DotNetNew.ItemTemplate.CSharp.9.0", + "shortName": "nunit-test", + "tags": { + "language": "C#", + "type": "item" + }, + "sourceName": "UnitTest1", + "preferNameDirectory": true, + "primaryOutputs": [ + { "path": "UnitTest1.cs" } + ], + "symbols": { + "DefaultNamespace": { + "type": "bind", + "binding": "msbuild:RootNamespace", + "replaces": "Tests" + }, + "ImplicitUsings": { + "type": "bind", + "binding": "msbuild:ImplicitUsings", + "datatype": "string", + "defaultValue": "disable" + }, + "evaluatedLangVersion": { + "type": "bind", + "binding": "msbuild:LangVersion", + "dataType": "string" + }, + "latestLangVersion": { + "type": "generated", + "generator": "constant", + "parameters": { + "value": "latest" + } + }, + "langVersion": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "evaluatedLangVersion", + "fallbackVariableName": "latestLangVersion" + } + }, + "csharp9orOlder": { + "type": "generated", + "generator": "regexMatch", + "datatype": "bool", + "parameters": { + "pattern": "^(ISO-1|ISO-2|[1-7]|[8-9]|[8-9]\\.0|7\\.[0-3])$", + "source": "langVersion" + } + }, + "csharp10orLater": { + "type": "computed", + "value": "!csharp9orOlder" + }, + "csharpFeature_FileScopedNamespaces": { + "type": "computed", + "value": "csharp10orLater == \"true\"" + } + }, + "constraints": { + "csharp-only": { + "type": "project-capability", + "args": "CSharp" + } + }, + "postActions": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens created test fixture class in the editor", + "manualInstructions": [ ], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "0" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/UnitTest1.cs b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/UnitTest1.cs new file mode 100644 index 000000000000..a793ddf49a6a --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-CSharp-Item/UnitTest1.cs @@ -0,0 +1,38 @@ +#if (ImplicitUsings != "enable") +using NUnit.Framework; + +#endif +#if (csharpFeature_FileScopedNamespaces) +namespace Tests; + +public class UnitTest1 +{ + [SetUp] + public void Setup() + { + } + + [Test] + public void Test1() + { + Assert.Pass(); + } +} +#else +namespace Tests +{ + public class UnitTest1 + { + [SetUp] + public void Setup() + { + } + + [Test] + public void Test1() + { + Assert.Pass(); + } + } +} +#endif diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/ide.host.json new file mode 100644 index 000000000000..8c0f3cd51715 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/ide.host.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "itemHierarchyPaths": ["Test"], + "appliesTo": "TestContainer|TestingPlatformServer", + "defaultItemExtension": "fs" +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/ide/icon.ico new file mode 100644 index 000000000000..671271e7595d Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..c5ee95d983c9 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Testovací položka NUnit 3", + "description": "Vytvoří novou testovací třídu NUnit.", + "postActions/openInEditor/description": "Otevře vytvořenou třídu testovacího přípravku v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..744753e2f568 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.de.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3-Testelement", + "description": "Erstellt eine neue NUnit-Testklasse", + "postActions/openInEditor/description": "Öffnet die erstellte Testfixture-Klasse im Editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..94aac9c09194 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.en.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Item", + "description": "Creates a new NUnit test class", + "postActions/openInEditor/description": "Opens created test fixture class in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..5fad26e60da0 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.es.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Elemento de prueba de NUnit 3", + "description": "Crea una nueva clase de prueba NUnit", + "postActions/openInEditor/description": "Abrir la clase de accesorio de prueba creada en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..b6c999c4cc5b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov alias halex2005 (codeofclimber.ru)", + "name": "Élément de test NUnit 3", + "description": "Crée une classe de test NUnit.", + "postActions/openInEditor/description": "Ouvre la classe de fixture de test créée dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..938c218e8331 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.it.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Elemento di test NUnit 3", + "description": "Crea una nuova classe di test NUnit", + "postActions/openInEditor/description": "Apre la classe di fixture di test creata nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..3c9a7c6b243c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 テスト項目", + "description": "新しい NUnit テスト クラスを作成します", + "postActions/openInEditor/description": "作成されたテスト フィクスチャ クラスをエディターで開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..4fa392e66d26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 테스트 항목", + "description": "새 NUnit 테스트 클래스를 만듭니다.", + "postActions/openInEditor/description": "편집기에서 만든 테스트 픽스쳐 클래스 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..3afcfe4c5d4d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 — element testowy", + "description": "Tworzy nową klasę testu NUnit", + "postActions/openInEditor/description": "Otwiera utworzoną klasę warunków początkowych w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..0ae34a3a82a8 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov, também conhecido como halex2005 (codeofclimber.ru)", + "name": "Item de Teste NUnit 3", + "description": "Cria uma nova classe de teste NUnit", + "postActions/openInEditor/description": "Abre a classe de acessório de teste criada no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..77a8c283caf6 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,6 @@ +{ + "author": "Алексей Харлов aka halex2005 (codeofclimber.ru)", + "name": "Тестовый элемент NUnit 3", + "description": "Создает тестовый класс NUnit", + "postActions/openInEditor/description": "Открывает созданный класс тестового приспособления в редакторе." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..92f13df6879e --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov, halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Öğesi", + "description": "Yeni bir NUnit test sınıfı oluşturur", + "postActions/openInEditor/description": "Oluşturulan test düzeni sınıfını düzenleyicide açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..1d2b7791893f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 测试项", + "description": "创建新的 NUnit 测试类", + "postActions/openInEditor/description": "在编辑器中打开创建的测试固定例程类" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..588770b41936 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 測試項目", + "description": "建立新的 NUnit 測試類別", + "postActions/openInEditor/description": "在編輯器中開啟建立的測試固件類別" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/template.json new file mode 100644 index 000000000000..b0c7f91862e9 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/.template.config/template.json @@ -0,0 +1,35 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "classifications": [ "Test", "NUnit" ], + "name": "NUnit 3 Test Item", + "defaultName": "NUnitTestItem", + "generatorVersions": "[1.0.0.0-*)", + "description": "Creates a new NUnit test class", + "groupIdentity": "NUnit3.DotNetNew.ItemTemplate", + "precedence": "12000", + "identity": "NUnit3.DotNetNew.ItemTemplate.FSharp.9.0", + "shortName": "nunit-test", + "tags": { + "language": "F#", + "type": "item" + }, + "sourceName": "UnitTest1", + "preferNameDirectory": true, + "primaryOutputs": [ + { "path": "UnitTest1.fs" } + ], + "postActions": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens created test fixture class in the editor", + "manualInstructions": [ ], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "0" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/UnitTest1.fs b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/UnitTest1.fs new file mode 100644 index 000000000000..46c9a164a3a3 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-FSharp-Item/UnitTest1.fs @@ -0,0 +1,11 @@ +module Tests + +open NUnit.Framework + +[] +let Setup () = + () + +[] +let Test1 () = + Assert.Pass() diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/ide.host.json new file mode 100644 index 000000000000..03f5bc90c87d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/ide.host.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "itemHierarchyPaths": ["Test"], + "appliesTo": "TestContainer|TestingPlatformServer", + "defaultItemExtension": "vb" +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/ide/icon.ico new file mode 100644 index 000000000000..14998ba8c023 Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..c5ee95d983c9 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Testovací položka NUnit 3", + "description": "Vytvoří novou testovací třídu NUnit.", + "postActions/openInEditor/description": "Otevře vytvořenou třídu testovacího přípravku v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..744753e2f568 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.de.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3-Testelement", + "description": "Erstellt eine neue NUnit-Testklasse", + "postActions/openInEditor/description": "Öffnet die erstellte Testfixture-Klasse im Editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..94aac9c09194 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.en.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Item", + "description": "Creates a new NUnit test class", + "postActions/openInEditor/description": "Opens created test fixture class in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..5fad26e60da0 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.es.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Elemento de prueba de NUnit 3", + "description": "Crea una nueva clase de prueba NUnit", + "postActions/openInEditor/description": "Abrir la clase de accesorio de prueba creada en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..b6c999c4cc5b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov alias halex2005 (codeofclimber.ru)", + "name": "Élément de test NUnit 3", + "description": "Crée une classe de test NUnit.", + "postActions/openInEditor/description": "Ouvre la classe de fixture de test créée dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..997b0d40cba1 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.it.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Elemento di test NUnit 3", + "description": "Consente di creare una nuova classe di test NUnit", + "postActions/openInEditor/description": "Apre la classe di fixture di test creata nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..3c9a7c6b243c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 テスト項目", + "description": "新しい NUnit テスト クラスを作成します", + "postActions/openInEditor/description": "作成されたテスト フィクスチャ クラスをエディターで開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..4fa392e66d26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 테스트 항목", + "description": "새 NUnit 테스트 클래스를 만듭니다.", + "postActions/openInEditor/description": "편집기에서 만든 테스트 픽스쳐 클래스 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..3afcfe4c5d4d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 — element testowy", + "description": "Tworzy nową klasę testu NUnit", + "postActions/openInEditor/description": "Otwiera utworzoną klasę warunków początkowych w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..0ae34a3a82a8 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov, também conhecido como halex2005 (codeofclimber.ru)", + "name": "Item de Teste NUnit 3", + "description": "Cria uma nova classe de teste NUnit", + "postActions/openInEditor/description": "Abre a classe de acessório de teste criada no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..77a8c283caf6 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,6 @@ +{ + "author": "Алексей Харлов aka halex2005 (codeofclimber.ru)", + "name": "Тестовый элемент NUnit 3", + "description": "Создает тестовый класс NUnit", + "postActions/openInEditor/description": "Открывает созданный класс тестового приспособления в редакторе." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..92f13df6879e --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov, halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Öğesi", + "description": "Yeni bir NUnit test sınıfı oluşturur", + "postActions/openInEditor/description": "Oluşturulan test düzeni sınıfını düzenleyicide açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..1d2b7791893f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 测试项", + "description": "创建新的 NUnit 测试类", + "postActions/openInEditor/description": "在编辑器中打开创建的测试固定例程类" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..588770b41936 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,6 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 測試項目", + "description": "建立新的 NUnit 測試類別", + "postActions/openInEditor/description": "在編輯器中開啟建立的測試固件類別" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/template.json new file mode 100644 index 000000000000..ce8c24f969b4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/.template.config/template.json @@ -0,0 +1,35 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "classifications": [ "Test", "NUnit" ], + "name": "NUnit 3 Test Item", + "defaultName": "NUnitTestItem", + "generatorVersions": "[1.0.0.0-*)", + "description": "Creates a new NUnit test class", + "groupIdentity": "NUnit3.DotNetNew.ItemTemplate", + "precedence": "12000", + "identity": "NUnit3.DotNetNew.ItemTemplate.VisualBasic.9.0", + "shortName": "nunit-test", + "tags": { + "language": "VB", + "type": "item" + }, + "sourceName": "UnitTest1", + "preferNameDirectory": true, + "primaryOutputs": [ + { "path": "UnitTest1.vb" } + ], + "postActions": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens created test fixture class in the editor", + "manualInstructions": [ ], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "0" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/UnitTest1.vb b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/UnitTest1.vb new file mode 100644 index 000000000000..7608fee915e2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/NUnit-VisualBasic-Item/UnitTest1.vb @@ -0,0 +1,18 @@ +Imports NUnit.Framework + +Namespace Tests + + Public Class UnitTest1 + + + Public Sub Setup() + End Sub + + + Public Sub Test1() + Assert.Pass() + End Sub + + End Class + +End Namespace diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..8cb77b63f5c4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/dotnetcli.host.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + }, + "UseMSTestSdk": { + "shortName": "", + "longName": "sdk" + }, + "TestRunner": { + "shortName": "", + "longName": "test-runner" + }, + "CoverageTool": { + "shortName": "", + "longName": "coverage-tool" + }, + "ExtensionsProfile": { + "shortName": "", + "longName": "extensions-profile" + }, + "Fixture" : { + "shortName": "", + "longName": "fixture" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/ide.host.json new file mode 100644 index 000000000000..bdd89182698f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/ide.host.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "symbolInfo": [ + { + "id": "UseMSTestSdk", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "TestRunner", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "ExtensionsProfile", + "isVisible": true + }, + { + "id": "CoverageTool", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "Fixture", + "isVisible": true + } + ], + "tags": [ + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/ide/icon.ico new file mode 100644 index 000000000000..40382f8898eb Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..90949e4d4a2f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Testovací projekt MSTest", + "description": "Projekt obsahující testy MSTest, který se dá spustit na .NET v systémech Windows, Linux a MacOS.", + "symbols/TargetFrameworkOverride/description": "Přepíše cílovou architekturu.", + "symbols/TargetFrameworkOverride/displayName": "Přepsání cílové architektury", + "symbols/Framework/description": "Cílová architektura pro projekt.", + "symbols/Framework/displayName": "Architektura", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (jenom Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (jenom Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (jenom Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (jenom Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (jenom Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".Net Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.", + "symbols/skipRestore/displayName": "Přeskočit obnovení", + "symbols/langVersion/description": "Nastaví vlastnost LangVersion ve vytvořeném souboru projektu.", + "symbols/langVersion/displayName": "Verze jazyka", + "symbols/UseMSTestSdk/description": "Použijte styl projektu MSTest.Sdk. Další informace najdete na https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Použít MSTest.Sdk", + "symbols/TestRunner/description": "Vyberte spouštěč nebo platformu. Další informace najdete na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Použít MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Použití platformy VSTest", + "symbols/CoverageTool/description": "Nástroj pokrytí, který se má použít pro projekt.", + "symbols/CoverageTool/displayName": "Nástroj pokrytí", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Pokrytí kódu Microsoftu", + "symbols/CoverageTool/choices/coverlet/description": "pokrývka", + "symbols/ExtensionsProfile/description": "Při použití MSTest Runneru vyberte profil rozšíření sady SDK. Další informace najdete na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testování profilu rozšíření", + "symbols/ExtensionsProfile/choices/Default/description": "Výchozí profil rozšíření (doporučeno)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Výchozí", + "symbols/ExtensionsProfile/choices/None/description": "Nejsou povolená žádná rozšíření.", + "symbols/ExtensionsProfile/choices/None/displayName": "Žádné", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Povolit všechna rozšíření odeslaná Microsoftem (včetně rozšíření s omezující licencí)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Vyberte typy testovacích součástí, které se mají zahrnout do projektu.", + "symbols/Fixture/displayName": "Testovací přípravek", + "symbols/Fixture/choices/None/description": "Žádné metody testovacího přípravku", + "symbols/Fixture/choices/None/displayName": "Žádné", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metoda testovacího přípravku AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metoda testovacího přípravku AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metoda testovacího přípravku ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metoda testovacího přípravku ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metoda testovacího přípravku TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metoda testovacího přípravku TestCleanup", + "postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore", + "postActions/openInEditor/description": "Otevře Test1.cs v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..72bd5ba201b7 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest-Testprojekt", + "description": "Ein Projekt, das MSTest-Tests enthält, die auf .NET unter Windows, Linux und macOS ausgeführt werden können.", + "symbols/TargetFrameworkOverride/description": "Überschreibt das Zielframework", + "symbols/TargetFrameworkOverride/displayName": "Zielframeworküberschreibung", + "symbols/Framework/description": "Das Zielframework für das Projekt.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (nur Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (nur Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (nur Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (nur Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (nur Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", + "symbols/skipRestore/displayName": "Wiederherstellung überspringen", + "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/displayName": "Sprachversion", + "symbols/UseMSTestSdk/description": "Verwenden Sie den MSTest.Sdk-Projektstil. Weitere Informationen unter https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk verwenden", + "symbols/TestRunner/description": "Wählen Sie den Runner/die Plattform aus. Weitere Informationen finden Sie unter https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "MSTest Runner verwenden (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest-Plattform verwenden", + "symbols/CoverageTool/description": "Das Abdeckungstool, das für das Projekt verwendet werden soll.", + "symbols/CoverageTool/displayName": "Coverage-Tool", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Wählen Sie das SDK-Erweiterungsprofil aus, wenn Sie MSTest Runner verwenden. Weitere Informationen finden Sie unter https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Erweiterungsprofil wird getestet", + "symbols/ExtensionsProfile/choices/Default/description": "Standarderweiterungsprofil (empfohlen)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Standard", + "symbols/ExtensionsProfile/choices/None/description": "Keine Erweiterungen sind aktiviert", + "symbols/ExtensionsProfile/choices/None/displayName": "Keine", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Alle von Microsoft gelieferten Erweiterungen aktivieren (einschließlich Erweiterungen mit einer restriktiven Lizenz)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Wählen Sie die Fixturearten aus, die in das Projekt eingeschlossen werden sollen.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Keine Fixturemethoden", + "symbols/Fixture/choices/None/displayName": "Keine", + "symbols/Fixture/choices/AssemblyInitialize/description": "Fixturemethode \"AssemblyInitialize\"", + "symbols/Fixture/choices/AssemblyCleanup/description": "Fixierungsmethode \"AssemblyCleanup\"", + "symbols/Fixture/choices/ClassInitialize/description": "Fixturemethode \"ClassInitialize\"", + "symbols/Fixture/choices/ClassCleanup/description": "Fixierungsmethode \"ClassCleanup\"", + "symbols/Fixture/choices/TestInitialize/description": "Fixturemethode \"TestInitialize\"", + "symbols/Fixture/choices/TestCleanup/description": "Fixierungsmethode \"TestCleanup\"", + "postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen", + "postActions/openInEditor/description": "Öffnet Test1.cs im Editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..23438a626050 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Project", + "description": "A project that contains MSTest tests that can run on .NET on Windows, Linux and MacOS.", + "symbols/TargetFrameworkOverride/description": "Overrides the target framework", + "symbols/TargetFrameworkOverride/displayName": "Target framework override", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows only)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows only)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows only)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows only)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows only)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "symbols/skipRestore/displayName": "Skip restore", + "symbols/langVersion/description": "Sets the LangVersion property in the created project file", + "symbols/langVersion/displayName": "Language version", + "symbols/UseMSTestSdk/description": "Use MSTest.Sdk project style. More information at https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Use MSTest.Sdk", + "symbols/TestRunner/description": "Select the runner/platform. More information at https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/MSTest/description": "Use MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest platform", + "symbols/CoverageTool/description": "The coverage tool to use for the project.", + "symbols/CoverageTool/displayName": "Coverage tool", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Select the SDK extensions profile when using MSTest Runner. More information at https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testing extensions profile", + "symbols/ExtensionsProfile/choices/Default/description": "Default extensions profile (recommended)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Default", + "symbols/ExtensionsProfile/choices/None/description": "No extensions are enabled", + "symbols/ExtensionsProfile/choices/None/displayName": "None", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Enable all extensions shipped by Microsoft (including extensions with a restrictive license)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Select the fixture kinds to include in the project.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "No fixture methods", + "symbols/Fixture/choices/None/displayName": "None", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture method", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture method", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture method", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture method", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture method", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture method", + "postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'", + "postActions/openInEditor/description": "Opens Test1.cs in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..1787687b1e97 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Proyecto de prueba de MSTest", + "description": "Proyecto que contiene pruebas de MSTest que se pueden ejecutar en .NET en Windows, Linux y MacOS.", + "symbols/TargetFrameworkOverride/description": "Invalida la plataforma de destino", + "symbols/TargetFrameworkOverride/displayName": "Invalidación de la plataforma de destino", + "symbols/Framework/description": "Marco de destino del proyecto.", + "symbols/Framework/displayName": "Marco", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (solo Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (solo Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (solo Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (solo Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (solo Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "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/langVersion/description": "Establece la propiedad LangVersion en el archivo de proyecto creado.", + "symbols/langVersion/displayName": "Versión de lenguaje", + "symbols/UseMSTestSdk/description": "Use el estilo de proyecto MSTest.Sdk. Más información en https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usar MSTest.Sdk", + "symbols/TestRunner/description": "Seleccione el ejecutor o la plataforma. Más información en https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Ejecutor de pruebas", + "symbols/TestRunner/choices/MSTest/description": "Usar MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Uso de la plataforma VSTest", + "symbols/CoverageTool/description": "Herramienta de cobertura que se va a usar para el proyecto.", + "symbols/CoverageTool/displayName": "Herramienta de cobertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Cobertura de código de Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "cubrecama", + "symbols/ExtensionsProfile/description": "Seleccione el perfil de extensiones del SDK al usar MSTest Runner. Más información en https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Probar perfil de extensiones", + "symbols/ExtensionsProfile/choices/Default/description": "Perfil de extensiones predeterminadas (recomendado)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Valor predeterminado", + "symbols/ExtensionsProfile/choices/None/description": "No hay extensiones habilitadas", + "symbols/ExtensionsProfile/choices/None/displayName": "Ninguno", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Habilitar todas las extensiones enviadas por Microsoft (incluidas las extensiones con una licencia restrictiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Seleccione los tipos de accesorio que desea incluir en el proyecto.", + "symbols/Fixture/displayName": "Accesorio", + "symbols/Fixture/choices/None/description": "No hay métodos de accesorio", + "symbols/Fixture/choices/None/displayName": "Ninguno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método de accesorio AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de accesorio AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de accesorio ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de accesorio ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de accesorio TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de accesorio TestCleanup", + "postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir Test1.cs en el editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..92df5d07b578 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Projet de test MSTest", + "description": "Un projet qui contient des tests MSTest pouvant être exécutés sur .NET sous Windows, Linux et MacOS.", + "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du cadre cible", + "symbols/Framework/description": "Framework cible du projet.", + "symbols/Framework/displayName": "Infrastructure", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows uniquement)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows uniquement)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows uniquement)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows uniquement)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows uniquement)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "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/langVersion/description": "Définit la propriété LangVersion dans le fichier projet créé", + "symbols/langVersion/displayName": "Version du langage", + "symbols/UseMSTestSdk/description": "Utilisez le style de projet MSTest.Sdk. Plus d’informations sur https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Utiliser MSTest.Sdk", + "symbols/TestRunner/description": "Sélectionnez l’exécuteur/la plateforme. Plus d’informations sur https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Utilisez MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Utiliser la plateforme VSTest", + "symbols/CoverageTool/description": "Outil de couverture à utiliser pour le projet.", + "symbols/CoverageTool/displayName": "Outil de couverture", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Couverture du code Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Sélectionnez le profil d’extensions du Kit de développement logiciel (SDK) lors de l’utilisation de l’exécuteur MSTest. Plus d’informations sur https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Test du profil des extensions", + "symbols/ExtensionsProfile/choices/Default/description": "Profil d’extensions par défaut (recommandé)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Par défaut", + "symbols/ExtensionsProfile/choices/None/description": "Aucune extension n’est activée", + "symbols/ExtensionsProfile/choices/None/displayName": "Aucun", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Activez toutes les extensions fournies par Microsoft (y compris les extensions avec une licence restrictive)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Sélectionnez les types de fixtures à inclure dans le projet.", + "symbols/Fixture/displayName": "Appareil", + "symbols/Fixture/choices/None/description": "Aucune méthode de fixture", + "symbols/Fixture/choices/None/displayName": "Aucun", + "symbols/Fixture/choices/AssemblyInitialize/description": "Méthode de fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Méthode de fixture assemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Méthode de fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Méthode de fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Méthode de fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Méthode de fixture TestCleanup", + "postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »", + "postActions/openInEditor/description": "Ouvre Test1.cs dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..0ecc964a2b5b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Progetto di test MSTest", + "description": "Progetto che contiene i test MSTest eseguibili in .NET in Windows, Linux e MacOS.", + "symbols/TargetFrameworkOverride/description": "Ignora il framework di destinazione", + "symbols/TargetFrameworkOverride/displayName": "Sostituisci framework di destinazione", + "symbols/Framework/description": "Il framework di destinazione per il progetto.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (solo Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (solo Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (solo Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (solo Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (solo Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", + "symbols/skipRestore/displayName": "Ignora ripristino", + "symbols/langVersion/description": "Imposta la proprietà LangVersion nel file di progetto creato", + "symbols/langVersion/displayName": "Versione del linguaggio", + "symbols/UseMSTestSdk/description": "Usare lo stile del progetto MSTest.Sdk. Per altre informazioni, vedere https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usa MSTest.Sdk", + "symbols/TestRunner/description": "Selezionare lo strumento di esecuzione/la piattaforma. Per altre informazioni, vedere https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Usa MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Usa la piattaforma VSTest", + "symbols/CoverageTool/description": "Strumento di copertura da usare per il progetto.", + "symbols/CoverageTool/displayName": "Strumento di copertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Selezionare il profilo delle estensioni SDK quando si usa MSTest Runner. Per altre informazioni, vedere https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Test del profilo delle estensioni", + "symbols/ExtensionsProfile/choices/Default/description": "Profilo estensioni predefinito (scelta consigliata)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Impostazione predefinita", + "symbols/ExtensionsProfile/choices/None/description": "Nessuna estensione abilitata", + "symbols/ExtensionsProfile/choices/None/displayName": "Nessuno", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Abilita tutte le estensioni spedite da Microsoft (incluse le estensioni con una licenza restrittiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Selezionare i tipi di fixture da includere nel progetto.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Nessun metodo di fixture", + "symbols/Fixture/choices/None/displayName": "Nessuno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metodo fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metodo fixture AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metodo fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metodo fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metodo fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metodo fixture TestCleanup", + "postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'", + "postActions/openInEditor/description": "Apre Test1.cs nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..a5cd73b9ee1d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest テスト プロジェクト", + "description": "Windows、Linux、MacOS 上の .NET Core で実行できる MSTest テストを含むプロジェクト。", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", + "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", + "symbols/Framework/displayName": "フレームワーク", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows のみ)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows のみ)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows のみ)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows のみ)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows のみ)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", + "symbols/skipRestore/displayName": "復元のスキップ", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/displayName": "言語バージョン", + "symbols/UseMSTestSdk/description": "MSTest.Sdk プロジェクト スタイルを使用します。https://aka.ms/mstest/sdk の詳細情報", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk を使用します", + "symbols/TestRunner/description": "ランナー/プラットフォームを選択します。https://aka.ms/mstest/sdk/extensions-profile の詳細情報", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "MSTest Runner を使用する (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest プラットフォームを使用する", + "symbols/CoverageTool/description": "プロジェクトに使用するカバレッジ ツール。", + "symbols/CoverageTool/displayName": "カバレッジ ツール", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft コード カバレッジ", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "MSTest Runner を使用する場合は、SDK 拡張機能プロファイルを選択します。https://aka.ms/mstest/sdk/extensions-profile の詳細情報", + "symbols/ExtensionsProfile/displayName": "拡張機能プロファイルをテストしています", + "symbols/ExtensionsProfile/choices/Default/description": "既定の拡張機能プロファイル (推奨)", + "symbols/ExtensionsProfile/choices/Default/displayName": "既定値", + "symbols/ExtensionsProfile/choices/None/description": "有効になっている拡張機能がありません", + "symbols/ExtensionsProfile/choices/None/displayName": "なし", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft が出荷するすべての拡張機能を有効にする (制限付きライセンスを持つ拡張機能を含む)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "プロジェクトに含めるフィクスチャの種類を選択します。", + "symbols/Fixture/displayName": "フィクスチャ", + "symbols/Fixture/choices/None/description": "フィクスチャ メソッドがありません", + "symbols/Fixture/choices/None/displayName": "なし", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup フィクスチャ メソッド", + "postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する", + "postActions/openInEditor/description": "エディターで Test1.cs を開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..0a04a4673531 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest 테스트 프로젝트", + "description": "Windows, Linux 및 macOS의 .NET에서 실행할 수 있는 MSTest 테스트가 포함된 프로젝트", + "symbols/TargetFrameworkOverride/description": "대상 프레임워크를 재정의합니다.", + "symbols/TargetFrameworkOverride/displayName": "대상 프레임워크 재정의", + "symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.", + "symbols/Framework/displayName": "프레임워크", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10(Windows만 해당)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9(Windows만 해당)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8(Windows만 해당)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7(Windows만 해당)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6(Windows만 해당)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", + "symbols/skipRestore/displayName": "복원 건너뛰기", + "symbols/langVersion/description": "만든 프로젝트 파일에 LangVersion 속성을 설정합니다", + "symbols/langVersion/displayName": "언어 버전", + "symbols/UseMSTestSdk/description": "MSTest.Sdk 프로젝트 스타일을 사용합니다. 자세한 내용은 https://aka.ms/mstest/sdk를 확인하세요.", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk 사용", + "symbols/TestRunner/description": "실행기/플랫폼을 선택합니다. 자세한 내용은 https://aka.ms/mstest/sdk/extensions-profile을 확인하세요.", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "MSTest 실행기 사용(Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest 플랫폼 사용", + "symbols/CoverageTool/description": "프로젝트에 사용할 검사 도구입니다.", + "symbols/CoverageTool/displayName": "적용 범위 도구", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 코드 검사", + "symbols/CoverageTool/choices/coverlet/description": "침대보", + "symbols/ExtensionsProfile/description": "MSTest 실행기를 사용할 때 SDK 확장 프로필을 선택합니다. 자세한 내용은 https://aka.ms/mstest/sdk/extensions-profile을 확인하세요.", + "symbols/ExtensionsProfile/displayName": "확장 프로필 테스트 중", + "symbols/ExtensionsProfile/choices/Default/description": "기본 확장 프로필(권장)", + "symbols/ExtensionsProfile/choices/Default/displayName": "기본값", + "symbols/ExtensionsProfile/choices/None/description": "사용하도록 설정된 확장이 없습니다.", + "symbols/ExtensionsProfile/choices/None/displayName": "없음", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft에서 제공하는 모든 확장 사용(제한 라이선스가 있는 확장 포함)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "프로젝트에 포함할 픽스쳐 종류를 선택합니다.", + "symbols/Fixture/displayName": "픽스쳐", + "symbols/Fixture/choices/None/description": "픽스쳐 메서드 없음", + "symbols/Fixture/choices/None/displayName": "없음", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture 메서드", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture 메서드", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture 메서드", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture 메서드", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture 메서드", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture 메서드", + "postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행", + "postActions/openInEditor/description": "편집기에서 Test1.cs 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..c9fdc148bd48 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest — projekt testowy", + "description": "Projekt zawierający testy MSTest, które mogą być uruchamiane na platformie .NET w systemach Windows, Linux i MacOS.", + "symbols/TargetFrameworkOverride/description": "Zastępuje platformę docelową", + "symbols/TargetFrameworkOverride/displayName": "Odrzucenie platformy docelowej", + "symbols/Framework/description": "Platforma docelowa dla tego projektu.", + "symbols/Framework/displayName": "Platforma", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (tylko system Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (tylko system Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (tylko system Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (tylko system Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (tylko system Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": "Platforma .NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", + "symbols/skipRestore/displayName": "Pomiń przywracanie", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/displayName": "Wersja języka", + "symbols/UseMSTestSdk/description": "Użyj stylu projektu MSTest.Sdk. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Korzystaj z narzędzia MSTest.Sdk", + "symbols/TestRunner/description": "Wybierz moduł uruchamiający/platformę. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Moduł uruchamiający", + "symbols/TestRunner/choices/MSTest/description": "Korzystanie z modułu uruchamiającego MSTest (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Korzystanie z platformy VSTest", + "symbols/CoverageTool/description": "Narzędzie pokrycia do użycia w projekcie.", + "symbols/CoverageTool/displayName": "Narzędzie pokrycia", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Pokrycie kodu firmy Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Wybierz profil rozszerzeń zestawu SDK podczas korzystania z modułu uruchamiającego MSTest. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testowanie profilu rozszerzeń", + "symbols/ExtensionsProfile/choices/Default/description": "Domyślny profil rozszerzeń (rekomendowane)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Wartość domyślna", + "symbols/ExtensionsProfile/choices/None/description": "Nie włączono rozszerzeń", + "symbols/ExtensionsProfile/choices/None/displayName": "Brak", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Włącz wszystkie rozszerzenia dostarczane przez firmę Microsoft (w tym rozszerzenia z restrykcyjną licencją)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Wybierz rodzaje warunków początkowych do uwzględnienia w projekcie.", + "symbols/Fixture/displayName": "Warunki początkowe", + "symbols/Fixture/choices/None/description": "Brak metod początkowych", + "symbols/Fixture/choices/None/displayName": "Brak", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize — metoda początkowa", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup — metoda początkowa", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize — metoda początkowa", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup — metoda początkowa", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize — metoda początkowa", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup — metoda początkowa", + "postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”", + "postActions/openInEditor/description": "Otwiera plik Test1.cs w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..292ace6ccbdd --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Projeto de Teste MSTest", + "description": "Um projeto que contém testes do MSTest que podem ser executados no .NET no Windows, Linux e MacOS.", + "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/displayName": "Estrutura", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (somente Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (somente Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (somente Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (somente Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (somente Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", + "symbols/skipRestore/displayName": "Ignorar restauração", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/displayName": "Versão do idioma", + "symbols/UseMSTestSdk/description": "Use o estilo de projeto MSTest.Sdk. Mais informações em https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usar MSTest.Sdk", + "symbols/TestRunner/description": "Selecione o executor/plataforma. Mais informações em https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Executor de teste", + "symbols/TestRunner/choices/MSTest/description": "Usar o MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Usar a plataforma VSTest", + "symbols/CoverageTool/description": "A ferramenta de cobertura a ser usada para o projeto.", + "symbols/CoverageTool/displayName": "Ferramenta Cobertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Cobertura de Código da Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Selecione o perfil de extensões do SDK ao usar o Executor do MSTest. Mais informações em https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testando o perfil de extensões", + "symbols/ExtensionsProfile/choices/Default/description": "Perfil de extensões padrão (recomendado)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Padrão", + "symbols/ExtensionsProfile/choices/None/description": "Nenhuma extensão está habilitada", + "symbols/ExtensionsProfile/choices/None/displayName": "Nenhum", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Habilitar todas as extensões enviadas pela Microsoft (incluindo extensões com uma licença restritiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Selecione os tipos de acessório a serem incluídos no projeto.", + "symbols/Fixture/displayName": "Acessório", + "symbols/Fixture/choices/None/description": "Nenhum método de acessório", + "symbols/Fixture/choices/None/displayName": "Nenhum", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método acessório AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de acessório AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de acessório ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de acessório ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de acessório TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de acessório TestCleanup", + "postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"", + "postActions/openInEditor/description": "Abre o Test1.cs no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..928e28705747 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,61 @@ +{ + "author": "Майкрософт", + "name": "Тестовый проект MSTest", + "description": "Проект, содержащий тесты MSTest, которые могут работать на .NET в Windows, Linux и MacOS.", + "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", + "symbols/TargetFrameworkOverride/displayName": "Переопределение целевой платформы", + "symbols/Framework/description": "Целевая платформа для проекта.", + "symbols/Framework/displayName": "Платформа", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (только для Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (только для Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (только для Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (только для Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (только для Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Позволяет пропускать автоматическое восстановление проекта при создании.", + "symbols/skipRestore/displayName": "Пропустить восстановление", + "symbols/langVersion/description": "Задает свойство LangVersion в создаваемом файле проекта.", + "symbols/langVersion/displayName": "Версия языка", + "symbols/UseMSTestSdk/description": "Используйте стиль проекта MSTest.Sdk. Дополнительные сведения на https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Использовать MSTest.Sdk", + "symbols/TestRunner/description": "Выберите средство выполнения тестов или платформу. Дополнительные сведения на https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Средство выполнения тестов", + "symbols/TestRunner/choices/MSTest/description": "Используйте MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Используйте платформу VSTest", + "symbols/CoverageTool/description": "Инструмент покрытия, который следует использовать для проекта.", + "symbols/CoverageTool/displayName": "Средство оценки объема протестированного кода", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Покрытие кода (Майкрософт)", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Выберите профиль расширений SDK при использовании MSTest Runner. Дополнительные сведения на https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Проверка профиля расширений", + "symbols/ExtensionsProfile/choices/Default/description": "Профиль расширений по умолчанию (рекомендуется)", + "symbols/ExtensionsProfile/choices/Default/displayName": "По умолчанию", + "symbols/ExtensionsProfile/choices/None/description": "Расширения не включены.", + "symbols/ExtensionsProfile/choices/None/displayName": "Отсутствует", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Включить все расширения, поставляемые Майкрософт (включая расширения с ограничительной лицензией)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Выберите типы средств, которые необходимо включить в проект.", + "symbols/Fixture/displayName": "Средство", + "symbols/Fixture/choices/None/description": "Нет методов работы со средствами", + "symbols/Fixture/choices/None/displayName": "Отсутствует", + "symbols/Fixture/choices/AssemblyInitialize/description": "Метод работы со средствами AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Метод работы со средствами AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Метод работы со средствами ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Метод работы со средствами ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Метод работы со средствами TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Метод работы со средствами TestCleanup", + "postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", + "postActions/openInEditor/description": "Открывает Test1.cs редакторе" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..d0ca2ca4c465 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Projesi", + "description": "Windows, Linux ve macOS üzerinde .NET'te çalışabilen MSTest testlerini içeren bir proje.", + "symbols/TargetFrameworkOverride/description": "Hedef çerçeveyi geçersiz kılar", + "symbols/TargetFrameworkOverride/displayName": "Hedef çerçeveyi geçersiz kılma", + "symbols/Framework/description": "Projenin hedef çerçevesi.", + "symbols/Framework/displayName": "Çerçeve", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (yalnızca Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (yalnızca Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (yalnızca Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (yalnızca Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (yalnızca Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/displayName": "Geri yüklemeyi atla", + "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", + "symbols/langVersion/displayName": "Dil sürümü", + "symbols/UseMSTestSdk/description": "MSTest.Sdk proje stilini kullanın.. Daha fazla bilgi: https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk kullan", + "symbols/TestRunner/description": "Çalıştırıcıyı/platformu seçin. Daha fazla bilgi: https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test çalıştırıcı", + "symbols/TestRunner/choices/MSTest/description": "MSTest Çalıştırıcısı'nı kullan (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest platformunu kullan", + "symbols/CoverageTool/description": "Projede kullanılacak kapsam aracı.", + "symbols/CoverageTool/displayName": "Kapsam aracı", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Kod Kapsamı", + "symbols/CoverageTool/choices/coverlet/description": "kapakçık", + "symbols/ExtensionsProfile/description": "MSTest Çalıştırıcısı kullanılırken SDK uzantıları profilini seçin. Daha fazla bilgi: https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Uzantılar profili test ediliyor", + "symbols/ExtensionsProfile/choices/Default/description": "Varsayılan uzantılar profili (önerilen)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Varsayılan", + "symbols/ExtensionsProfile/choices/None/description": "Uzantı etkinleştirilmedi", + "symbols/ExtensionsProfile/choices/None/displayName": "Hiçbiri", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft'un gönderdiği tüm uzantıları etkinleştir (kısıtlayıcı lisansı olan uzantılar dahil)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Projeye dahil edilecek düzen türlerini seçin.", + "symbols/Fixture/displayName": "Düzen", + "symbols/Fixture/choices/None/description": "Düzen yöntemi yok", + "symbols/Fixture/choices/None/displayName": "Hiçbiri", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize düzen yöntemi", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup düzen yöntemi", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize düzen yöntemi", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup düzen yöntemi", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize düzen yöntemi", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup düzen yöntemi", + "postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır", + "postActions/openInEditor/description": "Test1.cs'yi düzenleyicide açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..0699b04ab637 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest 测试项目", + "description": "一个包含 MSTest 测试的项目,这些测试可在 Windows、Linux 和 MacOS 的 .NET 上运行。", + "symbols/TargetFrameworkOverride/description": "替代目标框架", + "symbols/TargetFrameworkOverride/displayName": "目标框架替代", + "symbols/Framework/description": "项目的目标框架。", + "symbols/Framework/displayName": "框架", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (仅限 Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (仅限 Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (仅限 Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (仅限 Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (仅限 Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", + "symbols/skipRestore/displayName": "跳过还原", + "symbols/langVersion/description": "在创建的项目文件中设置 LangVersion 属性", + "symbols/langVersion/displayName": "语言版本", + "symbols/UseMSTestSdk/description": "使用 MSTest.Sdk 项目样式。有关详细信息,请访问 https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "使用 MSTest.Sdk", + "symbols/TestRunner/description": "选择运行器/平台。有关详细信息,请访问 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "使用 MSTest 运行器(Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "使用 VSTest 平台", + "symbols/CoverageTool/description": "要用于项目的覆盖率工具。", + "symbols/CoverageTool/displayName": "覆盖工具", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 代码覆盖率", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "使用 MSTest 运行器时选择 SDK 扩展配置文件。有关详细信息,请访问 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "测试扩展配置文件", + "symbols/ExtensionsProfile/choices/Default/description": "默认扩展配置文件(推荐)", + "symbols/ExtensionsProfile/choices/Default/displayName": "默认", + "symbols/ExtensionsProfile/choices/None/description": "未启用任何扩展", + "symbols/ExtensionsProfile/choices/None/displayName": "无", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "启用 Microsoft 提供的所有扩展(包括具有限制性许可证的扩展)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "选择要包含在项目中的固定例程类型。", + "symbols/Fixture/displayName": "固定例程", + "symbols/Fixture/choices/None/description": "无固定例程方法", + "symbols/Fixture/choices/None/displayName": "无", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固定例程方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固定例程方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固定例程方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固定例程方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固定例程方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固定例程方法", + "postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"", + "postActions/openInEditor/description": "在编辑器中打开 Test1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..55a1df310c93 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest 測試專案", + "description": "包含可以在 Windows、Linux 和 MacOS 版的 .NET 上執行的 MSTest 測試的專案。", + "symbols/TargetFrameworkOverride/description": "覆寫目標 Framework", + "symbols/TargetFrameworkOverride/displayName": "目標架構覆寫", + "symbols/Framework/description": "專案的目標 Framework。", + "symbols/Framework/displayName": "架構", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (僅限 Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (僅限 Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (僅限 Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (僅限 Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (僅限 Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "如果指定,則會在建立時跳過專案的自動還原。", + "symbols/skipRestore/displayName": "跳過還原", + "symbols/langVersion/description": "設定建立的專案檔中的 LangVersion 屬性", + "symbols/langVersion/displayName": "語言版本", + "symbols/UseMSTestSdk/description": "使用 MSTest.Sdk 專案樣式。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "使用 MSTest.Sdk", + "symbols/TestRunner/description": "選取執行器/平台。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "測試執行器", + "symbols/TestRunner/choices/MSTest/description": "使用 MSTest 執行器 (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "使用 VSTest 平台", + "symbols/CoverageTool/description": "要用於專案的涵蓋範圍工具。", + "symbols/CoverageTool/displayName": "涵蓋範圍工具", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 程式碼涵蓋範圍", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "選取使用 MSTest 執行器時的 SDK 延伸模組設定檔。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "正在測試擴充功能設定檔", + "symbols/ExtensionsProfile/choices/Default/description": "預設延伸模組設定檔 (建議)", + "symbols/ExtensionsProfile/choices/Default/displayName": "預設", + "symbols/ExtensionsProfile/choices/None/description": "未啟用任何延伸模組", + "symbols/ExtensionsProfile/choices/None/displayName": "無", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "啟用由 Microsoft 提供的所有延伸模組 (包括具有有限制授權的延伸模組)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "選取要併入專案中的固件類型。", + "symbols/Fixture/displayName": "固件", + "symbols/Fixture/choices/None/description": "沒有固件方法", + "symbols/Fixture/choices/None/displayName": "無", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固件方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固件方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固件方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固件方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固件方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固件方法", + "postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'", + "postActions/openInEditor/description": "在編輯器中開啟 Test1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/template.json new file mode 100644 index 000000000000..d63ecec5fc45 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/template.json @@ -0,0 +1,266 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Test", "MSTest", "Desktop", "Web"], + "name": "MSTest Test Project", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project that contains MSTest tests that can run on .NET on Windows, Linux and MacOS.", + "groupIdentity": "Microsoft.Test.MSTest", + "precedence": "12000", + "identity": "Microsoft.Test.MSTest.CSharp.10.0", + "shortName": "mstest", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "Company.TestProject1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "displayName": "Target framework override", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "displayName": "Framework", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": ".NET 10" + }, + { + "choice": "net10.0-windows", + "description": ".NET 10 (Windows only)" + }, + { + "choice": "net9.0", + "description": ".NET 9" + }, + { + "choice": "net9.0-windows", + "description": ".NET 9 (Windows only)" + }, + { + "choice": "net8.0", + "description": ".NET 8" + }, + { + "choice": "net8.0-windows", + "description": ".NET 8 (Windows only)" + }, + { + "choice": "net7.0", + "description": ".NET 7" + }, + { + "choice": "net7.0-windows", + "description": ".NET 7 (Windows only)" + }, + { + "choice": "net6.0", + "description": ".NET 6" + }, + { + "choice": "net6.0-windows", + "description": ".NET 6 (Windows only)" + }, + { + "choice": "netcoreapp3.1", + "description": ".NET Core 3.1" + }, + { + "choice": "net481", + "description": ".NET Framework 4.8.1" + }, + { + "choice": "net48", + "description": ".NET Framework 4.8" + }, + { + "choice": "net472", + "description": ".NET Framework 4.7.2" + }, + { + "choice": "net471", + "description": ".NET Framework 4.7.1" + }, + { + "choice": "net47", + "description": ".NET Framework 4.7" + }, + { + "choice": "net462", + "description": ".NET Framework 4.6.2" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "HostIdentifier": { + "type": "bind", + "binding": "host:HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "displayName": "Skip restore", + "defaultValue": "false" + }, + "langVersion": { + "type": "parameter", + "datatype": "text", + "description": "Sets the LangVersion property in the created project file", + "defaultValue": "latest", + "replaces": "$(ProjectLanguageVersion)", + "displayName": "Language version" + }, + "UseMSTestSdk": { + "type": "parameter", + "datatype": "bool", + "description": "Use MSTest.Sdk project style. More information at https://aka.ms/mstest/sdk", + "displayName": "Use MSTest.Sdk", + "defaultValue": "False" + }, + "TestRunner": { + "type": "parameter", + "datatype": "choice", + "enableQuotelessLiterals": true, + "description": "Select the runner/platform. More information at https://aka.ms/mstest/sdk/extensions-profile", + "displayName": "Test runner", + "defaultValue": "VSTest", + "choices": [ + { + "choice": "MSTest", + "description": "Use MSTest Runner (Microsoft.Testing.Platform)" + }, + { + "choice": "VSTest", + "description": "Use VSTest platform" + } + ] + }, + "CoverageTool": { + "type": "parameter", + "datatype": "choice", + "description": "The coverage tool to use for the project.", + "displayName": "Coverage tool", + "defaultValue": "Microsoft.CodeCoverage", + "choices": [ + { + "choice": "Microsoft.CodeCoverage", + "description": "Microsoft Code Coverage" + }, + { + "choice": "coverlet", + "description": "coverlet" + } + ] + }, + "ExtensionsProfile": { + "type": "parameter", + "datatype": "choice", + "description": "Select the SDK extensions profile when using MSTest Runner. More information at https://aka.ms/mstest/sdk/extensions-profile", + "displayName": "Testing extensions profile", + "isEnabled": "UseMSTestSdk && (TestRunner == MSTest)", + "defaultValue": "Default", + "replaces": "$(ExtensionsProfile)", + "choices": [ + { + "choice": "Default", + "description": "Default extensions profile (recommended)", + "displayName": "Default" + }, + { + "choice": "None", + "description": "No extensions are enabled", + "displayName": "None" + }, + { + "choice": "AllMicrosoft", + "description": "Enable all extensions shipped by Microsoft (including extensions with a restrictive license)", + "displayName": "AllMicrosoft" + } + ] + }, + "Fixture": { + "type": "parameter", + "datatype": "choice", + "description": "Select the fixture kinds to include in the project.", + "displayName": "Fixture", + "allowMultipleValues": true, + "enableQuotelessLiterals": true, + "defaultValue": "None", + "choices": [ + { + "choice": "None", + "description": "No fixture methods", + "displayName": "None" + }, + { + "choice": "AssemblyInitialize", + "description": "AssemblyInitialize fixture method" + }, + { + "choice": "AssemblyCleanup", + "description": "AssemblyCleanup fixture method" + }, + { + "choice": "ClassInitialize", + "description": "ClassInitialize fixture method" + }, + { + "choice": "ClassCleanup", + "description": "ClassCleanup fixture method" + }, + { + "choice": "TestInitialize", + "description": "TestInitialize fixture method" + }, + { + "choice": "TestCleanup", + "description": "TestCleanup fixture method" + } + ] + } + }, + "primaryOutputs": [ + { "path": "Company.TestProject1.csproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "MSTestSettings.cs" + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "Test1.cs" + } + ], + "defaultName": "TestProject1", + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "id": "restoreNugetPackages", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Test1.cs in the editor", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/Company.TestProject1.csproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/Company.TestProject1.csproj new file mode 100644 index 000000000000..b946e74e8821 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/Company.TestProject1.csproj @@ -0,0 +1,72 @@ + + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + enable + enable + + true + + + + + + + + + + true + $(ExtensionsProfile) + + + + + + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + enable + enable + + true + Exe + true + + true + + + + + + + + + + + + + + + + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/MSTestSettings.cs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/MSTestSettings.cs new file mode 100644 index 000000000000..aaf278c844f0 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/MSTestSettings.cs @@ -0,0 +1 @@ +[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)] diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/Test1.cs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/Test1.cs new file mode 100644 index 000000000000..9224c7fa9a7a --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/Test1.cs @@ -0,0 +1,58 @@ +namespace Company.TestProject1; + +[TestClass] +public sealed class Test1 +{ +#if (Fixture == AssemblyInitialize) + [AssemblyInitialize] + public static void AssemblyInit(TestContext context) + { + // This method is called once for the test assembly, before any tests are run. + } + +#endif +#if (Fixture == AssemblyCleanup) + [AssemblyCleanup] + public static void AssemblyCleanup() + { + // This method is called once for the test assembly, after all tests are run. + } + +#endif +#if (Fixture == ClassInitialize) + [ClassInitialize] + public static void ClassInit(TestContext context) + { + // This method is called once for the test class, before any tests of the class are run. + } + +#endif +#if (Fixture == ClassCleanup) + [ClassCleanup] + public static void ClassCleanup() + { + // This method is called once for the test class, after all tests of the class are run. + } + +#endif +#if (Fixture == TestInitialize) + [TestInitialize] + public void TestInit() + { + // This method is called before each test method. + } + +#endif +#if (Fixture == TestCleanup) + [TestCleanup] + public void TestCleanup() + { + // This method is called after each test method. + } + +#endif + [TestMethod] + public void TestMethod1() + { + } +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..8cb77b63f5c4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/dotnetcli.host.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + }, + "UseMSTestSdk": { + "shortName": "", + "longName": "sdk" + }, + "TestRunner": { + "shortName": "", + "longName": "test-runner" + }, + "CoverageTool": { + "shortName": "", + "longName": "coverage-tool" + }, + "ExtensionsProfile": { + "shortName": "", + "longName": "extensions-profile" + }, + "Fixture" : { + "shortName": "", + "longName": "fixture" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/ide.host.json new file mode 100644 index 000000000000..bdd89182698f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/ide.host.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "symbolInfo": [ + { + "id": "UseMSTestSdk", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "TestRunner", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "ExtensionsProfile", + "isVisible": true + }, + { + "id": "CoverageTool", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "Fixture", + "isVisible": true + } + ], + "tags": [ + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/ide/icon.ico new file mode 100644 index 000000000000..671271e7595d Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..0a7e1c4ce3b6 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Testovací projekt MSTest", + "description": "Projekt obsahující testy MSTest, který se dá spustit na .NET v systémech Windows, Linux a MacOS.", + "symbols/TargetFrameworkOverride/description": "Přepíše cílovou architekturu.", + "symbols/TargetFrameworkOverride/displayName": "Přepsání cílové architektury", + "symbols/Framework/description": "Cílová architektura pro projekt.", + "symbols/Framework/displayName": "Architektura", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (jenom Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (jenom Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (jenom Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (jenom Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (jenom Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".Net Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.", + "symbols/skipRestore/displayName": "Přeskočit obnovení", + "symbols/langVersion/description": "Nastaví vlastnost LangVersion ve vytvořeném souboru projektu.", + "symbols/langVersion/displayName": "Verze jazyka", + "symbols/UseMSTestSdk/description": "Použijte styl projektu MSTest.Sdk. Další informace najdete na https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Použít MSTest.Sdk", + "symbols/TestRunner/description": "Vyberte spouštěč nebo platformu. Další informace najdete na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Použít MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Použití platformy VSTest", + "symbols/CoverageTool/description": "Nástroj pokrytí, který se má použít pro projekt.", + "symbols/CoverageTool/displayName": "Nástroj pokrytí", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Pokrytí kódu Microsoftu", + "symbols/CoverageTool/choices/coverlet/description": "pokrývka", + "symbols/ExtensionsProfile/description": "Při použití MSTest Runneru vyberte profil rozšíření sady SDK. Další informace najdete na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testování profilu rozšíření", + "symbols/ExtensionsProfile/choices/Default/description": "Výchozí profil rozšíření (doporučeno)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Výchozí", + "symbols/ExtensionsProfile/choices/None/description": "Nejsou povolená žádná rozšíření.", + "symbols/ExtensionsProfile/choices/None/displayName": "Žádné", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Povolit všechna rozšíření odeslaná Microsoftem (včetně rozšíření s omezující licencí)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Vyberte typy testovacích součástí, které se mají zahrnout do projektu.", + "symbols/Fixture/displayName": "Testovací přípravek", + "symbols/Fixture/choices/None/description": "Žádné metody testovacího přípravku", + "symbols/Fixture/choices/None/displayName": "Žádné", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metoda testovacího přípravku AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metoda testovacího přípravku AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metoda testovacího přípravku ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metoda testovacího přípravku ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metoda testovacího přípravku TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metoda testovacího přípravku TestCleanup", + "postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore", + "postActions/openInEditor/description": "Otevře Test1.fs v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..e7b25fccb442 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest-Testprojekt", + "description": "Ein Projekt, das MSTest-Tests enthält, die auf .NET unter Windows, Linux und macOS ausgeführt werden können.", + "symbols/TargetFrameworkOverride/description": "Überschreibt das Zielframework", + "symbols/TargetFrameworkOverride/displayName": "Überschreibung des Zielframeworks", + "symbols/Framework/description": "Das Zielframework für das Projekt.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (nur Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (nur Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (nur Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (nur Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (nur Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", + "symbols/skipRestore/displayName": "Wiederherstellung überspringen", + "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/displayName": "Sprachversion", + "symbols/UseMSTestSdk/description": "Verwenden Sie den MSTest.Sdk-Projektstil. Weitere Informationen unter https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk verwenden", + "symbols/TestRunner/description": "Wählen Sie den Runner/die Plattform aus. Weitere Informationen finden Sie unter https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "MSTest Runner verwenden (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest-Plattform verwenden", + "symbols/CoverageTool/description": "Das Abdeckungstool, das für das Projekt verwendet werden soll.", + "symbols/CoverageTool/displayName": "Coverage-Tool", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Wählen Sie das SDK-Erweiterungsprofil aus, wenn Sie MSTest Runner verwenden. Weitere Informationen finden Sie unter https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Erweiterungsprofil wird getestet", + "symbols/ExtensionsProfile/choices/Default/description": "Standarderweiterungsprofil (empfohlen)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Standard", + "symbols/ExtensionsProfile/choices/None/description": "Keine Erweiterungen sind aktiviert", + "symbols/ExtensionsProfile/choices/None/displayName": "Keine", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Alle von Microsoft gelieferten Erweiterungen aktivieren (einschließlich Erweiterungen mit einer restriktiven Lizenz)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Wählen Sie die Fixturearten aus, die in das Projekt eingeschlossen werden sollen.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Keine Fixturemethoden", + "symbols/Fixture/choices/None/displayName": "Keine", + "symbols/Fixture/choices/AssemblyInitialize/description": "Fixturemethode \"AssemblyInitialize\"", + "symbols/Fixture/choices/AssemblyCleanup/description": "Fixierungsmethode \"AssemblyCleanup\"", + "symbols/Fixture/choices/ClassInitialize/description": "Fixturemethode \"ClassInitialize\"", + "symbols/Fixture/choices/ClassCleanup/description": "Fixierungsmethode \"ClassCleanup\"", + "symbols/Fixture/choices/TestInitialize/description": "Fixturemethode \"TestInitialize\"", + "symbols/Fixture/choices/TestCleanup/description": "Fixierungsmethode \"TestCleanup\"", + "postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen", + "postActions/openInEditor/description": "Öffnet Test1.fs im Editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..ec3cf1bec85e --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Project", + "description": "A project that contains MSTest tests that can run on .NET on Windows, Linux and MacOS.", + "symbols/TargetFrameworkOverride/description": "Overrides the target framework", + "symbols/TargetFrameworkOverride/displayName": "Target framework override", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows only)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows only)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows only)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows only)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows only)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "symbols/skipRestore/displayName": "Skip restore", + "symbols/langVersion/description": "Sets the LangVersion property in the created project file", + "symbols/langVersion/displayName": "Language version", + "symbols/UseMSTestSdk/description": "Use MSTest.Sdk project style. More information at https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Use MSTest.Sdk", + "symbols/TestRunner/description": "Select the runner/platform. More information at https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/MSTest/description": "Use MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest platform", + "symbols/CoverageTool/description": "The coverage tool to use for the project.", + "symbols/CoverageTool/displayName": "Coverage tool", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Select the SDK extensions profile when using MSTest Runner. More information at https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testing extensions profile", + "symbols/ExtensionsProfile/choices/Default/description": "Default extensions profile (recommended)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Default", + "symbols/ExtensionsProfile/choices/None/description": "No extensions are enabled", + "symbols/ExtensionsProfile/choices/None/displayName": "None", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Enable all extensions shipped by Microsoft (including extensions with a restrictive license)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Select the fixture kinds to include in the project.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "No fixture methods", + "symbols/Fixture/choices/None/displayName": "None", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture method", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture method", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture method", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture method", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture method", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture method", + "postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'", + "postActions/openInEditor/description": "Opens Test1.fs in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..85a050607356 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Proyecto de prueba de MSTest", + "description": "Proyecto que contiene pruebas de MSTest que se pueden ejecutar en .NET en Windows, Linux y MacOS.", + "symbols/TargetFrameworkOverride/description": "Invalida la plataforma de destino", + "symbols/TargetFrameworkOverride/displayName": "Invalidación de la plataforma de destino", + "symbols/Framework/description": "Marco de destino del proyecto.", + "symbols/Framework/displayName": "Marco", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (solo Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (solo Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (solo Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (solo Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (solo Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "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/langVersion/description": "Establece la propiedad LangVersion en el archivo de proyecto creado.", + "symbols/langVersion/displayName": "Versión de lenguaje", + "symbols/UseMSTestSdk/description": "Use el estilo de proyecto MSTest.Sdk. Más información en https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usar MSTest.Sdk", + "symbols/TestRunner/description": "Seleccione el ejecutor o la plataforma. Más información en https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Ejecutor de pruebas", + "symbols/TestRunner/choices/MSTest/description": "Usar MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Uso de la plataforma VSTest", + "symbols/CoverageTool/description": "Herramienta de cobertura que se va a usar para el proyecto.", + "symbols/CoverageTool/displayName": "Herramienta de cobertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Cobertura de código de Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "cubrecama", + "symbols/ExtensionsProfile/description": "Seleccione el perfil de extensiones del SDK al usar MSTest Runner. Más información en https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Probar perfil de extensiones", + "symbols/ExtensionsProfile/choices/Default/description": "Perfil de extensiones predeterminadas (recomendado)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Valor predeterminado", + "symbols/ExtensionsProfile/choices/None/description": "No hay extensiones habilitadas", + "symbols/ExtensionsProfile/choices/None/displayName": "Ninguno", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Habilitar todas las extensiones enviadas por Microsoft (incluidas las extensiones con una licencia restrictiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Seleccione los tipos de accesorio que desea incluir en el proyecto.", + "symbols/Fixture/displayName": "Accesorio", + "symbols/Fixture/choices/None/description": "No hay métodos de accesorio", + "symbols/Fixture/choices/None/displayName": "Ninguno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método de accesorio AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de accesorio AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de accesorio ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de accesorio ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de accesorio TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de accesorio TestCleanup", + "postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir Test1.fs en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..4a34be376d5c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Projet de test MSTest", + "description": "Un projet qui contient des tests MSTest pouvant être exécutés sur .NET sous Windows, Linux et MacOS.", + "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du cadre cible", + "symbols/Framework/description": "Framework cible du projet.", + "symbols/Framework/displayName": "Infrastructure", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows uniquement)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows uniquement)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows uniquement)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows uniquement)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows uniquement)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "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/langVersion/description": "Définit la propriété LangVersion dans le fichier projet créé", + "symbols/langVersion/displayName": "Version du langage", + "symbols/UseMSTestSdk/description": "Utilisez le style de projet MSTest.Sdk. Plus d’informations sur https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Utiliser MSTest.Sdk", + "symbols/TestRunner/description": "Sélectionnez l’exécuteur/la plateforme. Plus d’informations sur https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Utilisez MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Utiliser la plateforme VSTest", + "symbols/CoverageTool/description": "Outil de couverture à utiliser pour le projet.", + "symbols/CoverageTool/displayName": "Outil de couverture", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Couverture du code Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Sélectionnez le profil d’extensions du Kit de développement logiciel (SDK) lors de l’utilisation de l’exécuteur MSTest. Plus d’informations sur https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Test du profil d’extensions", + "symbols/ExtensionsProfile/choices/Default/description": "Profil d’extensions par défaut (recommandé)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Par défaut", + "symbols/ExtensionsProfile/choices/None/description": "Aucune extension n’est activée", + "symbols/ExtensionsProfile/choices/None/displayName": "Aucun", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Activez toutes les extensions fournies par Microsoft (y compris les extensions avec une licence restrictive)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Sélectionnez les types de fixtures à inclure dans le projet.", + "symbols/Fixture/displayName": "Appareil", + "symbols/Fixture/choices/None/description": "Aucune méthode de fixture", + "symbols/Fixture/choices/None/displayName": "Aucun", + "symbols/Fixture/choices/AssemblyInitialize/description": "Méthode de fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Méthode de fixture assemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Méthode de fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Méthode de fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Méthode de fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Méthode de fixture TestCleanup", + "postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »", + "postActions/openInEditor/description": "Ouvre Test1.fs dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..cf1d0c23d6d2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Progetto di test MSTest", + "description": "Progetto che contiene i test MSTest eseguibili in .NET in Windows, Linux e MacOS.", + "symbols/TargetFrameworkOverride/description": "Ignora il framework di destinazione", + "symbols/TargetFrameworkOverride/displayName": "Override del framework di destinazione", + "symbols/Framework/description": "Il framework di destinazione per il progetto.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (solo Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (solo Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (solo Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (solo Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (solo Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", + "symbols/skipRestore/displayName": "Salta ripristino", + "symbols/langVersion/description": "Imposta la proprietà LangVersion nel file di progetto creato", + "symbols/langVersion/displayName": "Versione del linguaggio", + "symbols/UseMSTestSdk/description": "Usare lo stile del progetto MSTest.Sdk. Per altre informazioni, vedere https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usa MSTest.Sdk", + "symbols/TestRunner/description": "Selezionare lo strumento di esecuzione/la piattaforma. Per altre informazioni, vedere https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/MSTest/description": "Usa MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Usa la piattaforma VSTest", + "symbols/CoverageTool/description": "Strumento di copertura da usare per il progetto.", + "symbols/CoverageTool/displayName": "Strumento di copertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Selezionare il profilo delle estensioni SDK quando si usa MSTest Runner. Per altre informazioni, vedere https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Test del profilo delle estensioni", + "symbols/ExtensionsProfile/choices/Default/description": "Profilo estensioni predefinito (scelta consigliata)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Predefinita", + "symbols/ExtensionsProfile/choices/None/description": "Nessuna estensione abilitata", + "symbols/ExtensionsProfile/choices/None/displayName": "Nessuno", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Abilita tutte le estensioni spedite da Microsoft (incluse le estensioni con una licenza restrittiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Selezionare i tipi di fixture da includere nel progetto.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Nessun metodo di fixture", + "symbols/Fixture/choices/None/displayName": "Nessuno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metodo fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metodo fixture AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metodo fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metodo fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metodo fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metodo fixture TestCleanup", + "postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'", + "postActions/openInEditor/description": "Apre Test1.fs nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..8cfa574ceb35 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest テスト プロジェクト", + "description": "Windows、Linux、MacOS 上の .NET Core で実行できる MSTest テストを含むプロジェクト。", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", + "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", + "symbols/Framework/displayName": "フレームワーク", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows のみ)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows のみ)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows のみ)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows のみ)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows のみ)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", + "symbols/skipRestore/displayName": "復元のスキップ", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/displayName": "言語バージョン", + "symbols/UseMSTestSdk/description": "MSTest.Sdk プロジェクト スタイルを使用します。https://aka.ms/mstest/sdk の詳細情報", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk を使用します", + "symbols/TestRunner/description": "ランナー/プラットフォームを選択します。https://aka.ms/mstest/sdk/extensions-profile の詳細情報", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "MSTest Runner を使用する (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest プラットフォームを使用する", + "symbols/CoverageTool/description": "プロジェクトに使用するカバレッジ ツール。", + "symbols/CoverageTool/displayName": "カバレッジ ツール", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft コード カバレッジ", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "MSTest Runner を使用する場合は、SDK 拡張機能プロファイルを選択します。https://aka.ms/mstest/sdk/extensions-profile の詳細情報", + "symbols/ExtensionsProfile/displayName": "拡張機能プロファイルをテストしています", + "symbols/ExtensionsProfile/choices/Default/description": "既定の拡張機能プロファイル (推奨)", + "symbols/ExtensionsProfile/choices/Default/displayName": "既定値", + "symbols/ExtensionsProfile/choices/None/description": "有効になっている拡張機能がありません", + "symbols/ExtensionsProfile/choices/None/displayName": "なし", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft が出荷するすべての拡張機能を有効にする (制限付きライセンスを持つ拡張機能を含む)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "プロジェクトに含めるフィクスチャの種類を選択します。", + "symbols/Fixture/displayName": "フィクスチャ", + "symbols/Fixture/choices/None/description": "フィクスチャ メソッドがありません", + "symbols/Fixture/choices/None/displayName": "なし", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup フィクスチャ メソッド", + "postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する", + "postActions/openInEditor/description": "エディターで Test1.fs を開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..db999f123292 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest 테스트 프로젝트", + "description": "Windows, Linux 및 macOS의 .NET에서 실행할 수 있는 MSTest 테스트가 포함된 프로젝트", + "symbols/TargetFrameworkOverride/description": "대상 프레임워크를 재정의합니다.", + "symbols/TargetFrameworkOverride/displayName": "대상 프레임워크 재정의", + "symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.", + "symbols/Framework/displayName": "프레임워크", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10(Windows만 해당)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9(Windows만 해당)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8(Windows만 해당)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7(Windows만 해당)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6(Windows만 해당)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", + "symbols/skipRestore/displayName": "복원 건너뛰기", + "symbols/langVersion/description": "만든 프로젝트 파일에 LangVersion 속성을 설정합니다", + "symbols/langVersion/displayName": "언어 버전", + "symbols/UseMSTestSdk/description": "MSTest.Sdk 프로젝트 스타일을 사용합니다. 자세한 내용은 https://aka.ms/mstest/sdk를 확인하세요.", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk 사용", + "symbols/TestRunner/description": "실행기/플랫폼을 선택합니다. 자세한 내용은 https://aka.ms/mstest/sdk/extensions-profile을 확인하세요.", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "MSTest 실행기 사용(Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest 플랫폼 사용", + "symbols/CoverageTool/description": "프로젝트에 사용할 검사 도구입니다.", + "symbols/CoverageTool/displayName": "적용 범위 도구", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 코드 검사", + "symbols/CoverageTool/choices/coverlet/description": "침대보", + "symbols/ExtensionsProfile/description": "MSTest 실행기를 사용할 때 SDK 확장 프로필을 선택합니다. 자세한 내용은 https://aka.ms/mstest/sdk/extensions-profile을 확인하세요.", + "symbols/ExtensionsProfile/displayName": "확장 프로필 테스트 중", + "symbols/ExtensionsProfile/choices/Default/description": "기본 확장 프로필(권장)", + "symbols/ExtensionsProfile/choices/Default/displayName": "기본값", + "symbols/ExtensionsProfile/choices/None/description": "사용하도록 설정된 확장이 없습니다.", + "symbols/ExtensionsProfile/choices/None/displayName": "없음", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft에서 제공하는 모든 확장 사용(제한 라이선스가 있는 확장 포함)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "프로젝트에 포함할 픽스쳐 종류를 선택합니다.", + "symbols/Fixture/displayName": "픽스쳐", + "symbols/Fixture/choices/None/description": "픽스쳐 메서드 없음", + "symbols/Fixture/choices/None/displayName": "없음", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture 메서드", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture 메서드", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture 메서드", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture 메서드", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture 메서드", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture 메서드", + "postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행", + "postActions/openInEditor/description": "편집기에서 Test1.fs 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..2fc39b85f69e --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest — projekt testowy", + "description": "Projekt zawierający testy MSTest, które mogą być uruchamiane na platformie .NET w systemach Windows, Linux i MacOS.", + "symbols/TargetFrameworkOverride/description": "Zastępuje platformę docelową", + "symbols/TargetFrameworkOverride/displayName": "Zastąpienie struktury docelowej", + "symbols/Framework/description": "Platforma docelowa dla tego projektu.", + "symbols/Framework/displayName": "Struktura", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (tylko system Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (tylko system Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (tylko system Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (tylko system Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (tylko system Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": "Platforma .NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", + "symbols/skipRestore/displayName": "Pomiń przywracanie", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/displayName": "Wersja języka", + "symbols/UseMSTestSdk/description": "Użyj stylu projektu MSTest.Sdk. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Korzystaj z narzędzia MSTest.Sdk", + "symbols/TestRunner/description": "Wybierz moduł uruchamiający/platformę. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Moduł uruchamiający", + "symbols/TestRunner/choices/MSTest/description": "Korzystanie z modułu uruchamiającego MSTest (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Korzystanie z platformy VSTest", + "symbols/CoverageTool/description": "Narzędzie pokrycia do użycia w projekcie.", + "symbols/CoverageTool/displayName": "Narzędzie pokrycia", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Pokrycie kodu firmy Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Wybierz profil rozszerzeń zestawu SDK podczas korzystania z modułu uruchamiającego MSTest. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testowanie profilu rozszerzeń", + "symbols/ExtensionsProfile/choices/Default/description": "Domyślny profil rozszerzeń (rekomendowane)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Wartość domyślna", + "symbols/ExtensionsProfile/choices/None/description": "Nie włączono rozszerzeń", + "symbols/ExtensionsProfile/choices/None/displayName": "Brak", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Włącz wszystkie rozszerzenia dostarczane przez firmę Microsoft (w tym rozszerzenia z restrykcyjną licencją)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Wybierz rodzaje warunków początkowych do uwzględnienia w projekcie.", + "symbols/Fixture/displayName": "Warunki początkowe", + "symbols/Fixture/choices/None/description": "Brak metod początkowych", + "symbols/Fixture/choices/None/displayName": "Brak", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize — metoda początkowa", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup — metoda początkowa", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize — metoda początkowa", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup — metoda początkowa", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize — metoda początkowa", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup — metoda początkowa", + "postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”", + "postActions/openInEditor/description": "Otwiera plik Test1.fs w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..3674eb49ec57 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Projeto de Teste MSTest", + "description": "Um projeto que contém testes do MSTest que podem ser executados no .NET no Windows, Linux e MacOS.", + "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/displayName": "Estrutura", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (somente Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (somente Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (somente Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (somente Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (somente Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", + "symbols/skipRestore/displayName": "Ignorar restauração", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/displayName": "Versão do idioma", + "symbols/UseMSTestSdk/description": "Use o estilo de projeto MSTest.Sdk. Mais informações em https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usar MSTest.Sdk", + "symbols/TestRunner/description": "Selecione o executor/plataforma. Mais informações em https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Executor de teste", + "symbols/TestRunner/choices/MSTest/description": "Usar o MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Usar a plataforma VSTest", + "symbols/CoverageTool/description": "A ferramenta de cobertura a ser usada para o projeto.", + "symbols/CoverageTool/displayName": "Ferramenta de cobertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Cobertura de Código da Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Selecione o perfil de extensões do SDK ao usar o Executor do MSTest. Mais informações em https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testando o perfil de extensões", + "symbols/ExtensionsProfile/choices/Default/description": "Perfil de extensões padrão (recomendado)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Padrão", + "symbols/ExtensionsProfile/choices/None/description": "Nenhuma extensão está habilitada", + "symbols/ExtensionsProfile/choices/None/displayName": "Nenhum", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Habilitar todas as extensões enviadas pela Microsoft (incluindo extensões com uma licença restritiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Selecione os tipos de acessório a serem incluídos no projeto.", + "symbols/Fixture/displayName": "Acessório", + "symbols/Fixture/choices/None/description": "Nenhum método de acessório", + "symbols/Fixture/choices/None/displayName": "Nenhum", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método acessório AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de acessório AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de acessório ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de acessório ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de acessório TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de acessório TestCleanup", + "postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"", + "postActions/openInEditor/description": "Abre o Test1.fs no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..85064d1f3673 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,61 @@ +{ + "author": "Майкрософт", + "name": "Тестовый проект MSTest", + "description": "Проект, содержащий тесты MSTest, которые могут работать на .NET в Windows, Linux и MacOS.", + "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", + "symbols/TargetFrameworkOverride/displayName": "Переопределение целевой платформы", + "symbols/Framework/description": "Целевая платформа для проекта.", + "symbols/Framework/displayName": "Платформа", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (только для Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (только для Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (только для Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (только для Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (только для Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Позволяет пропускать автоматическое восстановление проекта при создании.", + "symbols/skipRestore/displayName": "Пропустить восстановление", + "symbols/langVersion/description": "Задает свойство LangVersion в создаваемом файле проекта.", + "symbols/langVersion/displayName": "Версия языка", + "symbols/UseMSTestSdk/description": "Используйте стиль проекта MSTest.Sdk. Дополнительные сведения на https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Использовать MSTest.Sdk", + "symbols/TestRunner/description": "Выберите средство выполнения тестов или платформу. Дополнительные сведения на https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Используйте MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Используйте платформу VSTest", + "symbols/CoverageTool/description": "Инструмент покрытия, который следует использовать для проекта.", + "symbols/CoverageTool/displayName": "Средство охвата", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Покрытие кода (Майкрософт)", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Выберите профиль расширений SDK при использовании MSTest Runner. Дополнительные сведения на https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Проверка профиля расширений", + "symbols/ExtensionsProfile/choices/Default/description": "Профиль расширений по умолчанию (рекомендуется)", + "symbols/ExtensionsProfile/choices/Default/displayName": "По умолчанию", + "symbols/ExtensionsProfile/choices/None/description": "Расширения не включены.", + "symbols/ExtensionsProfile/choices/None/displayName": "Отсутствует", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Включить все расширения, поставляемые Майкрософт (включая расширения с ограничительной лицензией)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Выберите типы средств, которые необходимо включить в проект.", + "symbols/Fixture/displayName": "Средство", + "symbols/Fixture/choices/None/description": "Нет методов работы со средствами", + "symbols/Fixture/choices/None/displayName": "Отсутствует", + "symbols/Fixture/choices/AssemblyInitialize/description": "Метод работы со средствами AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Метод работы со средствами AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Метод работы со средствами ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Метод работы со средствами ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Метод работы со средствами TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Метод работы со средствами TestCleanup", + "postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", + "postActions/openInEditor/description": "Открывает Test1.fs в редакторе" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..f0db9accfa26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Projesi", + "description": "Windows, Linux ve macOS üzerinde .NET'te çalışabilen MSTest testlerini içeren bir proje.", + "symbols/TargetFrameworkOverride/description": "Hedef çerçeveyi geçersiz kılar", + "symbols/TargetFrameworkOverride/displayName": "Hedef çerçeveyi geçersiz kılma", + "symbols/Framework/description": "Projenin hedef çerçevesi.", + "symbols/Framework/displayName": "Çerçeve", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (yalnızca Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (yalnızca Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (yalnızca Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (yalnızca Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (yalnızca Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/displayName": "Geri yüklemeyi atla", + "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", + "symbols/langVersion/displayName": "Dil sürümü", + "symbols/UseMSTestSdk/description": "MSTest.Sdk proje stilini kullanın.. Daha fazla bilgi: https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk’sını kullan", + "symbols/TestRunner/description": "Çalıştırıcıyı/platformu seçin. Daha fazla bilgi: https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test çalıştırıcı", + "symbols/TestRunner/choices/MSTest/description": "MSTest Çalıştırıcısı'nı kullan (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest platformunu kullan", + "symbols/CoverageTool/description": "Projede kullanılacak kapsam aracı.", + "symbols/CoverageTool/displayName": "Kapsam aracı", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Kod Kapsamı", + "symbols/CoverageTool/choices/coverlet/description": "kapakçık", + "symbols/ExtensionsProfile/description": "MSTest Çalıştırıcısı kullanılırken SDK uzantıları profilini seçin. Daha fazla bilgi: https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Uzantılar profili test ediliyor", + "symbols/ExtensionsProfile/choices/Default/description": "Varsayılan uzantılar profili (önerilen)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Varsayılan", + "symbols/ExtensionsProfile/choices/None/description": "Uzantı etkinleştirilmedi", + "symbols/ExtensionsProfile/choices/None/displayName": "Hiçbiri", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft'un gönderdiği tüm uzantıları etkinleştir (kısıtlayıcı lisansı olan uzantılar dahil)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Projeye dahil edilecek düzen türlerini seçin.", + "symbols/Fixture/displayName": "Düzen", + "symbols/Fixture/choices/None/description": "Düzen yöntemi yok", + "symbols/Fixture/choices/None/displayName": "Hiçbiri", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize düzen yöntemi", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup düzen yöntemi", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize düzen yöntemi", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup düzen yöntemi", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize düzen yöntemi", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup düzen yöntemi", + "postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır", + "postActions/openInEditor/description": "Test1.fs'yi düzenleyicide açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..d662df313966 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest 测试项目", + "description": "一个包含 MSTest 测试的项目,这些测试可在 Windows、Linux 和 MacOS 的 .NET 上运行。", + "symbols/TargetFrameworkOverride/description": "替代目标框架", + "symbols/TargetFrameworkOverride/displayName": "目标框架替代", + "symbols/Framework/description": "项目的目标框架。", + "symbols/Framework/displayName": "框架", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (仅限 Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (仅限 Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (仅限 Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (仅限 Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (仅限 Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", + "symbols/skipRestore/displayName": "跳过还原", + "symbols/langVersion/description": "在创建的项目文件中设置 LangVersion 属性", + "symbols/langVersion/displayName": "语言版本", + "symbols/UseMSTestSdk/description": "使用 MSTest.Sdk 项目样式。有关详细信息,请访问 https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "使用 MSTest.Sdk", + "symbols/TestRunner/description": "选择运行器/平台。有关详细信息,请访问 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "测试运行程序", + "symbols/TestRunner/choices/MSTest/description": "使用 MSTest 运行器(Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "使用 VSTest 平台", + "symbols/CoverageTool/description": "要用于项目的覆盖率工具。", + "symbols/CoverageTool/displayName": "覆盖率工具", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 代码覆盖率", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "使用 MSTest 运行器时选择 SDK 扩展配置文件。有关详细信息,请访问 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "测试扩展配置文件", + "symbols/ExtensionsProfile/choices/Default/description": "默认扩展配置文件(推荐)", + "symbols/ExtensionsProfile/choices/Default/displayName": "默认", + "symbols/ExtensionsProfile/choices/None/description": "未启用任何扩展", + "symbols/ExtensionsProfile/choices/None/displayName": "无", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "启用 Microsoft 提供的所有扩展(包括具有限制性许可证的扩展)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "选择要包含在项目中的固定例程类型。", + "symbols/Fixture/displayName": "固定例程", + "symbols/Fixture/choices/None/description": "无固定例程方法", + "symbols/Fixture/choices/None/displayName": "无", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固定例程方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固定例程方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固定例程方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固定例程方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固定例程方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固定例程方法", + "postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"", + "postActions/openInEditor/description": "在编辑器中打开 Test1.fs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..a7bb050b775d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest 測試專案", + "description": "包含可以在 Windows、Linux 和 MacOS 版的 .NET 上執行的 MSTest 測試的專案。", + "symbols/TargetFrameworkOverride/description": "覆寫目標 Framework", + "symbols/TargetFrameworkOverride/displayName": "目標架構覆寫", + "symbols/Framework/description": "專案的目標 Framework。", + "symbols/Framework/displayName": "架構", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (僅限 Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (僅限 Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (僅限 Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (僅限 Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (僅限 Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "如果指定,則會在建立時跳過專案的自動還原。", + "symbols/skipRestore/displayName": "跳過還原", + "symbols/langVersion/description": "設定建立的專案檔中的 LangVersion 屬性", + "symbols/langVersion/displayName": "語言版本", + "symbols/UseMSTestSdk/description": "使用 MSTest.Sdk 專案樣式。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "使用 MSTest.Sdk", + "symbols/TestRunner/description": "選取執行器/平台。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "測試執行器", + "symbols/TestRunner/choices/MSTest/description": "使用 MSTest 執行器 (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "使用 VSTest 平台", + "symbols/CoverageTool/description": "要用於專案的涵蓋範圍工具。", + "symbols/CoverageTool/displayName": "涵蓋範圍工具", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 程式碼涵蓋範圍", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "選取使用 MSTest 執行器時的 SDK 延伸模組設定檔。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "正在測試擴充功能設定檔", + "symbols/ExtensionsProfile/choices/Default/description": "預設延伸模組設定檔 (建議)", + "symbols/ExtensionsProfile/choices/Default/displayName": "預設", + "symbols/ExtensionsProfile/choices/None/description": "未啟用任何延伸模組", + "symbols/ExtensionsProfile/choices/None/displayName": "無", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "啟用由 Microsoft 提供的所有延伸模組 (包括具有有限制授權的延伸模組)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "選取要併入專案中的固件類型。", + "symbols/Fixture/displayName": "固件", + "symbols/Fixture/choices/None/description": "沒有固件方法", + "symbols/Fixture/choices/None/displayName": "無", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固件方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固件方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固件方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固件方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固件方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固件方法", + "postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'", + "postActions/openInEditor/description": "在編輯器中開啟 Test1.fs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/template.json new file mode 100644 index 000000000000..b4538b3c475a --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/template.json @@ -0,0 +1,266 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Test", "MSTest", "Desktop", "Web"], + "name": "MSTest Test Project", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project that contains MSTest tests that can run on .NET on Windows, Linux and MacOS.", + "groupIdentity": "Microsoft.Test.MSTest", + "precedence": "12000", + "identity": "Microsoft.Test.MSTest.FSharp.10.0", + "shortName": "mstest", + "tags": { + "language": "F#", + "type": "project" + }, + "sourceName": "Company.TestProject1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "displayName": "Target framework override", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "displayName": "Framework", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": ".NET 10" + }, + { + "choice": "net10.0-windows", + "description": ".NET 10 (Windows only)" + }, + { + "choice": "net9.0", + "description": ".NET 9" + }, + { + "choice": "net9.0-windows", + "description": ".NET 9 (Windows only)" + }, + { + "choice": "net8.0", + "description": ".NET 8" + }, + { + "choice": "net8.0-windows", + "description": ".NET 8 (Windows only)" + }, + { + "choice": "net7.0", + "description": ".NET 7" + }, + { + "choice": "net7.0-windows", + "description": ".NET 7 (Windows only)" + }, + { + "choice": "net6.0", + "description": ".NET 6" + }, + { + "choice": "net6.0-windows", + "description": ".NET 6 (Windows only)" + }, + { + "choice": "netcoreapp3.1", + "description": ".NET Core 3.1" + }, + { + "choice": "net481", + "description": ".NET Framework 4.8.1" + }, + { + "choice": "net48", + "description": ".NET Framework 4.8" + }, + { + "choice": "net472", + "description": ".NET Framework 4.7.2" + }, + { + "choice": "net471", + "description": ".NET Framework 4.7.1" + }, + { + "choice": "net47", + "description": ".NET Framework 4.7" + }, + { + "choice": "net462", + "description": ".NET Framework 4.6.2" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "HostIdentifier": { + "type": "bind", + "binding": "host:HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "displayName": "Skip restore", + "defaultValue": "false" + }, + "langVersion": { + "type": "parameter", + "datatype": "text", + "description": "Sets the LangVersion property in the created project file", + "defaultValue": "latest", + "replaces": "$(ProjectLanguageVersion)", + "displayName": "Language version" + }, + "UseMSTestSdk": { + "type": "parameter", + "datatype": "bool", + "description": "Use MSTest.Sdk project style. More information at https://aka.ms/mstest/sdk", + "displayName": "Use MSTest.Sdk", + "defaultValue": "False" + }, + "TestRunner": { + "type": "parameter", + "datatype": "choice", + "enableQuotelessLiterals": true, + "description": "Select the runner/platform. More information at https://aka.ms/mstest/sdk/extensions-profile", + "displayName": "Test runner", + "defaultValue": "VSTest", + "choices": [ + { + "choice": "MSTest", + "description": "Use MSTest Runner (Microsoft.Testing.Platform)" + }, + { + "choice": "VSTest", + "description": "Use VSTest platform" + } + ] + }, + "CoverageTool": { + "type": "parameter", + "datatype": "choice", + "description": "The coverage tool to use for the project.", + "displayName": "Coverage tool", + "defaultValue": "Microsoft.CodeCoverage", + "choices": [ + { + "choice": "Microsoft.CodeCoverage", + "description": "Microsoft Code Coverage" + }, + { + "choice": "coverlet", + "description": "coverlet" + } + ] + }, + "ExtensionsProfile": { + "type": "parameter", + "datatype": "choice", + "description": "Select the SDK extensions profile when using MSTest Runner. More information at https://aka.ms/mstest/sdk/extensions-profile", + "displayName": "Testing extensions profile", + "isEnabled": "UseMSTestSdk && (TestRunner == MSTest)", + "defaultValue": "Default", + "replaces": "$(ExtensionsProfile)", + "choices": [ + { + "choice": "Default", + "description": "Default extensions profile (recommended)", + "displayName": "Default" + }, + { + "choice": "None", + "description": "No extensions are enabled", + "displayName": "None" + }, + { + "choice": "AllMicrosoft", + "description": "Enable all extensions shipped by Microsoft (including extensions with a restrictive license)", + "displayName": "AllMicrosoft" + } + ] + }, + "Fixture": { + "type": "parameter", + "datatype": "choice", + "description": "Select the fixture kinds to include in the project.", + "displayName": "Fixture", + "allowMultipleValues": true, + "enableQuotelessLiterals": true, + "defaultValue": "None", + "choices": [ + { + "choice": "None", + "description": "No fixture methods", + "displayName": "None" + }, + { + "choice": "AssemblyInitialize", + "description": "AssemblyInitialize fixture method" + }, + { + "choice": "AssemblyCleanup", + "description": "AssemblyCleanup fixture method" + }, + { + "choice": "ClassInitialize", + "description": "ClassInitialize fixture method" + }, + { + "choice": "ClassCleanup", + "description": "ClassCleanup fixture method" + }, + { + "choice": "TestInitialize", + "description": "TestInitialize fixture method" + }, + { + "choice": "TestCleanup", + "description": "TestCleanup fixture method" + } + ] + } + }, + "primaryOutputs": [ + { "path": "Company.TestProject1.fsproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "MSTestSettings.fs" + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "Test1.fs" + } + ], + "defaultName": "TestProject1", + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "id": "restoreNugetPackages", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Test1.fs in the editor", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/Company.TestProject1.fsproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/Company.TestProject1.fsproj new file mode 100644 index 000000000000..342f7ca670f4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/Company.TestProject1.fsproj @@ -0,0 +1,82 @@ + + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + enable + enable + + true + + + + + + + + + + true + $(ExtensionsProfile) + + + + + + + + + + + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + enable + enable + + true + Exe + true + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/MSTestSettings.fs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/MSTestSettings.fs new file mode 100644 index 000000000000..63af03a4340a --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/MSTestSettings.fs @@ -0,0 +1,6 @@ +module MSTestSettings + +open Microsoft.VisualStudio.TestTools.UnitTesting + +[] +do() diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/Test1.fs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/Test1.fs new file mode 100644 index 000000000000..c84f25a1b906 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/Test1.fs @@ -0,0 +1,53 @@ +namespace Company.TestProject1 + +open System +open Microsoft.VisualStudio.TestTools.UnitTesting + +[] +type Test1 () = + +#if (Fixture == AssemblyInitialize) + [] + static member AssemblyInit (context: TestContext) = + // This method is called once for the test assembly, before any tests are run. + () + +#endif +#if (Fixture == AssemblyCleanup) + [] + static member AssemblyCleanup () = + // This method is called once for the test assembly, after all tests are run. + () + +#endif +#if (Fixture == ClassInitialize) + [] + member this.ClassInit (context: TestContext) = + // This method is called once for the test class, before any tests of the class are run. + () + +#endif +#if (Fixture == ClassCleanup) + [] + member this.ClassCleanup () = + // This method is called once for the test class, after all tests of the class are run. + () + +#endif +#if (Fixture == TestInitialize) + [] + member this.TestInit () = + // This method is called before each test method. + () + +#endif +#if (Fixture == TestCleanup) + [] + member this.TestCleanup () = + // This method is called after each test method. + () + +#endif + [] + member this.TestMethodPassing () = + Assert.IsTrue(true); diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..8cb77b63f5c4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/dotnetcli.host.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + }, + "UseMSTestSdk": { + "shortName": "", + "longName": "sdk" + }, + "TestRunner": { + "shortName": "", + "longName": "test-runner" + }, + "CoverageTool": { + "shortName": "", + "longName": "coverage-tool" + }, + "ExtensionsProfile": { + "shortName": "", + "longName": "extensions-profile" + }, + "Fixture" : { + "shortName": "", + "longName": "fixture" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/ide.host.json new file mode 100644 index 000000000000..bdd89182698f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/ide.host.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "symbolInfo": [ + { + "id": "UseMSTestSdk", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "TestRunner", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "ExtensionsProfile", + "isVisible": true + }, + { + "id": "CoverageTool", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "Fixture", + "isVisible": true + } + ], + "tags": [ + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/ide/icon.ico new file mode 100644 index 000000000000..14998ba8c023 Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..2064d2b109a4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Testovací projekt MSTest", + "description": "Projekt obsahující testy MSTest, který se dá spustit na .NET v systémech Windows, Linux a MacOS.", + "symbols/TargetFrameworkOverride/description": "Přepíše cílovou architekturu.", + "symbols/TargetFrameworkOverride/displayName": "Přepsání cílové architektury", + "symbols/Framework/description": "Cílová architektura pro projekt.", + "symbols/Framework/displayName": "Architektura", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (jenom Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (jenom Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (jenom Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (jenom Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (jenom Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".Net Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.", + "symbols/skipRestore/displayName": "Přeskočit obnovení", + "symbols/langVersion/description": "Nastaví vlastnost LangVersion ve vytvořeném souboru projektu.", + "symbols/langVersion/displayName": "Verze jazyka", + "symbols/UseMSTestSdk/description": "Použijte styl projektu MSTest.Sdk. Další informace najdete na https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Použít MSTest.Sdk", + "symbols/TestRunner/description": "Vyberte spouštěč nebo platformu. Další informace najdete na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Použít MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Použití platformy VSTest", + "symbols/CoverageTool/description": "Nástroj pokrytí, který se má použít pro projekt.", + "symbols/CoverageTool/displayName": "Nástroj pokrytí", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Pokrytí kódu Microsoftu", + "symbols/CoverageTool/choices/coverlet/description": "pokrývka", + "symbols/ExtensionsProfile/description": "Při použití MSTest Runneru vyberte profil rozšíření sady SDK. Další informace najdete na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testování profilu rozšíření", + "symbols/ExtensionsProfile/choices/Default/description": "Výchozí profil rozšíření (doporučeno)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Výchozí", + "symbols/ExtensionsProfile/choices/None/description": "Nejsou povolená žádná rozšíření.", + "symbols/ExtensionsProfile/choices/None/displayName": "Žádné", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Povolit všechna rozšíření odeslaná Microsoftem (včetně rozšíření s omezující licencí)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Vyberte typy testovacích součástí, které se mají zahrnout do projektu.", + "symbols/Fixture/displayName": "Testovací přípravek", + "symbols/Fixture/choices/None/description": "Žádné metody testovacího přípravku", + "symbols/Fixture/choices/None/displayName": "Žádné", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metoda testovacího přípravku AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metoda testovacího přípravku AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metoda testovacího přípravku ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metoda testovacího přípravku ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metoda testovacího přípravku TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metoda testovacího přípravku TestCleanup", + "postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore", + "postActions/openInEditor/description": "Otevře Test1.vb v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..3fc7a76173e8 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.de.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest-Testprojekt", + "description": "Ein Projekt, das MSTest-Tests enthält, die auf .NET unter Windows, Linux und macOS ausgeführt werden können.", + "symbols/TargetFrameworkOverride/description": "Überschreibt das Zielframework", + "symbols/TargetFrameworkOverride/displayName": "Zielframeworküberschreibung", + "symbols/Framework/description": "Das Zielframework für das Projekt.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (nur Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (nur Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (nur Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (nur Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (nur Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", + "symbols/skipRestore/displayName": "Wiederherstellung überspringen", + "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/displayName": "Sprachversion", + "symbols/UseMSTestSdk/description": "Verwenden Sie den MSTest.Sdk-Projektstil. Weitere Informationen unter https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk verwenden", + "symbols/TestRunner/description": "Wählen Sie den Runner/die Plattform aus. Weitere Informationen finden Sie unter https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "MSTest Runner verwenden (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest-Plattform verwenden", + "symbols/CoverageTool/description": "Das Abdeckungstool, das für das Projekt verwendet werden soll.", + "symbols/CoverageTool/displayName": "Coverage-Tool", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Wählen Sie das SDK-Erweiterungsprofil aus, wenn Sie MSTest Runner verwenden. Weitere Informationen finden Sie unter https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Erweiterungsprofil wird getestet", + "symbols/ExtensionsProfile/choices/Default/description": "Standarderweiterungsprofil (empfohlen)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Standard", + "symbols/ExtensionsProfile/choices/None/description": "Keine Erweiterungen sind aktiviert", + "symbols/ExtensionsProfile/choices/None/displayName": "Keine", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Alle von Microsoft gelieferten Erweiterungen aktivieren (einschließlich Erweiterungen mit einer restriktiven Lizenz)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Wählen Sie die Fixturearten aus, die in das Projekt eingeschlossen werden sollen.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Keine Fixturemethoden", + "symbols/Fixture/choices/None/displayName": "Keine", + "symbols/Fixture/choices/AssemblyInitialize/description": "Fixturemethode \"AssemblyInitialize\"", + "symbols/Fixture/choices/AssemblyCleanup/description": "Fixierungsmethode \"AssemblyCleanup\"", + "symbols/Fixture/choices/ClassInitialize/description": "Fixturemethode \"ClassInitialize\"", + "symbols/Fixture/choices/ClassCleanup/description": "Fixierungsmethode \"ClassCleanup\"", + "symbols/Fixture/choices/TestInitialize/description": "Fixturemethode \"TestInitialize\"", + "symbols/Fixture/choices/TestCleanup/description": "Fixierungsmethode \"TestCleanup\"", + "postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen", + "postActions/openInEditor/description": "Öffnet Test1.vb im Editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..9758560f9433 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.en.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Project", + "description": "A project that contains MSTest tests that can run on .NET on Windows, Linux and MacOS.", + "symbols/TargetFrameworkOverride/description": "Overrides the target framework", + "symbols/TargetFrameworkOverride/displayName": "Target framework override", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows only)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows only)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows only)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows only)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows only)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "symbols/skipRestore/displayName": "Skip restore", + "symbols/langVersion/description": "Sets the LangVersion property in the created project file", + "symbols/langVersion/displayName": "Language version", + "symbols/UseMSTestSdk/description": "Use MSTest.Sdk project style. More information at https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Use MSTest.Sdk", + "symbols/TestRunner/description": "Select the runner/platform. More information at https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/MSTest/description": "Use MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest platform", + "symbols/CoverageTool/description": "The coverage tool to use for the project.", + "symbols/CoverageTool/displayName": "Coverage tool", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Select the SDK extensions profile when using MSTest Runner. More information at https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testing extensions profile", + "symbols/ExtensionsProfile/choices/Default/description": "Default extensions profile (recommended)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Default", + "symbols/ExtensionsProfile/choices/None/description": "No extensions are enabled", + "symbols/ExtensionsProfile/choices/None/displayName": "None", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Enable all extensions shipped by Microsoft (including extensions with a restrictive license)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Select the fixture kinds to include in the project.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "No fixture methods", + "symbols/Fixture/choices/None/displayName": "None", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture method", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture method", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture method", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture method", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture method", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture method", + "postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'", + "postActions/openInEditor/description": "Opens Test1.vb in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..227f27b145b4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.es.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Proyecto de prueba de MSTest", + "description": "Proyecto que contiene pruebas de MSTest que se pueden ejecutar en .NET en Windows, Linux y MacOS.", + "symbols/TargetFrameworkOverride/description": "Invalida la plataforma de destino", + "symbols/TargetFrameworkOverride/displayName": "Invalidación de la plataforma de destino", + "symbols/Framework/description": "Marco de destino del proyecto.", + "symbols/Framework/displayName": "Marco", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (solo Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (solo Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (solo Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (solo Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (solo Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "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/langVersion/description": "Establece la propiedad LangVersion en el archivo de proyecto creado.", + "symbols/langVersion/displayName": "Versión de lenguaje", + "symbols/UseMSTestSdk/description": "Use el estilo de proyecto MSTest.Sdk. Más información en https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usar MSTest.Sdk", + "symbols/TestRunner/description": "Seleccione el ejecutor o la plataforma. Más información en https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Ejecutor de pruebas", + "symbols/TestRunner/choices/MSTest/description": "Usar MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Uso de la plataforma VSTest", + "symbols/CoverageTool/description": "Herramienta de cobertura que se va a usar para el proyecto.", + "symbols/CoverageTool/displayName": "Herramienta de cobertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Cobertura de código de Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "cubrecama", + "symbols/ExtensionsProfile/description": "Seleccione el perfil de extensiones del SDK al usar MSTest Runner. Más información en https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Probar perfil de extensiones", + "symbols/ExtensionsProfile/choices/Default/description": "Perfil de extensiones predeterminadas (recomendado)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Valor predeterminado", + "symbols/ExtensionsProfile/choices/None/description": "No hay extensiones habilitadas", + "symbols/ExtensionsProfile/choices/None/displayName": "Ninguno", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Habilitar todas las extensiones enviadas por Microsoft (incluidas las extensiones con una licencia restrictiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Seleccione los tipos de accesorio que desea incluir en el proyecto.", + "symbols/Fixture/displayName": "Accesorio", + "symbols/Fixture/choices/None/description": "No hay métodos de accesorio", + "symbols/Fixture/choices/None/displayName": "Ninguno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método de accesorio AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de accesorio AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de accesorio ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de accesorio ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de accesorio TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de accesorio TestCleanup", + "postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir Test1.vb en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..b6b4ad0e3a70 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Projet de test MSTest", + "description": "Un projet qui contient des tests MSTest pouvant être exécutés sur .NET sous Windows, Linux et MacOS.", + "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du cadre cible", + "symbols/Framework/description": "Framework cible du projet.", + "symbols/Framework/displayName": "Infrastructure", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows uniquement)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows uniquement)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows uniquement)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows uniquement)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows uniquement)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "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/langVersion/description": "Définit la propriété LangVersion dans le fichier projet créé", + "symbols/langVersion/displayName": "Version du langage", + "symbols/UseMSTestSdk/description": "Utilisez le style de projet MSTest.Sdk. Plus d’informations sur https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Utiliser MSTest.Sdk", + "symbols/TestRunner/description": "Sélectionnez l’exécuteur/la plateforme. Plus d’informations sur https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Utilisez MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Utiliser la plateforme VSTest", + "symbols/CoverageTool/description": "Outil de couverture à utiliser pour le projet.", + "symbols/CoverageTool/displayName": "Outil de couverture", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Couverture du code Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Sélectionnez le profil d’extensions du Kit de développement logiciel (SDK) lors de l’utilisation de l’exécuteur MSTest. Plus d’informations sur https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Test du profil des extensions", + "symbols/ExtensionsProfile/choices/Default/description": "Profil d’extensions par défaut (recommandé)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Par défaut", + "symbols/ExtensionsProfile/choices/None/description": "Aucune extension n’est activée", + "symbols/ExtensionsProfile/choices/None/displayName": "Aucun", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Activez toutes les extensions fournies par Microsoft (y compris les extensions avec une licence restrictive)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Sélectionnez les types de fixtures à inclure dans le projet.", + "symbols/Fixture/displayName": "Appareil", + "symbols/Fixture/choices/None/description": "Aucune méthode de fixture", + "symbols/Fixture/choices/None/displayName": "Aucun", + "symbols/Fixture/choices/AssemblyInitialize/description": "Méthode de fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Méthode de fixture assemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Méthode de fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Méthode de fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Méthode de fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Méthode de fixture TestCleanup", + "postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »", + "postActions/openInEditor/description": "Ouvre Test1.vb dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..6ab1957c4529 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.it.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Progetto di test MSTest", + "description": "Progetto che contiene i test MSTest eseguibili in .NET in Windows, Linux e MacOS.", + "symbols/TargetFrameworkOverride/description": "Ignora il framework di destinazione", + "symbols/TargetFrameworkOverride/displayName": "Sostituzione del framework di destinazione", + "symbols/Framework/description": "Il framework di destinazione per il progetto.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (solo Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (solo Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (solo Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (solo Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (solo Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", + "symbols/skipRestore/displayName": "Ignora ripristino", + "symbols/langVersion/description": "Imposta la proprietà LangVersion nel file di progetto creato", + "symbols/langVersion/displayName": "Versione del linguaggio", + "symbols/UseMSTestSdk/description": "Usare lo stile del progetto MSTest.Sdk. Per altre informazioni, vedere https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usa MSTest.Sdk", + "symbols/TestRunner/description": "Selezionare lo strumento di esecuzione/la piattaforma. Per altre informazioni, vedere https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Usa MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Usa la piattaforma VSTest", + "symbols/CoverageTool/description": "Strumento di copertura da usare per il progetto.", + "symbols/CoverageTool/displayName": "Strumento di copertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Selezionare il profilo delle estensioni SDK quando si usa MSTest Runner. Per altre informazioni, vedere https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Test del profilo delle estensioni", + "symbols/ExtensionsProfile/choices/Default/description": "Profilo estensioni predefinito (scelta consigliata)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Impostazione predefinita", + "symbols/ExtensionsProfile/choices/None/description": "Nessuna estensione abilitata", + "symbols/ExtensionsProfile/choices/None/displayName": "Nessuno", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Abilita tutte le estensioni spedite da Microsoft (incluse le estensioni con una licenza restrittiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Selezionare i tipi di fixture da includere nel progetto.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Nessun metodo di fixture", + "symbols/Fixture/choices/None/displayName": "Nessuno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metodo fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metodo fixture AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metodo fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metodo fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metodo fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metodo fixture TestCleanup", + "postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'", + "postActions/openInEditor/description": "Apre Test1.vb nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..f8e3fef7e617 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest テスト プロジェクト", + "description": "Windows、Linux、MacOS 上の .NET Core で実行できる MSTest テストを含むプロジェクト。", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", + "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", + "symbols/Framework/displayName": "フレームワーク", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows のみ)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows のみ)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows のみ)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows のみ)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows のみ)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", + "symbols/skipRestore/displayName": "復元のスキップ", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/displayName": "言語バージョン", + "symbols/UseMSTestSdk/description": "MSTest.Sdk プロジェクト スタイルを使用します。https://aka.ms/mstest/sdk の詳細情報", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk を使用します", + "symbols/TestRunner/description": "ランナー/プラットフォームを選択します。https://aka.ms/mstest/sdk/extensions-profile の詳細情報", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "MSTest Runner を使用する (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest プラットフォームを使用する", + "symbols/CoverageTool/description": "プロジェクトに使用するカバレッジ ツール。", + "symbols/CoverageTool/displayName": "カバレッジ ツール", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft コード カバレッジ", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "MSTest Runner を使用する場合は、SDK 拡張機能プロファイルを選択します。https://aka.ms/mstest/sdk/extensions-profile の詳細情報", + "symbols/ExtensionsProfile/displayName": "拡張機能プロファイルをテストしています", + "symbols/ExtensionsProfile/choices/Default/description": "既定の拡張機能プロファイル (推奨)", + "symbols/ExtensionsProfile/choices/Default/displayName": "既定値", + "symbols/ExtensionsProfile/choices/None/description": "有効になっている拡張機能がありません", + "symbols/ExtensionsProfile/choices/None/displayName": "なし", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft が出荷するすべての拡張機能を有効にする (制限付きライセンスを持つ拡張機能を含む)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "プロジェクトに含めるフィクスチャの種類を選択します。", + "symbols/Fixture/displayName": "フィクスチャ", + "symbols/Fixture/choices/None/description": "フィクスチャ メソッドがありません", + "symbols/Fixture/choices/None/displayName": "なし", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup フィクスチャ メソッド", + "postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する", + "postActions/openInEditor/description": "エディターで Test1.vb を開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..6f46572375c7 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest 테스트 프로젝트", + "description": "Windows, Linux 및 macOS의 .NET에서 실행할 수 있는 MSTest 테스트가 포함된 프로젝트", + "symbols/TargetFrameworkOverride/description": "대상 프레임워크를 재정의합니다.", + "symbols/TargetFrameworkOverride/displayName": "대상 프레임워크 재정의", + "symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.", + "symbols/Framework/displayName": "프레임워크", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10(Windows만 해당)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9(Windows만 해당)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8(Windows만 해당)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7(Windows만 해당)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6(Windows만 해당)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", + "symbols/skipRestore/displayName": "복원 건너뛰기", + "symbols/langVersion/description": "만든 프로젝트 파일에 LangVersion 속성을 설정합니다", + "symbols/langVersion/displayName": "언어 버전", + "symbols/UseMSTestSdk/description": "MSTest.Sdk 프로젝트 스타일을 사용합니다. 자세한 내용은 https://aka.ms/mstest/sdk를 확인하세요.", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk 사용", + "symbols/TestRunner/description": "실행기/플랫폼을 선택합니다. 자세한 내용은 https://aka.ms/mstest/sdk/extensions-profile을 확인하세요.", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "MSTest 실행기 사용(Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest 플랫폼 사용", + "symbols/CoverageTool/description": "프로젝트에 사용할 검사 도구입니다.", + "symbols/CoverageTool/displayName": "적용 범위 도구", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 코드 검사", + "symbols/CoverageTool/choices/coverlet/description": "침대보", + "symbols/ExtensionsProfile/description": "MSTest 실행기를 사용할 때 SDK 확장 프로필을 선택합니다. 자세한 내용은 https://aka.ms/mstest/sdk/extensions-profile을 확인하세요.", + "symbols/ExtensionsProfile/displayName": "확장 프로필 테스트 중", + "symbols/ExtensionsProfile/choices/Default/description": "기본 확장 프로필(권장)", + "symbols/ExtensionsProfile/choices/Default/displayName": "기본값", + "symbols/ExtensionsProfile/choices/None/description": "사용하도록 설정된 확장이 없습니다.", + "symbols/ExtensionsProfile/choices/None/displayName": "없음", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft에서 제공하는 모든 확장 사용(제한 라이선스가 있는 확장 포함)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "프로젝트에 포함할 픽스쳐 종류를 선택합니다.", + "symbols/Fixture/displayName": "픽스쳐", + "symbols/Fixture/choices/None/description": "픽스쳐 메서드 없음", + "symbols/Fixture/choices/None/displayName": "없음", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture 메서드", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture 메서드", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture 메서드", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture 메서드", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture 메서드", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture 메서드", + "postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행", + "postActions/openInEditor/description": "편집기에서 Test1.vb 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..54ec2936fa4b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest — projekt testowy", + "description": "Projekt zawierający testy MSTest, które mogą być uruchamiane na platformie .NET w systemach Windows, Linux i MacOS.", + "symbols/TargetFrameworkOverride/description": "Zastępuje platformę docelową", + "symbols/TargetFrameworkOverride/displayName": "Odrzucenie platformy docelowej", + "symbols/Framework/description": "Platforma docelowa dla tego projektu.", + "symbols/Framework/displayName": "Platforma", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (tylko system Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (tylko system Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (tylko system Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (tylko system Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (tylko system Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": "Platforma .NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", + "symbols/skipRestore/displayName": "Pomiń przywracanie", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/displayName": "Wersja języka", + "symbols/UseMSTestSdk/description": "Użyj stylu projektu MSTest.Sdk. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Korzystaj z narzędzia MSTest.Sdk", + "symbols/TestRunner/description": "Wybierz moduł uruchamiający/platformę. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Moduł uruchamiający", + "symbols/TestRunner/choices/MSTest/description": "Korzystanie z modułu uruchamiającego MSTest (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Korzystanie z platformy VSTest", + "symbols/CoverageTool/description": "Narzędzie pokrycia do użycia w projekcie.", + "symbols/CoverageTool/displayName": "Narzędzie pokrycia", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Pokrycie kodu firmy Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Wybierz profil rozszerzeń zestawu SDK podczas korzystania z modułu uruchamiającego MSTest. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testowanie profilu rozszerzeń", + "symbols/ExtensionsProfile/choices/Default/description": "Domyślny profil rozszerzeń (rekomendowane)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Wartość domyślna", + "symbols/ExtensionsProfile/choices/None/description": "Nie włączono rozszerzeń", + "symbols/ExtensionsProfile/choices/None/displayName": "Brak", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Włącz wszystkie rozszerzenia dostarczane przez firmę Microsoft (w tym rozszerzenia z restrykcyjną licencją)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Wybierz rodzaje warunków początkowych do uwzględnienia w projekcie.", + "symbols/Fixture/displayName": "Warunki początkowe", + "symbols/Fixture/choices/None/description": "Brak metod początkowych", + "symbols/Fixture/choices/None/displayName": "Brak", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize — metoda początkowa", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup — metoda początkowa", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize — metoda początkowa", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup — metoda początkowa", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize — metoda początkowa", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup — metoda początkowa", + "postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”", + "postActions/openInEditor/description": "Otwiera plik Test1.vb w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..fd5ab216c9de --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Projeto de Teste MSTest", + "description": "Um projeto que contém testes do MSTest que podem ser executados no .NET no Windows, Linux e MacOS.", + "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/displayName": "Estrutura", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (somente Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (somente Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (somente Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (somente Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (somente Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", + "symbols/skipRestore/displayName": "Ignorar restauração", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/displayName": "Versão do idioma", + "symbols/UseMSTestSdk/description": "Use o estilo de projeto MSTest.Sdk. Mais informações em https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usar MSTest.Sdk", + "symbols/TestRunner/description": "Selecione o executor/plataforma. Mais informações em https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Executor de teste", + "symbols/TestRunner/choices/MSTest/description": "Usar o MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Usar a plataforma VSTest", + "symbols/CoverageTool/description": "A ferramenta de cobertura a ser usada para o projeto.", + "symbols/CoverageTool/displayName": "Ferramenta Cobertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Cobertura de Código da Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Selecione o perfil de extensões do SDK ao usar o Executor do MSTest. Mais informações em https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testando o perfil de extensões", + "symbols/ExtensionsProfile/choices/Default/description": "Perfil de extensões padrão (recomendado)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Padrão", + "symbols/ExtensionsProfile/choices/None/description": "Nenhuma extensão está habilitada", + "symbols/ExtensionsProfile/choices/None/displayName": "Nenhum", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Habilitar todas as extensões enviadas pela Microsoft (incluindo extensões com uma licença restritiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Selecione os tipos de acessório a serem incluídos no projeto.", + "symbols/Fixture/displayName": "Acessório", + "symbols/Fixture/choices/None/description": "Nenhum método de acessório", + "symbols/Fixture/choices/None/displayName": "Nenhum", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método acessório AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de acessório AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de acessório ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de acessório ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de acessório TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de acessório TestCleanup", + "postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"", + "postActions/openInEditor/description": "Abre o Test1.vb no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..a19c3c966e40 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,61 @@ +{ + "author": "Майкрософт", + "name": "Тестовый проект MSTest", + "description": "Проект, содержащий тесты MSTest, которые могут работать на .NET в Windows, Linux и MacOS.", + "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", + "symbols/TargetFrameworkOverride/displayName": "Переопределение целевой платформы", + "symbols/Framework/description": "Целевая платформа для проекта.", + "symbols/Framework/displayName": "Платформа", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (только для Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (только для Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (только для Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (только для Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (только для Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Позволяет пропускать автоматическое восстановление проекта при создании.", + "symbols/skipRestore/displayName": "Пропустить восстановление", + "symbols/langVersion/description": "Задает свойство LangVersion в создаваемом файле проекта.", + "symbols/langVersion/displayName": "Версия языка", + "symbols/UseMSTestSdk/description": "Используйте стиль проекта MSTest.Sdk. Дополнительные сведения на https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Использовать MSTest.Sdk", + "symbols/TestRunner/description": "Выберите средство выполнения тестов или платформу. Дополнительные сведения на https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Средство выполнения тестов", + "symbols/TestRunner/choices/MSTest/description": "Используйте MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Используйте платформу VSTest", + "symbols/CoverageTool/description": "Инструмент покрытия, который следует использовать для проекта.", + "symbols/CoverageTool/displayName": "Средство оценки объема протестированного кода", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Покрытие кода (Майкрософт)", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Выберите профиль расширений SDK при использовании MSTest Runner. Дополнительные сведения на https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Проверка профиля расширений", + "symbols/ExtensionsProfile/choices/Default/description": "Профиль расширений по умолчанию (рекомендуется)", + "symbols/ExtensionsProfile/choices/Default/displayName": "По умолчанию", + "symbols/ExtensionsProfile/choices/None/description": "Расширения не включены.", + "symbols/ExtensionsProfile/choices/None/displayName": "Отсутствует", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Включить все расширения, поставляемые Майкрософт (включая расширения с ограничительной лицензией)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Выберите типы средств, которые необходимо включить в проект.", + "symbols/Fixture/displayName": "Средство", + "symbols/Fixture/choices/None/description": "Нет методов работы со средствами", + "symbols/Fixture/choices/None/displayName": "Отсутствует", + "symbols/Fixture/choices/AssemblyInitialize/description": "Метод работы со средствами AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Метод работы со средствами AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Метод работы со средствами ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Метод работы со средствами ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Метод работы со средствами TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Метод работы со средствами TestCleanup", + "postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", + "postActions/openInEditor/description": "Открывает Test1.vb в редакторе" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..b647767d430f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Test Projesi", + "description": "Windows, Linux ve macOS üzerinde .NET'te çalışabilen MSTest testlerini içeren bir proje.", + "symbols/TargetFrameworkOverride/description": "Hedef çerçeveyi geçersiz kılar", + "symbols/TargetFrameworkOverride/displayName": "Hedef çerçeveyi geçersiz kılma", + "symbols/Framework/description": "Projenin hedef çerçevesi.", + "symbols/Framework/displayName": "Çerçeve", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (yalnızca Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (yalnızca Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (yalnızca Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (yalnızca Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (yalnızca Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/displayName": "Geri yüklemeyi atla", + "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", + "symbols/langVersion/displayName": "Dil sürümü", + "symbols/UseMSTestSdk/description": "MSTest.Sdk proje stilini kullanın.. Daha fazla bilgi: https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk’sını kullan", + "symbols/TestRunner/description": "Çalıştırıcıyı/platformu seçin. Daha fazla bilgi: https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Çalıştırıcıyı test et", + "symbols/TestRunner/choices/MSTest/description": "MSTest Çalıştırıcısı'nı kullan (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest platformunu kullan", + "symbols/CoverageTool/description": "Projede kullanılacak kapsam aracı.", + "symbols/CoverageTool/displayName": "Kapsam aracı", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Kod Kapsamı", + "symbols/CoverageTool/choices/coverlet/description": "kapakçık", + "symbols/ExtensionsProfile/description": "MSTest Çalıştırıcısı kullanılırken SDK uzantıları profilini seçin. Daha fazla bilgi: https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Uzantılar profili test ediliyor", + "symbols/ExtensionsProfile/choices/Default/description": "Varsayılan uzantılar profili (önerilen)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Varsayılan", + "symbols/ExtensionsProfile/choices/None/description": "Uzantı etkinleştirilmedi", + "symbols/ExtensionsProfile/choices/None/displayName": "Hiçbiri", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft'un gönderdiği tüm uzantıları etkinleştir (kısıtlayıcı lisansı olan uzantılar dahil)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Projeye dahil edilecek düzen türlerini seçin.", + "symbols/Fixture/displayName": "Düzen", + "symbols/Fixture/choices/None/description": "Düzen yöntemi yok", + "symbols/Fixture/choices/None/displayName": "Hiçbiri", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize düzen yöntemi", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup düzen yöntemi", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize düzen yöntemi", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup düzen yöntemi", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize düzen yöntemi", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup düzen yöntemi", + "postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır", + "postActions/openInEditor/description": "Test1.vb'yi düzenleyicide açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..33c39f8d5198 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest 测试项目", + "description": "一个包含 MSTest 测试的项目,这些测试可在 Windows、Linux 和 MacOS 的 .NET 上运行。", + "symbols/TargetFrameworkOverride/description": "替代目标框架", + "symbols/TargetFrameworkOverride/displayName": "目标框架替代", + "symbols/Framework/description": "项目的目标框架。", + "symbols/Framework/displayName": "框架", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (仅限 Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (仅限 Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (仅限 Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (仅限 Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (仅限 Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", + "symbols/skipRestore/displayName": "跳过还原", + "symbols/langVersion/description": "在创建的项目文件中设置 LangVersion 属性", + "symbols/langVersion/displayName": "语言版本", + "symbols/UseMSTestSdk/description": "使用 MSTest.Sdk 项目样式。有关详细信息,请访问 https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "使用 MSTest.Sdk", + "symbols/TestRunner/description": "选择运行器/平台。有关详细信息,请访问 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "使用 MSTest 运行器(Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "使用 VSTest 平台", + "symbols/CoverageTool/description": "要用于项目的覆盖率工具。", + "symbols/CoverageTool/displayName": "覆盖率工具", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 代码覆盖率", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "使用 MSTest 运行器时选择 SDK 扩展配置文件。有关详细信息,请访问 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "测试扩展配置文件", + "symbols/ExtensionsProfile/choices/Default/description": "默认扩展配置文件(推荐)", + "symbols/ExtensionsProfile/choices/Default/displayName": "默认", + "symbols/ExtensionsProfile/choices/None/description": "未启用任何扩展", + "symbols/ExtensionsProfile/choices/None/displayName": "无", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "启用 Microsoft 提供的所有扩展(包括具有限制性许可证的扩展)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "选择要包含在项目中的固定例程类型。", + "symbols/Fixture/displayName": "固定例程", + "symbols/Fixture/choices/None/description": "无固定例程方法", + "symbols/Fixture/choices/None/displayName": "无", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固定例程方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固定例程方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固定例程方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固定例程方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固定例程方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固定例程方法", + "postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"", + "postActions/openInEditor/description": "在编辑器中打开 Test1.vb" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..b8e94e05061f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest 測試專案", + "description": "包含可以在 Windows、Linux 和 MacOS 版的 .NET 上執行的 MSTest 測試的專案。", + "symbols/TargetFrameworkOverride/description": "覆寫目標 Framework", + "symbols/TargetFrameworkOverride/displayName": "目標架構覆寫", + "symbols/Framework/description": "專案的目標 Framework。", + "symbols/Framework/displayName": "架構", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (僅限 Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (僅限 Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (僅限 Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (僅限 Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (僅限 Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "如果指定,則會在建立時跳過專案的自動還原。", + "symbols/skipRestore/displayName": "跳過還原", + "symbols/langVersion/description": "設定建立的專案檔中的 LangVersion 屬性", + "symbols/langVersion/displayName": "語言版本", + "symbols/UseMSTestSdk/description": "使用 MSTest.Sdk 專案樣式。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "使用 MSTest.Sdk", + "symbols/TestRunner/description": "選取執行器/平台。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "測試執行器", + "symbols/TestRunner/choices/MSTest/description": "使用 MSTest 執行器 (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "使用 VSTest 平台", + "symbols/CoverageTool/description": "要用於專案的涵蓋範圍工具。", + "symbols/CoverageTool/displayName": "涵蓋範圍工具", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 程式碼涵蓋範圍", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "選取使用 MSTest 執行器時的 SDK 延伸模組設定檔。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "正在測試擴充功能設定檔", + "symbols/ExtensionsProfile/choices/Default/description": "預設延伸模組設定檔 (建議)", + "symbols/ExtensionsProfile/choices/Default/displayName": "預設", + "symbols/ExtensionsProfile/choices/None/description": "未啟用任何延伸模組", + "symbols/ExtensionsProfile/choices/None/displayName": "無", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "啟用由 Microsoft 提供的所有延伸模組 (包括具有有限制授權的延伸模組)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "選取要併入專案中的固件類型。", + "symbols/Fixture/displayName": "固件", + "symbols/Fixture/choices/None/description": "沒有固件方法", + "symbols/Fixture/choices/None/displayName": "無", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固件方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固件方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固件方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固件方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固件方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固件方法", + "postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'", + "postActions/openInEditor/description": "在編輯器中開啟 Test1.vb" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/template.json new file mode 100644 index 000000000000..9b41ff110a56 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/template.json @@ -0,0 +1,266 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Test", "MSTest", "Desktop", "Web"], + "name": "MSTest Test Project", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project that contains MSTest tests that can run on .NET on Windows, Linux and MacOS.", + "groupIdentity": "Microsoft.Test.MSTest", + "precedence": "12000", + "identity": "Microsoft.Test.MSTest.VisualBasic.10.0", + "shortName": "mstest", + "tags": { + "language": "VB", + "type": "project" + }, + "sourceName": "Company.TestProject1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "displayName": "Target framework override", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "displayName": "Framework", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": ".NET 10" + }, + { + "choice": "net10.0-windows", + "description": ".NET 10 (Windows only)" + }, + { + "choice": "net9.0", + "description": ".NET 9" + }, + { + "choice": "net9.0-windows", + "description": ".NET 9 (Windows only)" + }, + { + "choice": "net8.0", + "description": ".NET 8" + }, + { + "choice": "net8.0-windows", + "description": ".NET 8 (Windows only)" + }, + { + "choice": "net7.0", + "description": ".NET 7" + }, + { + "choice": "net7.0-windows", + "description": ".NET 7 (Windows only)" + }, + { + "choice": "net6.0", + "description": ".NET 6" + }, + { + "choice": "net6.0-windows", + "description": ".NET 6 (Windows only)" + }, + { + "choice": "netcoreapp3.1", + "description": ".NET Core 3.1" + }, + { + "choice": "net481", + "description": ".NET Framework 4.8.1" + }, + { + "choice": "net48", + "description": ".NET Framework 4.8" + }, + { + "choice": "net472", + "description": ".NET Framework 4.7.2" + }, + { + "choice": "net471", + "description": ".NET Framework 4.7.1" + }, + { + "choice": "net47", + "description": ".NET Framework 4.7" + }, + { + "choice": "net462", + "description": ".NET Framework 4.6.2" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "HostIdentifier": { + "type": "bind", + "binding": "host:HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "displayName": "Skip restore", + "defaultValue": "false" + }, + "langVersion": { + "type": "parameter", + "datatype": "text", + "description": "Sets the LangVersion property in the created project file", + "defaultValue": "latest", + "replaces": "$(ProjectLanguageVersion)", + "displayName": "Language version" + }, + "UseMSTestSdk": { + "type": "parameter", + "datatype": "bool", + "description": "Use MSTest.Sdk project style. More information at https://aka.ms/mstest/sdk", + "displayName": "Use MSTest.Sdk", + "defaultValue": "False" + }, + "TestRunner": { + "type": "parameter", + "datatype": "choice", + "enableQuotelessLiterals": true, + "description": "Select the runner/platform. More information at https://aka.ms/mstest/sdk/extensions-profile", + "displayName": "Test runner", + "defaultValue": "VSTest", + "choices": [ + { + "choice": "MSTest", + "description": "Use MSTest Runner (Microsoft.Testing.Platform)" + }, + { + "choice": "VSTest", + "description": "Use VSTest platform" + } + ] + }, + "CoverageTool": { + "type": "parameter", + "datatype": "choice", + "description": "The coverage tool to use for the project.", + "displayName": "Coverage tool", + "defaultValue": "Microsoft.CodeCoverage", + "choices": [ + { + "choice": "Microsoft.CodeCoverage", + "description": "Microsoft Code Coverage" + }, + { + "choice": "coverlet", + "description": "coverlet" + } + ] + }, + "ExtensionsProfile": { + "type": "parameter", + "datatype": "choice", + "description": "Select the SDK extensions profile when using MSTest Runner. More information at https://aka.ms/mstest/sdk/extensions-profile", + "displayName": "Testing extensions profile", + "isEnabled": "UseMSTestSdk && (TestRunner == MSTest)", + "defaultValue": "Default", + "replaces": "$(ExtensionsProfile)", + "choices": [ + { + "choice": "Default", + "description": "Default extensions profile (recommended)", + "displayName": "Default" + }, + { + "choice": "None", + "description": "No extensions are enabled", + "displayName": "None" + }, + { + "choice": "AllMicrosoft", + "description": "Enable all extensions shipped by Microsoft (including extensions with a restrictive license)", + "displayName": "AllMicrosoft" + } + ] + }, + "Fixture": { + "type": "parameter", + "datatype": "choice", + "description": "Select the fixture kinds to include in the project.", + "displayName": "Fixture", + "allowMultipleValues": true, + "enableQuotelessLiterals": true, + "defaultValue": "None", + "choices": [ + { + "choice": "None", + "description": "No fixture methods", + "displayName": "None" + }, + { + "choice": "AssemblyInitialize", + "description": "AssemblyInitialize fixture method" + }, + { + "choice": "AssemblyCleanup", + "description": "AssemblyCleanup fixture method" + }, + { + "choice": "ClassInitialize", + "description": "ClassInitialize fixture method" + }, + { + "choice": "ClassCleanup", + "description": "ClassCleanup fixture method" + }, + { + "choice": "TestInitialize", + "description": "TestInitialize fixture method" + }, + { + "choice": "TestCleanup", + "description": "TestCleanup fixture method" + } + ] + } + }, + "primaryOutputs": [ + { "path": "Company.TestProject1.vbproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "MSTestSettings.vb" + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "Test1.vb" + } + ], + "defaultName": "TestProject1", + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "id": "restoreNugetPackages", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Test1.vb in the editor", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/Company.TestProject1.vbproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/Company.TestProject1.vbproj new file mode 100644 index 000000000000..b946e74e8821 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/Company.TestProject1.vbproj @@ -0,0 +1,72 @@ + + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + enable + enable + + true + + + + + + + + + + true + $(ExtensionsProfile) + + + + + + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + enable + enable + + true + Exe + true + + true + + + + + + + + + + + + + + + + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/MSTestSettings.vb b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/MSTestSettings.vb new file mode 100644 index 000000000000..2ea6cd266913 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/MSTestSettings.vb @@ -0,0 +1,3 @@ +Imports Microsoft.VisualStudio.TestTools.UnitTesting + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/Test1.vb b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/Test1.vb new file mode 100644 index 000000000000..b23c00043a6f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/Test1.vb @@ -0,0 +1,54 @@ +Imports Microsoft.VisualStudio.TestTools.UnitTesting + +Namespace Company.TestProject1 + + Public Class Test1 +#If (Fixture == AssemblyInitialize) + + Public Shared Sub AssemblyInit(ByVal testContext As TestContext) + ' This method is called once for the test assembly, before any tests are run. + End Sub + +#End If +#If (Fixture == AssemblyCleanup) + + Public Shared Sub AssemblyCleanup() + ' This method is called once for the test assembly, after all tests are run. + End Sub + +#End If +#If (Fixture == ClassInitialize) + + Public Shared Sub ClassInit(ByVal testContext As TestContext) + ' This method is called once for the test class, before any tests of the class are run. + End Sub + +#End If +#If (Fixture == ClassCleanup) + + Public Shared Sub ClassCleanup() + ' This method is called once for the test class, after all tests of the class are run. + End Sub + +#End If +#If (Fixture == TestInitialize) + + Public Sub TestInit() + ' This method is called before each test method. + End Sub + +#End If +#If (Fixture == TestCleanup) + + Public Sub TestCleanup() + ' This method is called after each test method. + End Sub + +#End If + + Sub TestSub() + + End Sub + End Class +End Namespace + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..49fa37c2bf26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/dotnetcli.host.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "EnablePack": { + "shortName": "p", + "longName": "enable-pack" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/ide.host.json new file mode 100644 index 000000000000..ef689320bee2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/ide.host.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "tags": [ + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/ide/icon.ico new file mode 100644 index 000000000000..40382f8898eb Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..f4b8efc6f99c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Projekt testů NUnit 3", + "description": "Projekt obsahující testy NUnit, který se dá spustit na .NET v systémech Windows, Linux a macOS", + "symbols/TargetFrameworkOverride/description": "Přepíše cílovou architekturu.", + "symbols/TargetFrameworkOverride/displayName": "Přepsání cílové architektury", + "symbols/Framework/description": "Cílová architektura pro projekt.", + "symbols/Framework/displayName": "Architektura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Určuje, jestli se má pro projekt povolit balení (přes „dotnet pack“).", + "symbols/EnablePack/displayName": "Povolit balíček", + "symbols/skipRestore/description": "Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.", + "symbols/skipRestore/displayName": "Přeskočit obnovení", + "symbols/langVersion/description": "Nastaví vlastnost LangVersion ve vytvořeném souboru projektu.", + "symbols/langVersion/displayName": "Verze jazyka", + "postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore", + "postActions/openInEditor/description": "Otevře UnitTest1.cs v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..c60a1f45130f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3-Testprojekt", + "description": "Ein Projekt, das NUnit-Tests enthält, die auf .NET unter Windows, Linux und macOS ausgeführt werden können.", + "symbols/TargetFrameworkOverride/description": "Überschreibt das Zielframework", + "symbols/TargetFrameworkOverride/displayName": "Überschreibung des Zielframeworks", + "symbols/Framework/description": "Das Zielframework für das Projekt.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Ziel net10.0", + "symbols/EnablePack/description": "Gibt an, ob die Paketerstellung (über \"dotnet pack\") für das Projekt aktiviert werden soll.", + "symbols/EnablePack/displayName": "Paket aktivieren", + "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", + "symbols/skipRestore/displayName": "Wiederherstellung überspringen", + "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/displayName": "Sprachversion", + "postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen", + "postActions/openInEditor/description": "Öffnet UnitTest1.cs im Editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..b766ce12d96e --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Project", + "description": "A project that contains NUnit tests that can run on .NET on Windows, Linux and macOS", + "symbols/TargetFrameworkOverride/description": "Overrides the target framework", + "symbols/TargetFrameworkOverride/displayName": "Target framework override", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "symbols/EnablePack/displayName": "Enable pack", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "symbols/skipRestore/displayName": "Skip restore", + "symbols/langVersion/description": "Sets the LangVersion property in the created project file", + "symbols/langVersion/displayName": "Language version", + "postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'", + "postActions/openInEditor/description": "Opens UnitTest1.cs in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..e5aca0829613 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Proyecto de prueba de NUnit 3", + "description": "Proyecto que contiene pruebas NUnit que se pueden ejecutar en .NET en Windows, Linux y macOS", + "symbols/TargetFrameworkOverride/description": "Invalida la plataforma de destino", + "symbols/TargetFrameworkOverride/displayName": "Invalidación de la plataforma de destino", + "symbols/Framework/description": "Marco de destino del proyecto.", + "symbols/Framework/displayName": "Marco", + "symbols/Framework/choices/net10.0/description": "net10.0 de destino", + "symbols/EnablePack/description": "Indica si se va a habilitar o no el empaquetado (a través de \"dotnet pack\") para el proyecto.", + "symbols/EnablePack/displayName": "Habilitar paquete", + "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/langVersion/description": "Establece la propiedad LangVersion en el archivo de proyecto creado.", + "symbols/langVersion/displayName": "Versión de lenguaje", + "postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir UnitTest1.cs en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..50a9eaf7cdcc --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov alias halex2005 (codeofclimber.ru)", + "name": "Projet de tests NUnit 3", + "description": "Un projet qui contient des tests NUnit pouvant être exécutés sur .NET sous Windows, Linux et macOS.", + "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du cadre cible", + "symbols/Framework/description": "Framework cible du projet.", + "symbols/Framework/displayName": "Infrastructure", + "symbols/Framework/choices/net10.0/description": "net10.0 cible", + "symbols/EnablePack/description": "Indique s’il faut activer ou non la création de packages (via « dotnet pack ») pour le projet.", + "symbols/EnablePack/displayName": "Activer le pack", + "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/langVersion/description": "Définit la propriété LangVersion dans le fichier projet créé", + "symbols/langVersion/displayName": "Version du langage", + "postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »", + "postActions/openInEditor/description": "Ouvre UnitTest1.cs dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..1caf7cd8cade --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Progetto di test NUnit 3", + "description": "Progetto che contiene i test NUnit eseguibili in .NET in Windows, Linux e macOS", + "symbols/TargetFrameworkOverride/description": "Ignora il framework di destinazione", + "symbols/TargetFrameworkOverride/displayName": "Override del framework di destinazione", + "symbols/Framework/description": "Il framework di destinazione per il progetto.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "net10.0 di destinazione", + "symbols/EnablePack/description": "Indica se abilitare o meno la creazione del pacchetto (tramite \"dotnet pack\") per il progetto.", + "symbols/EnablePack/displayName": "Abilita pacchetto", + "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", + "symbols/skipRestore/displayName": "Salta ripristino", + "symbols/langVersion/description": "Imposta la proprietà LangVersion nel file di progetto creato", + "symbols/langVersion/displayName": "Versione del linguaggio", + "postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'", + "postActions/openInEditor/description": "Apre UnitTest1.cs nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..42669e1163a1 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 テスト プロジェクト", + "description": "Windows、Linux、macOS 上の .NET で実行できる NUnit テストを含むプロジェクト", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", + "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", + "symbols/Framework/displayName": "フレームワーク", + "symbols/Framework/choices/net10.0/description": "ターゲット net10.0", + "symbols/EnablePack/description": "(\"dotnet pack\" を使用して) プロジェクトのパッケージ化を有効にするかどうか。", + "symbols/EnablePack/displayName": "パックを有効にする", + "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", + "symbols/skipRestore/displayName": "復元のスキップ", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/displayName": "言語バージョン", + "postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する", + "postActions/openInEditor/description": "エディターで UnitTest1.cs を開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..73691e4051cc --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 테스트 프로젝트", + "description": "Windows, Linux 및 macOS의 .NET에서 실행할 수 있는 NUnit 테스트가 포함된 프로젝트", + "symbols/TargetFrameworkOverride/description": "대상 프레임워크를 재정의합니다.", + "symbols/TargetFrameworkOverride/displayName": "대상 프레임워크 재정의", + "symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.", + "symbols/Framework/displayName": "프레임워크", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "프로젝트에 대해 패키징(\"dotnet pack\"을 통해)을 활성화할지 여부", + "symbols/EnablePack/displayName": "팩 사용", + "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", + "symbols/skipRestore/displayName": "복원 건너뛰기", + "symbols/langVersion/description": "만든 프로젝트 파일에 LangVersion 속성을 설정합니다", + "symbols/langVersion/displayName": "언어 버전", + "postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행", + "postActions/openInEditor/description": "편집기에서 UnitTest1.cs 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..7c393cc732f4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 — projekt testowy", + "description": "Projekt zawierający testy NUnit, które mogą być uruchamiane na platformie .NET w systemach Windows, Linux i macOS", + "symbols/TargetFrameworkOverride/description": "Zastępuje platformę docelową", + "symbols/TargetFrameworkOverride/displayName": "Zastąpienie struktury docelowej", + "symbols/Framework/description": "Platforma docelowa dla tego projektu.", + "symbols/Framework/displayName": "Struktura", + "symbols/Framework/choices/net10.0/description": "Docelowa platforma net10.0", + "symbols/EnablePack/description": "Określa, czy włączyć pakowanie (za pośrednictwem „pakietu dotnet”) dla projektu.", + "symbols/EnablePack/displayName": "Włącz pakiet", + "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", + "symbols/skipRestore/displayName": "Pomiń przywracanie", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/displayName": "Wersja języka", + "postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”", + "postActions/openInEditor/description": "Otwiera plik UnitTest1.cs w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..7e30eb2f047d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov, também conhecido como halex2005 (codeofclimber.ru)", + "name": "Projeto de Teste NUnit 3", + "description": "Um projeto que contém testes NUnit que podem ser executados no .NET no Windows, Linux e macOS", + "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/displayName": "Estrutura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Se deseja ou não habilitar o empacotamento (via \"dotnet pack\") para o projeto.", + "symbols/EnablePack/displayName": "Habilitar pacote", + "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", + "symbols/skipRestore/displayName": "Ignorar restauração", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/displayName": "Versão do idioma", + "postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"", + "postActions/openInEditor/description": "Abre o UnitTest1.cs no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..5b5f0be4fc6b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,19 @@ +{ + "author": "Алексей Харлов aka halex2005 (codeofclimber.ru)", + "name": "Тестовый проект NUnit 3", + "description": "Проект, содержащий тесты NUnit, которые могут работать на .NET в Windows, Linux и macOS.", + "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", + "symbols/TargetFrameworkOverride/displayName": "Переопределение целевой платформы", + "symbols/Framework/description": "Целевая платформа для проекта.", + "symbols/Framework/displayName": "Платформа", + "symbols/Framework/choices/net10.0/description": "Целевая среда net10.0", + "symbols/EnablePack/description": "Следует ли включить упаковку (через \"dotnet pack\") для проекта.", + "symbols/EnablePack/displayName": "Включить пакет", + "symbols/skipRestore/description": "Позволяет пропускать автоматическое восстановление проекта при создании.", + "symbols/skipRestore/displayName": "Пропустить восстановление", + "symbols/langVersion/description": "Задает свойство LangVersion в создаваемом файле проекта.", + "symbols/langVersion/displayName": "Версия языка", + "postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", + "postActions/openInEditor/description": "Открывает UnitTest1.cs в редакторе" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..8ff7762ceeaa --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov, halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Projesi", + "description": "Windows, Linux ve macOS üzerinde .NET'te çalışabilen NUnit testlerini içeren bir proje", + "symbols/TargetFrameworkOverride/description": "Hedef çerçeveyi geçersiz kılar", + "symbols/TargetFrameworkOverride/displayName": "Hedef çerçeveyi geçersiz kılma", + "symbols/Framework/description": "Projenin hedef çerçevesi.", + "symbols/Framework/displayName": "Çerçeve", + "symbols/Framework/choices/net10.0/description": "Hedef net10.0", + "symbols/EnablePack/description": "Proje için paketlemeyi etkinleştirip etkinleştirmeme ayarı ( \"dotnet pack\" üzerinden).", + "symbols/EnablePack/displayName": "Paketi etkinleştir", + "symbols/skipRestore/description": "Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/displayName": "Geri yüklemeyi atla", + "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", + "symbols/langVersion/displayName": "Dil sürümü", + "postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır", + "postActions/openInEditor/description": "UnitTest1.cs'yi düzenleyicide açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..31d99eeea02a --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 测试项目", + "description": "一个包含 NUnit 测试的项目,这些测试可在 Windows、Linux 和 macOS 的 .NET 上运行", + "symbols/TargetFrameworkOverride/description": "替代目标框架", + "symbols/TargetFrameworkOverride/displayName": "目标框架替代", + "symbols/Framework/description": "项目的目标框架。", + "symbols/Framework/displayName": "框架", + "symbols/Framework/choices/net10.0/description": "目标 net10.0", + "symbols/EnablePack/description": "是否(通过 \"dotnet pack\")为项目启用打包。", + "symbols/EnablePack/displayName": "启用包", + "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", + "symbols/skipRestore/displayName": "跳过还原", + "symbols/langVersion/description": "在创建的项目文件中设置 LangVersion 属性", + "symbols/langVersion/displayName": "语言版本", + "postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"", + "postActions/openInEditor/description": "在编辑器中打开 UnitTest1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..641d51ead5f8 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 測試專案", + "description": "包含可以在 Windows、Linux 和 macOS 版的 .NET 上執行的 NUnit 測試的專案", + "symbols/TargetFrameworkOverride/description": "覆寫目標 Framework", + "symbols/TargetFrameworkOverride/displayName": "目標架構覆寫", + "symbols/Framework/description": "專案的目標 Framework。", + "symbols/Framework/displayName": "架構", + "symbols/Framework/choices/net10.0/description": "目標 net10.0", + "symbols/EnablePack/description": "是否要啟用專案的封裝 (透過 \"dotnet pack\")。", + "symbols/EnablePack/displayName": "啟用壓縮", + "symbols/skipRestore/description": "如果指定,則會在建立時跳過專案的自動還原。", + "symbols/skipRestore/displayName": "跳過還原", + "symbols/langVersion/description": "設定建立的專案檔中的 LangVersion 屬性", + "symbols/langVersion/displayName": "語言版本", + "postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'", + "postActions/openInEditor/description": "在編輯器中開啟 UnitTest1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/template.json new file mode 100644 index 000000000000..6b31a8439339 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/.template.config/template.json @@ -0,0 +1,101 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "classifications": [ "Test", "NUnit", "Desktop", "Web" ], + "name": "NUnit 3 Test Project", + "defaultName": "TestProject1", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project that contains NUnit tests that can run on .NET on Windows, Linux and macOS", + "groupIdentity": "NUnit3.DotNetNew.Template", + "precedence": "12000", + "identity": "NUnit3.DotNetNew.Template.CSharp.10.0", + "shortName": "nunit", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "Company.TestProject1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "displayName": "Target framework override", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "displayName": "Framework", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": "Target net10.0" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "EnablePack": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "displayName": "Enable pack" + }, + "HostIdentifier": { + "type": "bind", + "binding": "host:HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "displayName": "Skip restore", + "defaultValue": "false" + }, + "langVersion": { + "type": "parameter", + "datatype": "text", + "description": "Sets the LangVersion property in the created project file", + "defaultValue": "latest", + "replaces": "$(ProjectLanguageVersion)", + "displayName": "Language version" + } + }, + "primaryOutputs": [ + { "path": "Company.TestProject1.csproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "UnitTest1.cs" + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "GlobalUsings.cs" + } + ], + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "id": "restoreNugetPackages", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens UnitTest1.cs in the editor", + "manualInstructions": [ ], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/Company.TestProject1.csproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/Company.TestProject1.csproj new file mode 100644 index 000000000000..db1d8ece4b23 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/Company.TestProject1.csproj @@ -0,0 +1,26 @@ + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + enable + enable + true + false + + + + + + + + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/UnitTest1.cs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/UnitTest1.cs new file mode 100644 index 000000000000..3ff69886477a --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-CSharp/UnitTest1.cs @@ -0,0 +1,15 @@ +namespace Company.TestProject1; + +public class Tests +{ + [SetUp] + public void Setup() + { + } + + [Test] + public void Test1() + { + Assert.Pass(); + } +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..49fa37c2bf26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/dotnetcli.host.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "EnablePack": { + "shortName": "p", + "longName": "enable-pack" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/ide.host.json new file mode 100644 index 000000000000..ef689320bee2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/ide.host.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "tags": [ + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/ide/icon.ico new file mode 100644 index 000000000000..671271e7595d Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..2f14d205a4f6 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Projekt testů NUnit 3", + "description": "Projekt obsahující testy NUnit, který se dá spustit na .NET v systémech Windows, Linux a macOS", + "symbols/TargetFrameworkOverride/description": "Přepíše cílovou architekturu.", + "symbols/TargetFrameworkOverride/displayName": "Přepsání cílové architektury", + "symbols/Framework/description": "Cílová architektura pro projekt.", + "symbols/Framework/displayName": "Architektura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Určuje, jestli se má pro projekt povolit balení (přes „dotnet pack“).", + "symbols/EnablePack/displayName": "Povolit balíček", + "symbols/skipRestore/description": "Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.", + "symbols/skipRestore/displayName": "Přeskočit obnovení", + "symbols/langVersion/description": "Nastaví vlastnost LangVersion ve vytvořeném souboru projektu.", + "symbols/langVersion/displayName": "Verze jazyka", + "postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore", + "postActions/openInEditor/description": "Otevře UnitTest1.fs v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..9dbc40663365 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3-Testprojekt", + "description": "Ein Projekt, das NUnit-Tests enthält, die auf .NET unter Windows, Linux und macOS ausgeführt werden können.", + "symbols/TargetFrameworkOverride/description": "Überschreibt das Zielframework", + "symbols/TargetFrameworkOverride/displayName": "Zielframeworküberschreibung", + "symbols/Framework/description": "Das Zielframework für das Projekt.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Ziel net10.0", + "symbols/EnablePack/description": "Gibt an, ob die Paketerstellung (über \"dotnet pack\") für das Projekt aktiviert werden soll.", + "symbols/EnablePack/displayName": "Paket aktivieren", + "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", + "symbols/skipRestore/displayName": "Wiederherstellung überspringen", + "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/displayName": "Sprachversion", + "postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen", + "postActions/openInEditor/description": "Öffnet UnitTest1.fs im Editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..eb2e284da8c0 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Project", + "description": "A project that contains NUnit tests that can run on .NET on Windows, Linux and macOS", + "symbols/TargetFrameworkOverride/description": "Overrides the target framework", + "symbols/TargetFrameworkOverride/displayName": "Target framework override", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "symbols/EnablePack/displayName": "Enable pack", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "symbols/skipRestore/displayName": "Skip restore", + "symbols/langVersion/description": "Sets the LangVersion property in the created project file", + "symbols/langVersion/displayName": "Language version", + "postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'", + "postActions/openInEditor/description": "Opens UnitTest1.fs in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..9ee4b9d23fb1 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Proyecto de prueba de NUnit 3", + "description": "Proyecto que contiene pruebas NUnit que se pueden ejecutar en .NET en Windows, Linux y macOS", + "symbols/TargetFrameworkOverride/description": "Invalida la plataforma de destino", + "symbols/TargetFrameworkOverride/displayName": "Invalidación de la plataforma de destino", + "symbols/Framework/description": "Marco de destino del proyecto.", + "symbols/Framework/displayName": "Marco", + "symbols/Framework/choices/net10.0/description": "net10.0 de destino", + "symbols/EnablePack/description": "Indica si se va a habilitar o no el empaquetado (a través de \"dotnet pack\") para el proyecto.", + "symbols/EnablePack/displayName": "Habilitar paquete", + "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/langVersion/description": "Establece la propiedad LangVersion en el archivo de proyecto creado.", + "symbols/langVersion/displayName": "Versión de lenguaje", + "postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir UnitTest1.fs en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..7e003d08d99c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov alias halex2005 (codeofclimber.ru)", + "name": "Projet de tests NUnit 3", + "description": "Un projet qui contient des tests NUnit pouvant être exécutés sur .NET sous Windows, Linux et macOS.", + "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du cadre cible", + "symbols/Framework/description": "Framework cible du projet.", + "symbols/Framework/displayName": "Infrastructure", + "symbols/Framework/choices/net10.0/description": "net10.0 cible", + "symbols/EnablePack/description": "Indique s’il faut activer ou non la création de packages (via « dotnet pack ») pour le projet.", + "symbols/EnablePack/displayName": "Activer le pack", + "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/langVersion/description": "Définit la propriété LangVersion dans le fichier projet créé", + "symbols/langVersion/displayName": "Version du langage", + "postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »", + "postActions/openInEditor/description": "Ouvre UnitTest1.fs dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..e888aec336e7 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Progetto di test NUnit 3", + "description": "Progetto che contiene i test NUnit eseguibili in .NET in Windows, Linux e macOS", + "symbols/TargetFrameworkOverride/description": "Ignora il framework di destinazione", + "symbols/TargetFrameworkOverride/displayName": "Override del framework di destinazione", + "symbols/Framework/description": "Il framework di destinazione per il progetto.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "net10.0 di destinazione", + "symbols/EnablePack/description": "Indica se abilitare o meno la creazione del pacchetto (tramite \"dotnet pack\") per il progetto.", + "symbols/EnablePack/displayName": "Abilita pacchetto", + "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", + "symbols/skipRestore/displayName": "Salta ripristino", + "symbols/langVersion/description": "Imposta la proprietà LangVersion nel file di progetto creato", + "symbols/langVersion/displayName": "Versione del linguaggio", + "postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'", + "postActions/openInEditor/description": "Apre UnitTest1.fs nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..1e1444f4c0bd --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 テスト プロジェクト", + "description": "Windows、Linux、macOS 上の .NET で実行できる NUnit テストを含むプロジェクト", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", + "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", + "symbols/Framework/displayName": "フレームワーク", + "symbols/Framework/choices/net10.0/description": "ターゲット net10.0", + "symbols/EnablePack/description": "(\"dotnet pack\" を使用して) プロジェクトのパッケージ化を有効にするかどうか。", + "symbols/EnablePack/displayName": "パックを有効にする", + "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", + "symbols/skipRestore/displayName": "復元のスキップ", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/displayName": "言語バージョン", + "postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する", + "postActions/openInEditor/description": "エディターで UnitTest1.fs を開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..3d690e3cb242 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 테스트 프로젝트", + "description": "Windows, Linux 및 macOS의 .NET에서 실행할 수 있는 NUnit 테스트가 포함된 프로젝트", + "symbols/TargetFrameworkOverride/description": "대상 프레임워크를 재정의합니다.", + "symbols/TargetFrameworkOverride/displayName": "대상 프레임워크 재정의", + "symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.", + "symbols/Framework/displayName": "프레임워크", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "프로젝트에 대해 패키징(\"dotnet pack\"을 통해)을 활성화할지 여부", + "symbols/EnablePack/displayName": "팩 사용", + "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", + "symbols/skipRestore/displayName": "복원 건너뛰기", + "symbols/langVersion/description": "만든 프로젝트 파일에 LangVersion 속성을 설정합니다", + "symbols/langVersion/displayName": "언어 버전", + "postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행", + "postActions/openInEditor/description": "편집기에서 UnitTest1.fs 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..23d3b6764f5f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 — projekt testowy", + "description": "Projekt zawierający testy NUnit, które mogą być uruchamiane na platformie .NET w systemach Windows, Linux i macOS", + "symbols/TargetFrameworkOverride/description": "Zastępuje platformę docelową", + "symbols/TargetFrameworkOverride/displayName": "Zastąpienie struktury docelowej", + "symbols/Framework/description": "Platforma docelowa dla tego projektu.", + "symbols/Framework/displayName": "Struktura", + "symbols/Framework/choices/net10.0/description": "Docelowa platforma net10.0", + "symbols/EnablePack/description": "Określa, czy włączyć pakowanie (za pośrednictwem „pakietu dotnet”) dla projektu.", + "symbols/EnablePack/displayName": "Włącz pakiet", + "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", + "symbols/skipRestore/displayName": "Pomiń przywracanie", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/displayName": "Wersja języka", + "postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”", + "postActions/openInEditor/description": "Otwiera plik UnitTest1.fs w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..318efee36957 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov, também conhecido como halex2005 (codeofclimber.ru)", + "name": "Projeto de Teste NUnit 3", + "description": "Um projeto que contém testes NUnit que podem ser executados no .NET no Windows, Linux e macOS", + "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/displayName": "Estrutura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Se deseja ou não habilitar o empacotamento (via \"dotnet pack\") para o projeto.", + "symbols/EnablePack/displayName": "Habilitar pacote", + "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", + "symbols/skipRestore/displayName": "Ignorar restauração", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/displayName": "Versão do idioma", + "postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"", + "postActions/openInEditor/description": "Abre o UnitTest1.fs no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..fff314fcf804 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,19 @@ +{ + "author": "Алексей Харлов aka halex2005 (codeofclimber.ru)", + "name": "Тестовый проект NUnit 3", + "description": "Проект, содержащий тесты NUnit, которые могут работать на .NET в Windows, Linux и macOS.", + "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", + "symbols/TargetFrameworkOverride/displayName": "Переопределение целевой платформы", + "symbols/Framework/description": "Целевая платформа для проекта.", + "symbols/Framework/displayName": "Платформа", + "symbols/Framework/choices/net10.0/description": "Целевая среда net10.0", + "symbols/EnablePack/description": "Следует ли включить упаковку (через \"dotnet pack\") для проекта.", + "symbols/EnablePack/displayName": "Включить пакет", + "symbols/skipRestore/description": "Позволяет пропускать автоматическое восстановление проекта при создании.", + "symbols/skipRestore/displayName": "Пропустить восстановление", + "symbols/langVersion/description": "Задает свойство LangVersion в создаваемом файле проекта.", + "symbols/langVersion/displayName": "Версия языка", + "postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", + "postActions/openInEditor/description": "Открывает UnitTest1.fs в редакторе" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..cc5e3de0e417 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov, halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Projesi", + "description": "Windows, Linux ve macOS üzerinde .NET'te çalışabilen NUnit testlerini içeren bir proje", + "symbols/TargetFrameworkOverride/description": "Hedef çerçeveyi geçersiz kılar", + "symbols/TargetFrameworkOverride/displayName": "Hedef çerçeveyi geçersiz kılma", + "symbols/Framework/description": "Projenin hedef çerçevesi.", + "symbols/Framework/displayName": "Çerçeve", + "symbols/Framework/choices/net10.0/description": "Hedef net10.0", + "symbols/EnablePack/description": "Proje için paketlemeyi etkinleştirip etkinleştirmeme ayarı ( \"dotnet pack\" üzerinden).", + "symbols/EnablePack/displayName": "Paketi etkinleştir", + "symbols/skipRestore/description": "Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/displayName": "Geri yüklemeyi atla", + "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", + "symbols/langVersion/displayName": "Dil sürümü", + "postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır", + "postActions/openInEditor/description": "UnitTest1.fs'yi düzenleyicide açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..98bc6e335da9 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 测试项目", + "description": "一个包含 NUnit 测试的项目,这些测试可在 Windows、Linux 和 macOS 的 .NET 上运行", + "symbols/TargetFrameworkOverride/description": "替代目标框架", + "symbols/TargetFrameworkOverride/displayName": "目标框架替代", + "symbols/Framework/description": "项目的目标框架。", + "symbols/Framework/displayName": "框架", + "symbols/Framework/choices/net10.0/description": "目标 net10.0", + "symbols/EnablePack/description": "是否(通过 \"dotnet pack\")为项目启用打包。", + "symbols/EnablePack/displayName": "启用包", + "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", + "symbols/skipRestore/displayName": "跳过还原", + "symbols/langVersion/description": "在创建的项目文件中设置 LangVersion 属性", + "symbols/langVersion/displayName": "语言版本", + "postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"", + "postActions/openInEditor/description": "在编辑器中打开 UnitTest1.fs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..d2fbaf7cf44d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 測試專案", + "description": "包含可以在 Windows、Linux 和 macOS 版的 .NET 上執行的 NUnit 測試的專案", + "symbols/TargetFrameworkOverride/description": "覆寫目標 Framework", + "symbols/TargetFrameworkOverride/displayName": "目標架構覆寫", + "symbols/Framework/description": "專案的目標 Framework。", + "symbols/Framework/displayName": "架構", + "symbols/Framework/choices/net10.0/description": "目標 net10.0", + "symbols/EnablePack/description": "是否要啟用專案的封裝 (透過 \"dotnet pack\")。", + "symbols/EnablePack/displayName": "啟用壓縮", + "symbols/skipRestore/description": "如果指定,則會在建立時跳過專案的自動還原。", + "symbols/skipRestore/displayName": "跳過還原", + "symbols/langVersion/description": "設定建立的專案檔中的 LangVersion 屬性", + "symbols/langVersion/displayName": "語言版本", + "postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'", + "postActions/openInEditor/description": "在編輯器中開啟 UnitTest1.fs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/template.json new file mode 100644 index 000000000000..72c5dae8347e --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/.template.config/template.json @@ -0,0 +1,97 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "classifications": [ "Test", "NUnit", "Desktop", "Web" ], + "name": "NUnit 3 Test Project", + "defaultName": "TestProject1", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project that contains NUnit tests that can run on .NET on Windows, Linux and macOS", + "groupIdentity": "NUnit3.DotNetNew.Template", + "precedence": "12000", + "identity": "NUnit3.DotNetNew.Template.FSharp.10.0", + "shortName": "nunit", + "tags": { + "language": "F#", + "type": "project" + }, + "sourceName": "Company.TestProject1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "displayName": "Target framework override", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "displayName": "Framework", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": "Target net10.0" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "EnablePack": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "displayName": "Enable pack" + }, + "HostIdentifier": { + "type": "bind", + "binding": "host:HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "displayName": "Skip restore", + "defaultValue": "false" + }, + "langVersion": { + "type": "parameter", + "datatype": "text", + "description": "Sets the LangVersion property in the created project file", + "defaultValue": "latest", + "replaces": "$(ProjectLanguageVersion)", + "displayName": "Language version" + } + }, + "primaryOutputs": [ + { "path": "Company.TestProject1.fsproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "UnitTest1.fs" + } + ], + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "id": "restoreNugetPackages", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens UnitTest1.fs in the editor", + "manualInstructions": [ ], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/Company.TestProject1.fsproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/Company.TestProject1.fsproj new file mode 100644 index 000000000000..a84b80a3492f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/Company.TestProject1.fsproj @@ -0,0 +1,26 @@ + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + true + false + false + + + + + + + + + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/Program.fs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/Program.fs new file mode 100644 index 000000000000..31dc4f7357bb --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/Program.fs @@ -0,0 +1,4 @@ +module Program + +[] +let main _ = 0 diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/UnitTest1.fs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/UnitTest1.fs new file mode 100644 index 000000000000..04ad1fc8c27c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-FSharp/UnitTest1.fs @@ -0,0 +1,11 @@ +module Company.TestProject1 + +open NUnit.Framework + +[] +let Setup () = + () + +[] +let Test1 () = + Assert.Pass() diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..49fa37c2bf26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/dotnetcli.host.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "EnablePack": { + "shortName": "p", + "longName": "enable-pack" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/ide.host.json new file mode 100644 index 000000000000..ef689320bee2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/ide.host.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "tags": [ + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/ide/icon.ico new file mode 100644 index 000000000000..14998ba8c023 Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..948582708682 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Projekt testů NUnit 3", + "description": "Projekt obsahující testy NUnit, který se dá spustit na .NET v systémech Windows, Linux a macOS", + "symbols/TargetFrameworkOverride/description": "Přepíše cílovou architekturu.", + "symbols/TargetFrameworkOverride/displayName": "Přepsání cílové architektury", + "symbols/Framework/description": "Cílová architektura pro projekt.", + "symbols/Framework/displayName": "Architektura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Určuje, jestli se má pro projekt povolit balení (přes „dotnet pack“).", + "symbols/EnablePack/displayName": "Povolit balíček", + "symbols/skipRestore/description": "Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.", + "symbols/skipRestore/displayName": "Přeskočit obnovení", + "symbols/langVersion/description": "Nastaví vlastnost LangVersion ve vytvořeném souboru projektu.", + "symbols/langVersion/displayName": "Verze jazyka", + "postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore", + "postActions/openInEditor/description": "Otevře UnitTest1.vb v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..d3172ba52c06 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.de.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3-Testprojekt", + "description": "Ein Projekt, das NUnit-Tests enthält, die auf .NET unter Windows, Linux und macOS ausgeführt werden können.", + "symbols/TargetFrameworkOverride/description": "Überschreibt das Zielframework", + "symbols/TargetFrameworkOverride/displayName": "Überschreibung des Zielframeworks", + "symbols/Framework/description": "Das Zielframework für das Projekt.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Ziel net10.0", + "symbols/EnablePack/description": "Gibt an, ob die Paketerstellung (über \"dotnet pack\") für das Projekt aktiviert werden soll.", + "symbols/EnablePack/displayName": "Paket aktivieren", + "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", + "symbols/skipRestore/displayName": "Wiederherstellung überspringen", + "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/displayName": "Sprachversion", + "postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen", + "postActions/openInEditor/description": "Öffnet UnitTest1.vb im Editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..5c66ede97250 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.en.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Project", + "description": "A project that contains NUnit tests that can run on .NET on Windows, Linux and macOS", + "symbols/TargetFrameworkOverride/description": "Overrides the target framework", + "symbols/TargetFrameworkOverride/displayName": "Target framework override", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "symbols/EnablePack/displayName": "Enable pack", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "symbols/skipRestore/displayName": "Skip restore", + "symbols/langVersion/description": "Sets the LangVersion property in the created project file", + "symbols/langVersion/displayName": "Language version", + "postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'", + "postActions/openInEditor/description": "Opens UnitTest1.vb in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..9a3d0e6e2067 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.es.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Proyecto de prueba de NUnit 3", + "description": "Proyecto que contiene pruebas NUnit que se pueden ejecutar en .NET en Windows, Linux y macOS", + "symbols/TargetFrameworkOverride/description": "Invalida la plataforma de destino", + "symbols/TargetFrameworkOverride/displayName": "Invalidación de la plataforma de destino", + "symbols/Framework/description": "Marco de destino del proyecto.", + "symbols/Framework/displayName": "Marco", + "symbols/Framework/choices/net10.0/description": "net10.0 de destino", + "symbols/EnablePack/description": "Indica si se va a habilitar o no el empaquetado (a través de \"dotnet pack\") para el proyecto.", + "symbols/EnablePack/displayName": "Habilitar paquete", + "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/langVersion/description": "Establece la propiedad LangVersion en el archivo de proyecto creado.", + "symbols/langVersion/displayName": "Versión de lenguaje", + "postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir UnitTest1.vb en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..cdb8760b3521 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov alias halex2005 (codeofclimber.ru)", + "name": "Projet de tests NUnit 3", + "description": "Un projet qui contient des tests NUnit pouvant être exécutés sur .NET sous Windows, Linux et macOS.", + "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du cadre cible", + "symbols/Framework/description": "Framework cible du projet.", + "symbols/Framework/displayName": "Infrastructure", + "symbols/Framework/choices/net10.0/description": "net10.0 cible", + "symbols/EnablePack/description": "Indique s’il faut activer ou non la création de packages (via « dotnet pack ») pour le projet.", + "symbols/EnablePack/displayName": "Activer le pack", + "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/langVersion/description": "Définit la propriété LangVersion dans le fichier projet créé", + "symbols/langVersion/displayName": "Version du langage", + "postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »", + "postActions/openInEditor/description": "Ouvre UnitTest1.vb dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..8c0e631762e4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.it.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "Progetto di test NUnit 3", + "description": "Progetto che contiene i test NUnit eseguibili in .NET in Windows, Linux e macOS", + "symbols/TargetFrameworkOverride/description": "Ignora il framework di destinazione", + "symbols/TargetFrameworkOverride/displayName": "Override del framework di destinazione", + "symbols/Framework/description": "Il framework di destinazione per il progetto.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "net10.0 di destinazione", + "symbols/EnablePack/description": "Indica se abilitare o meno la creazione del pacchetto (tramite \"dotnet pack\") per il progetto.", + "symbols/EnablePack/displayName": "Abilita pacchetto", + "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", + "symbols/skipRestore/displayName": "Salta ripristino", + "symbols/langVersion/description": "Imposta la proprietà LangVersion nel file di progetto creato", + "symbols/langVersion/displayName": "Versione del linguaggio", + "postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'", + "postActions/openInEditor/description": "Apre UnitTest1.vb nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..cac46e90fa5f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 テスト プロジェクト", + "description": "Windows、Linux、macOS 上の .NET で実行できる NUnit テストを含むプロジェクト", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", + "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", + "symbols/Framework/displayName": "フレームワーク", + "symbols/Framework/choices/net10.0/description": "ターゲット net10.0", + "symbols/EnablePack/description": "(\"dotnet pack\" を使用して) プロジェクトのパッケージ化を有効にするかどうか。", + "symbols/EnablePack/displayName": "パックを有効にする", + "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", + "symbols/skipRestore/displayName": "復元のスキップ", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/displayName": "言語バージョン", + "postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する", + "postActions/openInEditor/description": "エディターで UnitTest1.vb を開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..983ac988e64f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 테스트 프로젝트", + "description": "Windows, Linux 및 macOS의 .NET에서 실행할 수 있는 NUnit 테스트가 포함된 프로젝트", + "symbols/TargetFrameworkOverride/description": "대상 프레임워크를 재정의합니다.", + "symbols/TargetFrameworkOverride/displayName": "대상 프레임워크 재정의", + "symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.", + "symbols/Framework/displayName": "프레임워크", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "프로젝트에 대해 패키징(\"dotnet pack\"을 통해)을 활성화할지 여부", + "symbols/EnablePack/displayName": "팩 사용", + "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", + "symbols/skipRestore/displayName": "복원 건너뛰기", + "symbols/langVersion/description": "만든 프로젝트 파일에 LangVersion 속성을 설정합니다", + "symbols/langVersion/displayName": "언어 버전", + "postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행", + "postActions/openInEditor/description": "편집기에서 UnitTest1.vb 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..28fae6b7366a --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 — projekt testowy", + "description": "Projekt zawierający testy NUnit, które mogą być uruchamiane na platformie .NET w systemach Windows, Linux i macOS", + "symbols/TargetFrameworkOverride/description": "Zastępuje platformę docelową", + "symbols/TargetFrameworkOverride/displayName": "Zastąpienie struktury docelowej", + "symbols/Framework/description": "Platforma docelowa dla tego projektu.", + "symbols/Framework/displayName": "Struktura", + "symbols/Framework/choices/net10.0/description": "Docelowa platforma net10.0", + "symbols/EnablePack/description": "Określa, czy włączyć pakowanie (za pośrednictwem „pakietu dotnet”) dla projektu.", + "symbols/EnablePack/displayName": "Włącz pakiet", + "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", + "symbols/skipRestore/displayName": "Pomiń przywracanie", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/displayName": "Wersja języka", + "postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”", + "postActions/openInEditor/description": "Otwiera plik UnitTest1.vb w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..232d32bc3afa --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov, também conhecido como halex2005 (codeofclimber.ru)", + "name": "Projeto de Teste NUnit 3", + "description": "Um projeto que contém testes NUnit que podem ser executados no .NET no Windows, Linux e macOS", + "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/displayName": "Estrutura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Se deseja ou não habilitar o empacotamento (via \"dotnet pack\") para o projeto.", + "symbols/EnablePack/displayName": "Habilitar pacote", + "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", + "symbols/skipRestore/displayName": "Ignorar restauração", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/displayName": "Versão do idioma", + "postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"", + "postActions/openInEditor/description": "Abre o UnitTest1.vb no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..fb491aaf82a8 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,19 @@ +{ + "author": "Алексей Харлов aka halex2005 (codeofclimber.ru)", + "name": "Тестовый проект NUnit 3", + "description": "Проект, содержащий тесты NUnit, которые могут работать на .NET в Windows, Linux и macOS.", + "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", + "symbols/TargetFrameworkOverride/displayName": "Переопределение целевой платформы", + "symbols/Framework/description": "Целевая платформа для проекта.", + "symbols/Framework/displayName": "Платформа", + "symbols/Framework/choices/net10.0/description": "Целевая среда net10.0", + "symbols/EnablePack/description": "Следует ли включить упаковку (через \"dotnet pack\") для проекта.", + "symbols/EnablePack/displayName": "Включить пакет", + "symbols/skipRestore/description": "Позволяет пропускать автоматическое восстановление проекта при создании.", + "symbols/skipRestore/displayName": "Пропустить восстановление", + "symbols/langVersion/description": "Задает свойство LangVersion в создаваемом файле проекта.", + "symbols/langVersion/displayName": "Версия языка", + "postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", + "postActions/openInEditor/description": "Открывает UnitTest1.vb в редакторе" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..802dd355a3cb --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov, halex2005 (codeofclimber.ru)", + "name": "NUnit 3 Test Projesi", + "description": "Windows, Linux ve macOS üzerinde .NET'te çalışabilen NUnit testlerini içeren bir proje", + "symbols/TargetFrameworkOverride/description": "Hedef çerçeveyi geçersiz kılar", + "symbols/TargetFrameworkOverride/displayName": "Hedef çerçeveyi geçersiz kılma", + "symbols/Framework/description": "Projenin hedef çerçevesi.", + "symbols/Framework/displayName": "Çerçeve", + "symbols/Framework/choices/net10.0/description": "Hedef net10.0", + "symbols/EnablePack/description": "Proje için paketlemeyi etkinleştirip etkinleştirmeme ayarı ( \"dotnet pack\" üzerinden).", + "symbols/EnablePack/displayName": "Paketi etkinleştir", + "symbols/skipRestore/description": "Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/displayName": "Geri yüklemeyi atla", + "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", + "symbols/langVersion/displayName": "Dil sürümü", + "postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır", + "postActions/openInEditor/description": "UnitTest1.vb'yi düzenleyicide açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..9e9b143c8644 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 测试项目", + "description": "一个包含 NUnit 测试的项目,这些测试可在 Windows、Linux 和 macOS 的 .NET 上运行", + "symbols/TargetFrameworkOverride/description": "替代目标框架", + "symbols/TargetFrameworkOverride/displayName": "目标框架替代", + "symbols/Framework/description": "项目的目标框架。", + "symbols/Framework/displayName": "框架", + "symbols/Framework/choices/net10.0/description": "目标 net10.0", + "symbols/EnablePack/description": "是否(通过 \"dotnet pack\")为项目启用打包。", + "symbols/EnablePack/displayName": "启用包", + "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", + "symbols/skipRestore/displayName": "跳过还原", + "symbols/langVersion/description": "在创建的项目文件中设置 LangVersion 属性", + "symbols/langVersion/displayName": "语言版本", + "postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"", + "postActions/openInEditor/description": "在编辑器中打开 UnitTest1.vb" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..c8532d26e052 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,19 @@ +{ + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "name": "NUnit 3 測試專案", + "description": "包含可以在 Windows、Linux 和 macOS 版的 .NET 上執行的 NUnit 測試的專案", + "symbols/TargetFrameworkOverride/description": "覆寫目標 Framework", + "symbols/TargetFrameworkOverride/displayName": "目標架構覆寫", + "symbols/Framework/description": "專案的目標 Framework。", + "symbols/Framework/displayName": "架構", + "symbols/Framework/choices/net10.0/description": "目標 net10.0", + "symbols/EnablePack/description": "是否要啟用專案的封裝 (透過 \"dotnet pack\")。", + "symbols/EnablePack/displayName": "啟用壓縮", + "symbols/skipRestore/description": "如果指定,則會在建立時跳過專案的自動還原。", + "symbols/skipRestore/displayName": "跳過還原", + "symbols/langVersion/description": "設定建立的專案檔中的 LangVersion 屬性", + "symbols/langVersion/displayName": "語言版本", + "postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'", + "postActions/openInEditor/description": "在編輯器中開啟 UnitTest1.vb" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/template.json new file mode 100644 index 000000000000..cf39a816d358 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/.template.config/template.json @@ -0,0 +1,97 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Aleksei Kharlov aka halex2005 (codeofclimber.ru)", + "classifications": [ "Test", "NUnit", "Desktop", "Web" ], + "name": "NUnit 3 Test Project", + "defaultName": "TestProject1", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project that contains NUnit tests that can run on .NET on Windows, Linux and macOS", + "groupIdentity": "NUnit3.DotNetNew.Template", + "precedence": "12000", + "identity": "NUnit3.DotNetNew.Template.VisualBasic.10.0", + "shortName": "nunit", + "tags": { + "language": "VB", + "type": "project" + }, + "sourceName": "Company.TestProject1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "displayName": "Target framework override", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "displayName": "Framework", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": "Target net10.0" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "EnablePack": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "displayName": "Enable pack" + }, + "HostIdentifier": { + "type": "bind", + "binding": "host:HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "displayName": "Skip restore", + "defaultValue": "false" + }, + "langVersion": { + "type": "parameter", + "datatype": "text", + "description": "Sets the LangVersion property in the created project file", + "defaultValue": "latest", + "replaces": "$(ProjectLanguageVersion)", + "displayName": "Language version" + } + }, + "primaryOutputs": [ + { "path": "Company.TestProject1.vbproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "UnitTest1.vb" + } + ], + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "id": "restoreNugetPackages", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens UnitTest1.vb in the editor", + "manualInstructions": [ ], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/Company.TestProject1.vbproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/Company.TestProject1.vbproj new file mode 100644 index 000000000000..8d27a5210365 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/Company.TestProject1.vbproj @@ -0,0 +1,20 @@ + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + true + false + + + + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/UnitTest1.vb b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/UnitTest1.vb new file mode 100644 index 000000000000..27ef109c8967 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/NUnit-VisualBasic/UnitTest1.vb @@ -0,0 +1,18 @@ +Imports NUnit.Framework + +Namespace Company.TestProject1 + + Public Class Tests + + + Public Sub Setup() + End Sub + + + Public Sub Test1() + Assert.Pass() + End Sub + + End Class + +End Namespace diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..8cb77b63f5c4 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/dotnetcli.host.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + }, + "UseMSTestSdk": { + "shortName": "", + "longName": "sdk" + }, + "TestRunner": { + "shortName": "", + "longName": "test-runner" + }, + "CoverageTool": { + "shortName": "", + "longName": "coverage-tool" + }, + "ExtensionsProfile": { + "shortName": "", + "longName": "extensions-profile" + }, + "Fixture" : { + "shortName": "", + "longName": "fixture" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/ide.host.json new file mode 100644 index 000000000000..bdd89182698f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/ide.host.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "symbolInfo": [ + { + "id": "UseMSTestSdk", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "TestRunner", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "ExtensionsProfile", + "isVisible": true + }, + { + "id": "CoverageTool", + "isVisible": true, + "persistenceScope": "shared" + }, + { + "id": "Fixture", + "isVisible": true + } + ], + "tags": [ + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/ide/icon.ico new file mode 100644 index 000000000000..40382f8898eb Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..ab88f233c1a1 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Testovací projekt MSTest Playwright", + "description": "Projekt, který obsahuje testy Playwright pomocí testovací architektury MSTest, který se dá spustit v .NET ve Windows, Linuxu a MacOS.", + "symbols/TargetFrameworkOverride/description": "Přepíše cílovou architekturu.", + "symbols/TargetFrameworkOverride/displayName": "Přepsání cílové architektury", + "symbols/Framework/description": "Cílová architektura pro projekt.", + "symbols/Framework/displayName": "Architektura", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (jenom Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (jenom Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (jenom Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (jenom Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (jenom Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".Net Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.", + "symbols/skipRestore/displayName": "Přeskočit obnovení", + "symbols/langVersion/description": "Nastaví vlastnost LangVersion ve vytvořeném souboru projektu.", + "symbols/langVersion/displayName": "Verze jazyka", + "symbols/UseMSTestSdk/description": "Použijte styl projektu MSTest.Sdk. Další informace najdete na https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Použít MSTest.Sdk", + "symbols/TestRunner/description": "Vyberte spouštěč nebo platformu. Další informace najdete na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Použít MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Použití platformy VSTest", + "symbols/CoverageTool/description": "Nástroj pokrytí, který se má použít pro projekt.", + "symbols/CoverageTool/displayName": "Nástroj pokrytí", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Pokrytí kódu Microsoftu", + "symbols/CoverageTool/choices/coverlet/description": "pokrývka", + "symbols/ExtensionsProfile/description": "Při použití MSTest Runneru vyberte profil rozšíření sady SDK. Další informace najdete na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testování profilu rozšíření", + "symbols/ExtensionsProfile/choices/Default/description": "Výchozí profil rozšíření (doporučeno)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Výchozí", + "symbols/ExtensionsProfile/choices/None/description": "Nejsou povolená žádná rozšíření.", + "symbols/ExtensionsProfile/choices/None/displayName": "Žádné", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Povolit všechna rozšíření odeslaná Microsoftem (včetně rozšíření s omezující licencí)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Vyberte typy testovacích součástí, které se mají zahrnout do projektu.", + "symbols/Fixture/displayName": "Testovací přípravek", + "symbols/Fixture/choices/None/description": "Žádné metody testovacího přípravku", + "symbols/Fixture/choices/None/displayName": "Žádné", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metoda testovacího přípravku AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metoda testovacího přípravku AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metoda testovacího přípravku ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metoda testovacího přípravku ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metoda testovacího přípravku TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metoda testovacího přípravku TestCleanup", + "postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore", + "postActions/openInEditor/description": "Otevře Test1.cs v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..69504dc97d3e --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Playwright-Testprojekt", + "description": "Ein Projekt, das Playwright-Tests mit MSTest-Testframework enthält, das unter .NET unter Windows, Linux und MacOS ausgeführt werden kann.", + "symbols/TargetFrameworkOverride/description": "Überschreibt das Zielframework", + "symbols/TargetFrameworkOverride/displayName": "Überschreibung des Zielframeworks", + "symbols/Framework/description": "Das Zielframework für das Projekt.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (nur Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (nur Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (nur Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (nur Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (nur Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", + "symbols/skipRestore/displayName": "Wiederherstellung überspringen", + "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/displayName": "Sprachversion", + "symbols/UseMSTestSdk/description": "Verwenden Sie den MSTest.Sdk-Projektstil. Weitere Informationen unter https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk verwenden", + "symbols/TestRunner/description": "Wählen Sie den Runner/die Plattform aus. Weitere Informationen finden Sie unter https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "MSTest Runner verwenden (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest-Plattform verwenden", + "symbols/CoverageTool/description": "Das Abdeckungstool, das für das Projekt verwendet werden soll.", + "symbols/CoverageTool/displayName": "Coverage-Tool", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Wählen Sie das SDK-Erweiterungsprofil aus, wenn Sie MSTest Runner verwenden. Weitere Informationen finden Sie unter https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Erweiterungsprofil wird getestet", + "symbols/ExtensionsProfile/choices/Default/description": "Standarderweiterungsprofil (empfohlen)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Standard", + "symbols/ExtensionsProfile/choices/None/description": "Keine Erweiterungen sind aktiviert", + "symbols/ExtensionsProfile/choices/None/displayName": "Keine", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Alle von Microsoft gelieferten Erweiterungen aktivieren (einschließlich Erweiterungen mit einer restriktiven Lizenz)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Wählen Sie die Fixturearten aus, die in das Projekt eingeschlossen werden sollen.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Keine Fixturemethoden", + "symbols/Fixture/choices/None/displayName": "Keine", + "symbols/Fixture/choices/AssemblyInitialize/description": "Fixturemethode \"AssemblyInitialize\"", + "symbols/Fixture/choices/AssemblyCleanup/description": "Fixierungsmethode \"AssemblyCleanup\"", + "symbols/Fixture/choices/ClassInitialize/description": "Fixturemethode \"ClassInitialize\"", + "symbols/Fixture/choices/ClassCleanup/description": "Fixierungsmethode \"ClassCleanup\"", + "symbols/Fixture/choices/TestInitialize/description": "Fixturemethode \"TestInitialize\"", + "symbols/Fixture/choices/TestCleanup/description": "Fixierungsmethode \"TestCleanup\"", + "postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen", + "postActions/openInEditor/description": "Öffnet Test1.cs im Editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..9ed1d6f28d3b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Playwright Test Project", + "description": "A project that contains Playwright tests using MSTest test framework, that can run on .NET on Windows, Linux and MacOS.", + "symbols/TargetFrameworkOverride/description": "Overrides the target framework", + "symbols/TargetFrameworkOverride/displayName": "Target framework override", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows only)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows only)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows only)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows only)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows only)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "symbols/skipRestore/displayName": "Skip restore", + "symbols/langVersion/description": "Sets the LangVersion property in the created project file", + "symbols/langVersion/displayName": "Language version", + "symbols/UseMSTestSdk/description": "Use MSTest.Sdk project style. More information at https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Use MSTest.Sdk", + "symbols/TestRunner/description": "Select the runner/platform. More information at https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/MSTest/description": "Use MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest platform", + "symbols/CoverageTool/description": "The coverage tool to use for the project.", + "symbols/CoverageTool/displayName": "Coverage tool", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Select the SDK extensions profile when using MSTest Runner. More information at https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testing extensions profile", + "symbols/ExtensionsProfile/choices/Default/description": "Default extensions profile (recommended)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Default", + "symbols/ExtensionsProfile/choices/None/description": "No extensions are enabled", + "symbols/ExtensionsProfile/choices/None/displayName": "None", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Enable all extensions shipped by Microsoft (including extensions with a restrictive license)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Select the fixture kinds to include in the project.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "No fixture methods", + "symbols/Fixture/choices/None/displayName": "None", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture method", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture method", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture method", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture method", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture method", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture method", + "postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'", + "postActions/openInEditor/description": "Opens Test1.cs in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..587b4bf49756 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Proyecto de prueba de MSTest Playwright", + "description": "Proyecto que contiene pruebas de Playwright mediante el marco de pruebas de MSTest, que se puede ejecutar en .NET en Windows, Linux y MacOS.", + "symbols/TargetFrameworkOverride/description": "Invalida la plataforma de destino", + "symbols/TargetFrameworkOverride/displayName": "Invalidación de la plataforma de destino", + "symbols/Framework/description": "Marco de destino del proyecto.", + "symbols/Framework/displayName": "Marco", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (solo Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (solo Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (solo Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (solo Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (solo Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "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/langVersion/description": "Establece la propiedad LangVersion en el archivo de proyecto creado.", + "symbols/langVersion/displayName": "Versión de lenguaje", + "symbols/UseMSTestSdk/description": "Use el estilo de proyecto MSTest.Sdk. Más información en https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usar MSTest.Sdk", + "symbols/TestRunner/description": "Seleccione el ejecutor o la plataforma. Más información en https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Usar MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Uso de la plataforma VSTest", + "symbols/CoverageTool/description": "Herramienta de cobertura que se va a usar para el proyecto.", + "symbols/CoverageTool/displayName": "Herramienta de cobertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Cobertura de código de Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "cubrecama", + "symbols/ExtensionsProfile/description": "Seleccione el perfil de extensiones del SDK al usar MSTest Runner. Más información en https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Prueba del perfil de extensiones", + "symbols/ExtensionsProfile/choices/Default/description": "Perfil de extensiones predeterminadas (recomendado)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Valor predeterminado", + "symbols/ExtensionsProfile/choices/None/description": "No hay extensiones habilitadas", + "symbols/ExtensionsProfile/choices/None/displayName": "Ninguno", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Habilitar todas las extensiones enviadas por Microsoft (incluidas las extensiones con una licencia restrictiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Seleccione los tipos de accesorio que desea incluir en el proyecto.", + "symbols/Fixture/displayName": "Accesorio", + "symbols/Fixture/choices/None/description": "No hay métodos de accesorio", + "symbols/Fixture/choices/None/displayName": "Ninguno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método de accesorio AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de accesorio AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de accesorio ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de accesorio ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de accesorio TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de accesorio TestCleanup", + "postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir Test1.cs en el editor." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..4aaaec3bd586 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Projet de test MSTest Playwright", + "description": "Un projet qui contient des tests Playwright utilisant le framework de test MSTest, qui peut être exécuté sur .NET sur Windows, Linux et MacOS.", + "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du cadre cible", + "symbols/Framework/description": "Framework cible du projet.", + "symbols/Framework/displayName": "Infrastructure", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows uniquement)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows uniquement)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows uniquement)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows uniquement)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows uniquement)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "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/langVersion/description": "Définit la propriété LangVersion dans le fichier projet créé", + "symbols/langVersion/displayName": "Version du langage", + "symbols/UseMSTestSdk/description": "Utilisez le style de projet MSTest.Sdk. Plus d’informations sur https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Utiliser MSTest.Sdk", + "symbols/TestRunner/description": "Sélectionnez l’exécuteur/la plateforme. Plus d’informations sur https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Utilisez MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Utiliser la plateforme VSTest", + "symbols/CoverageTool/description": "Outil de couverture à utiliser pour le projet.", + "symbols/CoverageTool/displayName": "Outil de couverture", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Couverture du code Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Sélectionnez le profil d’extensions du Kit de développement logiciel (SDK) lors de l’utilisation de l’exécuteur MSTest. Plus d’informations sur https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Test du profil des extensions", + "symbols/ExtensionsProfile/choices/Default/description": "Profil d’extensions par défaut (recommandé)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Par défaut", + "symbols/ExtensionsProfile/choices/None/description": "Aucune extension n’est activée", + "symbols/ExtensionsProfile/choices/None/displayName": "Aucun", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Activez toutes les extensions fournies par Microsoft (y compris les extensions avec une licence restrictive)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Sélectionnez les types de fixtures à inclure dans le projet.", + "symbols/Fixture/displayName": "Appareil", + "symbols/Fixture/choices/None/description": "Aucune méthode de fixture", + "symbols/Fixture/choices/None/displayName": "Aucun", + "symbols/Fixture/choices/AssemblyInitialize/description": "Méthode de fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Méthode de fixture assemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Méthode de fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Méthode de fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Méthode de fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Méthode de fixture TestCleanup", + "postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »", + "postActions/openInEditor/description": "Ouvre Test1.cs dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..8badcf6ede67 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Progetto di test playwright MSTest", + "description": "Progetto che contiene test Playwright che usano il framework di test MSTest, eseguibile in .NET in Windows, Linux e MacOS.", + "symbols/TargetFrameworkOverride/description": "Ignora il framework di destinazione", + "symbols/TargetFrameworkOverride/displayName": "Sostituzione del framework di destinazione", + "symbols/Framework/description": "Il framework di destinazione per il progetto.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (solo Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (solo Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (solo Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (solo Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (solo Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", + "symbols/skipRestore/displayName": "Ignora ripristino", + "symbols/langVersion/description": "Imposta la proprietà LangVersion nel file di progetto creato", + "symbols/langVersion/displayName": "Versione del linguaggio", + "symbols/UseMSTestSdk/description": "Usare lo stile del progetto MSTest.Sdk. Per altre informazioni, vedere https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usa MSTest.Sdk", + "symbols/TestRunner/description": "Selezionare lo strumento di esecuzione/la piattaforma. Per altre informazioni, vedere https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "Usa MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Usa la piattaforma VSTest", + "symbols/CoverageTool/description": "Strumento di copertura da usare per il progetto.", + "symbols/CoverageTool/displayName": "Strumento di copertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Code Coverage", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Selezionare il profilo delle estensioni SDK quando si usa MSTest Runner. Per altre informazioni, vedere https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Test del profilo delle estensioni", + "symbols/ExtensionsProfile/choices/Default/description": "Profilo estensioni predefinito (scelta consigliata)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Predefinita", + "symbols/ExtensionsProfile/choices/None/description": "Nessuna estensione abilitata", + "symbols/ExtensionsProfile/choices/None/displayName": "Nessuno", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Abilita tutte le estensioni spedite da Microsoft (incluse le estensioni con una licenza restrittiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Selezionare i tipi di fixture da includere nel progetto.", + "symbols/Fixture/displayName": "Fixture", + "symbols/Fixture/choices/None/description": "Nessun metodo di fixture", + "symbols/Fixture/choices/None/displayName": "Nessuno", + "symbols/Fixture/choices/AssemblyInitialize/description": "Metodo fixture AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Metodo fixture AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Metodo fixture ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Metodo fixture ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Metodo fixture TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Metodo fixture TestCleanup", + "postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'", + "postActions/openInEditor/description": "Apre Test1.cs nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..bd8519a9b930 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Playwright テスト プロジェクト", + "description": "Windows、Linux、MacOS 上の .NET で実行できる、MSTest テスト フレームワークを使用した Playwright テストを含むプロジェクト。", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", + "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", + "symbols/Framework/displayName": "フレームワーク", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (Windows のみ)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (Windows のみ)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (Windows のみ)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (Windows のみ)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (Windows のみ)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", + "symbols/skipRestore/displayName": "復元のスキップ", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/displayName": "言語バージョン", + "symbols/UseMSTestSdk/description": "MSTest.Sdk プロジェクト スタイルを使用します。https://aka.ms/mstest/sdk の詳細情報", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk を使用する", + "symbols/TestRunner/description": "ランナー/プラットフォームを選択します。https://aka.ms/mstest/sdk/extensions-profile の詳細情報", + "symbols/TestRunner/displayName": "テスト ランナー", + "symbols/TestRunner/choices/MSTest/description": "MSTest Runner を使用する (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest プラットフォームを使用する", + "symbols/CoverageTool/description": "プロジェクトに使用するカバレッジ ツール。", + "symbols/CoverageTool/displayName": "カバレッジ ツール", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft コード カバレッジ", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "MSTest Runner を使用する場合は、SDK 拡張機能プロファイルを選択します。https://aka.ms/mstest/sdk/extensions-profile の詳細情報", + "symbols/ExtensionsProfile/displayName": "拡張機能プロファイルをテストしています", + "symbols/ExtensionsProfile/choices/Default/description": "既定の拡張機能プロファイル (推奨)", + "symbols/ExtensionsProfile/choices/Default/displayName": "既定値", + "symbols/ExtensionsProfile/choices/None/description": "有効になっている拡張機能がありません", + "symbols/ExtensionsProfile/choices/None/displayName": "なし", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft が出荷するすべての拡張機能を有効にする (制限付きライセンスを持つ拡張機能を含む)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "プロジェクトに含めるフィクスチャの種類を選択します。", + "symbols/Fixture/displayName": "フィクスチャ", + "symbols/Fixture/choices/None/description": "フィクスチャ メソッドがありません", + "symbols/Fixture/choices/None/displayName": "なし", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup フィクスチャ メソッド", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize フィクスチャ メソッド", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup フィクスチャ メソッド", + "postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する", + "postActions/openInEditor/description": "エディターで Test1.cs を開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..a75343bbbf39 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Playwright 테스트 프로젝트", + "description": "Windows, Linux 및 MacOS의 .NET에서 실행할 수 있는 MSTest 테스트 프레임워크를 사용하는 Playwright 테스트를 포함하는 프로젝트입니다.", + "symbols/TargetFrameworkOverride/description": "대상 프레임워크를 재정의합니다.", + "symbols/TargetFrameworkOverride/displayName": "대상 프레임워크 재정의", + "symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.", + "symbols/Framework/displayName": "프레임워크", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10(Windows만 해당)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9(Windows만 해당)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8(Windows만 해당)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7(Windows만 해당)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6(Windows만 해당)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", + "symbols/skipRestore/displayName": "복원 건너뛰기", + "symbols/langVersion/description": "만든 프로젝트 파일에 LangVersion 속성을 설정합니다", + "symbols/langVersion/displayName": "언어 버전", + "symbols/UseMSTestSdk/description": "MSTest.Sdk 프로젝트 스타일을 사용합니다. 자세한 내용은 https://aka.ms/mstest/sdk를 확인하세요.", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk 사용", + "symbols/TestRunner/description": "실행기/플랫폼을 선택합니다. 자세한 내용은 https://aka.ms/mstest/sdk/extensions-profile을 확인하세요.", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "MSTest 실행기 사용(Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest 플랫폼 사용", + "symbols/CoverageTool/description": "프로젝트에 사용할 검사 도구입니다.", + "symbols/CoverageTool/displayName": "적용 범위 도구", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 코드 검사", + "symbols/CoverageTool/choices/coverlet/description": "침대보", + "symbols/ExtensionsProfile/description": "MSTest 실행기를 사용할 때 SDK 확장 프로필을 선택합니다. 자세한 내용은 https://aka.ms/mstest/sdk/extensions-profile을 확인하세요.", + "symbols/ExtensionsProfile/displayName": "확장 프로필 테스트 중", + "symbols/ExtensionsProfile/choices/Default/description": "기본 확장 프로필(권장)", + "symbols/ExtensionsProfile/choices/Default/displayName": "기본값", + "symbols/ExtensionsProfile/choices/None/description": "사용하도록 설정된 확장이 없습니다.", + "symbols/ExtensionsProfile/choices/None/displayName": "없음", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft에서 제공하는 모든 확장 사용(제한 라이선스가 있는 확장 포함)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "프로젝트에 포함할 픽스쳐 종류를 선택합니다.", + "symbols/Fixture/displayName": "픽스쳐", + "symbols/Fixture/choices/None/description": "픽스쳐 메서드 없음", + "symbols/Fixture/choices/None/displayName": "없음", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize fixture 메서드", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup fixture 메서드", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize fixture 메서드", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup fixture 메서드", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize fixture 메서드", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture 메서드", + "postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행", + "postActions/openInEditor/description": "편집기에서 Test1.cs 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..295d39852a47 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Projekt testowy MSTest Playwright", + "description": "Projekt, który zawiera testy Playwright wykorzystujące strukturę testową MSTest, który można uruchomić na platformie .NET w systemach Windows, Linux i MacOS.", + "symbols/TargetFrameworkOverride/description": "Zastępuje platformę docelową", + "symbols/TargetFrameworkOverride/displayName": "Zastąpienie struktury docelowej", + "symbols/Framework/description": "Platforma docelowa dla tego projektu.", + "symbols/Framework/displayName": "Struktura", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (tylko system Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (tylko system Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (tylko system Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (tylko system Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (tylko system Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": "Platforma .NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", + "symbols/skipRestore/displayName": "Pomiń przywracanie", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/displayName": "Wersja języka", + "symbols/UseMSTestSdk/description": "Użyj stylu projektu MSTest.Sdk. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Korzystaj z narzędzia MSTest.Sdk", + "symbols/TestRunner/description": "Wybierz moduł uruchamiający/platformę. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Moduł uruchamiający", + "symbols/TestRunner/choices/MSTest/description": "Korzystanie z modułu uruchamiającego MSTest (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Korzystanie z platformy VSTest", + "symbols/CoverageTool/description": "Narzędzie pokrycia do użycia w projekcie.", + "symbols/CoverageTool/displayName": "Narzędzie pokrycia", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Pokrycie kodu firmy Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Wybierz profil rozszerzeń zestawu SDK podczas korzystania z modułu uruchamiającego MSTest. Więcej informacji znajdziesz na https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Testowanie profilu rozszerzeń", + "symbols/ExtensionsProfile/choices/Default/description": "Domyślny profil rozszerzeń (rekomendowane)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Wartość domyślna", + "symbols/ExtensionsProfile/choices/None/description": "Nie włączono rozszerzeń", + "symbols/ExtensionsProfile/choices/None/displayName": "Brak", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Włącz wszystkie rozszerzenia dostarczane przez firmę Microsoft (w tym rozszerzenia z restrykcyjną licencją)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Wybierz rodzaje warunków początkowych do uwzględnienia w projekcie.", + "symbols/Fixture/displayName": "Warunki początkowe", + "symbols/Fixture/choices/None/description": "Brak metod początkowych", + "symbols/Fixture/choices/None/displayName": "Brak", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize — metoda początkowa", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup — metoda początkowa", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize — metoda początkowa", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup — metoda początkowa", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize — metoda początkowa", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup — metoda początkowa", + "postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”", + "postActions/openInEditor/description": "Otwiera plik Test1.cs w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..ace29986181c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "Projeto de Teste MSTest do Playwright", + "description": "Um projeto que contém testes do Playwright usando a estrutura de teste MSTest, que pode ser executada no .NET no Windows, Linux e macOS.", + "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/displayName": "Estrutura", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (somente Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (somente Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (somente Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (somente Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (somente Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", + "symbols/skipRestore/displayName": "Ignorar restauração", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/displayName": "Versão do idioma", + "symbols/UseMSTestSdk/description": "Use o estilo de projeto MSTest.Sdk. Mais informações em https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Usar MSTest.SDK", + "symbols/TestRunner/description": "Selecione o executor/plataforma. Mais informações em https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Executar teste", + "symbols/TestRunner/choices/MSTest/description": "Usar o MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Usar a plataforma VSTest", + "symbols/CoverageTool/description": "A ferramenta de cobertura a ser usada para o projeto.", + "symbols/CoverageTool/displayName": "Ferramenta de cobertura", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Cobertura de Código da Microsoft", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Selecione o perfil de extensões do SDK ao usar o Executor do MSTest. Mais informações em https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Perfil de extensões de teste", + "symbols/ExtensionsProfile/choices/Default/description": "Perfil de extensões padrão (recomendado)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Padrão", + "symbols/ExtensionsProfile/choices/None/description": "Nenhuma extensão está habilitada", + "symbols/ExtensionsProfile/choices/None/displayName": "Nenhum", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Habilitar todas as extensões enviadas pela Microsoft (incluindo extensões com uma licença restritiva)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Selecione os tipos de acessório a serem incluídos no projeto.", + "symbols/Fixture/displayName": "Acessório", + "symbols/Fixture/choices/None/description": "Nenhum método de acessório", + "symbols/Fixture/choices/None/displayName": "Nenhum", + "symbols/Fixture/choices/AssemblyInitialize/description": "Método acessório AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Método de acessório AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Método de acessório ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Método de acessório ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Método de acessório TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Método de acessório TestCleanup", + "postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"", + "postActions/openInEditor/description": "Abre o Test1.cs no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..ef5313d27a70 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,61 @@ +{ + "author": "Майкрософт", + "name": "Тестовый проект MSTest Playwright", + "description": "Проект, содержащий тесты Playwright с использованием инфраструктуры MSTest, которая может работать на .NET в Windows, Linux и MacOS.", + "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", + "symbols/TargetFrameworkOverride/displayName": "Переопределение целевой платформы", + "symbols/Framework/description": "Целевая платформа для проекта.", + "symbols/Framework/displayName": "Платформа", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (только для Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (только для Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (только для Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (только для Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (только для Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Позволяет пропускать автоматическое восстановление проекта при создании.", + "symbols/skipRestore/displayName": "Пропустить восстановление", + "symbols/langVersion/description": "Задает свойство LangVersion в создаваемом файле проекта.", + "symbols/langVersion/displayName": "Версия языка", + "symbols/UseMSTestSdk/description": "Используйте стиль проекта MSTest.Sdk. Дополнительные сведения на https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "Использовать MSTest.Sdk", + "symbols/TestRunner/description": "Выберите средство выполнения тестов или платформу. Дополнительные сведения на https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Средство выполнения тестов", + "symbols/TestRunner/choices/MSTest/description": "Используйте MSTest Runner (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "Используйте платформу VSTest", + "symbols/CoverageTool/description": "Инструмент покрытия, который следует использовать для проекта.", + "symbols/CoverageTool/displayName": "Средство оценки объема протестированного кода", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Покрытие кода (Майкрософт)", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "Выберите профиль расширений SDK при использовании MSTest Runner. Дополнительные сведения на https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Проверка профиля расширений", + "symbols/ExtensionsProfile/choices/Default/description": "Профиль расширений по умолчанию (рекомендуется)", + "symbols/ExtensionsProfile/choices/Default/displayName": "По умолчанию", + "symbols/ExtensionsProfile/choices/None/description": "Расширения не включены.", + "symbols/ExtensionsProfile/choices/None/displayName": "Отсутствует", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Включить все расширения, поставляемые Майкрософт (включая расширения с ограничительной лицензией)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Выберите типы средств, которые необходимо включить в проект.", + "symbols/Fixture/displayName": "Средство", + "symbols/Fixture/choices/None/description": "Нет методов работы со средствами", + "symbols/Fixture/choices/None/displayName": "Отсутствует", + "symbols/Fixture/choices/AssemblyInitialize/description": "Метод работы со средствами AssemblyInitialize", + "symbols/Fixture/choices/AssemblyCleanup/description": "Метод работы со средствами AssemblyCleanup", + "symbols/Fixture/choices/ClassInitialize/description": "Метод работы со средствами ClassInitialize", + "symbols/Fixture/choices/ClassCleanup/description": "Метод работы со средствами ClassCleanup", + "symbols/Fixture/choices/TestInitialize/description": "Метод работы со средствами TestInitialize", + "symbols/Fixture/choices/TestCleanup/description": "Метод работы со средствами TestCleanup", + "postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", + "postActions/openInEditor/description": "Открывает Test1.cs редакторе" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..2daa2133c618 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Playwright Test Projesi", + "description": "Windows, Linux ve macOS üzerinde .NET'te çalışabilen ve MSTest test çerçevesini kullanan Playwright testlerini içeren bir proje.", + "symbols/TargetFrameworkOverride/description": "Hedef çerçeveyi geçersiz kılar", + "symbols/TargetFrameworkOverride/displayName": "Hedef çerçeveyi geçersiz kılma", + "symbols/Framework/description": "Projenin hedef çerçevesi.", + "symbols/Framework/displayName": "Çerçeve", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (yalnızca Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (yalnızca Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (yalnızca Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (yalnızca Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (yalnızca Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/displayName": "Geri yüklemeyi atla", + "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", + "symbols/langVersion/displayName": "Dil sürümü", + "symbols/UseMSTestSdk/description": "MSTest.Sdk proje stilini kullanın.. Daha fazla bilgi: https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "MSTest.Sdk kullan", + "symbols/TestRunner/description": "Çalıştırıcıyı/platformu seçin. Daha fazla bilgi: https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test çalıştırıcı", + "symbols/TestRunner/choices/MSTest/description": "MSTest Çalıştırıcısı'nı kullan (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "VSTest platformunu kullan", + "symbols/CoverageTool/description": "Projede kullanılacak kapsam aracı.", + "symbols/CoverageTool/displayName": "Kapsam aracı", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft Kod Kapsamı", + "symbols/CoverageTool/choices/coverlet/description": "kapakçık", + "symbols/ExtensionsProfile/description": "MSTest Çalıştırıcısı kullanılırken SDK uzantıları profilini seçin. Daha fazla bilgi: https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "Uzantılar profili test ediliyor", + "symbols/ExtensionsProfile/choices/Default/description": "Varsayılan uzantılar profili (önerilen)", + "symbols/ExtensionsProfile/choices/Default/displayName": "Varsayılan", + "symbols/ExtensionsProfile/choices/None/description": "Uzantı etkinleştirilmedi", + "symbols/ExtensionsProfile/choices/None/displayName": "Hiçbiri", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "Microsoft'un gönderdiği tüm uzantıları etkinleştir (kısıtlayıcı lisansı olan uzantılar dahil)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "Projeye dahil edilecek düzen türlerini seçin.", + "symbols/Fixture/displayName": "Düzen", + "symbols/Fixture/choices/None/description": "Düzen yöntemi yok", + "symbols/Fixture/choices/None/displayName": "Hiçbiri", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize düzen yöntemi", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup düzen yöntemi", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize düzen yöntemi", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup düzen yöntemi", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize düzen yöntemi", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup düzen yöntemi", + "postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır", + "postActions/openInEditor/description": "Test1.cs'yi düzenleyicide açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..b01848fcaafe --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Playwright 测试项目", + "description": "一个包含使用 MSTest 测试框架的 Playwright 测试的项目,这些测试可在 Windows、Linux 和 MacOS 上的 .NET 上运行。", + "symbols/TargetFrameworkOverride/description": "替代目标框架", + "symbols/TargetFrameworkOverride/displayName": "目标框架替代", + "symbols/Framework/description": "项目的目标框架。", + "symbols/Framework/displayName": "框架", + "symbols/Framework/choices/net10.0/description": ".NET 10", + "symbols/Framework/choices/net10.0-windows/description": ".NET 10 (仅限 Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 9", + "symbols/Framework/choices/net9.0-windows/description": ".NET 9 (仅限 Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (仅限 Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (仅限 Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (仅限 Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", + "symbols/skipRestore/displayName": "跳过还原", + "symbols/langVersion/description": "在创建的项目文件中设置 LangVersion 属性", + "symbols/langVersion/displayName": "语言版本", + "symbols/UseMSTestSdk/description": "使用 MSTest.Sdk 项目样式。有关详细信息,请访问 https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "使用 MSTest.Sdk", + "symbols/TestRunner/description": "选择运行器/平台。有关详细信息,请访问 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "Test Runner", + "symbols/TestRunner/choices/MSTest/description": "使用 MSTest 运行器(Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "使用 VSTest 平台", + "symbols/CoverageTool/description": "要用于项目的覆盖率工具。", + "symbols/CoverageTool/displayName": "覆盖工具", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 代码覆盖率", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "使用 MSTest 运行器时选择 SDK 扩展配置文件。有关详细信息,请访问 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "测试扩展配置文件", + "symbols/ExtensionsProfile/choices/Default/description": "默认扩展配置文件(推荐)", + "symbols/ExtensionsProfile/choices/Default/displayName": "默认", + "symbols/ExtensionsProfile/choices/None/description": "未启用任何扩展", + "symbols/ExtensionsProfile/choices/None/displayName": "无", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "启用 Microsoft 提供的所有扩展(包括具有限制性许可证的扩展)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "选择要包含在项目中的固定例程类型。", + "symbols/Fixture/displayName": "固定例程", + "symbols/Fixture/choices/None/description": "无固定例程方法", + "symbols/Fixture/choices/None/displayName": "无", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固定例程方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固定例程方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固定例程方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固定例程方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固定例程方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固定例程方法", + "postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"", + "postActions/openInEditor/description": "在编辑器中打开 Test1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..2ef9ff776c26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,61 @@ +{ + "author": "Microsoft", + "name": "MSTest Playwright 測試專案", + "description": "包含可以在 Windows、Linux 和 MacOS 版的 .NET 上執行、使用 MSTest 測試架構的 Playwright 測試的專案。", + "symbols/TargetFrameworkOverride/description": "覆寫目標 Framework", + "symbols/TargetFrameworkOverride/displayName": "目標架構覆寫", + "symbols/Framework/description": "專案的目標 Framework。", + "symbols/Framework/displayName": "架構", + "symbols/Framework/choices/net10.0/description": ".NET 9", + "symbols/Framework/choices/net10.0-windows/description": ".NET 9 (僅限 Windows)", + "symbols/Framework/choices/net9.0/description": ".NET 10", + "symbols/Framework/choices/net9.0-windows/description": ".NET 10 (僅限 Windows)", + "symbols/Framework/choices/net8.0/description": ".NET 8", + "symbols/Framework/choices/net8.0-windows/description": ".NET 8 (僅限 Windows)", + "symbols/Framework/choices/net7.0/description": ".NET 7", + "symbols/Framework/choices/net7.0-windows/description": ".NET 7 (僅限 Windows)", + "symbols/Framework/choices/net6.0/description": ".NET 6", + "symbols/Framework/choices/net6.0-windows/description": ".NET 6 (僅限 Windows)", + "symbols/Framework/choices/netcoreapp3.1/description": ".NET Core 3.1", + "symbols/Framework/choices/net481/description": ".NET Framework 4.8.1", + "symbols/Framework/choices/net48/description": ".NET Framework 4.8", + "symbols/Framework/choices/net472/description": ".NET Framework 4.7.2", + "symbols/Framework/choices/net471/description": ".NET Framework 4.7.1", + "symbols/Framework/choices/net47/description": ".NET Framework 4.7", + "symbols/Framework/choices/net462/description": ".NET Framework 4.6.2", + "symbols/skipRestore/description": "如果指定,則會在建立時跳過專案的自動還原。", + "symbols/skipRestore/displayName": "跳過還原", + "symbols/langVersion/description": "設定建立的專案檔中的 LangVersion 屬性", + "symbols/langVersion/displayName": "語言版本", + "symbols/UseMSTestSdk/description": "使用 MSTest.Sdk 專案樣式。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk", + "symbols/UseMSTestSdk/displayName": "使用 MSTest.Sdk", + "symbols/TestRunner/description": "選取執行器/平台。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/TestRunner/displayName": "測試執行器", + "symbols/TestRunner/choices/MSTest/description": "使用 MSTest 執行器 (Microsoft.Testing.Platform)", + "symbols/TestRunner/choices/VSTest/description": "使用 VSTest 平台", + "symbols/CoverageTool/description": "要用於專案的涵蓋範圍工具。", + "symbols/CoverageTool/displayName": "涵蓋範圍工具", + "symbols/CoverageTool/choices/Microsoft.CodeCoverage/description": "Microsoft 程式碼涵蓋範圍", + "symbols/CoverageTool/choices/coverlet/description": "coverlet", + "symbols/ExtensionsProfile/description": "選取使用 MSTest 執行器時的 SDK 延伸模組設定檔。如需詳細資訊,請參閱 https://aka.ms/mstest/sdk/extensions-profile", + "symbols/ExtensionsProfile/displayName": "正在測試擴充功能設定檔", + "symbols/ExtensionsProfile/choices/Default/description": "預設延伸模組設定檔 (建議)", + "symbols/ExtensionsProfile/choices/Default/displayName": "預設", + "symbols/ExtensionsProfile/choices/None/description": "未啟用任何延伸模組", + "symbols/ExtensionsProfile/choices/None/displayName": "無", + "symbols/ExtensionsProfile/choices/AllMicrosoft/description": "啟用由 Microsoft 提供的所有延伸模組 (包括具有有限制授權的延伸模組)", + "symbols/ExtensionsProfile/choices/AllMicrosoft/displayName": "AllMicrosoft", + "symbols/Fixture/description": "選取要併入專案中的固件類型。", + "symbols/Fixture/displayName": "固件", + "symbols/Fixture/choices/None/description": "沒有固件方法", + "symbols/Fixture/choices/None/displayName": "無", + "symbols/Fixture/choices/AssemblyInitialize/description": "AssemblyInitialize 固件方法", + "symbols/Fixture/choices/AssemblyCleanup/description": "AssemblyCleanup 固件方法", + "symbols/Fixture/choices/ClassInitialize/description": "ClassInitialize 固件方法", + "symbols/Fixture/choices/ClassCleanup/description": "ClassCleanup 固件方法", + "symbols/Fixture/choices/TestInitialize/description": "TestInitialize 固件方法", + "symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固件方法", + "postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'", + "postActions/openInEditor/description": "在編輯器中開啟 Test1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/template.json new file mode 100644 index 000000000000..fcf6da24c994 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/template.json @@ -0,0 +1,266 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Test", "MSTest", "Playwright", "Desktop", "Web"], + "name": "MSTest Playwright Test Project", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project that contains Playwright tests using MSTest test framework, that can run on .NET on Windows, Linux and MacOS.", + "groupIdentity": "Microsoft.Test.Playwright.MSTest", + "precedence": "12000", + "identity": "Microsoft.Test.Playwright.MSTest.CSharp.10.0", + "shortName": "mstest-playwright", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "Company.TestProject1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "displayName": "Target framework override", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "displayName": "Framework", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": ".NET 10" + }, + { + "choice": "net10.0-windows", + "description": ".NET 10 (Windows only)" + }, + { + "choice": "net9.0", + "description": ".NET 9" + }, + { + "choice": "net9.0-windows", + "description": ".NET 9 (Windows only)" + }, + { + "choice": "net8.0", + "description": ".NET 8" + }, + { + "choice": "net8.0-windows", + "description": ".NET 8 (Windows only)" + }, + { + "choice": "net7.0", + "description": ".NET 7" + }, + { + "choice": "net7.0-windows", + "description": ".NET 7 (Windows only)" + }, + { + "choice": "net6.0", + "description": ".NET 6" + }, + { + "choice": "net6.0-windows", + "description": ".NET 6 (Windows only)" + }, + { + "choice": "netcoreapp3.1", + "description": ".NET Core 3.1" + }, + { + "choice": "net481", + "description": ".NET Framework 4.8.1" + }, + { + "choice": "net48", + "description": ".NET Framework 4.8" + }, + { + "choice": "net472", + "description": ".NET Framework 4.7.2" + }, + { + "choice": "net471", + "description": ".NET Framework 4.7.1" + }, + { + "choice": "net47", + "description": ".NET Framework 4.7" + }, + { + "choice": "net462", + "description": ".NET Framework 4.6.2" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "HostIdentifier": { + "type": "bind", + "binding": "host:HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "displayName": "Skip restore", + "defaultValue": "false" + }, + "langVersion": { + "type": "parameter", + "datatype": "text", + "description": "Sets the LangVersion property in the created project file", + "defaultValue": "latest", + "replaces": "$(ProjectLanguageVersion)", + "displayName": "Language version" + }, + "UseMSTestSdk": { + "type": "parameter", + "datatype": "bool", + "description": "Use MSTest.Sdk project style. More information at https://aka.ms/mstest/sdk", + "displayName": "Use MSTest.Sdk", + "defaultValue": "False" + }, + "TestRunner": { + "type": "parameter", + "datatype": "choice", + "enableQuotelessLiterals": true, + "description": "Select the runner/platform. More information at https://aka.ms/mstest/sdk/extensions-profile", + "displayName": "Test runner", + "defaultValue": "VSTest", + "choices": [ + { + "choice": "MSTest", + "description": "Use MSTest Runner (Microsoft.Testing.Platform)" + }, + { + "choice": "VSTest", + "description": "Use VSTest platform" + } + ] + }, + "CoverageTool": { + "type": "parameter", + "datatype": "choice", + "description": "The coverage tool to use for the project.", + "displayName": "Coverage tool", + "defaultValue": "Microsoft.CodeCoverage", + "choices": [ + { + "choice": "Microsoft.CodeCoverage", + "description": "Microsoft Code Coverage" + }, + { + "choice": "coverlet", + "description": "coverlet" + } + ] + }, + "ExtensionsProfile": { + "type": "parameter", + "datatype": "choice", + "description": "Select the SDK extensions profile when using MSTest Runner. More information at https://aka.ms/mstest/sdk/extensions-profile", + "displayName": "Testing extensions profile", + "isEnabled": "UseMSTestSdk && (TestRunner == MSTest)", + "defaultValue": "Default", + "replaces": "$(ExtensionsProfile)", + "choices": [ + { + "choice": "Default", + "description": "Default extensions profile (recommended)", + "displayName": "Default" + }, + { + "choice": "None", + "description": "No extensions are enabled", + "displayName": "None" + }, + { + "choice": "AllMicrosoft", + "description": "Enable all extensions shipped by Microsoft (including extensions with a restrictive license)", + "displayName": "AllMicrosoft" + } + ] + }, + "Fixture": { + "type": "parameter", + "datatype": "choice", + "description": "Select the fixture kinds to include in the project.", + "displayName": "Fixture", + "allowMultipleValues": true, + "enableQuotelessLiterals": true, + "defaultValue": "None", + "choices": [ + { + "choice": "None", + "description": "No fixture methods", + "displayName": "None" + }, + { + "choice": "AssemblyInitialize", + "description": "AssemblyInitialize fixture method" + }, + { + "choice": "AssemblyCleanup", + "description": "AssemblyCleanup fixture method" + }, + { + "choice": "ClassInitialize", + "description": "ClassInitialize fixture method" + }, + { + "choice": "ClassCleanup", + "description": "ClassCleanup fixture method" + }, + { + "choice": "TestInitialize", + "description": "TestInitialize fixture method" + }, + { + "choice": "TestCleanup", + "description": "TestCleanup fixture method" + } + ] + } + }, + "primaryOutputs": [ + { "path": "Company.TestProject1.csproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "MSTestSettings.cs" + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "Test1.cs" + } + ], + "defaultName": "TestProject1", + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "id": "restoreNugetPackages", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Test1.cs in the editor", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/Company.TestProject1.csproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/Company.TestProject1.csproj new file mode 100644 index 000000000000..378ba4599c25 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/Company.TestProject1.csproj @@ -0,0 +1,77 @@ + + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + enable + enable + true + + true + + + + + + + + + + true + $(ExtensionsProfile) + + + + + + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + enable + enable + + true + Exe + true + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/MSTestSettings.cs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/MSTestSettings.cs new file mode 100644 index 000000000000..aaf278c844f0 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/MSTestSettings.cs @@ -0,0 +1 @@ +[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)] diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/Test1.cs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/Test1.cs new file mode 100644 index 000000000000..b3e8e48318c0 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/Test1.cs @@ -0,0 +1,74 @@ +namespace Company.TestProject1; + +[TestClass] +public class Test1 : PageTest +{ +#if (Fixture == AssemblyInitialize) + [AssemblyInitialize] + public static void AssemblyInit(TestContext context) + { + // This method is called once for the test assembly, before any tests are run. + } + +#endif +#if (Fixture == AssemblyCleanup) + [AssemblyCleanup] + public static void AssemblyCleanup() + { + // This method is called once for the test assembly, after all tests are run. + } + +#endif +#if (Fixture == ClassInitialize) + [ClassInitialize] + public static void ClassInit(TestContext context) + { + // This method is called once for the test class, before any tests of the class are run. + } + +#endif +#if (Fixture == ClassCleanup) + [ClassCleanup] + public static void ClassCleanup() + { + // This method is called once for the test class, after all tests of the class are run. + } + +#endif +#if (Fixture == TestInitialize) + [TestInitialize] + public void TestInit() + { + // This method is called before each test method. + } + +#endif +#if (Fixture == TestCleanup) + [TestCleanup] + public void TestCleanup() + { + // This method is called after each test method. + } + +#endif + [TestMethod] + public async Task HomepageHasPlaywrightInTitleAndGetStartedLinkLinkingToTheIntroPage() + { + await Page.GotoAsync("https://playwright.dev"); + + // Expect a title "to contain" a substring. + await Expect(Page).ToHaveTitleAsync(new Regex("Playwright")); + + // create a locator + var getStarted = Page.Locator("text=Get Started"); + + // Expect an attribute "to be strictly equal" to the value. + await Expect(getStarted).ToHaveAttributeAsync("href", "/docs/intro"); + + // Click the get started link. + await getStarted.ClickAsync(); + + // Expects the URL to contain intro. + await Expect(Page).ToHaveURLAsync(new Regex(".*intro")); + } +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..49fa37c2bf26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/dotnetcli.host.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "EnablePack": { + "shortName": "p", + "longName": "enable-pack" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/ide.host.json new file mode 100644 index 000000000000..ef689320bee2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/ide.host.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "tags": [ + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/ide/icon.ico new file mode 100644 index 000000000000..40382f8898eb Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..3f2392b6579a --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "Testovací projekt NUnit Playwright", + "description": "Projekt, který obsahuje testy Playwright pomocí testovací architektury NUnit, který se dá spustit v .NET ve Windows, Linuxu a MacOS.", + "symbols/TargetFrameworkOverride/description": "Přepíše cílovou architekturu.", + "symbols/TargetFrameworkOverride/displayName": "Přepsání cílové architektury", + "symbols/Framework/description": "Cílová architektura pro projekt.", + "symbols/Framework/displayName": "Architektura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Určuje, jestli se má pro projekt povolit balení (přes „dotnet pack“).", + "symbols/EnablePack/displayName": "Povolit balíček", + "symbols/skipRestore/description": "Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.", + "symbols/skipRestore/displayName": "Přeskočit obnovení", + "symbols/langVersion/description": "Nastaví vlastnost LangVersion ve vytvořeném souboru projektu.", + "symbols/langVersion/displayName": "Verze jazyka", + "postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore", + "postActions/openInEditor/description": "Otevře Class1.cs v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..95b714435d58 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "NUnit Playwright-Testprojekt", + "description": "Ein Projekt, das Playwright-Tests mit NUnit-Testframework enthält, das unter .NET unter Windows, Linux und MacOS ausgeführt werden kann.", + "symbols/TargetFrameworkOverride/description": "Überschreibt das Zielframework", + "symbols/TargetFrameworkOverride/displayName": "Überschreibung des Zielframeworks", + "symbols/Framework/description": "Das Zielframework für das Projekt.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Ziel net10.0", + "symbols/EnablePack/description": "Gibt an, ob die Paketerstellung (über \"dotnet pack\") für das Projekt aktiviert werden soll.", + "symbols/EnablePack/displayName": "Paket aktivieren", + "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", + "symbols/skipRestore/displayName": "Wiederherstellung überspringen", + "symbols/langVersion/description": "Legt die Eigenschaft „langVersion“ in der erstellten Projektdatei fest", + "symbols/langVersion/displayName": "Sprachversion", + "postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen", + "postActions/openInEditor/description": "Öffnet Class1.cs“ im Editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..8355638e38f5 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "NUnit Playwright Test Project", + "description": "A project that contains Playwright tests using NUnit test framework, that can run on .NET on Windows, Linux and MacOS.", + "symbols/TargetFrameworkOverride/description": "Overrides the target framework", + "symbols/TargetFrameworkOverride/displayName": "Target framework override", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "symbols/EnablePack/displayName": "Enable pack", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "symbols/skipRestore/displayName": "Skip restore", + "symbols/langVersion/description": "Sets the LangVersion property in the created project file", + "symbols/langVersion/displayName": "Language version", + "postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'", + "postActions/openInEditor/description": "Opens Class1.cs in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..861ff21d45fc --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "Proyecto de prueba de NUnit Playwright", + "description": "Proyecto que contiene pruebas de Playwright mediante el marco de pruebas NUnit, que se puede ejecutar en .NET en Windows, Linux y MacOS.", + "symbols/TargetFrameworkOverride/description": "Invalida la plataforma de destino", + "symbols/TargetFrameworkOverride/displayName": "Invalidación de la plataforma de destino", + "symbols/Framework/description": "Marco de destino del proyecto.", + "symbols/Framework/displayName": "Marco", + "symbols/Framework/choices/net10.0/description": "net10.0 de destino", + "symbols/EnablePack/description": "Indica si se va a habilitar o no el empaquetado (a través de \"dotnet pack\") para el proyecto.", + "symbols/EnablePack/displayName": "Habilitar paquete", + "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/langVersion/description": "Establece la propiedad LangVersion en el archivo de proyecto creado.", + "symbols/langVersion/displayName": "Versión de lenguaje", + "postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir Class1.cs en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..27b3a2f26df9 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "Projet de test NUnit Playwright", + "description": "Un projet qui contient des tests Playwright utilisant le framework de test NUnit, qui peut fonctionner sur .NET sous Windows, Linux et MacOS.", + "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du cadre cible", + "symbols/Framework/description": "Framework cible du projet.", + "symbols/Framework/displayName": "Infrastructure", + "symbols/Framework/choices/net10.0/description": "net10.0 cible", + "symbols/EnablePack/description": "Indique s’il faut activer ou non la création de packages (via « dotnet pack ») pour le projet.", + "symbols/EnablePack/displayName": "Activer le pack", + "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/langVersion/description": "Définit la propriété LangVersion dans le fichier projet créé", + "symbols/langVersion/displayName": "Version du langage", + "postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »", + "postActions/openInEditor/description": "Ouvre Class1.cs dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..53da72d5c626 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "Progetto di test playwright NUnit", + "description": "Progetto che contiene test Playwright che usano il framework di test NUnit, eseguibile in .NET in Windows, Linux e MacOS.", + "symbols/TargetFrameworkOverride/description": "Ignora il framework di destinazione", + "symbols/TargetFrameworkOverride/displayName": "Sostituzione del framework di destinazione", + "symbols/Framework/description": "Il framework di destinazione per il progetto.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "net10.0 di destinazione", + "symbols/EnablePack/description": "Indica se abilitare o meno la creazione del pacchetto (tramite \"dotnet pack\") per il progetto.", + "symbols/EnablePack/displayName": "Abilita pacchetto", + "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", + "symbols/skipRestore/displayName": "Ignora ripristino", + "symbols/langVersion/description": "Imposta la proprietà LangVersion nel file di progetto creato", + "symbols/langVersion/displayName": "Versione del linguaggio", + "postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'", + "postActions/openInEditor/description": "Apre Class1.cs nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..9e33fc2368c5 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "NUnit Playwright テスト プロジェクト", + "description": "Windows、Linux、MacOS 上の .NET で実行できる、NUnit テスト フレームワークを使用した Playwright テストを含むプロジェクト。", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", + "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", + "symbols/Framework/displayName": "フレームワーク", + "symbols/Framework/choices/net10.0/description": "ターゲット net10.0", + "symbols/EnablePack/description": "(\"dotnet pack\" を使用して) プロジェクトのパッケージ化を有効にするかどうか。", + "symbols/EnablePack/displayName": "パックを有効にする", + "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", + "symbols/skipRestore/displayName": "復元のスキップ", + "symbols/langVersion/description": "作成されたプロジェクト ファイルで LangVersion プロパティを設定します", + "symbols/langVersion/displayName": "言語バージョン", + "postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する", + "postActions/openInEditor/description": "エディターで Class1.cs を開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..4531cfacacda --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "NUnit Playwright 테스트 프로젝트", + "description": "Windows, Linux 및 MacOS의 .NET에서 실행할 수 있는 NUnit 테스트 프레임워크를 사용하는 Playwright 테스트를 포함하는 프로젝트입니다.", + "symbols/TargetFrameworkOverride/description": "대상 프레임워크를 재정의합니다.", + "symbols/TargetFrameworkOverride/displayName": "대상 프레임워크 재정의", + "symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.", + "symbols/Framework/displayName": "프레임워크", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "프로젝트에 대해 패키징(\"dotnet pack\"을 통해)을 활성화할지 여부", + "symbols/EnablePack/displayName": "팩 사용", + "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", + "symbols/skipRestore/displayName": "복원 건너뛰기", + "symbols/langVersion/description": "만든 프로젝트 파일에 LangVersion 속성을 설정합니다", + "symbols/langVersion/displayName": "언어 버전", + "postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행", + "postActions/openInEditor/description": "편집기에서 Class1.cs 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..3b9d20f930f2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "Projekt testowy NUnit Playwright", + "description": "Projekt, który zawiera testy Playwright wykorzystujące strukturę testową NUnit, który można uruchomić na platformie .NET w systemach Windows, Linux i MacOS.", + "symbols/TargetFrameworkOverride/description": "Zastępuje platformę docelową", + "symbols/TargetFrameworkOverride/displayName": "Zastąpienie struktury docelowej", + "symbols/Framework/description": "Platforma docelowa dla tego projektu.", + "symbols/Framework/displayName": "Struktura", + "symbols/Framework/choices/net10.0/description": "Docelowa platforma net10.0", + "symbols/EnablePack/description": "Określa, czy włączyć pakowanie (za pośrednictwem „pakietu dotnet”) dla projektu.", + "symbols/EnablePack/displayName": "Włącz pakiet", + "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", + "symbols/skipRestore/displayName": "Pomiń przywracanie", + "symbols/langVersion/description": "Ustawia właściwość LangVersion w utworzonym pliku projektu", + "symbols/langVersion/displayName": "Wersja języka", + "postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”", + "postActions/openInEditor/description": "Otwiera plik Class1.cs w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..de5dda80d21f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "Projeto de Teste NUnit do Playwright", + "description": "Um projeto que contém testes do Playwright usando a estrutura de teste NUnit, que pode ser executada no .NET no Windows, Linux e macOS.", + "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/displayName": "Estrutura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Se deseja ou não habilitar o empacotamento (via \"dotnet pack\") para o projeto.", + "symbols/EnablePack/displayName": "Habilitar pacote", + "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", + "symbols/skipRestore/displayName": "Ignorar restauração", + "symbols/langVersion/description": "Define a propriedade LangVersion no arquivo do projeto criado", + "symbols/langVersion/displayName": "Versão do idioma", + "postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir Class1.cs no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..29b5a32c0c51 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,19 @@ +{ + "author": "Майкрософт", + "name": "Проект тестирования NUnit Playwright", + "description": "Проект, содержащий тесты Playwright с использованием инфраструктуры тестирования NUnit, которая может работать на .NET в Windows, Linux и MacOS.", + "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", + "symbols/TargetFrameworkOverride/displayName": "Переопределение целевой платформы", + "symbols/Framework/description": "Целевая платформа для проекта.", + "symbols/Framework/displayName": "Платформа", + "symbols/Framework/choices/net10.0/description": "Целевая среда net10.0", + "symbols/EnablePack/description": "Следует ли включить упаковку (через \"dotnet pack\") для проекта.", + "symbols/EnablePack/displayName": "Включить пакет", + "symbols/skipRestore/description": "Позволяет пропускать автоматическое восстановление проекта при создании.", + "symbols/skipRestore/displayName": "Пропустить восстановление", + "symbols/langVersion/description": "Задает свойство LangVersion в создаваемом файле проекта.", + "symbols/langVersion/displayName": "Версия языка", + "postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", + "postActions/openInEditor/description": "Открывает файл Class1.cs в редакторе" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..7926538e08e9 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "NUnit Playwright Test Projesi", + "description": "Windows, Linux ve macOS üzerinde .NET'te çalışabilen ve NUnit test çerçevesini kullanan Playwright testlerini içeren bir proje.", + "symbols/TargetFrameworkOverride/description": "Hedef çerçeveyi geçersiz kılar", + "symbols/TargetFrameworkOverride/displayName": "Hedef çerçeveyi geçersiz kılma", + "symbols/Framework/description": "Projenin hedef çerçevesi.", + "symbols/Framework/displayName": "Çerçeve", + "symbols/Framework/choices/net10.0/description": "Hedef net10.0", + "symbols/EnablePack/description": "Proje için paketlemeyi etkinleştirip etkinleştirmeme ayarı ( \"dotnet pack\" üzerinden).", + "symbols/EnablePack/displayName": "Paketi etkinleştir", + "symbols/skipRestore/description": "Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/displayName": "Geri yüklemeyi atla", + "symbols/langVersion/description": "Oluşturulan proje dosyasında LangVersion özelliğini ayarlar", + "symbols/langVersion/displayName": "Dil sürümü", + "postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır", + "postActions/openInEditor/description": "Düzenleyicide Class1.cs dosyasını açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..5c6f8b1447c3 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "NUnit Playwright 测试项目", + "description": "一个包含使用 NUnit 测试框架的 Playwright 测试的项目,这些测试可在 Windows、Linux 和 MacOS 上的 .NET 上运行。", + "symbols/TargetFrameworkOverride/description": "替代目标框架", + "symbols/TargetFrameworkOverride/displayName": "目标框架替代", + "symbols/Framework/description": "项目的目标框架。", + "symbols/Framework/displayName": "框架", + "symbols/Framework/choices/net10.0/description": "目标 net10.0", + "symbols/EnablePack/description": "是否(通过 \"dotnet pack\")为项目启用打包。", + "symbols/EnablePack/displayName": "启用包", + "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", + "symbols/skipRestore/displayName": "跳过还原", + "symbols/langVersion/description": "在创建的项目文件中设置 LangVersion 属性", + "symbols/langVersion/displayName": "语言版本", + "postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"", + "postActions/openInEditor/description": "在编辑器中打开 Class1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..2300924811e5 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,19 @@ +{ + "author": "Microsoft", + "name": "NUnit Playwright 測試專案", + "description": "包含可以在 Windows、Linux 和 MacOS 版的 .NET 上執行、使用 NUnit 測試架構的 Playwright 測試的專案。", + "symbols/TargetFrameworkOverride/description": "覆寫目標 Framework", + "symbols/TargetFrameworkOverride/displayName": "目標架構覆寫", + "symbols/Framework/description": "專案的目標 Framework。", + "symbols/Framework/displayName": "架構", + "symbols/Framework/choices/net10.0/description": "目標 net10.0", + "symbols/EnablePack/description": "是否要啟用專案的封裝 (透過 \"dotnet pack\")。", + "symbols/EnablePack/displayName": "啟用壓縮", + "symbols/skipRestore/description": "如果指定,則會在建立時跳過專案的自動還原。", + "symbols/skipRestore/displayName": "跳過還原", + "symbols/langVersion/description": "設定建立的專案檔中的 LangVersion 屬性", + "symbols/langVersion/displayName": "語言版本", + "postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'", + "postActions/openInEditor/description": "在編輯器中開啟 Class1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/template.json new file mode 100644 index 000000000000..de3c0063934b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/.template.config/template.json @@ -0,0 +1,101 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ "Test", "NUnit", "Playwright", "Desktop", "Web" ], + "name": "NUnit Playwright Test Project", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project that contains Playwright tests using NUnit test framework, that can run on .NET on Windows, Linux and MacOS.", + "groupIdentity": "Microsoft.Test.Playwright.NUnit", + "precedence": "12000", + "identity": "Microsoft.Test.Playwright.NUnit.CSharp.10.0", + "shortName": "nunit-playwright", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "Company.TestProject1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "displayName": "Target framework override", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "displayName": "Framework", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": "Target net10.0" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "EnablePack": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "displayName": "Enable pack" + }, + "HostIdentifier": { + "type": "bind", + "binding": "host:HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "displayName": "Skip restore", + "defaultValue": "false" + }, + "langVersion": { + "type": "parameter", + "datatype": "text", + "description": "Sets the LangVersion property in the created project file", + "defaultValue": "latest", + "replaces": "$(ProjectLanguageVersion)", + "displayName": "Language version" + } + }, + "primaryOutputs": [ + { "path": "Company.TestProject1.csproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "UnitTest1.cs" + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "GlobalUsings.cs" + } + ], + "defaultName": "TestProject1", + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [ { "text": "Run 'dotnet restore'" } ], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "id": "restoreNugetPackages", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Class1.cs in the editor", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/Company.TestProject1.csproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/Company.TestProject1.csproj new file mode 100644 index 000000000000..0425ec75fe1e --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/Company.TestProject1.csproj @@ -0,0 +1,30 @@ + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + $(ProjectLanguageVersion) + enable + enable + true + false + + + + + + + + + + + + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/UnitTest1.cs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/UnitTest1.cs new file mode 100644 index 000000000000..6f683a9651c3 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-NUnit-CSharp/UnitTest1.cs @@ -0,0 +1,27 @@ +namespace Company.TestProject1; + +[Parallelizable(ParallelScope.Self)] +[TestFixture] +public class Tests : PageTest +{ + [Test] + public async Task HomepageHasPlaywrightInTitleAndGetStartedLinkLinkingtoTheIntroPage() + { + await Page.GotoAsync("https://playwright.dev"); + + // Expect a title "to contain" a substring. + await Expect(Page).ToHaveTitleAsync(new Regex("Playwright")); + + // create a locator + var getStarted = Page.Locator("text=Get Started"); + + // Expect an attribute "to be strictly equal" to the value. + await Expect(getStarted).ToHaveAttributeAsync("href", "/docs/intro"); + + // Click the get started link. + await getStarted.ClickAsync(); + + // Expects the URL to contain intro. + await Expect(Page).ToHaveURLAsync(new Regex(".*intro")); + } +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..49fa37c2bf26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/dotnetcli.host.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "EnablePack": { + "shortName": "p", + "longName": "enable-pack" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/ide.host.json new file mode 100644 index 000000000000..ef689320bee2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/ide.host.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "tags": [ + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/ide/icon.ico new file mode 100644 index 000000000000..40382f8898eb Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..b860e7a91962 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Projekt testů xUnit", + "description": "Projekt obsahující testy xUnit.net, které je možné spustit na .NET ve Windows, Linuxu a macOS", + "symbols/TargetFrameworkOverride/description": "Přepíše cílovou architekturu.", + "symbols/TargetFrameworkOverride/displayName": "Přepsání cílové architektury", + "symbols/Framework/description": "Cílová architektura pro projekt.", + "symbols/Framework/displayName": "Architektura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Určuje, jestli se má pro projekt povolit balení (přes „dotnet pack“).", + "symbols/EnablePack/displayName": "Povolit balíček", + "symbols/skipRestore/description": "Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.", + "symbols/skipRestore/displayName": "Přeskočit obnovení", + "postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore", + "postActions/openInEditor/description": "Otevře Class1.cs v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..be77d05be890 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit-Testprojekt", + "description": "Ein Projekt, das xUnit.net-Tests enthält, die auf .NET unter Windows, Linux und macOS ausgeführt werden können.", + "symbols/TargetFrameworkOverride/description": "Überschreibt das Zielframework", + "symbols/TargetFrameworkOverride/displayName": "Zielframeworküberschreibung", + "symbols/Framework/description": "Das Zielframework für das Projekt.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Ziel net10.0", + "symbols/EnablePack/description": "Gibt an, ob die Paketerstellung (über \"dotnet pack\") für das Projekt aktiviert werden soll.", + "symbols/EnablePack/displayName": "Paket aktivieren", + "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", + "symbols/skipRestore/displayName": "Wiederherstellung überspringen", + "postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen", + "postActions/openInEditor/description": "Öffnet Class1.cs“ im Editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..47c72c7192da --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit Test Project", + "description": "A project that contains xUnit.net tests that can run on .NET on Windows, Linux and macOS", + "symbols/TargetFrameworkOverride/description": "Overrides the target framework", + "symbols/TargetFrameworkOverride/displayName": "Target framework override", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "symbols/EnablePack/displayName": "Enable pack", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "symbols/skipRestore/displayName": "Skip restore", + "postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'", + "postActions/openInEditor/description": "Opens Class1.cs in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..8da2b713bb9f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Proyecto de prueba de xUnit", + "description": "Proyecto que contiene xUnit.net pruebas que se pueden ejecutar en .NET en Windows, Linux y macOS", + "symbols/TargetFrameworkOverride/description": "Invalida la plataforma de destino", + "symbols/TargetFrameworkOverride/displayName": "Invalidación de la plataforma de destino", + "symbols/Framework/description": "Marco de destino del proyecto.", + "symbols/Framework/displayName": "Marco", + "symbols/Framework/choices/net10.0/description": "net10.0 de destino", + "symbols/EnablePack/description": "Indica si se va a habilitar o no el empaquetado (a través de \"dotnet pack\") para el proyecto.", + "symbols/EnablePack/displayName": "Habilitar paquete", + "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", + "postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir Class1.cs en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..c7c3d51ad26f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Projet de test xUnit", + "description": "Un projet qui contient des tests xUnit.net qui peuvent être exécutés sur .NET sous Windows, Linux et macOS.", + "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du cadre cible", + "symbols/Framework/description": "Framework cible du projet.", + "symbols/Framework/displayName": "Infrastructure", + "symbols/Framework/choices/net10.0/description": "net10.0 cible", + "symbols/EnablePack/description": "Indique s’il faut activer ou non la création de packages (via « dotnet pack ») pour le projet.", + "symbols/EnablePack/displayName": "Activer le pack", + "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", + "postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »", + "postActions/openInEditor/description": "Ouvre Class1.cs dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..447c6c03a64d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Progetto di test xUnit", + "description": "Progetto che contiene i test xUnit.net eseguibili in .NET in Windows, Linux e macOS", + "symbols/TargetFrameworkOverride/description": "Ignora il framework di destinazione", + "symbols/TargetFrameworkOverride/displayName": "Override del framework di destinazione", + "symbols/Framework/description": "Il framework di destinazione per il progetto.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "net10.0 di destinazione", + "symbols/EnablePack/description": "Indica se abilitare o meno la creazione del pacchetto (tramite \"dotnet pack\") per il progetto.", + "symbols/EnablePack/displayName": "Abilita pacchetto", + "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", + "symbols/skipRestore/displayName": "Salta ripristino", + "postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'", + "postActions/openInEditor/description": "Apre Class1.cs nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..c7d2438ec69c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit テスト プロジェクト", + "description": "Windows、Linux、macOS 上の .NET で実行できる xUnit.net テストを含むプロジェクト", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", + "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", + "symbols/Framework/displayName": "フレームワーク", + "symbols/Framework/choices/net10.0/description": "ターゲット net10.0", + "symbols/EnablePack/description": "(\"dotnet pack\" を使用して) プロジェクトのパッケージ化を有効にするかどうか。", + "symbols/EnablePack/displayName": "パックを有効にする", + "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", + "symbols/skipRestore/displayName": "復元のスキップ", + "postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する", + "postActions/openInEditor/description": "エディターで Class1.cs を開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..8ba3246be2ea --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit 테스트 프로젝트", + "description": "Windows, Linux 및 macOS의 .NET에서 실행할 수 있는 xUnit.net 테스트가 포함된 프로젝트입니다.", + "symbols/TargetFrameworkOverride/description": "대상 프레임워크를 재정의합니다.", + "symbols/TargetFrameworkOverride/displayName": "대상 프레임워크 재정의", + "symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.", + "symbols/Framework/displayName": "프레임워크", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "프로젝트에 대해 패키징(\"dotnet pack\"을 통해)을 활성화할지 여부", + "symbols/EnablePack/displayName": "팩 사용", + "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", + "symbols/skipRestore/displayName": "복원 건너뛰기", + "postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행", + "postActions/openInEditor/description": "편집기에서 Class1.cs 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..6fc40822dc85 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit — projekt testowy", + "description": "Projekt zawierający testy xUnit.net, które mogą być uruchamiane na platformie .NET w systemach Windows, Linux i macOS", + "symbols/TargetFrameworkOverride/description": "Zastępuje platformę docelową", + "symbols/TargetFrameworkOverride/displayName": "Odrzucenie platformy docelowej", + "symbols/Framework/description": "Platforma docelowa dla tego projektu.", + "symbols/Framework/displayName": "Platforma", + "symbols/Framework/choices/net10.0/description": "Docelowa platforma net10.0", + "symbols/EnablePack/description": "Określa, czy włączyć pakowanie (za pośrednictwem „pakietu dotnet”) dla projektu.", + "symbols/EnablePack/displayName": "Włącz pakiet", + "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", + "symbols/skipRestore/displayName": "Pomiń przywracanie", + "postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”", + "postActions/openInEditor/description": "Otwiera plik Class1.cs w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..f774157cfb79 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Projeto de Teste xUnit", + "description": "Um projeto que contém testes xUnit.net que podem ser executados no .NET no Windows, Linux e macOS", + "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/displayName": "Estrutura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Se deseja ou não habilitar o empacotamento (via \"dotnet pack\") para o projeto.", + "symbols/EnablePack/displayName": "Habilitar pacote", + "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", + "symbols/skipRestore/displayName": "Ignorar restauração", + "postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir Class1.cs no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..6830d4974b65 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,17 @@ +{ + "author": "Майкрософт", + "name": "Тестовый проект xUnit", + "description": "Проект, содержащий тесты xUnit.net, которые могут работать на .NET в Windows, Linux и macOS.", + "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", + "symbols/TargetFrameworkOverride/displayName": "Переопределение целевой платформы", + "symbols/Framework/description": "Целевая платформа для проекта.", + "symbols/Framework/displayName": "Платформа", + "symbols/Framework/choices/net10.0/description": "Целевая среда net10.0", + "symbols/EnablePack/description": "Следует ли включить упаковку (через \"dotnet pack\") для проекта.", + "symbols/EnablePack/displayName": "Включить пакет", + "symbols/skipRestore/description": "Позволяет пропускать автоматическое восстановление проекта при создании.", + "symbols/skipRestore/displayName": "Пропустить восстановление", + "postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", + "postActions/openInEditor/description": "Открывает файл Class1.cs в редакторе" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..0121340d5e93 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit Test Projesi", + "description": "Windows, Linux ve macOS üzerinde .NET'te çalışabilen xUnit.net testlerini içeren bir proje", + "symbols/TargetFrameworkOverride/description": "Hedef çerçeveyi geçersiz kılar", + "symbols/TargetFrameworkOverride/displayName": "Hedef çerçeveyi geçersiz kılma", + "symbols/Framework/description": "Projenin hedef çerçevesi.", + "symbols/Framework/displayName": "Çerçeve", + "symbols/Framework/choices/net10.0/description": "Hedef net10.0", + "symbols/EnablePack/description": "Proje için paketlemeyi etkinleştirip etkinleştirmeme ayarı ( \"dotnet pack\" üzerinden).", + "symbols/EnablePack/displayName": "Paketi etkinleştir", + "symbols/skipRestore/description": "Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/displayName": "Geri yüklemeyi atla", + "postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır", + "postActions/openInEditor/description": "Düzenleyicide Class1.cs dosyasını açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..179b6d2cdb27 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit 测试项目", + "description": "一个包含 xUnit.net 测试的项目,这些测试可在 Windows、Linux 和 macOS 的 .NET 上运行", + "symbols/TargetFrameworkOverride/description": "替代目标框架", + "symbols/TargetFrameworkOverride/displayName": "目标框架替代", + "symbols/Framework/description": "项目的目标框架。", + "symbols/Framework/displayName": "框架", + "symbols/Framework/choices/net10.0/description": "目标 net10.0", + "symbols/EnablePack/description": "是否(通过 \"dotnet pack\")为项目启用打包。", + "symbols/EnablePack/displayName": "启用包", + "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", + "symbols/skipRestore/displayName": "跳过还原", + "postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"", + "postActions/openInEditor/description": "在编辑器中打开 Class1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..18ccb5575129 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit 測試專案", + "description": "包含可以在 Windows、Linux 和 macOS 版的 .NET 上執行的 xUnit.net 測試的專案", + "symbols/TargetFrameworkOverride/description": "覆寫目標 Framework", + "symbols/TargetFrameworkOverride/displayName": "目標架構覆寫", + "symbols/Framework/description": "專案的目標 Framework。", + "symbols/Framework/displayName": "架構", + "symbols/Framework/choices/net10.0/description": "目標 net10.0", + "symbols/EnablePack/description": "是否要啟用專案的封裝 (透過 \"dotnet pack\")。", + "symbols/EnablePack/displayName": "啟用壓縮", + "symbols/skipRestore/description": "如果指定,則會在建立時跳過專案的自動還原。", + "symbols/skipRestore/displayName": "跳過還原", + "postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'", + "postActions/openInEditor/description": "在編輯器中開啟 Class1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/template.json new file mode 100644 index 000000000000..4267937bfd3b --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/.template.config/template.json @@ -0,0 +1,93 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Test", "xUnit", "Desktop", "Web"], + "name": "xUnit Test Project", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project that contains xUnit.net tests that can run on .NET on Windows, Linux and macOS", + "groupIdentity": "Microsoft.Test.xUnit", + "precedence": "12000", + "identity": "Microsoft.Test.xUnit.CSharp.10.0", + "shortName": "xunit", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "Company.TestProject1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "displayName": "Target framework override", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "displayName": "Framework", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": "Target net10.0" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "EnablePack": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "displayName": "Enable pack" + }, + "HostIdentifier": { + "type": "bind", + "binding": "host:HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "displayName": "Skip restore", + "defaultValue": "false" + } + }, + "primaryOutputs": [ + { "path": "Company.TestProject1.csproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "UnitTest1.cs" + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "GlobalUsings.cs" + } + ], + "defaultName": "TestProject1", + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "id": "restoreNugetPackages", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Class1.cs in the editor", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/Company.TestProject1.csproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/Company.TestProject1.csproj new file mode 100644 index 000000000000..cbce87cf4fc5 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/Company.TestProject1.csproj @@ -0,0 +1,24 @@ + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + enable + enable + true + false + + + + + + + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/UnitTest1.cs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/UnitTest1.cs new file mode 100644 index 000000000000..7e243fefdc29 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/UnitTest1.cs @@ -0,0 +1,10 @@ +namespace Company.TestProject1; + +public class UnitTest1 +{ + [Fact] + public void Test1() + { + + } +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..49fa37c2bf26 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/dotnetcli.host.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "EnablePack": { + "shortName": "p", + "longName": "enable-pack" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/ide.host.json new file mode 100644 index 000000000000..ef689320bee2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/ide.host.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "tags": [ + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/ide/icon.ico new file mode 100644 index 000000000000..671271e7595d Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..78fa5c781f3c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Projekt testů xUnit", + "description": "Projekt obsahující testy xUnit.net, které je možné spustit na .NET ve Windows, Linuxu a macOS", + "symbols/TargetFrameworkOverride/description": "Přepíše cílovou architekturu.", + "symbols/TargetFrameworkOverride/displayName": "Přepsání cílové architektury", + "symbols/Framework/description": "Cílová architektura pro projekt.", + "symbols/Framework/displayName": "Architektura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Určuje, jestli se má pro projekt povolit balení (přes „dotnet pack“).", + "symbols/EnablePack/displayName": "Povolit balíček", + "symbols/skipRestore/description": "Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.", + "symbols/skipRestore/displayName": "Přeskočit obnovení", + "postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore", + "postActions/openInEditor/description": "Otevře Tests.fs v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..c160f9959f58 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit-Testprojekt", + "description": "Ein Projekt, das xUnit.net-Tests enthält, die auf .NET unter Windows, Linux und macOS ausgeführt werden können.", + "symbols/TargetFrameworkOverride/description": "Überschreibt das Zielframework", + "symbols/TargetFrameworkOverride/displayName": "Zielframeworküberschreibung", + "symbols/Framework/description": "Das Zielframework für das Projekt.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Ziel net10.0", + "symbols/EnablePack/description": "Gibt an, ob die Paketerstellung (über \"dotnet pack\") für das Projekt aktiviert werden soll.", + "symbols/EnablePack/displayName": "Paket aktivieren", + "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", + "symbols/skipRestore/displayName": "Wiederherstellung überspringen", + "postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen", + "postActions/openInEditor/description": "Öffnet Tests.fs im Editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..373107d96640 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit Test Project", + "description": "A project that contains xUnit.net tests that can run on .NET on Windows, Linux and macOS", + "symbols/TargetFrameworkOverride/description": "Overrides the target framework", + "symbols/TargetFrameworkOverride/displayName": "Target framework override", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "symbols/EnablePack/displayName": "Enable pack", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "symbols/skipRestore/displayName": "Skip restore", + "postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'", + "postActions/openInEditor/description": "Opens Tests.fs in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..31341187ca0c --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Proyecto de prueba de xUnit", + "description": "Proyecto que contiene xUnit.net pruebas que se pueden ejecutar en .NET en Windows, Linux y macOS", + "symbols/TargetFrameworkOverride/description": "Invalida la plataforma de destino", + "symbols/TargetFrameworkOverride/displayName": "Invalidación de la plataforma de destino", + "symbols/Framework/description": "Marco de destino del proyecto.", + "symbols/Framework/displayName": "Marco", + "symbols/Framework/choices/net10.0/description": "net10.0 de destino", + "symbols/EnablePack/description": "Indica si se va a habilitar o no el empaquetado (a través de \"dotnet pack\") para el proyecto.", + "symbols/EnablePack/displayName": "Habilitar paquete", + "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", + "postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir Tests.fs en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..d14eeed32f47 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Projet de test xUnit", + "description": "Un projet qui contient des tests xUnit.net qui peuvent être exécutés sur .NET sous Windows, Linux et macOS.", + "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du cadre cible", + "symbols/Framework/description": "Framework cible du projet.", + "symbols/Framework/displayName": "Infrastructure", + "symbols/Framework/choices/net10.0/description": "net10.0 cible", + "symbols/EnablePack/description": "Indique s’il faut activer ou non la création de packages (via « dotnet pack ») pour le projet.", + "symbols/EnablePack/displayName": "Activer le pack", + "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", + "postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »", + "postActions/openInEditor/description": "Ouvre Tests.fs dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..9ebc3fd7164d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Progetto di test xUnit", + "description": "Progetto che contiene i test xUnit.net eseguibili in .NET in Windows, Linux e macOS", + "symbols/TargetFrameworkOverride/description": "Ignora il framework di destinazione", + "symbols/TargetFrameworkOverride/displayName": "Override del framework di destinazione", + "symbols/Framework/description": "Il framework di destinazione per il progetto.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "net10.0 di destinazione", + "symbols/EnablePack/description": "Indica se abilitare o meno la creazione del pacchetto (tramite \"dotnet pack\") per il progetto.", + "symbols/EnablePack/displayName": "Abilita pacchetto", + "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", + "symbols/skipRestore/displayName": "Salta ripristino", + "postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'", + "postActions/openInEditor/description": "Apre Tests.fs nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..74399f220006 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit テスト プロジェクト", + "description": "Windows、Linux、macOS 上の .NET で実行できる xUnit.net テストを含むプロジェクト", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", + "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", + "symbols/Framework/displayName": "フレームワーク", + "symbols/Framework/choices/net10.0/description": "ターゲット net10.0", + "symbols/EnablePack/description": "(\"dotnet pack\" を使用して) プロジェクトのパッケージ化を有効にするかどうか。", + "symbols/EnablePack/displayName": "パックを有効にする", + "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", + "symbols/skipRestore/displayName": "復元のスキップ", + "postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する", + "postActions/openInEditor/description": "エディターで Tests.fs を開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..66d4ed97b8a0 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit 테스트 프로젝트", + "description": "Windows, Linux 및 macOS의 .NET에서 실행할 수 있는 xUnit.net 테스트가 포함된 프로젝트입니다.", + "symbols/TargetFrameworkOverride/description": "대상 프레임워크를 재정의합니다.", + "symbols/TargetFrameworkOverride/displayName": "대상 프레임워크 재정의", + "symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.", + "symbols/Framework/displayName": "프레임워크", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "프로젝트에 대해 패키징(\"dotnet pack\"을 통해)을 활성화할지 여부", + "symbols/EnablePack/displayName": "팩 사용", + "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", + "symbols/skipRestore/displayName": "복원 건너뛰기", + "postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행", + "postActions/openInEditor/description": "편집기에서 Tests.fs 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..e45b61f27861 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit — projekt testowy", + "description": "Projekt zawierający testy xUnit.net, które mogą być uruchamiane na platformie .NET w systemach Windows, Linux i macOS", + "symbols/TargetFrameworkOverride/description": "Zastępuje platformę docelową", + "symbols/TargetFrameworkOverride/displayName": "Zastąpienie struktury docelowej", + "symbols/Framework/description": "Platforma docelowa dla tego projektu.", + "symbols/Framework/displayName": "Struktura", + "symbols/Framework/choices/net10.0/description": "Docelowa platforma net10.0", + "symbols/EnablePack/description": "Określa, czy włączyć pakowanie (za pośrednictwem „pakietu dotnet”) dla projektu.", + "symbols/EnablePack/displayName": "Włącz pakiet", + "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", + "symbols/skipRestore/displayName": "Pomiń przywracanie", + "postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”", + "postActions/openInEditor/description": "Otwiera plik Tests.fs w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..914d01ec8ce6 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Projeto de Teste xUnit", + "description": "Um projeto que contém testes xUnit.net que podem ser executados no .NET no Windows, Linux e macOS", + "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/displayName": "Estrutura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Se deseja ou não habilitar o empacotamento (via \"dotnet pack\") para o projeto.", + "symbols/EnablePack/displayName": "Habilitar pacote", + "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", + "symbols/skipRestore/displayName": "Ignorar restauração", + "postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"", + "postActions/openInEditor/description": "Abre o Tests.fs no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..3f752e7c1e3d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,17 @@ +{ + "author": "Майкрософт", + "name": "Тестовый проект xUnit", + "description": "Проект, содержащий тесты xUnit.net, которые могут работать на .NET в Windows, Linux и macOS.", + "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", + "symbols/TargetFrameworkOverride/displayName": "Переопределение целевой платформы", + "symbols/Framework/description": "Целевая платформа для проекта.", + "symbols/Framework/displayName": "Платформа", + "symbols/Framework/choices/net10.0/description": "Целевая среда net10.0", + "symbols/EnablePack/description": "Следует ли включить упаковку (через \"dotnet pack\") для проекта.", + "symbols/EnablePack/displayName": "Включить пакет", + "symbols/skipRestore/description": "Позволяет пропускать автоматическое восстановление проекта при создании.", + "symbols/skipRestore/displayName": "Пропустить восстановление", + "postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", + "postActions/openInEditor/description": "Открывает Tests.fs в редакторе" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..7083772a4a6f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit Test Projesi", + "description": "Windows, Linux ve macOS üzerinde .NET'te çalışabilen xUnit.net testlerini içeren bir proje", + "symbols/TargetFrameworkOverride/description": "Hedef çerçeveyi geçersiz kılar", + "symbols/TargetFrameworkOverride/displayName": "Hedef çerçeveyi geçersiz kılma", + "symbols/Framework/description": "Projenin hedef çerçevesi.", + "symbols/Framework/displayName": "Çerçeve", + "symbols/Framework/choices/net10.0/description": "Hedef net10.0", + "symbols/EnablePack/description": "Proje için paketlemeyi etkinleştirip etkinleştirmeme ayarı ( \"dotnet pack\" üzerinden).", + "symbols/EnablePack/displayName": "Paketi etkinleştir", + "symbols/skipRestore/description": "Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/displayName": "Geri yüklemeyi atla", + "postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır", + "postActions/openInEditor/description": "Tests.fs'yi düzenleyicide açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..6987eb15e833 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit 测试项目", + "description": "一个包含 xUnit.net 测试的项目,这些测试可在 Windows、Linux 和 macOS 的 .NET 上运行", + "symbols/TargetFrameworkOverride/description": "替代目标框架", + "symbols/TargetFrameworkOverride/displayName": "目标框架替代", + "symbols/Framework/description": "项目的目标框架。", + "symbols/Framework/displayName": "框架", + "symbols/Framework/choices/net10.0/description": "目标 net10.0", + "symbols/EnablePack/description": "是否(通过 \"dotnet pack\")为项目启用打包。", + "symbols/EnablePack/displayName": "启用包", + "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", + "symbols/skipRestore/displayName": "跳过还原", + "postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"", + "postActions/openInEditor/description": "在编辑器中打开 Tests.fs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..ee9381c71956 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit 測試專案", + "description": "包含可以在 Windows、Linux 和 macOS 版的 .NET 上執行的 xUnit.net 測試的專案", + "symbols/TargetFrameworkOverride/description": "覆寫目標 Framework", + "symbols/TargetFrameworkOverride/displayName": "目標架構覆寫", + "symbols/Framework/description": "專案的目標 Framework。", + "symbols/Framework/displayName": "架構", + "symbols/Framework/choices/net10.0/description": "目標 net10.0", + "symbols/EnablePack/description": "是否要啟用專案的封裝 (透過 \"dotnet pack\")。", + "symbols/EnablePack/displayName": "啟用壓縮", + "symbols/skipRestore/description": "如果指定,則會在建立時跳過專案的自動還原。", + "symbols/skipRestore/displayName": "跳過還原", + "postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'", + "postActions/openInEditor/description": "在編輯器中開啟 Tests.fs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/template.json new file mode 100644 index 000000000000..e3cee6e75741 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/.template.config/template.json @@ -0,0 +1,89 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Test", "xUnit", "Desktop", "Web"], + "name": "xUnit Test Project", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project that contains xUnit.net tests that can run on .NET on Windows, Linux and macOS", + "groupIdentity": "Microsoft.Test.xUnit", + "precedence": "12000", + "identity": "Microsoft.Test.xUnit.FSharp.10.0", + "shortName": "xunit", + "tags": { + "language": "F#", + "type": "project" + }, + "sourceName": "Company.TestProject1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "displayName": "Target framework override", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "displayName": "Framework", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": "Target net10.0" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "EnablePack": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "displayName": "Enable pack" + }, + "HostIdentifier": { + "type": "bind", + "binding": "host:HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "displayName": "Skip restore", + "defaultValue": "false" + } + }, + "primaryOutputs": [ + { "path": "Company.TestProject1.fsproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "Tests.fs" + } + ], + "defaultName": "TestProject1", + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "id": "restoreNugetPackages", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Tests.fs in the editor", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Company.TestProject1.fsproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Company.TestProject1.fsproj new file mode 100644 index 000000000000..96421d5c0a0e --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Company.TestProject1.fsproj @@ -0,0 +1,24 @@ + + + + net10.0 + TargetFrameworkOverride + Company.TestProject1 + true + false + false + + + + + + + + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Program.fs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Program.fs new file mode 100644 index 000000000000..31dc4f7357bb --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Program.fs @@ -0,0 +1,4 @@ +module Program + +[] +let main _ = 0 diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Tests.fs b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Tests.fs new file mode 100644 index 000000000000..7f70fae192b2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Tests.fs @@ -0,0 +1,8 @@ +module Tests + +open System +open Xunit + +[] +let ``My test`` () = + Assert.True(true) diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..6f20dff748c1 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/dotnetcli.host.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "EnablePack": { + "shortName": "p", + "longName": "enable-pack" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + } + }, + "usageExamples": [ + "" + ] +} + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/ide.host.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/ide.host.json new file mode 100644 index 000000000000..ef689320bee2 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/ide.host.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/ide.host", + "icon": "ide/icon.ico", + "tags": [ + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/ide/icon.ico b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/ide/icon.ico new file mode 100644 index 000000000000..14998ba8c023 Binary files /dev/null and b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/ide/icon.ico differ diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..b860e7a91962 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Projekt testů xUnit", + "description": "Projekt obsahující testy xUnit.net, které je možné spustit na .NET ve Windows, Linuxu a macOS", + "symbols/TargetFrameworkOverride/description": "Přepíše cílovou architekturu.", + "symbols/TargetFrameworkOverride/displayName": "Přepsání cílové architektury", + "symbols/Framework/description": "Cílová architektura pro projekt.", + "symbols/Framework/displayName": "Architektura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Určuje, jestli se má pro projekt povolit balení (přes „dotnet pack“).", + "symbols/EnablePack/displayName": "Povolit balíček", + "symbols/skipRestore/description": "Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.", + "symbols/skipRestore/displayName": "Přeskočit obnovení", + "postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore", + "postActions/openInEditor/description": "Otevře Class1.cs v editoru." +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..be77d05be890 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.de.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit-Testprojekt", + "description": "Ein Projekt, das xUnit.net-Tests enthält, die auf .NET unter Windows, Linux und macOS ausgeführt werden können.", + "symbols/TargetFrameworkOverride/description": "Überschreibt das Zielframework", + "symbols/TargetFrameworkOverride/displayName": "Zielframeworküberschreibung", + "symbols/Framework/description": "Das Zielframework für das Projekt.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Ziel net10.0", + "symbols/EnablePack/description": "Gibt an, ob die Paketerstellung (über \"dotnet pack\") für das Projekt aktiviert werden soll.", + "symbols/EnablePack/displayName": "Paket aktivieren", + "symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.", + "symbols/skipRestore/displayName": "Wiederherstellung überspringen", + "postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen", + "postActions/openInEditor/description": "Öffnet Class1.cs“ im Editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..47c72c7192da --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.en.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit Test Project", + "description": "A project that contains xUnit.net tests that can run on .NET on Windows, Linux and macOS", + "symbols/TargetFrameworkOverride/description": "Overrides the target framework", + "symbols/TargetFrameworkOverride/displayName": "Target framework override", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "symbols/EnablePack/displayName": "Enable pack", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "symbols/skipRestore/displayName": "Skip restore", + "postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'", + "postActions/openInEditor/description": "Opens Class1.cs in the editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..8da2b713bb9f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.es.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Proyecto de prueba de xUnit", + "description": "Proyecto que contiene xUnit.net pruebas que se pueden ejecutar en .NET en Windows, Linux y macOS", + "symbols/TargetFrameworkOverride/description": "Invalida la plataforma de destino", + "symbols/TargetFrameworkOverride/displayName": "Invalidación de la plataforma de destino", + "symbols/Framework/description": "Marco de destino del proyecto.", + "symbols/Framework/displayName": "Marco", + "symbols/Framework/choices/net10.0/description": "net10.0 de destino", + "symbols/EnablePack/description": "Indica si se va a habilitar o no el empaquetado (a través de \"dotnet pack\") para el proyecto.", + "symbols/EnablePack/displayName": "Habilitar paquete", + "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", + "postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir Class1.cs en el editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..c7c3d51ad26f --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Projet de test xUnit", + "description": "Un projet qui contient des tests xUnit.net qui peuvent être exécutés sur .NET sous Windows, Linux et macOS.", + "symbols/TargetFrameworkOverride/description": "Remplace l’infrastructure cible", + "symbols/TargetFrameworkOverride/displayName": "Remplacement du cadre cible", + "symbols/Framework/description": "Framework cible du projet.", + "symbols/Framework/displayName": "Infrastructure", + "symbols/Framework/choices/net10.0/description": "net10.0 cible", + "symbols/EnablePack/description": "Indique s’il faut activer ou non la création de packages (via « dotnet pack ») pour le projet.", + "symbols/EnablePack/displayName": "Activer le pack", + "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", + "postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »", + "postActions/openInEditor/description": "Ouvre Class1.cs dans l’éditeur" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..447c6c03a64d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.it.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Progetto di test xUnit", + "description": "Progetto che contiene i test xUnit.net eseguibili in .NET in Windows, Linux e macOS", + "symbols/TargetFrameworkOverride/description": "Ignora il framework di destinazione", + "symbols/TargetFrameworkOverride/displayName": "Override del framework di destinazione", + "symbols/Framework/description": "Il framework di destinazione per il progetto.", + "symbols/Framework/displayName": "Framework", + "symbols/Framework/choices/net10.0/description": "net10.0 di destinazione", + "symbols/EnablePack/description": "Indica se abilitare o meno la creazione del pacchetto (tramite \"dotnet pack\") per il progetto.", + "symbols/EnablePack/displayName": "Abilita pacchetto", + "symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.", + "symbols/skipRestore/displayName": "Salta ripristino", + "postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'", + "postActions/openInEditor/description": "Apre Class1.cs nell'editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..cf5f3c00e288 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit テスト プロジェクト", + "description": "Windows、Linux、macOS 上の .NET で実行できる xUnit.net テストを含むプロジェクト", + "symbols/TargetFrameworkOverride/description": "ターゲット フレームワークをオーバーライドします", + "symbols/TargetFrameworkOverride/displayName": "ターゲット フレームワークのオーバーライド", + "symbols/Framework/description": "プロジェクトのターゲット フレームワークです。", + "symbols/Framework/displayName": "フレームワーク", + "symbols/Framework/choices/net10.0/description": "ターゲット net10.0", + "symbols/EnablePack/description": "(\"dotnet pack\" を使用して) プロジェクトのパッケージ化を有効にするかどうか。", + "symbols/EnablePack/displayName": "パックを有効にする", + "symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。", + "symbols/skipRestore/displayName": "復元をスキップする", + "postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する", + "postActions/openInEditor/description": "エディターで Class1.cs を開きます" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..8ba3246be2ea --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit 테스트 프로젝트", + "description": "Windows, Linux 및 macOS의 .NET에서 실행할 수 있는 xUnit.net 테스트가 포함된 프로젝트입니다.", + "symbols/TargetFrameworkOverride/description": "대상 프레임워크를 재정의합니다.", + "symbols/TargetFrameworkOverride/displayName": "대상 프레임워크 재정의", + "symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.", + "symbols/Framework/displayName": "프레임워크", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "프로젝트에 대해 패키징(\"dotnet pack\"을 통해)을 활성화할지 여부", + "symbols/EnablePack/displayName": "팩 사용", + "symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.", + "symbols/skipRestore/displayName": "복원 건너뛰기", + "postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행", + "postActions/openInEditor/description": "편집기에서 Class1.cs 열기" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..3c180485d1e7 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit — projekt testowy", + "description": "Projekt zawierający testy xUnit.net, które mogą być uruchamiane na platformie .NET w systemach Windows, Linux i macOS", + "symbols/TargetFrameworkOverride/description": "Zastępuje platformę docelową", + "symbols/TargetFrameworkOverride/displayName": "Zastąpienie struktury docelowej", + "symbols/Framework/description": "Platforma docelowa dla tego projektu.", + "symbols/Framework/displayName": "Struktura", + "symbols/Framework/choices/net10.0/description": "Docelowa platforma net10.0", + "symbols/EnablePack/description": "Określa, czy włączyć pakowanie (za pośrednictwem „pakietu dotnet”) dla projektu.", + "symbols/EnablePack/displayName": "Włącz pakiet", + "symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.", + "symbols/skipRestore/displayName": "Pomiń przywracanie", + "postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”", + "postActions/openInEditor/description": "Otwiera plik Class1.cs w edytorze" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..f774157cfb79 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "Projeto de Teste xUnit", + "description": "Um projeto que contém testes xUnit.net que podem ser executados no .NET no Windows, Linux e macOS", + "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/displayName": "Estrutura", + "symbols/Framework/choices/net10.0/description": "Target net10.0", + "symbols/EnablePack/description": "Se deseja ou não habilitar o empacotamento (via \"dotnet pack\") para o projeto.", + "symbols/EnablePack/displayName": "Habilitar pacote", + "symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.", + "symbols/skipRestore/displayName": "Ignorar restauração", + "postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"", + "postActions/openInEditor/description": "Abrir Class1.cs no editor" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..6830d4974b65 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,17 @@ +{ + "author": "Майкрософт", + "name": "Тестовый проект xUnit", + "description": "Проект, содержащий тесты xUnit.net, которые могут работать на .NET в Windows, Linux и macOS.", + "symbols/TargetFrameworkOverride/description": "Переопределяет целевую платформу", + "symbols/TargetFrameworkOverride/displayName": "Переопределение целевой платформы", + "symbols/Framework/description": "Целевая платформа для проекта.", + "symbols/Framework/displayName": "Платформа", + "symbols/Framework/choices/net10.0/description": "Целевая среда net10.0", + "symbols/EnablePack/description": "Следует ли включить упаковку (через \"dotnet pack\") для проекта.", + "symbols/EnablePack/displayName": "Включить пакет", + "symbols/skipRestore/description": "Позволяет пропускать автоматическое восстановление проекта при создании.", + "symbols/skipRestore/displayName": "Пропустить восстановление", + "postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"", + "postActions/openInEditor/description": "Открывает файл Class1.cs в редакторе" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..0121340d5e93 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit Test Projesi", + "description": "Windows, Linux ve macOS üzerinde .NET'te çalışabilen xUnit.net testlerini içeren bir proje", + "symbols/TargetFrameworkOverride/description": "Hedef çerçeveyi geçersiz kılar", + "symbols/TargetFrameworkOverride/displayName": "Hedef çerçeveyi geçersiz kılma", + "symbols/Framework/description": "Projenin hedef çerçevesi.", + "symbols/Framework/displayName": "Çerçeve", + "symbols/Framework/choices/net10.0/description": "Hedef net10.0", + "symbols/EnablePack/description": "Proje için paketlemeyi etkinleştirip etkinleştirmeme ayarı ( \"dotnet pack\" üzerinden).", + "symbols/EnablePack/displayName": "Paketi etkinleştir", + "symbols/skipRestore/description": "Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.", + "symbols/skipRestore/displayName": "Geri yüklemeyi atla", + "postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", + "postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır", + "postActions/openInEditor/description": "Düzenleyicide Class1.cs dosyasını açar" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..179b6d2cdb27 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit 测试项目", + "description": "一个包含 xUnit.net 测试的项目,这些测试可在 Windows、Linux 和 macOS 的 .NET 上运行", + "symbols/TargetFrameworkOverride/description": "替代目标框架", + "symbols/TargetFrameworkOverride/displayName": "目标框架替代", + "symbols/Framework/description": "项目的目标框架。", + "symbols/Framework/displayName": "框架", + "symbols/Framework/choices/net10.0/description": "目标 net10.0", + "symbols/EnablePack/description": "是否(通过 \"dotnet pack\")为项目启用打包。", + "symbols/EnablePack/displayName": "启用包", + "symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。", + "symbols/skipRestore/displayName": "跳过还原", + "postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"", + "postActions/openInEditor/description": "在编辑器中打开 Class1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..18ccb5575129 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,17 @@ +{ + "author": "Microsoft", + "name": "xUnit 測試專案", + "description": "包含可以在 Windows、Linux 和 macOS 版的 .NET 上執行的 xUnit.net 測試的專案", + "symbols/TargetFrameworkOverride/description": "覆寫目標 Framework", + "symbols/TargetFrameworkOverride/displayName": "目標架構覆寫", + "symbols/Framework/description": "專案的目標 Framework。", + "symbols/Framework/displayName": "架構", + "symbols/Framework/choices/net10.0/description": "目標 net10.0", + "symbols/EnablePack/description": "是否要啟用專案的封裝 (透過 \"dotnet pack\")。", + "symbols/EnablePack/displayName": "啟用壓縮", + "symbols/skipRestore/description": "如果指定,則會在建立時跳過專案的自動還原。", + "symbols/skipRestore/displayName": "跳過還原", + "postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。", + "postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'", + "postActions/openInEditor/description": "在編輯器中開啟 Class1.cs" +} \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/template.json new file mode 100644 index 000000000000..8d63b4b475d3 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/.template.config/template.json @@ -0,0 +1,89 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Test", "xUnit", "Desktop", "Web"], + "name": "xUnit Test Project", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project that contains xUnit.net tests that can run on .NET on Windows, Linux and macOS", + "groupIdentity": "Microsoft.Test.xUnit", + "precedence": "12000", + "identity": "Microsoft.Test.xUnit.VisualBasic.10.0", + "shortName": "xunit", + "tags": { + "language": "VB", + "type": "project" + }, + "sourceName": "Company.TestProject1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "displayName": "Target framework override", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "displayName": "Framework", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": "Target net10.0" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "EnablePack": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether or not to enable packaging (via \"dotnet pack\") for the project.", + "displayName": "Enable pack" + }, + "HostIdentifier": { + "type": "bind", + "binding": "host:HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "displayName": "Skip restore", + "defaultValue": "false" + } + }, + "primaryOutputs": [ + { "path": "Company.TestProject1.vbproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "UnitTest1.vb" + } + ], + "defaultName": "TestProject1", + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "id": "restoreNugetPackages", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Class1.cs in the editor", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "id": "openInEditor", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/Company.TestProject1.vbproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/Company.TestProject1.vbproj new file mode 100644 index 000000000000..f7bde4de0756 --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/Company.TestProject1.vbproj @@ -0,0 +1,18 @@ + + + + Company.TestProject1 + net10.0 + TargetFrameworkOverride + true + false + + + + + + + + + + diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/UnitTest1.vb b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/UnitTest1.vb new file mode 100644 index 000000000000..dc21f884811d --- /dev/null +++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/UnitTest1.vb @@ -0,0 +1,12 @@ +Imports System +Imports Xunit + +Namespace Company.TestProject1 + Public Class UnitTest1 + + Sub TestSub() + + End Sub + End Class +End Namespace + diff --git a/template_feed/README.md b/template_feed/README.md index bf98de54b1f9..9b29cf870b92 100644 --- a/template_feed/README.md +++ b/template_feed/README.md @@ -7,6 +7,7 @@ This folder contains common project and item templates: - Class Library (`classlib`) - .NET `gitignore` (`gitignore`) - Editor config (`editorconfig`) +- Test templates (`mstest`, `nunit`, `xunit`) and some others The issues for the content of these templates should be opened in dotnet/sdk repo with label [`Area-Templates`](https://github.com/dotnet/sdk/issues?q=is%3Aopen+is%3Aissue+label%3AArea-Templates). @@ -18,7 +19,6 @@ The other templates are located in the following repositories: |ASP.NET Single Page Application templates| [dotnet/spa-templates](https://github.com/dotnet/spa-templates)| |WPF templates|[dotnet/wpf](https://github.com/dotnet/wpf)| |Windows Forms templates|[dotnet/winforms](https://github.com/dotnet/winforms)| -|Test templates|[dotnet/test-templates](https://github.com/dotnet/test-templates)| |MAUI templates|[dotnet/maui](https://github.com/dotnet/maui)| -Issues for the template content should be opened in the corresponding repository. \ No newline at end of file +Issues for the template content should be opened in the corresponding repository. diff --git a/test/ArgumentForwarding.Tests/ArgumentForwardingTests.cs b/test/ArgumentForwarding.Tests/ArgumentForwardingTests.cs index e9e5eea66216..405d744b8832 100644 --- a/test/ArgumentForwarding.Tests/ArgumentForwardingTests.cs +++ b/test/ArgumentForwarding.Tests/ArgumentForwardingTests.cs @@ -165,7 +165,7 @@ private string[] EscapeAndEvaluateArgumentString(string[] rawEvaluatedArgument) Console.WriteLine($"STDERR: {commandResult.StdErr}"); - commandResult.ExitCode.Should().Be(0); + commandResult.ExitCode.Should().Be(0, $"STDOUT: {commandResult.StdOut} STDERR: {commandResult.StdErr}"); return ParseReflectorOutput(commandResult.StdOut); } diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 5424d6ac6f49..cb15df6b34a0 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -1,10 +1,9 @@ - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) $(DefaultItemExcludes);**/*.tmp + $(MSBuildThisFileDirectory)xunit.runner.json + $(MSBuildThisFileDirectory)xunit.runner.json diff --git a/test/EndToEnd.Tests/ProjectBuildTests.cs b/test/EndToEnd.Tests/ProjectBuildTests.cs index 664a9e241ee9..9d71dc9b5c6d 100644 --- a/test/EndToEnd.Tests/ProjectBuildTests.cs +++ b/test/EndToEnd.Tests/ProjectBuildTests.cs @@ -408,11 +408,7 @@ private static string DetectExpectedDefaultFramework(string template = "") { // TODO: This block need to be updated when every template updates their default tfm. // Currently winforms updated their default templates target but not others. - if (template.StartsWith("mstest") - || template.StartsWith("winforms") - || template.StartsWith("wpf") - || template.StartsWith("nunit") - || template.StartsWith("xunit")) + if (template.StartsWith("winforms") || template.StartsWith("wpf")) { return $"net9.0"; } diff --git a/test/HelixTasks/AssemblyScheduler.cs b/test/HelixTasks/AssemblyScheduler.cs index 428d40dff3f4..5a6e909f4cda 100644 --- a/test/HelixTasks/AssemblyScheduler.cs +++ b/test/HelixTasks/AssemblyScheduler.cs @@ -35,15 +35,6 @@ public AssemblyPartitionInfo(string assemblyPath) public sealed class AssemblyScheduler { - /// - /// This is a test class inserted into assemblies to guard against a .NET desktop bug. The tests - /// inside of it counteract the underlying issue. If this test is included in any assembly it - /// must be added to every partition to ensure the work around is present - /// - /// https://github.com/dotnet/corefx/issues/3793 - /// https://github.com/dotnet/roslyn/issues/8936 - /// - private const string EventListenerGuardFullName = "Microsoft.CodeAnalysis.UnitTests.EventListenerGuard"; private readonly struct TypeInfo { @@ -78,23 +69,18 @@ private sealed class AssemblyInfoBuilder private readonly StringBuilder _builder = new(); private readonly string _assemblyPath; private readonly int _methodLimit; - private readonly bool _hasEventListenerGuard; - private readonly bool _netFramework; private int _currentId; private List _currentTypeInfoList = new(); - private AssemblyInfoBuilder(string assemblyPath, int methodLimit, bool hasEventListenerGuard, bool netFramework = false) + private AssemblyInfoBuilder(string assemblyPath, int methodLimit) { _assemblyPath = assemblyPath; _methodLimit = methodLimit; - _hasEventListenerGuard = hasEventListenerGuard; - _netFramework = netFramework; } internal static void Build(string assemblyPath, int methodLimit, List typeInfoList, out List partitionList, out List assemblyInfoList, bool netFramework = false) { - var hasEventListenerGuard = typeInfoList.Any(x => x.FullName == EventListenerGuardFullName); - var builder = new AssemblyInfoBuilder(assemblyPath, methodLimit, hasEventListenerGuard, netFramework); + var builder = new AssemblyInfoBuilder(assemblyPath, methodLimit); builder.Build(typeInfoList); partitionList = builder._partitionList; assemblyInfoList = builder._assemblyInfoList; @@ -107,19 +93,13 @@ private void Build(List typeInfoList) foreach (var typeInfo in typeInfoList) { _currentTypeInfoList.Add(typeInfo); - if (_netFramework) - { - if (_builder.Length > 0) - { - _builder.Append("|"); - } - _builder.Append($@"{typeInfo.FullName}"); - } - else + if (_builder.Length > 0) { - _builder.Append($@"-class ""{typeInfo.FullName}"" "); + _builder.Append("|"); } + _builder.Append($@"{typeInfo.FullName}"); + CheckForPartitionLimit(done: false); } @@ -131,12 +111,6 @@ private void BeginPartition() _currentId++; _currentTypeInfoList = new List(); _builder.Length = 0; - - // Ensure the EventListenerGuard is in every partition. - if (_hasEventListenerGuard) - { - _builder.Append($@"-class ""{EventListenerGuardFullName}"" "); - } } private void CheckForPartitionLimit(bool done) diff --git a/test/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs b/test/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs index 2d838d172a72..c9962361469f 100644 --- a/test/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs +++ b/test/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs @@ -126,20 +126,20 @@ private async Task ExecuteAsync() // These tests have to be executed slightly differently and we give them a different Identity so ADO can tell them apart var runtimeTargetFrameworkParsed = NuGetFramework.Parse(runtimeTargetFramework); var testIdentityDifferentiator = ""; - bool netFramework = false; if (runtimeTargetFrameworkParsed.Framework == ".NETFramework") { testIdentityDifferentiator = ".netfx"; - netFramework = true; } else if (runtimeTargetFrameworkParsed.Framework != ".NETCoreApp") { throw new NotImplementedException("does not support non support the runtime specified"); } - string testExecutionDirectory = netFramework ? "-e DOTNET_SDK_TEST_EXECUTION_DIRECTORY=%TestExecutionDirectory%" : IsPosixShell ? "-testExecutionDirectory $TestExecutionDirectory" : "-testExecutionDirectory %TestExecutionDirectory%"; + // On mac due to https://github.com/dotnet/sdk/issues/3923, we run against workitem directory + // but on Windows, if we running against working item diretory, we would hit long path. + string testExecutionDirectory = IsPosixShell ? "-e DOTNET_SDK_TEST_EXECUTION_DIRECTORY=$TestExecutionDirectory" : "-e DOTNET_SDK_TEST_EXECUTION_DIRECTORY=%TestExecutionDirectory%"; - string msbuildAdditionalSdkResolverFolder = netFramework ? "-e DOTNET_SDK_TEST_MSBUILDSDKRESOLVER_FOLDER=%HELIX_CORRELATION_PAYLOAD%\\r" : IsPosixShell ? "" : "-msbuildAdditionalSdkResolverFolder %HELIX_CORRELATION_PAYLOAD%\\r"; + string msbuildAdditionalSdkResolverFolder = IsPosixShell ? "" : "-e DOTNET_SDK_TEST_MSBUILDSDKRESOLVER_FOLDER=%HELIX_CORRELATION_PAYLOAD%\\r"; if (ExcludeAdditionalParameters.Equals("true")) { @@ -148,23 +148,16 @@ private async Task ExecuteAsync() } var scheduler = new AssemblyScheduler(methodLimit: !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TestFullMSBuild")) ? 32 : 16); - var assemblyPartitionInfos = scheduler.Schedule(targetPath, netFramework: netFramework); + var assemblyPartitionInfos = scheduler.Schedule(targetPath); var partitionedWorkItem = new List(); foreach (var assemblyPartitionInfo in assemblyPartitionInfos) { string command; - if (netFramework) - { - var testFilter = string.IsNullOrEmpty(assemblyPartitionInfo.ClassListArgumentString) ? "" : $"--filter \"{assemblyPartitionInfo.ClassListArgumentString}\""; - command = $"{driver} test {assemblyName} -e HELIX_WORK_ITEM_TIMEOUT={timeout} {testExecutionDirectory} {msbuildAdditionalSdkResolverFolder} " + - $"{(XUnitArguments != null ? " " + XUnitArguments : "")} --results-directory .\\ --logger trx {testFilter}"; - } - else - { - command = $"{driver} exec {assemblyName} -e HELIX_WORK_ITEM_TIMEOUT={timeout} {testExecutionDirectory} {msbuildAdditionalSdkResolverFolder} " + - $"{(XUnitArguments != null ? " " + XUnitArguments : "")} -xml testResults.xml {assemblyPartitionInfo.ClassListArgumentString} {arguments}"; - } + + var testFilter = string.IsNullOrEmpty(assemblyPartitionInfo.ClassListArgumentString) ? "" : $"--filter \"{assemblyPartitionInfo.ClassListArgumentString}\""; + command = $"{driver} test {assemblyName} -e HELIX_WORK_ITEM_TIMEOUT={timeout} {testExecutionDirectory} {msbuildAdditionalSdkResolverFolder} " + + $"{(XUnitArguments != null ? " " + XUnitArguments : "")} --results-directory .{Path.DirectorySeparatorChar} --logger trx --logger \"console;verbosity=detailed\" --blame-hang --blame-hang-timeout 30m {testFilter} -- {arguments}"; Log.LogMessage($"Creating work item with properties Identity: {assemblyName}, PayloadDirectory: {publishDirectory}, Command: {command}"); diff --git a/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BlazorWasmHotReloadMiddlewareTest.cs b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BlazorWasmHotReloadMiddlewareTest.cs index b214f8ac2ed9..efdcf548c524 100644 --- a/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BlazorWasmHotReloadMiddlewareTest.cs +++ b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BlazorWasmHotReloadMiddlewareTest.cs @@ -3,339 +3,260 @@ using System.Text.Json; using Microsoft.AspNetCore.Http; -using Microsoft.Net.Http.Headers; +using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Watch.BrowserRefresh { public class BlazorWasmHotReloadMiddlewareTest { + private readonly ILogger _logger; + private BlazorWasmHotReloadMiddleware _middleware; + + public BlazorWasmHotReloadMiddlewareTest() + { + var loggerFactory = LoggerFactory.Create(_ => { }); + _logger = loggerFactory.CreateLogger(); + _middleware = new BlazorWasmHotReloadMiddleware(context => throw new TimeZoneNotFoundException(), _logger); + } + [Fact] public async Task DeltasAreSavedOnPost() { - // Arrange var context = new DefaultHttpContext(); context.Request.Method = "post"; - var deltas = new[] + var update = new BlazorWasmHotReloadMiddleware.Update { - new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 0, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta1", - MetadataDelta = "MetadataDelta1", - UpdatedTypes = [42], - }, - new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 1, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta2", - MetadataDelta = "MetadataDelta2", - UpdatedTypes = [42], - } + Id = 0, + Deltas = + [ + new() + { + ModuleId = Guid.NewGuid().ToString(), + ILDelta = "ILDelta1", + PdbDelta = "PDBDelta1", + MetadataDelta = "MetadataDelta1", + UpdatedTypes = [42], + }, + new() + { + ModuleId = Guid.NewGuid().ToString(), + ILDelta = "ILDelta2", + PdbDelta = "PDBDelta2", + MetadataDelta = "MetadataDelta2", + UpdatedTypes = [42], + } + ] }; - context.Request.Body = GetJson(deltas); - var middleware = new BlazorWasmHotReloadMiddleware(context => throw new TimeZoneNotFoundException()); + context.Request.Body = GetJson(update); - // Act - await middleware.InvokeAsync(context); + await _middleware.InvokeAsync(context); - // Assert - AssertDeltas(deltas, middleware.Deltas); - Assert.NotEqual(0, context.Response.Headers["ETag"].Count); + AssertUpdates([update], _middleware.Updates); } [Fact] public async Task DuplicateDeltasOnPostAreIgnored() { - // Arrange - var deltas = new[] + var updates = new BlazorWasmHotReloadMiddleware.Update[] { - new BlazorWasmHotReloadMiddleware.UpdateDelta + new() { - SequenceId = 0, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta1", - MetadataDelta = "MetadataDelta1", - UpdatedTypes = [42], + Id = 0, + Deltas = + [ + new() + { + ModuleId = Guid.NewGuid().ToString(), + ILDelta = "ILDelta1", + PdbDelta = "PDBDelta1", + MetadataDelta = "MetadataDelta1", + UpdatedTypes = [42], + } + ] }, - new BlazorWasmHotReloadMiddleware.UpdateDelta + new() { - SequenceId = 1, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta2", - MetadataDelta = "MetadataDelta2", - UpdatedTypes = [42], + Id = 1, + Deltas = + [ + new() + { + ModuleId = Guid.NewGuid().ToString(), + ILDelta = "ILDelta2", + PdbDelta = "PDBDelta2", + MetadataDelta = "MetadataDelta2", + UpdatedTypes = [42], + } + ] } }; + var context = new DefaultHttpContext(); context.Request.Method = "post"; - context.Request.Body = GetJson(deltas); + context.Request.Body = GetJson(updates[0]); - var middleware = new BlazorWasmHotReloadMiddleware(context => throw new TimeZoneNotFoundException()); + await _middleware.InvokeAsync(context); - // Act 1 - await middleware.InvokeAsync(context); - - // Act 2 context = new DefaultHttpContext(); context.Request.Method = "post"; - context.Request.Body = GetJson(deltas); - await middleware.InvokeAsync(context); + context.Request.Body = GetJson(updates[1]); + await _middleware.InvokeAsync(context); - // Assert - AssertDeltas(deltas, middleware.Deltas); - Assert.NotEqual(0, context.Response.Headers["ETag"].Count); + AssertUpdates(updates, _middleware.Updates); } [Fact] public async Task MultipleDeltaPayloadsCanBeAccepted() { - // Arrange - var deltas = new List + var update = new BlazorWasmHotReloadMiddleware.Update() { - new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 0, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta1", - MetadataDelta = "MetadataDelta1", - UpdatedTypes = [42], - }, - new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 1, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta2", - MetadataDelta = "MetadataDelta2", - UpdatedTypes = [42], - } + Id = 0, + Deltas = + [ + new() + { + ModuleId = Guid.NewGuid().ToString(), + ILDelta = "ILDelta1", + PdbDelta = "PDBDelta1", + MetadataDelta = "MetadataDelta1", + UpdatedTypes = [42], + }, + new() + { + ModuleId = Guid.NewGuid().ToString(), + ILDelta = "ILDelta2", + PdbDelta = "PDBDelta2", + MetadataDelta = "MetadataDelta2", + UpdatedTypes = [42], + } + ] }; + var context = new DefaultHttpContext(); context.Request.Method = "post"; - context.Request.Body = GetJson(deltas); - - var middleware = new BlazorWasmHotReloadMiddleware(context => throw new TimeZoneNotFoundException()); + context.Request.Body = GetJson(update); + await _middleware.InvokeAsync(context); - // Act 1 - await middleware.InvokeAsync(context); - - // Act 2 - var newDeltas = new[] + var newUpdate = new BlazorWasmHotReloadMiddleware.Update() { - new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 3, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta3", - MetadataDelta = "MetadataDelta3", - UpdatedTypes = [42], - }, - new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 4, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta4", - MetadataDelta = "MetadataDelta4", - UpdatedTypes = [42], - }, - new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 5, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta5", - MetadataDelta = "MetadataDelta5", - UpdatedTypes = [42], - }, + Id = 1, + Deltas = + [ + new() + { + ModuleId = Guid.NewGuid().ToString(), + ILDelta = "ILDelta3", + PdbDelta = "PDBDelta3", + MetadataDelta = "MetadataDelta3", + UpdatedTypes = [42], + }, + new() + { + ModuleId = Guid.NewGuid().ToString(), + ILDelta = "ILDelta4", + PdbDelta = "PDBDelta4", + MetadataDelta = "MetadataDelta4", + UpdatedTypes = [42], + }, + new() + { + ModuleId = Guid.NewGuid().ToString(), + ILDelta = "ILDelta5", + PdbDelta = "PDBDelta5", + MetadataDelta = "MetadataDelta5", + UpdatedTypes = [42], + }, + ] }; context = new DefaultHttpContext(); context.Request.Method = "post"; - context.Request.Body = GetJson(newDeltas); - await middleware.InvokeAsync(context); + context.Request.Body = GetJson(newUpdate); + await _middleware.InvokeAsync(context); - // Assert - deltas.AddRange(newDeltas); - AssertDeltas(deltas, middleware.Deltas); - Assert.NotEqual(0, context.Response.Headers["ETag"].Count); + AssertUpdates([update, newUpdate], _middleware.Updates); } [Fact] public async Task Get_Returns204_IfNoDeltasPresent() { - // Arrange var context = new DefaultHttpContext(); context.Request.Method = "get"; - var middleware = new BlazorWasmHotReloadMiddleware(context => throw new TimeZoneNotFoundException()); + + await _middleware.InvokeAsync(context); - // Act - await middleware.InvokeAsync(context); - - // Assert Assert.Equal(204, context.Response.StatusCode); } [Fact] public async Task GetReturnsDeltas() { - // Arrange var context = new DefaultHttpContext(); context.Request.Method = "get"; var stream = new MemoryStream(); context.Response.Body = stream; - var middleware = new BlazorWasmHotReloadMiddleware(context => throw new TimeZoneNotFoundException()); - var deltas = new List + var updates = new List { - new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 0, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta1", - MetadataDelta = "MetadataDelta1", - UpdatedTypes = [42], - }, - new BlazorWasmHotReloadMiddleware.UpdateDelta + new() { - SequenceId = 1, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta2", - MetadataDelta = "MetadataDelta2", - UpdatedTypes = [42], + Id = 0, + Deltas = + [ + new() + { + ModuleId = Guid.NewGuid().ToString(), + ILDelta = "ILDelta1", + PdbDelta = "PdbDelta1", + MetadataDelta = "MetadataDelta1", + UpdatedTypes = [42], + }, + new() + { + ModuleId = Guid.NewGuid().ToString(), + ILDelta = "ILDelta2", + PdbDelta = "PdbDelta2", + MetadataDelta = "MetadataDelta2", + UpdatedTypes = [42], + } + ] } }; - middleware.Deltas.AddRange(deltas); + _middleware.Updates.AddRange(updates); - // Act - await middleware.InvokeAsync(context); + await _middleware.InvokeAsync(context); - // Assert Assert.Equal(200, context.Response.StatusCode); Assert.Equal( - JsonSerializer.SerializeToUtf8Bytes(deltas, new JsonSerializerOptions(JsonSerializerDefaults.Web)), + JsonSerializer.SerializeToUtf8Bytes(updates, new JsonSerializerOptions(JsonSerializerDefaults.Web)), stream.ToArray()); - Assert.NotEqual(0, context.Response.Headers[HeaderNames.ETag].Count); } - [Fact] - public async Task GetReturnsNotModified_IfNoneMatchApplies() + private static void AssertUpdates(IReadOnlyList expected, IReadOnlyList actual) { - // Arrange - var context = new DefaultHttpContext(); - context.Request.Method = "get"; - var middleware = new BlazorWasmHotReloadMiddleware(context => throw new TimeZoneNotFoundException()); - var deltas = new List - { - new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 0, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta1", - MetadataDelta = "MetadataDelta1", - UpdatedTypes = [42], - }, - new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 1, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta2", - MetadataDelta = "MetadataDelta2", - UpdatedTypes = [42], - } - }; - middleware.Deltas.AddRange(deltas); - - // Act 1 - await middleware.InvokeAsync(context); - var etag = context.Response.Headers[HeaderNames.ETag]; - - // Act 2 - context = new DefaultHttpContext(); - context.Request.Method = "get"; - context.Request.Headers[HeaderNames.IfNoneMatch] = etag; - - await middleware.InvokeAsync(context); - - // Assert 2 - Assert.Equal(StatusCodes.Status304NotModified, context.Response.StatusCode); - } + Assert.Equal(expected.Count, actual.Count); - [Fact] - public async Task GetReturnsUpdatedResults_IfNoneMatchFails() - { - // Arrange - var context = new DefaultHttpContext(); - context.Request.Method = "get"; - var middleware = new BlazorWasmHotReloadMiddleware(context => throw new TimeZoneNotFoundException()); - var deltas = new List + for (var u = 0; u < expected.Count; u++) { - new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 0, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta1", - MetadataDelta = "MetadataDelta1", - UpdatedTypes = [42], - }, - new BlazorWasmHotReloadMiddleware.UpdateDelta + var expectedUpdate = expected[u]; + var actualUpdate = actual[u]; + Assert.Equal(expectedUpdate.Id, actualUpdate.Id); + Assert.Equal(expectedUpdate.Deltas.Length, expectedUpdate.Deltas.Length); + + for (var i = 0; i < expectedUpdate.Deltas.Length; i++) { - SequenceId = 1, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta2", - MetadataDelta = "MetadataDelta2", - UpdatedTypes = [42], + Assert.Equal(expectedUpdate.Deltas[i].ILDelta, actualUpdate.Deltas[i].ILDelta); + Assert.Equal(expectedUpdate.Deltas[i].PdbDelta, actualUpdate.Deltas[i].PdbDelta); + Assert.Equal(expectedUpdate.Deltas[i].MetadataDelta, actualUpdate.Deltas[i].MetadataDelta); + Assert.Equal(expectedUpdate.Deltas[i].ModuleId, actualUpdate.Deltas[i].ModuleId); + Assert.Equal(expectedUpdate.Deltas[i].UpdatedTypes, actualUpdate.Deltas[i].UpdatedTypes); } - }; - middleware.Deltas.AddRange(deltas); - - // Act 1 - await middleware.InvokeAsync(context); - var etag = context.Response.Headers[HeaderNames.ETag]; - - // Act 2 - var update = new BlazorWasmHotReloadMiddleware.UpdateDelta - { - SequenceId = 3, - ModuleId = Guid.NewGuid().ToString(), - ILDelta = "ILDelta3", - MetadataDelta = "MetadataDelta3", - UpdatedTypes = [42], - }; - deltas.Add(update); - middleware.Deltas.Add(update); - context = new DefaultHttpContext(); - context.Request.Method = "get"; - context.Request.Headers[HeaderNames.IfNoneMatch] = etag; - var stream = new MemoryStream(); - context.Response.Body = stream; - - await middleware.InvokeAsync(context); - - // Assert 2 - Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode); - Assert.Equal( - JsonSerializer.SerializeToUtf8Bytes(deltas, new JsonSerializerOptions(JsonSerializerDefaults.Web)), - stream.ToArray()); - Assert.NotEqual(etag, context.Response.Headers[HeaderNames.ETag]); - } - - private static void AssertDeltas(IReadOnlyList expected, IReadOnlyList actual) - { - Assert.Equal(expected.Count, actual.Count); - - for (var i = 0; i < expected.Count; i++) - { - Assert.Equal(expected[i].ILDelta, actual[i].ILDelta); - Assert.Equal(expected[i].MetadataDelta, actual[i].MetadataDelta); - Assert.Equal(expected[i].ModuleId, actual[i].ModuleId); - Assert.Equal(expected[i].SequenceId, actual[i].SequenceId); - Assert.Equal(expected[i].UpdatedTypes, actual[i].UpdatedTypes); } } - private Stream GetJson(IReadOnlyList deltas) + private static Stream GetJson(object obj) { - var bytes = JsonSerializer.SerializeToUtf8Bytes(deltas, new JsonSerializerOptions(JsonSerializerDefaults.Web)); + var bytes = JsonSerializer.SerializeToUtf8Bytes(obj, new JsonSerializerOptions(JsonSerializerDefaults.Web)); return new MemoryStream(bytes); } } diff --git a/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserRefreshMiddlewareTest.cs b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserRefreshMiddlewareTest.cs index c09dd8c64274..1fa4b862b693 100644 --- a/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserRefreshMiddlewareTest.cs +++ b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserRefreshMiddlewareTest.cs @@ -492,14 +492,12 @@ public async Task InvokeAsync_AttachesHeadersToResponse() var middleware = new BrowserRefreshMiddleware(async (context) => { - context.Response.ContentType = "application/json"; await context.Response.StartAsync(); await context.Response.WriteAsync("{ }"); }, NullLogger.Instance); - UnsafeBrowserRefreshMiddlewareAccessor.GetSetPrivateDotnetModifiableAssemblies(middleware) = "true"; - UnsafeBrowserRefreshMiddlewareAccessor.GetSetPrivateAspnetcoreBrowserTools(middleware) = "true"; + middleware.Test_SetEnvironment(dotnetModifiableAssemblies: "true", aspnetcoreBrowserTools: "true"); // Act await middleware.InvokeAsync(context); @@ -545,8 +543,7 @@ public async Task InvokeAsync_DoesNotAttachHeaders_WhenAlreadyAttached() await context.Response.WriteAsync("{ }"); }, NullLogger.Instance); - UnsafeBrowserRefreshMiddlewareAccessor.GetSetPrivateDotnetModifiableAssemblies(middleware) = "true"; - UnsafeBrowserRefreshMiddlewareAccessor.GetSetPrivateAspnetcoreBrowserTools(middleware) = "true"; + middleware.Test_SetEnvironment(dotnetModifiableAssemblies: "true", aspnetcoreBrowserTools: "true"); // Act await middleware.InvokeAsync(context); @@ -598,15 +595,6 @@ public async Task InvokeAsync_AddsScriptToThePage() Assert.Equal("

Hello world

", responseContent); } - private static class UnsafeBrowserRefreshMiddlewareAccessor - { - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_dotnetModifiableAssemblies")] - extern internal static ref string GetSetPrivateDotnetModifiableAssemblies(BrowserRefreshMiddleware middleware); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_aspnetcoreBrowserTools")] - extern internal static ref string GetSetPrivateAspnetcoreBrowserTools(BrowserRefreshMiddleware middleware); - } - private class TestHttpResponseFeature : IHttpResponseFeature, IHttpResponseBodyFeature { private (Func callback, object state)[] _callbacks = []; diff --git a/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserScriptMiddlewareTest.cs b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserScriptMiddlewareTest.cs index ee20f24e0fa0..19621f84cc92 100644 --- a/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserScriptMiddlewareTest.cs +++ b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/BrowserScriptMiddlewareTest.cs @@ -2,26 +2,35 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Watch.BrowserRefresh { public class BrowserScriptMiddlewareTest { private readonly RequestDelegate _next = (context) => Task.CompletedTask; + private readonly ILogger _logger; + + public BrowserScriptMiddlewareTest() + { + var loggerFactory = LoggerFactory.Create(_ => { }); + _logger = loggerFactory.CreateLogger(); + } [Fact] public async Task InvokeAsync_ReturnsScript() { - // Arrange var context = new DefaultHttpContext(); var stream = new MemoryStream(); context.Response.Body = stream; - var middleware = new BrowserScriptMiddleware(_next, BrowserScriptMiddleware.GetWebSocketClientJavaScript("some-host", "test-key")); + var middleware = new BrowserScriptMiddleware( + _next, + new PathString("/script.js"), + BrowserScriptMiddleware.GetWebSocketClientJavaScript("some-host", "test-key"), + _logger); - // Act await middleware.InvokeAsync(context); - // Assert stream.Position = 0; var script = Encoding.UTF8.GetString(stream.ToArray()); Assert.Contains("// dotnet-watch browser reload script", script); @@ -32,15 +41,16 @@ public async Task InvokeAsync_ReturnsScript() [Fact] public async Task InvokeAsync_ConfiguresHeaders() { - // Arrange var context = new DefaultHttpContext(); context.Response.Body = new MemoryStream(); - var middleware = new BrowserScriptMiddleware(_next, BrowserScriptMiddleware.GetWebSocketClientJavaScript("some-host", "test-key")); + var middleware = new BrowserScriptMiddleware( + _next, + new PathString("/script.js"), + BrowserScriptMiddleware.GetWebSocketClientJavaScript("some-host", "test-key"), + _logger); - // Act await middleware.InvokeAsync(context); - // Assert var response = context.Response; Assert.Collection( response.Headers.OrderBy(h => h.Key), diff --git a/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/HostingStartupTest.cs b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/HostingStartupTest.cs index 8e046cc1c3af..5050e4c8dd15 100644 --- a/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/HostingStartupTest.cs +++ b/test/Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/HostingStartupTest.cs @@ -45,18 +45,32 @@ public async Task GetBlazorHotReloadMiddlewareWorks() [Fact] public async Task PostBlazorHotReloadMiddlewareWorks() { - // Arrange var requestDelegate = GetRequestDelegate(); var context = new DefaultHttpContext(); context.Request.Path = "/_framework/blazor-hotreload"; context.Request.Method = "POST"; - context.Request.Body = new MemoryStream(Encoding.UTF8.GetBytes("[]")); - // Act + var updateJson = """ + {"id":0,"deltas":[{"moduleId":"9BBB9BBD-48F0-4EB2-B7A3-956CFC220CC4","metadataDelta":"","ilDelta":"","pdbDelta":"","updatedTypes":[1,2,3]}]} + """; + + context.Request.Body = new MemoryStream(Encoding.UTF8.GetBytes(updateJson)); + await requestDelegate(context); - // Assert Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode); + + context.Request.Path = "/_framework/blazor-hotreload"; + context.Request.Method = "GET"; + + var body = new MemoryStream(); + context.Response.Body = body; + + await requestDelegate(context); + + var bodyJson = Encoding.UTF8.GetString(body.ToArray()); + + Assert.Equal($"[{updateJson}]", bodyJson); } [Fact] diff --git a/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/HotReloadAgentTest.cs b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/HotReloadAgentTest.cs index ab1952b2f3e7..3c0673244bed 100644 --- a/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/HotReloadAgentTest.cs +++ b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/HotReloadAgentTest.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Reflection; -using Microsoft.Extensions.HotReload; +using Microsoft.DotNet.HotReload; using Moq; -namespace Microsoft.Extensions.DotNetDeltaApplier +namespace Microsoft.DotNet.Watch.UnitTests { public class HotReloadAgentTest { diff --git a/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs index b5e5467d37ea..547f0618f049 100644 --- a/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs +++ b/test/Microsoft.Extensions.DotNetDeltaApplier.Tests/StartupHookTests.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.Extensions.DotNetDeltaApplier +namespace Microsoft.DotNet.Watch.UnitTests { public class StartupHookTests { diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs index cc7aa1abc878..5734483b579e 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs @@ -25,7 +25,12 @@ public class DockerRegistryManager internal class SameArchManifestPicker : IManifestPicker { - public PlatformSpecificManifest? PickBestManifestForRid(IReadOnlyDictionary manifestList, string runtimeIdentifier) + public PlatformSpecificManifest? PickBestManifestForRid(IReadOnlyDictionary manifestList, string runtimeIdentifier) + { + return manifestList.Values.SingleOrDefault(m => m.platform.os == "linux" && m.platform.architecture == "amd64"); + } + + public PlatformSpecificOciManifest? PickBestManifestForRid(IReadOnlyDictionary manifestList, string runtimeIdentifier) { return manifestList.Values.SingleOrDefault(m => m.platform.os == "linux" && m.platform.architecture == "amd64"); } @@ -73,13 +78,14 @@ public static async Task StartAndPopulateDockerRegistry(ITestOutputHelper testOu string dotnetdll = System.Reflection.Assembly.GetExecutingAssembly().Location; var ridjson = Path.Combine(Path.GetDirectoryName(dotnetdll)!, "RuntimeIdentifierGraph.json"); - var image = await pullRegistry.GetImageManifestAsync(RuntimeBaseImage, tag, "linux-x64", new SameArchManifestPicker(), CancellationToken.None); + var image = await pullRegistry.GetImageManifestAsync(RuntimeBaseImage, tag, "linux-x64", new SameArchManifestPicker(), CancellationToken.None); var source = new SourceImageReference(pullRegistry, RuntimeBaseImage, tag); var dest = new DestinationImageReference(pushRegistry, RuntimeBaseImage, [tag]); logger.LogInformation($"Pushing image for {BaseImageSource}/{RuntimeBaseImage}:{tag}"); await pushRegistry.PushAsync(image.Build(), source, dest, CancellationToken.None); logger.LogInformation($"Pushed image for {BaseImageSource}/{RuntimeBaseImage}:{tag}"); } + return; } catch (Exception ex) diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index 5ae1169c459d..10132a38f476 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.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 System.Formats.Tar; using System.Runtime.CompilerServices; using Microsoft.DotNet.Cli.Utils; using Microsoft.NET.Build.Containers.LocalDaemons; @@ -189,6 +190,148 @@ public async Task ApiEndToEndWithArchiveWritingAndLoad() } } + [DockerAvailableFact] + public async Task TarballsHaveCorrectStructure() + { + var archiveFile = Path.Combine(TestSettings.TestArtifactsDirectory, + nameof(TarballsHaveCorrectStructure), "app.tar.gz"); + + // 1. Create docker image and write it to a tarball + (BuiltImage dockerImage, SourceImageReference sourceReference, DestinationImageReference destinationReference) = + await BuildDockerImageWithArciveDestinationAsync(archiveFile, ["latest"], nameof(TarballsHaveCorrectStructure)); + + await destinationReference.LocalRegistry!.LoadAsync(dockerImage, sourceReference, destinationReference, default).ConfigureAwait(false); + + Assert.True(File.Exists(archiveFile), $"File.Exists({archiveFile})"); + + CheckDockerTarballStructure(archiveFile); + + // 2. Convert the docker image to an OCI image and write it to a tarball + BuiltImage ociImage = ConvertToOciImage(dockerImage); + + await destinationReference.LocalRegistry!.LoadAsync(ociImage, sourceReference, destinationReference, default).ConfigureAwait(false); + + Assert.True(File.Exists(archiveFile), $"File.Exists({archiveFile})"); + + CheckOciTarballStructure(archiveFile); + } + + private async Task<(BuiltImage image, SourceImageReference sourceReference, DestinationImageReference destinationReference)> BuildDockerImageWithArciveDestinationAsync(string archiveFile, string[] tags, string testName) + { + ILogger logger = _loggerFactory.CreateLogger(testName); + Registry registry = new(DockerRegistryManager.LocalRegistry, logger, RegistryMode.Push); + + ImageBuilder imageBuilder = await registry.GetImageManifestAsync( + DockerRegistryManager.RuntimeBaseImage, + DockerRegistryManager.Net8ImageTag, + "linux-x64", + ToolsetUtils.RidGraphManifestPicker, + cancellationToken: default).ConfigureAwait(false); + Assert.NotNull(imageBuilder); + + BuiltImage builtImage = imageBuilder.Build(); + + // Write the image to disk + var sourceReference = new SourceImageReference(registry, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net7ImageTag); + var destinationReference = new DestinationImageReference(new ArchiveFileRegistry(archiveFile), NewImageName(), tags); + + return (builtImage, sourceReference, destinationReference); + } + + private BuiltImage ConvertToOciImage(BuiltImage builtImage) + { + // Convert the image to an OCI image + var ociImage = new BuiltImage + { + Config = builtImage.Config, + ImageDigest = builtImage.ImageDigest, + ImageSha = builtImage.ImageSha, + ImageSize = builtImage.ImageSize, + Manifest = builtImage.Manifest, + ManifestMediaType = SchemaTypes.OciManifestV1, + }; + + return ociImage; + } + + private void CheckDockerTarballStructure(string tarball) + { + var layersCount = 0; + int configJson = 0; + int manifestJsonCount = 0; + + using (FileStream fs = new FileStream(tarball, FileMode.Open, FileAccess.Read)) + using (var tarReader = new TarReader(fs)) + { + var entry = tarReader.GetNextEntry(); + + while (entry is not null) + { + if (entry.Name == "manifest.json") + { + manifestJsonCount++; + } + else if (entry.Name.EndsWith(".json")) + { + configJson++; + } + else if (entry.Name.EndsWith("/layer.tar")) + { + layersCount++; + } + else + { + Assert.Fail($"Unexpected entry in tarball: {entry.Name}"); + } + + entry = tarReader.GetNextEntry(); + } + } + + Assert.Equal(1, manifestJsonCount); + Assert.Equal(1, configJson); + Assert.True(layersCount > 0); + } + + private void CheckOciTarballStructure(string tarball) + { + int blobsCount = 0; + int ociLayoutCount = 0; + int indexJsonCount = 0; + + using (FileStream fs = new FileStream(tarball, FileMode.Open, FileAccess.Read)) + using (var tarReader = new TarReader(fs)) + { + var entry = tarReader.GetNextEntry(); + + while (entry is not null) + { + if (entry.Name == "oci-layout") + { + ociLayoutCount++; + } + else if (entry.Name == "index.json") + { + indexJsonCount++; + } + else if (entry.Name.StartsWith("blobs/sha256/")) + { + blobsCount++; + } + else + { + Assert.Fail($"Unexpected entry in tarball: {entry.Name}"); + } + + entry = tarReader.GetNextEntry(); + } + } + + Assert.Equal(1, ociLayoutCount); + Assert.Equal(1, indexJsonCount); + Assert.True(blobsCount > 0); + } + private string BuildLocalApp([CallerMemberName] string testName = "TestName", string tfm = ToolsetInfo.CurrentTargetFramework, string rid = "linux-x64") { string workingDirectory = Path.Combine(TestSettings.TestArtifactsDirectory, testName); diff --git a/test/Microsoft.NET.Build.Containers.UnitTests/ImageBuilderTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/ImageBuilderTests.cs index 1d6c0d4b9cc4..6a359c970480 100644 --- a/test/Microsoft.NET.Build.Containers.UnitTests/ImageBuilderTests.cs +++ b/test/Microsoft.NET.Build.Containers.UnitTests/ImageBuilderTests.cs @@ -703,6 +703,6 @@ private ImageBuilder FromBaseImageConfig(string baseImageConfig, [CallerMemberNa Layers = new List(), KnownDigest = StaticKnownDigestValue }; - return new ImageBuilder(manifest, new ImageConfig(baseImageConfig), _loggerFactory.CreateLogger(testName)); + return new ImageBuilder(manifest, manifest.MediaType, new ImageConfig(baseImageConfig), _loggerFactory.CreateLogger(testName)); } } diff --git a/test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs index 81740674b438..37384ba7c18e 100644 --- a/test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs +++ b/test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs @@ -395,12 +395,12 @@ public async Task UploadBlobChunkedAsync_Failure() api.Verify(api => api.Blob.Upload.UploadChunkAsync(It.IsIn(absoluteUploadUri, uploadPath), It.IsAny(), It.IsAny()), Times.Exactly(1)); } + [Theory(Skip = "https://github.com/dotnet/sdk/issues/42820")] [InlineData(true, true, true)] [InlineData(false, true, true)] [InlineData(true, false, true)] [InlineData(false, false, true)] [InlineData(false, false, false)] - [Theory] public async Task InsecureRegistry(bool isInsecureRegistry, bool serverIsHttps, bool httpServerCloseAbortive) { ILogger logger = _loggerFactory.CreateLogger(nameof(InsecureRegistry)); diff --git a/test/Microsoft.NET.Build.Tests/ArtifactsOutputPathTests.cs b/test/Microsoft.NET.Build.Tests/ArtifactsOutputPathTests.cs index 4afaaa3a9074..4a4c86049f40 100644 --- a/test/Microsoft.NET.Build.Tests/ArtifactsOutputPathTests.cs +++ b/test/Microsoft.NET.Build.Tests/ArtifactsOutputPathTests.cs @@ -94,7 +94,7 @@ public void ItUsesArtifactsOutputPathForBuild() } } - [Fact] + [Fact(Skip = "https://github.com/dotnet/sdk/issues/45057")] public void ItUsesArtifactsOutputPathForPublish() { var (testProjects, testAsset) = GetTestProjects(); diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopLibrary.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopLibrary.cs index 127aaf3882cd..557741e430d5 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopLibrary.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildADesktopLibrary.cs @@ -225,6 +225,32 @@ public void It_can_preserve_compilation_context_and_reference_netstandard_librar } } + [Theory] + [InlineData("RazorSimpleMvc22", "netcoreapp2.2", "SimpleMvc22")] + [InlineData("DesktopReferencingNetStandardLibrary", "net46", "Library")] + public void PackageReferences_with_private_assets_do_not_appear_in_deps_file(string asset, string targetFramework, string exeName) + { + var testAsset = _testAssetsManager + .CopyTestAsset(asset) + .WithSource(); + + var buildCommand = new BuildCommand(testAsset); + buildCommand.Execute().Should().Pass(); + + using (var depsJsonFileStream = File.OpenRead(Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, exeName + ".deps.json"))) + { + var dependencyContext = new DependencyContextJsonReader().Read(depsJsonFileStream); + if (asset.Equals("DesktopReferencingNetStandardLibrary")) + { + dependencyContext.CompileLibraries.Any(l => l.Name.Equals("Library")).Should().BeTrue(); + } + else + { + dependencyContext.CompileLibraries.Any(l => l.Name.Equals("Microsoft.AspNetCore.App")).Should().BeFalse(); + } + } + } + [WindowsOnlyFact] public void It_resolves_assembly_conflicts_with_a_NETFramework_library() { diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs index 36e9637febc8..749ded3845d6 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs @@ -48,7 +48,7 @@ public void It_targets_the_right_shared_framework(string targetFramework, string } // Test behavior when implicit version differs for framework-dependent and self-contained apps - [Theory] + [Theory(Skip = "https://github.com/dotnet/sdk/issues/45417")] [InlineData("netcoreapp1.0", false, true, "1.0.5")] [InlineData("netcoreapp1.0", true, true, "1.0.16")] [InlineData("netcoreapp1.0", false, false, "1.0.5")] diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs index c1e9e0e94c55..98fb056b9bfb 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs @@ -810,7 +810,7 @@ public void It_does_not_write_to_undefined_assembly_metadata_attribute(string ta } } - [Theory] + [Theory(Skip = "https://github.com/dotnet/sdk/issues/45148")] [InlineData("netcoreapp3.1", ".NET Core 3.1")] [InlineData("netcoreapp2.1", ".NET Core 2.1")] [InlineData("netstandard2.1", ".NET Standard 2.1")] diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs index 91fb7349c71c..fad2a213d958 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs @@ -551,6 +551,44 @@ public void It_does_not_rewrite_the_single_file_unnecessarily() fileWriteTimeAfterSecondRun.Should().Be(fileWriteTimeAfterFirstRun); } + [RequiresMSBuildVersionFact("16.8.0")] + public void It_uses_appropriate_host_on_selfcontained_publish_with_no_build() + { + var testProject = new TestProject() + { + Name = "SingleFileTest", + TargetFrameworks = ToolsetInfo.CurrentTargetFramework, + RuntimeIdentifier = RuntimeInformation.RuntimeIdentifier, + IsExe = true, + }; + testProject.AdditionalProperties.Add("SelfContained", "true"); + TestAsset testAsset = _testAssetsManager.CreateTestProject(testProject); + + // Build will create app using apphost + var buildCommand = new BuildCommand(testAsset); + buildCommand + .Execute() + .Should() + .Pass(); + + // Publish without build should create app using singlefilehost + var publishCommand = new PublishCommand(testAsset); + publishCommand + .Execute(PublishSingleFile, "/p:NoBuild=true") + .Should() + .Pass(); + string singleFilePath = Path.Combine( + GetPublishDirectory(publishCommand).FullName, + $"{testProject.Name}{Constants.ExeSuffix}"); + + // Make sure published app runs correctly + var command = new RunExeCommand(Log, singleFilePath); + command.Execute() + .Should() + .Pass() + .And.HaveStdOutContaining("Hello World"); + } + [RequiresMSBuildVersionFact("16.8.0")] public void It_rewrites_the_apphost_for_single_file_publish() { diff --git a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs index 3e9d2f2aa0cd..05c7771111a8 100644 --- a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs +++ b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToUseFrameworkRoslyn.cs @@ -160,5 +160,26 @@ public void It_throws_a_warning_when_NuGetPackageRoot_is_empty() var toolsetPackageDir = Path.Combine(customPackagesDir, "microsoft.net.sdk.compilers.toolset"); new DirectoryInfo(toolsetPackageDir).Should().Exist(); } + + [FullMSBuildOnlyFact] // https://github.com/dotnet/sdk/issues/44605 + public void It_does_not_throw_a_warning_when_NuGetPackageRoot_is_empty_in_wpftmp() + { + var testAsset = _testAssetsManager + .CopyTestAsset("DesktopWpf") + .WithSource(); + + NuGetConfigWriter.Write(testAsset.Path, TestContext.Current.TestPackages); + + var buildCommand = new BuildCommand(testAsset, relativePathToProject: "FxWpf") + { + WorkingDirectory = Path.Combine(testAsset.Path, "FxWpf") + }; + + // simulate mismatched MSBuild versions via _IsDisjointMSBuildVersion + buildCommand.Execute("-p:_IsDisjointMSBuildVersion=true") + .Should().Pass().And.NotHaveStdOutContaining("NETSDK1221"); + + Assert.True(File.Exists(Path.Combine(testAsset.Path, "obj", "net472", "MainWindow.g.cs"))); + } } } diff --git a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs index 0602e895315e..a1421b976d8d 100644 --- a/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs +++ b/test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorLegacyIntegrationTest60.cs @@ -54,7 +54,7 @@ public void Publish60Hosted_Works() ProjectDirectory = CreateAspNetSdkTestAsset(testAsset); var publish = CreatePublishCommand(ProjectDirectory, "Server"); - ExecuteCommand(publish) + ExecuteCommand(publish, "/p:BuildWithNetFrameworkHostedCompiler=true") .Should() .Pass() .And.NotHaveStdOutContaining("warning IL"); diff --git a/test/Microsoft.NET.Sdk.Razor.Tests/BuildWithComponentsIntegrationTest.cs b/test/Microsoft.NET.Sdk.Razor.Tests/BuildWithComponentsIntegrationTest.cs index b93cec570764..1feb0fed8adf 100644 --- a/test/Microsoft.NET.Sdk.Razor.Tests/BuildWithComponentsIntegrationTest.cs +++ b/test/Microsoft.NET.Sdk.Razor.Tests/BuildWithComponentsIntegrationTest.cs @@ -40,7 +40,7 @@ private void Build_ComponentsWorks([CallerMemberName] string callerName = "") var projectDirectory = CreateAspNetSdkTestAsset(testAsset, callerName); var build = new BuildCommand(projectDirectory); - build.Execute().Should().Pass(); + build.Execute("/p:BuildWithNetFrameworkHostedCompiler=true").Should().Pass(); string outputPath = build.GetOutputDirectory(DefaultTfm).ToString(); diff --git a/test/Microsoft.NET.Sdk.Razor.Tests/MvcBuildIntegrationTestLegacy.cs b/test/Microsoft.NET.Sdk.Razor.Tests/MvcBuildIntegrationTestLegacy.cs index 1447b3977762..9c4d881277f0 100644 --- a/test/Microsoft.NET.Sdk.Razor.Tests/MvcBuildIntegrationTestLegacy.cs +++ b/test/Microsoft.NET.Sdk.Razor.Tests/MvcBuildIntegrationTestLegacy.cs @@ -113,9 +113,18 @@ public void Build_ProducesDepsFileWithCompilationContext_ButNoReferences() depsFile.Should().Exist(); var dependencyContext = ReadDependencyContext(depsFile.FullName); - // Ensure some compile references exist - var packageReference = dependencyContext.CompileLibraries.First(l => l.Name == "System.Runtime.CompilerServices.Unsafe"); - packageReference.Assemblies.Should().NotBeEmpty(); + if (TargetFramework.Equals("netcoreapp2.2")) + { + // Ensure compile references from a PrivateAssets="all" PackageReference don't exist + var packageReference = dependencyContext.CompileLibraries.FirstOrDefault(l => l.Name == "System.Runtime.CompilerServices.Unsafe", defaultValue: null); + packageReference.Should().BeNull(); + } + else + { + // Ensure some compile references exist + var packageReference = dependencyContext.CompileLibraries.First(l => l.Name == "System.Runtime.CompilerServices.Unsafe"); + packageReference.Assemblies.Should().NotBeEmpty(); + } var projectReference = dependencyContext.CompileLibraries.First(l => l.Name == TestProjectName); projectReference.Assemblies.Should().NotBeEmpty(); diff --git a/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssets/DiscoverPrecompressedAssetsTest.cs b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssets/DiscoverPrecompressedAssetsTest.cs new file mode 100644 index 000000000000..e4019c5b1da9 --- /dev/null +++ b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssets/DiscoverPrecompressedAssetsTest.cs @@ -0,0 +1,109 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.StaticWebAssets.Tasks; +using Microsoft.Build.Framework; +using Moq; + +namespace Microsoft.NET.Sdk.Razor.Tests; + +public class DiscoverPrecompressedAssetsTest +{ + public string ItemSpec { get; } + + public string OriginalItemSpec { get; } + + public string OutputBasePath { get; } + + public DiscoverPrecompressedAssetsTest() + { + OutputBasePath = Path.Combine(TestContext.Current.TestExecutionDirectory, nameof(ResolveCompressedAssetsTest)); + ItemSpec = Path.Combine(OutputBasePath, Guid.NewGuid().ToString("N") + ".tmp"); + OriginalItemSpec = Path.Combine(OutputBasePath, Guid.NewGuid().ToString("N") + ".tmp"); + } + + [Fact] + public void DiscoversPrecompressedAssetsCorrectly() + { + var errorMessages = new List(); + var buildEngine = new Mock(); + buildEngine.Setup(e => e.LogErrorEvent(It.IsAny())) + .Callback(args => errorMessages.Add(args.Message)); + + var uncompressedCandidate = new StaticWebAsset + { + Identity = Path.Combine(Environment.CurrentDirectory, "wwwroot", "js", "site.js"), + RelativePath = "js/site#[.{fingerprint}]?.js", + BasePath = "_content/Test", + AssetMode = StaticWebAsset.AssetModes.All, + AssetKind = StaticWebAsset.AssetKinds.All, + AssetMergeSource = string.Empty, + SourceId = "Test", + CopyToOutputDirectory = StaticWebAsset.AssetCopyOptions.Never, + Fingerprint = "uncompressed", + RelatedAsset = string.Empty, + ContentRoot = Path.Combine(Environment.CurrentDirectory,"wwwroot"), + SourceType = StaticWebAsset.SourceTypes.Discovered, + Integrity = "uncompressed-integrity", + AssetRole = StaticWebAsset.AssetRoles.Primary, + AssetMergeBehavior = string.Empty, + AssetTraitValue = string.Empty, + AssetTraitName = string.Empty, + OriginalItemSpec = Path.Combine("wwwroot", "js", "site.js"), + CopyToPublishDirectory = StaticWebAsset.AssetCopyOptions.PreserveNewest + }; + + var compressedCandidate = new StaticWebAsset + { + Identity = Path.Combine(Environment.CurrentDirectory, "wwwroot", "js", "site.js.gz"), + RelativePath = "js/site.js#[.{fingerprint}]?.gz", + BasePath = "_content/Test", + AssetMode = StaticWebAsset.AssetModes.All, + AssetKind = StaticWebAsset.AssetKinds.All, + AssetMergeSource = string.Empty, + SourceId = "Test", + CopyToOutputDirectory = StaticWebAsset.AssetCopyOptions.Never, + Fingerprint = "compressed", + RelatedAsset = string.Empty, + ContentRoot = Path.Combine(Environment.CurrentDirectory, "wwwroot"), + SourceType = StaticWebAsset.SourceTypes.Discovered, + Integrity = "compressed-integrity", + AssetRole = StaticWebAsset.AssetRoles.Primary, + AssetMergeBehavior = string.Empty, + AssetTraitValue = string.Empty, + AssetTraitName = string.Empty, + OriginalItemSpec = Path.Combine("wwwroot", "js", "site.js.gz"), + CopyToPublishDirectory = StaticWebAsset.AssetCopyOptions.PreserveNewest + }; + + var task = new DiscoverPrecompressedAssets + { + CandidateAssets = [uncompressedCandidate.ToTaskItem(), compressedCandidate.ToTaskItem()], + BuildEngine = buildEngine.Object + }; + + var result = task.Execute(); + + result.Should().BeTrue(); + task.DiscoveredCompressedAssets.Should().ContainSingle(); + var asset = task.DiscoveredCompressedAssets[0]; + asset.ItemSpec.Should().Be(compressedCandidate.Identity); + asset.GetMetadata("RelatedAsset").Should().Be(uncompressedCandidate.Identity); + asset.GetMetadata("OriginalItemSpec").Should().Be(uncompressedCandidate.Identity); + asset.GetMetadata("RelativePath").Should().Be("js/site#[.{fingerprint=uncompressed}]?.js.gz"); + asset.GetMetadata("AssetRole").Should().Be("Alternative"); + asset.GetMetadata("AssetTraitName").Should().Be("Content-Encoding"); + asset.GetMetadata("AssetTraitValue").Should().Be("gzip"); + asset.GetMetadata("Fingerprint").Should().Be("compressed"); + asset.GetMetadata("Integrity").Should().Be("compressed-integrity"); + asset.GetMetadata("CopyToPublishDirectory").Should().Be("PreserveNewest"); + asset.GetMetadata("CopyToOutputDirectory").Should().Be("Never"); + asset.GetMetadata("AssetMergeSource").Should().Be(string.Empty); + asset.GetMetadata("AssetMergeBehavior").Should().Be(string.Empty); + asset.GetMetadata("AssetKind").Should().Be("All"); + asset.GetMetadata("AssetMode").Should().Be("All"); + asset.GetMetadata("SourceId").Should().Be("Test"); + asset.GetMetadata("SourceType").Should().Be("Discovered"); + asset.GetMetadata("ContentRoot").Should().Be(Path.Combine(Environment.CurrentDirectory, $"wwwroot{Path.DirectorySeparatorChar}")); + } +} diff --git a/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssets/ResolveCompressedAssetsTest.cs b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssets/ResolveCompressedAssetsTest.cs index bd164de346d6..67878b28dce1 100644 --- a/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssets/ResolveCompressedAssetsTest.cs +++ b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssets/ResolveCompressedAssetsTest.cs @@ -1,11 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.Metrics; using Microsoft.AspNetCore.StaticWebAssets.Tasks; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using Moq; using NuGet.ContentModel; +using NuGet.Packaging.Core; namespace Microsoft.NET.Sdk.Razor.Tests; @@ -70,6 +72,74 @@ public void ResolvesExplicitlyProvidedAssets() task.AssetsToCompress[1].ItemSpec.Should().EndWith(".br"); } + [Fact] + public void InfersPreCompressedAssetsCorrectly() + { + var errorMessages = new List(); + var buildEngine = new Mock(); + buildEngine.Setup(e => e.LogErrorEvent(It.IsAny())) + .Callback(args => errorMessages.Add(args.Message)); + + var uncompressedCandidate = new StaticWebAsset + { + Identity = Path.Combine(Environment.CurrentDirectory, "wwwroot", "js", "site.js"), + RelativePath = "js/site#[.{fingerprint}]?.js", + BasePath = "_content/Test", + AssetMode = StaticWebAsset.AssetModes.All, + AssetKind = StaticWebAsset.AssetKinds.All, + AssetMergeSource = string.Empty, + SourceId = "Test", + CopyToOutputDirectory = StaticWebAsset.AssetCopyOptions.Never, + Fingerprint = "xtxxf3hu2r", + RelatedAsset = string.Empty, + ContentRoot = Path.Combine(Environment.CurrentDirectory,"wwwroot"), + SourceType = StaticWebAsset.SourceTypes.Discovered, + Integrity = "hRQyftXiu1lLX2P9Ly9xa4gHJgLeR1uGN5qegUobtGo=", + AssetRole = StaticWebAsset.AssetRoles.Primary, + AssetMergeBehavior = string.Empty, + AssetTraitValue = string.Empty, + AssetTraitName = string.Empty, + OriginalItemSpec = Path.Combine("wwwroot", "js", "site.js"), + CopyToPublishDirectory = StaticWebAsset.AssetCopyOptions.PreserveNewest + }; + + var compressedCandidate = new StaticWebAsset + { + Identity = Path.Combine(Environment.CurrentDirectory, "wwwroot", "js", "site.js.gz"), + RelativePath = "js/site.js#[.{fingerprint}]?.gz", + BasePath = "_content/Test", + AssetMode = StaticWebAsset.AssetModes.All, + AssetKind = StaticWebAsset.AssetKinds.All, + AssetMergeSource = string.Empty, + SourceId = "Test", + CopyToOutputDirectory = StaticWebAsset.AssetCopyOptions.Never, + Fingerprint = "es13vhk42b", + RelatedAsset = string.Empty, + ContentRoot = Path.Combine(Environment.CurrentDirectory, "wwwroot"), + SourceType = StaticWebAsset.SourceTypes.Discovered, + Integrity = "zs5Fd3XI6+g9f4N1SFLVdgghuiqdvq+nETAjTbvVxx4=", + AssetRole = StaticWebAsset.AssetRoles.Primary, + AssetMergeBehavior = string.Empty, + AssetTraitValue = string.Empty, + AssetTraitName = string.Empty, + OriginalItemSpec = Path.Combine("wwwroot", "js", "site.js.gz"), + CopyToPublishDirectory = StaticWebAsset.AssetCopyOptions.PreserveNewest + }; + + var task = new ResolveCompressedAssets + { + OutputPath = OutputBasePath, + CandidateAssets = [uncompressedCandidate.ToTaskItem(), compressedCandidate.ToTaskItem()], + Formats = "gzip", + BuildEngine = buildEngine.Object + }; + + var result = task.Execute(); + + result.Should().BeTrue(); + task.AssetsToCompress.Should().HaveCount(0); + } + [Fact] public void ResolvesAssetsMatchingIncludePattern() { diff --git a/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/Build_Detects_PrecompressedAssets.Build.files.json b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/Build_Detects_PrecompressedAssets.Build.files.json new file mode 100644 index 000000000000..817adc62eec6 --- /dev/null +++ b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/Build_Detects_PrecompressedAssets.Build.files.json @@ -0,0 +1,4 @@ +[ + "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css" +] \ No newline at end of file diff --git a/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/Build_Detects_PrecompressedAssets.Build.staticwebassets.json b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/Build_Detects_PrecompressedAssets.Build.staticwebassets.json new file mode 100644 index 000000000000..d228706df30c --- /dev/null +++ b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/Build_Detects_PrecompressedAssets.Build.staticwebassets.json @@ -0,0 +1,1209 @@ +{ + "Version": 1, + "Hash": "__hash__", + "Source": "AppWithP2PReference", + "BasePath": "_content/AppWithP2PReference", + "Mode": "Default", + "ManifestType": "Build", + "ReferencedProjectsConfiguration": [ + { + "Identity": "${ProjectPath}\\ClassLibrary\\ClassLibrary.csproj", + "Version": 2, + "Source": "ClassLibrary", + "GetPublishAssetsTargets": "ComputeReferencedStaticWebAssetsPublishManifest;GetCurrentProjectPublishStaticWebAssetItems", + "AdditionalPublishProperties": "", + "AdditionalPublishPropertiesToRemove": "WebPublishProfileFile;TargetFramework;RuntimeIdentifier;SelfContained", + "GetBuildAssetsTargets": "GetCurrentProjectBuildStaticWebAssetItems", + "AdditionalBuildProperties": "", + "AdditionalBuildPropertiesToRemove": "WebPublishProfileFile;TargetFramework;RuntimeIdentifier;SelfContained" + } + ], + "DiscoveryPatterns": [ + { + "Name": "ClassLibrary\\wwwroot", + "Source": "ClassLibrary", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\wwwroot\\", + "BasePath": "_content/ClassLibrary", + "Pattern": "**" + } + ], + "Assets": [ + { + "Identity": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "SourceId": "AppWithP2PReference", + "SourceType": "Computed", + "ContentRoot": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\", + "BasePath": "_content/AppWithP2PReference", + "RelativePath": "AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "AssetKind": "All", + "AssetMode": "CurrentProject", + "AssetRole": "Alternative", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css", + "AssetTraitName": "Content-Encoding", + "AssetTraitValue": "gzip", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz" + }, + { + "Identity": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css", + "SourceId": "AppWithP2PReference", + "SourceType": "Computed", + "ContentRoot": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\", + "BasePath": "_content/AppWithP2PReference", + "RelativePath": "AppWithP2PReference#[.{fingerprint}]?.styles.css", + "AssetKind": "All", + "AssetMode": "CurrentProject", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "ScopedCss", + "AssetTraitValue": "ApplicationBundle", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "AssetKind": "All", + "AssetMode": "Reference", + "AssetRole": "Alternative", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\ClassLibrary.bundle.scp.css", + "AssetTraitName": "Content-Encoding", + "AssetTraitValue": "gzip", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\js\\project-transitive-dep.v4.js.gz", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "js/project-transitive-dep.v4.js.gz", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Alternative", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.v4.js", + "AssetTraitName": "Content-Encoding", + "AssetTraitValue": "gzip", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\js\\project-transitive-dep.v4.js.gz" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\ClassLibrary.bundle.scp.css", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "ClassLibrary#[.{fingerprint}]!.bundle.scp.css", + "AssetKind": "All", + "AssetMode": "Reference", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "ScopedCss", + "AssetTraitValue": "ProjectBundle", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\ClassLibrary.bundle.scp.css" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.br", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\wwwroot\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "js/project-transitive-dep.js.br", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Alternative", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.js", + "AssetTraitName": "Content-Encoding", + "AssetTraitValue": "br", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.br" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.gz", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\wwwroot\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "js/project-transitive-dep.js.gz", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Alternative", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.js", + "AssetTraitName": "Content-Encoding", + "AssetTraitValue": "gzip", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.gz" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.js", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\wwwroot\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "js/project-transitive-dep.js", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "", + "AssetTraitValue": "", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.js" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.v4.js", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\wwwroot\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "js/project-transitive-dep.v4.js", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "", + "AssetTraitValue": "", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.v4.js" + } + ], + "Endpoints": [ + { + "Route": "AppWithP2PReference.styles.css.gz", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "AppWithP2PReference.__fingerprint__.styles.css.gz", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "AppWithP2PReference.styles.css.gz" + } + ] + }, + { + "Route": "AppWithP2PReference.styles.css", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Link", + "Value": "\u003C_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css\u003E; rel=\u0022preload\u0022; as=\u0022style\u0022" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "AppWithP2PReference.__fingerprint__.styles.css", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Link", + "Value": "\u003C_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css\u003E; rel=\u0022preload\u0022; as=\u0022style\u0022" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "AppWithP2PReference.styles.css" + } + ] + }, + { + "Route": "AppWithP2PReference.styles.css", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Link", + "Value": "\u003C_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css\u003E; rel=\u0022preload\u0022; as=\u0022style\u0022" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "AppWithP2PReference.__fingerprint__.styles.css", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Link", + "Value": "\u003C_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css\u003E; rel=\u0022preload\u0022; as=\u0022style\u0022" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "AppWithP2PReference.styles.css" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.bundle.scp.css.gz", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css.gz", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "_content/ClassLibrary/ClassLibrary.bundle.scp.css.gz" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.bundle.scp.css", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "_content/ClassLibrary/ClassLibrary.bundle.scp.css" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.v4.js.gz", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\js\\project-transitive-dep.v4.js.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.v4.js", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\js\\project-transitive-dep.v4.js.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.bundle.scp.css", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\ClassLibrary.bundle.scp.css", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\ClassLibrary.bundle.scp.css", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "_content/ClassLibrary/ClassLibrary.bundle.scp.css" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.js.br", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.br", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "br" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.js", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.br", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "br", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "br" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.js.gz", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.js", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.js", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.js", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.v4.js", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.v4.js", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/PublishWorks_With_PrecompressedAssets.Build.files.json b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/PublishWorks_With_PrecompressedAssets.Build.files.json new file mode 100644 index 000000000000..4658dfcbf916 --- /dev/null +++ b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/PublishWorks_With_PrecompressedAssets.Build.files.json @@ -0,0 +1,18 @@ +[ + "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css", + "${OutputPath}\\wwwroot\\AppWithP2PReference.styles.css", + "${OutputPath}\\wwwroot\\AppWithP2PReference.styles.css.br", + "${OutputPath}\\wwwroot\\AppWithP2PReference.styles.css.gz", + "${OutputPath}\\wwwroot\\_content\\ClassLibrary\\ClassLibrary.__fingerprint__.bundle.scp.css", + "${OutputPath}\\wwwroot\\_content\\ClassLibrary\\ClassLibrary.__fingerprint__.bundle.scp.css.br", + "${OutputPath}\\wwwroot\\_content\\ClassLibrary\\ClassLibrary.__fingerprint__.bundle.scp.css.gz", + "${OutputPath}\\wwwroot\\_content\\ClassLibrary\\js\\project-transitive-dep.js", + "${OutputPath}\\wwwroot\\_content\\ClassLibrary\\js\\project-transitive-dep.js.br", + "${OutputPath}\\wwwroot\\_content\\ClassLibrary\\js\\project-transitive-dep.js.gz", + "${OutputPath}\\wwwroot\\_content\\ClassLibrary\\js\\project-transitive-dep.v4.js", + "${OutputPath}\\wwwroot\\_content\\ClassLibrary\\js\\project-transitive-dep.v4.js.br", + "${OutputPath}\\wwwroot\\_content\\ClassLibrary\\js\\project-transitive-dep.v4.js.gz", + "${OutputPath}\\wwwroot\\js\\project-transitive-dep.js.br", + "${OutputPath}\\wwwroot\\js\\project-transitive-dep.js.gz" +] \ No newline at end of file diff --git a/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/PublishWorks_With_PrecompressedAssets.Build.staticwebassets.json b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/PublishWorks_With_PrecompressedAssets.Build.staticwebassets.json new file mode 100644 index 000000000000..d228706df30c --- /dev/null +++ b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsBaselines/PublishWorks_With_PrecompressedAssets.Build.staticwebassets.json @@ -0,0 +1,1209 @@ +{ + "Version": 1, + "Hash": "__hash__", + "Source": "AppWithP2PReference", + "BasePath": "_content/AppWithP2PReference", + "Mode": "Default", + "ManifestType": "Build", + "ReferencedProjectsConfiguration": [ + { + "Identity": "${ProjectPath}\\ClassLibrary\\ClassLibrary.csproj", + "Version": 2, + "Source": "ClassLibrary", + "GetPublishAssetsTargets": "ComputeReferencedStaticWebAssetsPublishManifest;GetCurrentProjectPublishStaticWebAssetItems", + "AdditionalPublishProperties": "", + "AdditionalPublishPropertiesToRemove": "WebPublishProfileFile;TargetFramework;RuntimeIdentifier;SelfContained", + "GetBuildAssetsTargets": "GetCurrentProjectBuildStaticWebAssetItems", + "AdditionalBuildProperties": "", + "AdditionalBuildPropertiesToRemove": "WebPublishProfileFile;TargetFramework;RuntimeIdentifier;SelfContained" + } + ], + "DiscoveryPatterns": [ + { + "Name": "ClassLibrary\\wwwroot", + "Source": "ClassLibrary", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\wwwroot\\", + "BasePath": "_content/ClassLibrary", + "Pattern": "**" + } + ], + "Assets": [ + { + "Identity": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "SourceId": "AppWithP2PReference", + "SourceType": "Computed", + "ContentRoot": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\", + "BasePath": "_content/AppWithP2PReference", + "RelativePath": "AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "AssetKind": "All", + "AssetMode": "CurrentProject", + "AssetRole": "Alternative", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css", + "AssetTraitName": "Content-Encoding", + "AssetTraitValue": "gzip", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz" + }, + { + "Identity": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css", + "SourceId": "AppWithP2PReference", + "SourceType": "Computed", + "ContentRoot": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\", + "BasePath": "_content/AppWithP2PReference", + "RelativePath": "AppWithP2PReference#[.{fingerprint}]?.styles.css", + "AssetKind": "All", + "AssetMode": "CurrentProject", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "ScopedCss", + "AssetTraitValue": "ApplicationBundle", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "AssetKind": "All", + "AssetMode": "Reference", + "AssetRole": "Alternative", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\ClassLibrary.bundle.scp.css", + "AssetTraitName": "Content-Encoding", + "AssetTraitValue": "gzip", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\js\\project-transitive-dep.v4.js.gz", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "js/project-transitive-dep.v4.js.gz", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Alternative", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.v4.js", + "AssetTraitName": "Content-Encoding", + "AssetTraitValue": "gzip", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\js\\project-transitive-dep.v4.js.gz" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\ClassLibrary.bundle.scp.css", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "ClassLibrary#[.{fingerprint}]!.bundle.scp.css", + "AssetKind": "All", + "AssetMode": "Reference", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "ScopedCss", + "AssetTraitValue": "ProjectBundle", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\ClassLibrary.bundle.scp.css" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.br", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\wwwroot\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "js/project-transitive-dep.js.br", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Alternative", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.js", + "AssetTraitName": "Content-Encoding", + "AssetTraitValue": "br", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.br" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.gz", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\wwwroot\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "js/project-transitive-dep.js.gz", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Alternative", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.js", + "AssetTraitName": "Content-Encoding", + "AssetTraitValue": "gzip", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.gz" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.js", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\wwwroot\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "js/project-transitive-dep.js", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "", + "AssetTraitValue": "", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.js" + }, + { + "Identity": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.v4.js", + "SourceId": "ClassLibrary", + "SourceType": "Project", + "ContentRoot": "${ProjectPath}\\ClassLibrary\\wwwroot\\", + "BasePath": "_content/ClassLibrary", + "RelativePath": "js/project-transitive-dep.v4.js", + "AssetKind": "All", + "AssetMode": "All", + "AssetRole": "Primary", + "AssetMergeBehavior": "", + "AssetMergeSource": "", + "RelatedAsset": "", + "AssetTraitName": "", + "AssetTraitValue": "", + "Fingerprint": "__fingerprint__", + "Integrity": "__integrity__", + "CopyToOutputDirectory": "Never", + "CopyToPublishDirectory": "PreserveNewest", + "OriginalItemSpec": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.v4.js" + } + ], + "Endpoints": [ + { + "Route": "AppWithP2PReference.styles.css.gz", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "AppWithP2PReference.__fingerprint__.styles.css.gz", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "AppWithP2PReference.styles.css.gz" + } + ] + }, + { + "Route": "AppWithP2PReference.styles.css", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Link", + "Value": "\u003C_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css\u003E; rel=\u0022preload\u0022; as=\u0022style\u0022" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "AppWithP2PReference.__fingerprint__.styles.css", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\compressed\\_content\\AppWithP2PReference\\AppWithP2PReference#[.{fingerprint=__fingerprint__}]?.styles.css.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Link", + "Value": "\u003C_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css\u003E; rel=\u0022preload\u0022; as=\u0022style\u0022" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "AppWithP2PReference.styles.css" + } + ] + }, + { + "Route": "AppWithP2PReference.styles.css", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Link", + "Value": "\u003C_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css\u003E; rel=\u0022preload\u0022; as=\u0022style\u0022" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "AppWithP2PReference.__fingerprint__.styles.css", + "AssetFile": "${ProjectPath}\\AppWithP2PReference\\obj\\Debug\\${Tfm}\\scopedcss\\bundle\\AppWithP2PReference.styles.css", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Link", + "Value": "\u003C_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css\u003E; rel=\u0022preload\u0022; as=\u0022style\u0022" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "AppWithP2PReference.styles.css" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.bundle.scp.css.gz", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css.gz", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "_content/ClassLibrary/ClassLibrary.bundle.scp.css.gz" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.bundle.scp.css", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\ClassLibrary#[.{fingerprint=__fingerprint__}]!.bundle.scp.css.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "_content/ClassLibrary/ClassLibrary.bundle.scp.css" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.v4.js.gz", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\js\\project-transitive-dep.v4.js.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.v4.js", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\compressed\\_content\\ClassLibrary\\js\\project-transitive-dep.v4.js.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.bundle.scp.css", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\ClassLibrary.bundle.scp.css", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/ClassLibrary.__fingerprint__.bundle.scp.css", + "AssetFile": "${ProjectPath}\\ClassLibrary\\obj\\Debug\\${Tfm}\\scopedcss\\projectbundle\\ClassLibrary.bundle.scp.css", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "max-age=31536000, immutable" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/css" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "fingerprint", + "Value": "__fingerprint__" + }, + { + "Name": "integrity", + "Value": "__integrity__" + }, + { + "Name": "label", + "Value": "_content/ClassLibrary/ClassLibrary.bundle.scp.css" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.js.br", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.br", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "br" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.js", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.br", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "br", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "br" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.js.gz", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.gz", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.js", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\_content\\ClassLibrary\\js\\project-transitive-dep.js.gz", + "Selectors": [ + { + "Name": "Content-Encoding", + "Value": "gzip", + "Quality": "__quality__" + } + ], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Encoding", + "Value": "gzip" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + }, + { + "Name": "Vary", + "Value": "Content-Encoding" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.js", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.js", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + }, + { + "Route": "_content/ClassLibrary/js/project-transitive-dep.v4.js", + "AssetFile": "${ProjectPath}\\ClassLibrary\\wwwroot\\js\\project-transitive-dep.v4.js", + "Selectors": [], + "ResponseHeaders": [ + { + "Name": "Accept-Ranges", + "Value": "bytes" + }, + { + "Name": "Cache-Control", + "Value": "no-cache" + }, + { + "Name": "Content-Length", + "Value": "__content-length__" + }, + { + "Name": "Content-Type", + "Value": "text/javascript" + }, + { + "Name": "ETag", + "Value": "__etag__" + }, + { + "Name": "Last-Modified", + "Value": "__last-modified__" + } + ], + "EndpointProperties": [ + { + "Name": "integrity", + "Value": "__integrity__" + } + ] + } + ] +} \ No newline at end of file diff --git a/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsCompressionIntegrationTest.cs b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsCompressionIntegrationTest.cs new file mode 100644 index 000000000000..94de9a5784dc --- /dev/null +++ b/test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetsCompressionIntegrationTest.cs @@ -0,0 +1,187 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.IO.Compression; +using System.Net.Http.Headers; +using Microsoft.AspNetCore.StaticWebAssets.Tasks; + +namespace Microsoft.NET.Sdk.Razor.Tests +{ + public class StaticWebAssetsCompressionIntegrationTest : AspNetSdkBaselineTest + { + public StaticWebAssetsCompressionIntegrationTest(ITestOutputHelper log) : base(log, GenerateBaselines) { } + + [Fact] + public void Build_Detects_PrecompressedAssets() + { + var expectedManifest = LoadBuildManifest(); + var testAsset = "RazorAppWithP2PReference"; + ProjectDirectory = CreateAspNetSdkTestAsset(testAsset); + + var file = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js"); + var gzipFile = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js.gz"); + var brotliFile = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js.br"); + + // Compress file into gzip and brotli + using (var gzipStream = new GZipStream(File.Create(gzipFile), CompressionLevel.NoCompression)) + { + using var stream = File.OpenRead(file); + stream.CopyTo(gzipStream); + } + + using (var brotliStream = new BrotliStream(File.Create(brotliFile), CompressionLevel.NoCompression)) + { + using var stream = File.OpenRead(file); + stream.CopyTo(brotliStream); + } + + var build = CreateBuildCommand(ProjectDirectory, "AppWithP2PReference"); + ExecuteCommand(build).Should().Pass(); + + var intermediateOutputPath = build.GetIntermediateDirectory(DefaultTfm, "Debug").ToString(); + var outputPath = build.GetOutputDirectory(DefaultTfm, "Debug").ToString(); + + // GenerateStaticWebAssetsManifest should generate the manifest file. + var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json"); + new FileInfo(path).Should().Exist(); + var manifest = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(path)); + AssertManifest(manifest, expectedManifest); + + // GenerateStaticWebAssetsManifest should copy the file to the output folder. + var finalPath = Path.Combine(outputPath, "AppWithP2PReference.staticwebassets.runtime.json"); + new FileInfo(finalPath).Should().Exist(); + + var manifest1 = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json"))); + AssertManifest(manifest1, expectedManifest); + AssertBuildAssets(manifest1, outputPath, intermediateOutputPath); + + var manifest2 = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json"))); + + var standardEndpoints = manifest2.Endpoints.Where(e => string.Equals(e.AssetFile, file, StringComparison.Ordinal)).ToArray(); + var gzipEndpoints = manifest2.Endpoints.Where(e => string.Equals(e.AssetFile, gzipFile, StringComparison.Ordinal)).ToArray(); + var brotliEndpoints = manifest2.Endpoints.Where(e => string.Equals(e.AssetFile, brotliFile, StringComparison.Ordinal)).ToArray(); + + var gzipAsset = manifest2.Assets.Single(a => string.Equals(a.Identity, gzipFile, StringComparison.Ordinal)); + var brotliAsset = manifest2.Assets.Single(a => string.Equals(a.Identity, brotliFile, StringComparison.Ordinal)); + + standardEndpoints.Should().HaveCount(1); + gzipEndpoints.Should().HaveCount(2); + brotliEndpoints.Should().HaveCount(2); + + var expectedWeakEndpointEtag = new EntityTagHeaderValue( + EntityTagHeaderValue.Parse(standardEndpoints.First().ResponseHeaders.Single(h => h.Name == "ETag").Value).Tag, + isWeak: true); + + foreach (var endpoint in gzipEndpoints) + { + endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.Value).Single().Should().Be("gzip"); + + var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.Value)); + etags.Where(e=> !e.IsWeak).Select(e => e.Tag).Single().Should().BeEquivalentTo($"\"{gzipAsset.Integrity}\""); + if (endpoint.Route.EndsWith(".gz")) + { + continue; + } + etags.Should().Contain(expectedWeakEndpointEtag); + } + + foreach (var endpoint in brotliEndpoints) + { + endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.Value).Single().Should().Be("br"); + + var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.Value)); + etags.Where(e => !e.IsWeak).Select(e => e.Tag).Single().Should().BeEquivalentTo($"\"{brotliAsset.Integrity}\""); + if (endpoint.Route.EndsWith(".br")) + { + continue; + } + etags.Should().Contain(expectedWeakEndpointEtag); + } + } + + [Fact] + public void PublishWorks_With_PrecompressedAssets() + { + var expectedManifest = LoadBuildManifest(); + var testAsset = "RazorAppWithP2PReference"; + ProjectDirectory = CreateAspNetSdkTestAsset(testAsset); + + var file = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js"); + var gzipFile = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js.gz"); + var brotliFile = Path.Combine(ProjectDirectory.Path, "ClassLibrary", "wwwroot", "js", "project-transitive-dep.js.br"); + + // Compress file into gzip and brotli + using (var gzipStream = new GZipStream(File.Create(gzipFile), CompressionLevel.NoCompression)) + { + using var stream = File.OpenRead(file); + stream.CopyTo(gzipStream); + } + + using (var brotliStream = new BrotliStream(File.Create(brotliFile), CompressionLevel.NoCompression)) + { + using var stream = File.OpenRead(file); + stream.CopyTo(brotliStream); + } + + var build = CreatePublishCommand(ProjectDirectory, "AppWithP2PReference"); + ExecuteCommand(build).Should().Pass(); + + var intermediateOutputPath = build.GetIntermediateDirectory(DefaultTfm, "Debug").ToString(); + var outputPath = build.GetOutputDirectory(DefaultTfm, "Debug").ToString(); + + // GenerateStaticWebAssetsManifest should generate the manifest file. + var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json"); + new FileInfo(path).Should().Exist(); + var manifest = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(path)); + AssertManifest(manifest, expectedManifest); + + + var manifest1 = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json"))); + AssertManifest(manifest1, expectedManifest); + AssertBuildAssets(manifest1, outputPath, intermediateOutputPath); + + var manifest2 = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.publish.json"))); + + var standardEndpoints = manifest2.Endpoints.Where(e => string.Equals(e.AssetFile, file, StringComparison.Ordinal)).ToArray(); + var gzipEndpoints = manifest2.Endpoints.Where(e => string.Equals(e.AssetFile, gzipFile, StringComparison.Ordinal)).ToArray(); + var brotliEndpoints = manifest2.Endpoints.Where(e => string.Equals(e.AssetFile, brotliFile, StringComparison.Ordinal)).ToArray(); + + var gzipAsset = manifest2.Assets.Single(a => string.Equals(a.Identity, gzipFile, StringComparison.Ordinal)); + var brotliAsset = manifest2.Assets.Single(a => string.Equals(a.Identity, brotliFile, StringComparison.Ordinal)); + + standardEndpoints.Should().HaveCount(1); + gzipEndpoints.Should().HaveCount(2); + brotliEndpoints.Should().HaveCount(2); + + var expectedWeakEndpointEtag = new EntityTagHeaderValue( + EntityTagHeaderValue.Parse(standardEndpoints.First().ResponseHeaders.Single(h => h.Name == "ETag").Value).Tag, + isWeak: true); + + foreach (var endpoint in gzipEndpoints) + { + endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.Value).Single().Should().Be("gzip"); + + var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.Value)); + etags.Where(e => !e.IsWeak).Select(e => e.Tag).Single().Should().BeEquivalentTo($"\"{gzipAsset.Integrity}\""); + if (endpoint.Route.EndsWith(".gz")) + { + continue; + } + etags.Should().Contain(expectedWeakEndpointEtag); + } + + foreach (var endpoint in brotliEndpoints) + { + endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.Value).Single().Should().Be("br"); + + var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.Value)); + etags.Where(e => !e.IsWeak).Select(e => e.Tag).Single().Should().BeEquivalentTo($"\"{brotliAsset.Integrity}\""); + if (endpoint.Route.EndsWith(".br")) + { + continue; + } + etags.Should().Contain(expectedWeakEndpointEtag); + } + } + } +} diff --git a/test/Microsoft.NET.TestFramework/Commands/MSBuildCommand.cs b/test/Microsoft.NET.TestFramework/Commands/MSBuildCommand.cs index 9ccfb366f631..020ef737a5bc 100644 --- a/test/Microsoft.NET.TestFramework/Commands/MSBuildCommand.cs +++ b/test/Microsoft.NET.TestFramework/Commands/MSBuildCommand.cs @@ -133,7 +133,17 @@ public override CommandResult Execute(IEnumerable args) args = new[] { "/restore" }.Concat(args); } - return base.Execute(args); + var command = base.Execute(args); + + var error = command.StdErr?.ToString(); + var output = command.StdOut?.ToString(); + if ((!String.IsNullOrEmpty(error) && error.Contains("NU3003")) || (!String.IsNullOrEmpty(output) && output.Contains("NU3003"))) + { + args = args.Concat(new[] { "-v:diag" }); + command = base.Execute(args); + } + + return command; } public CommandResult ExecuteWithoutRestore(IEnumerable args) diff --git a/test/Microsoft.NET.TestFramework/Commands/TestCommand.cs b/test/Microsoft.NET.TestFramework/Commands/TestCommand.cs index d46175d4e229..96d555bb293f 100644 --- a/test/Microsoft.NET.TestFramework/Commands/TestCommand.cs +++ b/test/Microsoft.NET.TestFramework/Commands/TestCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; @@ -120,19 +120,29 @@ private static bool SuccessOrNotTransientRestoreError(CommandResult result) public virtual CommandResult Execute(IEnumerable args) { - var command = CreateCommandSpec(args) + var spec = CreateCommandSpec(args); + + var command = spec .ToCommand(_doNotEscapeArguments) .CaptureStdOut() .CaptureStdErr(); - if (CommandOutputHandler != null) + command.OnOutputLine(line => { - command.OnOutputLine(CommandOutputHandler); - } + Log.WriteLine($"》{line}"); + CommandOutputHandler?.Invoke(line); + }); - var result = ((Command)command).Execute(ProcessStartedHandler); + command.OnErrorLine(line => + { + Log.WriteLine($"❌{line}"); + }); + + var display = $"dotnet {string.Join(" ", spec.Arguments)}"; - LogCommandResult(Log, result); + Log.WriteLine($"Executing '{display}':"); + var result = ((Command)command).Execute(ProcessStartedHandler); + Log.WriteLine($"Command '{display}' exited with exit code {result.ExitCode}."); return result; } diff --git a/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj b/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj index 5d3d106f4d23..3d3cd0d9c6b2 100644 --- a/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj +++ b/test/Microsoft.NET.TestFramework/Microsoft.NET.TestFramework.csproj @@ -35,8 +35,8 @@ <_Parameter2>$(MicrosoftAspNetCoreAppRefPackageVersion) - <_Parameter1>MicrosoftNETSdkAspireManifest80100PackageVersion - <_Parameter2>$(MicrosoftNETSdkAspireManifest80100PackageVersion) + <_Parameter1>AspirePackageVersion + <_Parameter2>$(AspirePackageVersion)
diff --git a/test/Microsoft.NET.TestFramework/TestAsset.cs b/test/Microsoft.NET.TestFramework/TestAsset.cs index b26334ad21a6..76826f3e6d3a 100644 --- a/test/Microsoft.NET.TestFramework/TestAsset.cs +++ b/test/Microsoft.NET.TestFramework/TestAsset.cs @@ -89,22 +89,24 @@ public TestAsset WithSource() File.Copy(srcFile, destFile, true); } - string[][] Properties = { - new string[] { "TargetFramework", "$(CurrentTargetFramework)", ToolsetInfo.CurrentTargetFramework }, - new string[] { "CurrentTargetFramework", "$(CurrentTargetFramework)", ToolsetInfo.CurrentTargetFramework }, - new string[] { "RuntimeIdentifier", "$(LatestWinRuntimeIdentifier)", ToolsetInfo.LatestWinRuntimeIdentifier }, - new string[] { "RuntimeIdentifier", "$(LatestLinuxRuntimeIdentifier)", ToolsetInfo.LatestLinuxRuntimeIdentifier }, - new string[] { "RuntimeIdentifier", "$(LatestMacRuntimeIdentifier)", ToolsetInfo.LatestMacRuntimeIdentifier }, - new string[] { "RuntimeIdentifier", "$(LatestRuntimeIdentifiers)", ToolsetInfo.LatestRuntimeIdentifiers } }; - - foreach (string[] property in Properties) + var substitutions = new[] { - UpdateProjProperty(property[0], property[1], property[2]); + (propertyName: "TargetFramework", variableName: "CurrentTargetFramework", value: ToolsetInfo.CurrentTargetFramework), + (propertyName: "CurrentTargetFramework", variableName: "CurrentTargetFramework", value: ToolsetInfo.CurrentTargetFramework), + (propertyName: "RuntimeIdentifier", variableName: "LatestWinRuntimeIdentifier", value: ToolsetInfo.LatestWinRuntimeIdentifier), + (propertyName: "RuntimeIdentifier", variableName: "LatestLinuxRuntimeIdentifier", value: ToolsetInfo.LatestLinuxRuntimeIdentifier), + (propertyName: "RuntimeIdentifier", variableName: "LatestMacRuntimeIdentifier", value: ToolsetInfo.LatestMacRuntimeIdentifier), + (propertyName: "RuntimeIdentifier", variableName: "LatestRuntimeIdentifiers", value: ToolsetInfo.LatestRuntimeIdentifiers) + }; + + foreach (var (propertyName, variableName, value) in substitutions) + { + UpdateProjProperty(propertyName, variableName, value); } foreach (var (propertyName, version) in ToolsetInfo.GetPackageVersionProperties()) { - this.ReplacePackageVersionVariable(propertyName, version); + ReplacePackageVersionVariable(propertyName, version); } return this; @@ -120,24 +122,24 @@ public TestAsset UpdateProjProperty(string propertyName, string variableName, st var ns = p.Root.Name.Namespace; var getNode = p.Root.Elements(ns + "PropertyGroup").Elements(ns + propertyName).FirstOrDefault(); getNode ??= p.Root.Elements(ns + "PropertyGroup").Elements(ns + $"{propertyName}s").FirstOrDefault(); - getNode?.SetValue(getNode?.Value.Replace(variableName, targetValue) ?? string.Empty); + getNode?.SetValue(getNode?.Value.Replace($"$({variableName})", targetValue) ?? string.Empty); } }); } public TestAsset ReplacePackageVersionVariable(string targetName, string targetValue) { - string[] PropertyNames = new[] { "PackageReference", "Package" }; + var elementsWithVersionAttribute = new[] { "PackageReference", "Package", "Sdk" }; return WithProjectChanges(project => { if (project.Root is not null) { var ns = project.Root.Name.Namespace; - foreach (var PropertyName in PropertyNames) + foreach (var elementName in elementsWithVersionAttribute) { var packageReferencesToUpdate = - project.Root.Descendants(ns + PropertyName) + project.Root.Descendants(ns + elementName) .Select(p => p.Attribute("Version")) .Where(va => va is not null && va.Value.Equals($"$({targetName})", StringComparison.OrdinalIgnoreCase)); foreach (var versionAttribute in packageReferencesToUpdate) diff --git a/test/Microsoft.NET.TestFramework/Utilities/TerminalLoggerStringExtensions.cs b/test/Microsoft.NET.TestFramework/Utilities/TerminalLoggerStringExtensions.cs index f14b109155f9..2c28bde412ce 100644 --- a/test/Microsoft.NET.TestFramework/Utilities/TerminalLoggerStringExtensions.cs +++ b/test/Microsoft.NET.TestFramework/Utilities/TerminalLoggerStringExtensions.cs @@ -12,6 +12,8 @@ public static string StripTerminalLoggerProgressIndicators(this string stdout) { return stdout .Replace("\x1b]9;4;3;\x1b\\", "") // indeterminate progress start - .Replace("\x1b]9;4;0;\x1b\\", ""); // indeterminate progress end + .Replace("\x1b]9;4;0;\x1b\\", "") // indeterminate progress end + .Replace("\x1b[?25l", "") // make cursor invisble + .Replace("\x1b[?25h", ""); // make cursor visible } -} \ No newline at end of file +} diff --git a/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/TabCompletionTests.Create_GetAllSuggestions.verified.txt b/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/TabCompletionTests.Create_GetAllSuggestions.verified.txt index 9d854689565a..610ddc1db75b 100644 --- a/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/TabCompletionTests.Create_GetAllSuggestions.verified.txt +++ b/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/TabCompletionTests.Create_GetAllSuggestions.verified.txt @@ -55,6 +55,27 @@ InsertText: globaljson, Documentation: A file for selecting the .NET SDK version. }, + { + Label: mstest, + Kind: Value, + SortText: mstest, + InsertText: mstest, + Documentation: A project that contains MSTest tests that can run on .NET on Windows, Linux and MacOS. + }, + { + Label: mstest-class, + Kind: Value, + SortText: mstest-class, + InsertText: mstest-class, + Documentation: Creates a new MSTest test class + }, + { + Label: mstest-playwright, + Kind: Value, + SortText: mstest-playwright, + InsertText: mstest-playwright, + Documentation: A project that contains Playwright tests using MSTest test framework, that can run on .NET on Windows, Linux and MacOS. + }, { Label: nugetconfig, Kind: Value, @@ -62,6 +83,27 @@ InsertText: nugetconfig, Documentation: A file for configuring the locations NuGet will search for packages }, + { + Label: nunit, + Kind: Value, + SortText: nunit, + InsertText: nunit, + Documentation: A project that contains NUnit tests that can run on .NET on Windows, Linux and macOS + }, + { + Label: nunit-playwright, + Kind: Value, + SortText: nunit-playwright, + InsertText: nunit-playwright, + Documentation: A project that contains Playwright tests using NUnit test framework, that can run on .NET on Windows, Linux and MacOS. + }, + { + Label: nunit-test, + Kind: Value, + SortText: nunit-test, + InsertText: nunit-test, + Documentation: Creates a new NUnit test class + }, { Label: packagesprops, Kind: Value, @@ -90,6 +132,13 @@ InsertText: webconfig, Documentation: A file used to configure Web Application settings }, + { + Label: xunit, + Kind: Value, + SortText: xunit, + InsertText: xunit, + Documentation: A project that contains xUnit.net tests that can run on .NET on Windows, Linux and macOS + }, { Label: --dry-run, Kind: Keyword, @@ -146,4 +195,4 @@ InsertText: -o, Detail: Location to place the generated output. } -] +] \ No newline at end of file diff --git a/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/TabCompletionTests.RootCommand_GetAllSuggestions.verified.txt b/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/TabCompletionTests.RootCommand_GetAllSuggestions.verified.txt index db6231ef5741..b06accd6268a 100644 --- a/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/TabCompletionTests.RootCommand_GetAllSuggestions.verified.txt +++ b/test/Microsoft.TemplateEngine.Cli.UnitTests/ParserTests/Approvals/TabCompletionTests.RootCommand_GetAllSuggestions.verified.txt @@ -55,6 +55,27 @@ InsertText: globaljson, Documentation: A file for selecting the .NET SDK version. }, + { + Label: mstest, + Kind: Value, + SortText: mstest, + InsertText: mstest, + Documentation: A project that contains MSTest tests that can run on .NET on Windows, Linux and MacOS. + }, + { + Label: mstest-class, + Kind: Value, + SortText: mstest-class, + InsertText: mstest-class, + Documentation: Creates a new MSTest test class + }, + { + Label: mstest-playwright, + Kind: Value, + SortText: mstest-playwright, + InsertText: mstest-playwright, + Documentation: A project that contains Playwright tests using MSTest test framework, that can run on .NET on Windows, Linux and MacOS. + }, { Label: nugetconfig, Kind: Value, @@ -62,6 +83,27 @@ InsertText: nugetconfig, Documentation: A file for configuring the locations NuGet will search for packages }, + { + Label: nunit, + Kind: Value, + SortText: nunit, + InsertText: nunit, + Documentation: A project that contains NUnit tests that can run on .NET on Windows, Linux and macOS + }, + { + Label: nunit-playwright, + Kind: Value, + SortText: nunit-playwright, + InsertText: nunit-playwright, + Documentation: A project that contains Playwright tests using NUnit test framework, that can run on .NET on Windows, Linux and MacOS. + }, + { + Label: nunit-test, + Kind: Value, + SortText: nunit-test, + InsertText: nunit-test, + Documentation: Creates a new NUnit test class + }, { Label: packagesprops, Kind: Value, @@ -90,6 +132,13 @@ InsertText: webconfig, Documentation: A file used to configure Web Application settings }, + { + Label: xunit, + Kind: Value, + SortText: xunit, + InsertText: xunit, + Documentation: A project that contains xUnit.net tests that can run on .NET on Windows, Linux and macOS + }, { Label: --dry-run, Kind: Keyword, diff --git a/test/Microsoft.WebTools.AspireService.Tests/AspireServerServiceTests.cs b/test/Microsoft.WebTools.AspireService.Tests/AspireServerServiceTests.cs index 30ddc62054a3..d712649cad1d 100644 --- a/test/Microsoft.WebTools.AspireService.Tests/AspireServerServiceTests.cs +++ b/test/Microsoft.WebTools.AspireService.Tests/AspireServerServiceTests.cs @@ -9,10 +9,8 @@ using System.Net.WebSockets; using System.Security.Cryptography.X509Certificates; using System.Text.Json; -using Microsoft.WebTools.AspireServer.Helpers; -using Microsoft.WebTools.AspireServer.Models; -namespace Microsoft.WebTools.AspireServer.UnitTests; +namespace Aspire.Tools.Service.UnitTests; public class AspireServerServiceTests(ITestOutputHelper output) { diff --git a/test/Microsoft.WebTools.AspireService.Tests/Mocks/Helpers.cs b/test/Microsoft.WebTools.AspireService.Tests/Mocks/Helpers.cs index 19f6d17f15c3..b3b67af5974b 100644 --- a/test/Microsoft.WebTools.AspireService.Tests/Mocks/Helpers.cs +++ b/test/Microsoft.WebTools.AspireService.Tests/Mocks/Helpers.cs @@ -5,7 +5,7 @@ using System.Net; using System.Net.Sockets; -namespace Microsoft.WebTools.AspireServer.UnitTests; +namespace Aspire.Tools.Service.UnitTests; public static class Helpers { diff --git a/test/Microsoft.WebTools.AspireService.Tests/Mocks/IAspireServerEventsMock.cs b/test/Microsoft.WebTools.AspireService.Tests/Mocks/IAspireServerEventsMock.cs index 3c805871fdf4..9b0439914320 100644 --- a/test/Microsoft.WebTools.AspireService.Tests/Mocks/IAspireServerEventsMock.cs +++ b/test/Microsoft.WebTools.AspireService.Tests/Mocks/IAspireServerEventsMock.cs @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -using Microsoft.WebTools.AspireServer.Contracts; using Moq; -namespace Microsoft.WebTools.AspireServer.UnitTests; +namespace Aspire.Tools.Service.UnitTests; internal class IAspireServerEventsMock : MockFactory { diff --git a/test/Microsoft.WebTools.AspireService.Tests/Mocks/IServiceProviderMock.cs b/test/Microsoft.WebTools.AspireService.Tests/Mocks/IServiceProviderMock.cs index c975028c392f..7ad43a448f25 100644 --- a/test/Microsoft.WebTools.AspireService.Tests/Mocks/IServiceProviderMock.cs +++ b/test/Microsoft.WebTools.AspireService.Tests/Mocks/IServiceProviderMock.cs @@ -3,7 +3,7 @@ using Moq; -namespace Microsoft.WebTools.AspireServer.UnitTests; +namespace Aspire.Tools.Service.UnitTests; internal class IServiceProviderMock : MockFactory { diff --git a/test/Microsoft.WebTools.AspireService.Tests/Mocks/MockFactory.cs b/test/Microsoft.WebTools.AspireService.Tests/Mocks/MockFactory.cs index ef9f4467013c..e06829a198fc 100644 --- a/test/Microsoft.WebTools.AspireService.Tests/Mocks/MockFactory.cs +++ b/test/Microsoft.WebTools.AspireService.Tests/Mocks/MockFactory.cs @@ -3,7 +3,7 @@ using Moq; -namespace Microsoft.WebTools.AspireServer.UnitTests; +namespace Aspire.Tools.Service.UnitTests; public interface IMockFactory { diff --git a/test/Microsoft.WebTools.AspireService.Tests/Mocks/Mocks.cs b/test/Microsoft.WebTools.AspireService.Tests/Mocks/Mocks.cs index 0b546ad5b20e..305e8ffddf5e 100644 --- a/test/Microsoft.WebTools.AspireService.Tests/Mocks/Mocks.cs +++ b/test/Microsoft.WebTools.AspireService.Tests/Mocks/Mocks.cs @@ -4,7 +4,7 @@ using System.Diagnostics; using Moq; -namespace Microsoft.WebTools.AspireServer.UnitTests; +namespace Aspire.Tools.Service.UnitTests; public class Mocks { diff --git a/test/Microsoft.WebTools.AspireService.Tests/RunSessionRequestTests.cs b/test/Microsoft.WebTools.AspireService.Tests/RunSessionRequestTests.cs index 4012d02bf10c..38ab5221846d 100644 --- a/test/Microsoft.WebTools.AspireService.Tests/RunSessionRequestTests.cs +++ b/test/Microsoft.WebTools.AspireService.Tests/RunSessionRequestTests.cs @@ -3,9 +3,7 @@ #nullable disable -using Microsoft.WebTools.AspireServer.Models; - -namespace Microsoft.WebTools.AspireServer.UnitTests; +namespace Aspire.Tools.Service.UnitTests; public class RunSessionRequestTests { diff --git a/test/TestAssets/TestProjects/WatchAspire/WatchAspire.AppHost/WatchAspire.AppHost.csproj b/test/TestAssets/TestProjects/WatchAspire/WatchAspire.AppHost/WatchAspire.AppHost.csproj index bb5e72a5337b..ac214265e5ee 100644 --- a/test/TestAssets/TestProjects/WatchAspire/WatchAspire.AppHost/WatchAspire.AppHost.csproj +++ b/test/TestAssets/TestProjects/WatchAspire/WatchAspire.AppHost/WatchAspire.AppHost.csproj @@ -1,4 +1,5 @@ - + + Exe @@ -7,8 +8,6 @@ enable true ad800ccc-954c-40cc-920b-2e09fc9eee7a - - 9.0.0 @@ -16,7 +15,7 @@ - + diff --git a/test/TestAssets/TestProjects/WatchAspire/WatchAspire.ServiceDefaults/WatchAspire.ServiceDefaults.csproj b/test/TestAssets/TestProjects/WatchAspire/WatchAspire.ServiceDefaults/WatchAspire.ServiceDefaults.csproj index cbfdf8929cb2..dad4e33333b6 100644 --- a/test/TestAssets/TestProjects/WatchAspire/WatchAspire.ServiceDefaults/WatchAspire.ServiceDefaults.csproj +++ b/test/TestAssets/TestProjects/WatchAspire/WatchAspire.ServiceDefaults/WatchAspire.ServiceDefaults.csproj @@ -1,4 +1,4 @@ - + net9.0 @@ -9,7 +9,7 @@ - + diff --git a/test/TestAssets/TestProjects/WatchNoDepsApp/WatchNoDepsApp.csproj b/test/TestAssets/TestProjects/WatchNoDepsApp/WatchNoDepsApp.csproj index b22b7a420622..37feccc1aaef 100644 --- a/test/TestAssets/TestProjects/WatchNoDepsApp/WatchNoDepsApp.csproj +++ b/test/TestAssets/TestProjects/WatchNoDepsApp/WatchNoDepsApp.csproj @@ -13,10 +13,16 @@ actually an important failure, so don't error out here. --> CS9057 + + true + + + + diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/App.razor b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/App.razor new file mode 100644 index 000000000000..3dc22458a9fa --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/App.razor @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + @* + + + + *@ + + + + + + + + + + + diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/MainLayout.razor b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/MainLayout.razor new file mode 100644 index 000000000000..e3b291825d2a --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/MainLayout.razor @@ -0,0 +1,23 @@ +@inherits LayoutComponentBase + +
+ + +
+
+ About +
+ +
+ @Body +
+
+
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
\ No newline at end of file diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/MainLayout.razor.css b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/MainLayout.razor.css new file mode 100644 index 000000000000..38d1f2598313 --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/MainLayout.razor.css @@ -0,0 +1,98 @@ +.page { + position: relative; + display: flex; + flex-direction: column; +} + +main { + flex: 1; +} + +.sidebar { + background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); +} + +.top-row { + background-color: #f7f7f7; + border-bottom: 1px solid #d6d5d5; + justify-content: flex-end; + height: 3.5rem; + display: flex; + align-items: center; +} + + .top-row ::deep a, .top-row ::deep .btn-link { + white-space: nowrap; + margin-left: 1.5rem; + text-decoration: none; + } + + .top-row ::deep a:hover, .top-row ::deep .btn-link:hover { + text-decoration: underline; + } + + .top-row ::deep a:first-child { + overflow: hidden; + text-overflow: ellipsis; + } + +@media (max-width: 640.98px) { + .top-row { + justify-content: space-between; + } + + .top-row ::deep a, .top-row ::deep .btn-link { + margin-left: 0; + } +} + +@media (min-width: 641px) { + .page { + flex-direction: row; + } + + .sidebar { + width: 250px; + height: 100vh; + position: sticky; + top: 0; + } + + .top-row { + position: sticky; + top: 0; + z-index: 1; + } + + .top-row.auth ::deep a:first-child { + flex: 1; + text-align: right; + width: 0; + } + + .top-row, article { + padding-left: 2rem !important; + padding-right: 1.5rem !important; + } +} + +#blazor-error-ui { + color-scheme: light only; + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + box-sizing: border-box; + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; + } diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/NavMenu.razor b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/NavMenu.razor new file mode 100644 index 000000000000..98879349fb43 --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/NavMenu.razor @@ -0,0 +1,17 @@ + + + + + diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/NavMenu.razor.css b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/NavMenu.razor.css new file mode 100644 index 000000000000..a2aeace9c38d --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Layout/NavMenu.razor.css @@ -0,0 +1,105 @@ +.navbar-toggler { + appearance: none; + cursor: pointer; + width: 3.5rem; + height: 2.5rem; + color: white; + position: absolute; + top: 0.5rem; + right: 1rem; + border: 1px solid rgba(255, 255, 255, 0.1); + background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1); +} + +.navbar-toggler:checked { + background-color: rgba(255, 255, 255, 0.5); +} + +.top-row { + min-height: 3.5rem; + background-color: rgba(0,0,0,0.4); +} + +.navbar-brand { + font-size: 1.1rem; +} + +.bi { + display: inline-block; + position: relative; + width: 1.25rem; + height: 1.25rem; + margin-right: 0.75rem; + top: -1px; + background-size: cover; +} + +.bi-house-door-fill-nav-menu { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E"); +} + +.bi-plus-square-fill-nav-menu { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E"); +} + +.bi-list-nested-nav-menu { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E"); +} + +.nav-item { + font-size: 0.9rem; + padding-bottom: 0.5rem; +} + + .nav-item:first-of-type { + padding-top: 1rem; + } + + .nav-item:last-of-type { + padding-bottom: 1rem; + } + + .nav-item ::deep .nav-link { + color: #d7d7d7; + background: none; + border: none; + border-radius: 4px; + height: 3rem; + display: flex; + align-items: center; + line-height: 3rem; + width: 100%; + } + +.nav-item ::deep a.active { + background-color: rgba(255,255,255,0.37); + color: white; +} + +.nav-item ::deep .nav-link:hover { + background-color: rgba(255,255,255,0.1); + color: white; +} + +.nav-scrollable { + display: none; +} + +.navbar-toggler:checked ~ .nav-scrollable { + display: block; +} + +@media (min-width: 641px) { + .navbar-toggler { + display: none; + } + + .nav-scrollable { + /* Never collapse the sidebar for wide screens */ + display: block; + + /* Allow sidebar to scroll for tall menus */ + height: calc(100vh - 3.5rem); + overflow-y: auto; + } +} diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Pages/Home.razor b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Pages/Home.razor new file mode 100644 index 000000000000..bb44fc2639e7 --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Pages/Home.razor @@ -0,0 +1,8 @@ +@page "/" +@using RazorClassLibrary.Components + +Home + + + +Welcome to your new app. \ No newline at end of file diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Routes.razor b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Routes.razor new file mode 100644 index 000000000000..ae94e9e955ef --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/Routes.razor @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/_Imports.razor b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/_Imports.razor new file mode 100644 index 000000000000..4db254546eb0 --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Components/_Imports.razor @@ -0,0 +1,10 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using static Microsoft.AspNetCore.Components.Web.RenderMode +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.JSInterop +@using RazorApp +@using RazorApp.Components diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Program.cs b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Program.cs new file mode 100644 index 000000000000..5698a11c7a78 --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Program.cs @@ -0,0 +1,31 @@ +using RazorApp.Components; + +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddRazorComponents() + .AddInteractiveServerComponents(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Error", createScopeForErrors: true); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); + + +app.UseAntiforgery(); + +//app.UseStaticFiles(); +app.MapStaticAssets(); + + +app.MapRazorComponents() + .AddInteractiveServerRenderMode(); + +app.Run(); diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Properties/launchSettings.json b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Properties/launchSettings.json new file mode 100644 index 000000000000..de38c15602c2 --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/Properties/launchSettings.json @@ -0,0 +1,13 @@ +{ + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": "true", + "launchBrowser": true, + "applicationUrl": "http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/RazorApp.csproj b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/RazorApp.csproj new file mode 100644 index 000000000000..a669f178a874 --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/RazorApp.csproj @@ -0,0 +1,12 @@ + + + + net9.0 + enable + enable + + + + + + diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/wwwroot/app.css b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/wwwroot/app.css new file mode 100644 index 000000000000..da9a577f4ecd --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorApp/wwwroot/app.css @@ -0,0 +1,61 @@ +html, body { + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + background-color: white; +} + +a, .btn-link { + color: #006bb7; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus { + box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb; +} + +.content { + padding-top: 1.1rem; +} + +h1:focus { + outline: none; +} + +.valid.modified:not([type=checkbox]) { + outline: 1px solid #26b050; +} + +.invalid { + outline: 1px solid #e50000; +} + +.validation-message { + color: #e50000; +} + +.blazor-error-boundary { + background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; + padding: 1rem 1rem 1rem 3.7rem; + color: white; +} + + .blazor-error-boundary::after { + content: "An error has occurred." + } + +.darker-border-checkbox.form-check-input { + border-color: #929292; +} + +.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder { + color: var(--bs-secondary-color); + text-align: end; +} + +.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { + text-align: start; +} diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorClassLibrary/Components/Example.razor b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorClassLibrary/Components/Example.razor new file mode 100644 index 000000000000..cb6f355d9937 --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorClassLibrary/Components/Example.razor @@ -0,0 +1,3 @@ +
+

Hello World

+
\ No newline at end of file diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorClassLibrary/Components/Example.razor.css b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorClassLibrary/Components/Example.razor.css new file mode 100644 index 000000000000..c0c34e31faa5 --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorClassLibrary/Components/Example.razor.css @@ -0,0 +1,3 @@ +.example { + color: red; +} \ No newline at end of file diff --git a/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorClassLibrary/RazorClassLibrary.csproj b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorClassLibrary/RazorClassLibrary.csproj new file mode 100644 index 000000000000..4c50d9d09f14 --- /dev/null +++ b/test/TestAssets/TestProjects/WatchRazorWithDeps/RazorClassLibrary/RazorClassLibrary.csproj @@ -0,0 +1,13 @@ + + + $(CurrentTargetFramework) + enable + enable + + + + + + + + diff --git a/test/UnitTests.proj b/test/UnitTests.proj index 3b2263e74e3f..d1ac0ae42d94 100644 --- a/test/UnitTests.proj +++ b/test/UnitTests.proj @@ -8,7 +8,7 @@ true - 00:45:00 + 01:00:00 diff --git a/test/dotnet-MsiInstallation.Tests/Framework/VMAction.cs b/test/dotnet-MsiInstallation.Tests/Framework/VMAction.cs index 9a7cb527cca7..8b57eb4fdc5a 100644 --- a/test/dotnet-MsiInstallation.Tests/Framework/VMAction.cs +++ b/test/dotnet-MsiInstallation.Tests/Framework/VMAction.cs @@ -214,6 +214,9 @@ class SerializedVMAction // Applies to CopyFileToVM, CopyFolderToVM, MoveFolderOnVM, WriteFileToVM, GetRemoteDirectory, GetRemoteFile public string TargetPath { get; set; } + // Applies to GetRemoteDirectory, GetRemoteFile + public bool MustExist { get; set; } + // Applies to CopyFileToVM, CopyFolderToVM, MoveFolderOnVM public string SourcePath { get; set; } diff --git a/test/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs b/test/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs index b36257611896..e245a508ac1c 100644 --- a/test/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs +++ b/test/dotnet-MsiInstallation.Tests/Framework/VMTestBase.cs @@ -23,7 +23,7 @@ public VMTestBase(ITestOutputHelper log) : base(log) } else { - var sdkTestingDir = VM.GetRemoteDirectory(@"c:\SdkTesting"); + var sdkTestingDir = VM.GetRemoteDirectory(@"c:\SdkTesting", mustExist: true); string installerPrefix = "dotnet-sdk-"; string installerSuffix = "-win-x64.exe"; @@ -52,6 +52,8 @@ public virtual void Dispose() VM.Dispose(); } + protected virtual bool NeedsIncludePreviews => false; + Lazy _sdkInstallerVersion; private bool _sdkInstalled = false; @@ -130,7 +132,7 @@ protected void DeployStage2Sdk() .WithIsReadOnly(true) .Execute(); - result.Should().Pass(); + result.Should().PassWithoutWarning(); string existingVersionToOverwrite = result.StdOut; @@ -185,13 +187,17 @@ protected string GetInstalledSdkVersion() var command = VM.CreateRunCommand("dotnet", "--version"); command.IsReadOnly = true; var result = command.Execute(); - result.Should().Pass(); + result.Should().PassWithoutWarning(); return result.StdOut; } protected CommandResult InstallWorkload(string workloadName, bool skipManifestUpdate) { - string [] args = { "dotnet", "workload", "install", workloadName, "--include-previews"}; + string [] args = { "dotnet", "workload", "install", workloadName}; + if (NeedsIncludePreviews) + { + args = [.. args, "--include-previews"]; + } if (skipManifestUpdate) { args = [.. args, "--skip-manifest-update"]; @@ -201,7 +207,7 @@ protected CommandResult InstallWorkload(string workloadName, bool skipManifestUp .WithDescription($"Install {workloadName} workload") .Execute(); - result.Should().Pass(); + result.Should().PassWithoutWarning(); return result; } @@ -213,7 +219,7 @@ protected WorkloadSet GetRollback(string directory = null) .WithIsReadOnly(true) .Execute(); - result.Should().Pass(); + result.Should().PassWithoutWarning(); return ParseRollbackOutput(result.StdOut); } @@ -233,7 +239,7 @@ protected string GetWorkloadVersion() .WithIsReadOnly(true) .Execute(); - result.Should().Pass(); + result.Should().PassWithoutWarning(); return result.StdOut; } @@ -244,7 +250,7 @@ protected void AddNuGetSource(string source) .WithDescription($"Add {source} to NuGet.config") .Execute() .Should() - .Pass(); + .PassWithoutWarning(); } } } diff --git a/test/dotnet-MsiInstallation.Tests/Framework/VirtualMachine.cs b/test/dotnet-MsiInstallation.Tests/Framework/VirtualMachine.cs index d22de7ecce86..b1b9b1d0ec24 100644 --- a/test/dotnet-MsiInstallation.Tests/Framework/VirtualMachine.cs +++ b/test/dotnet-MsiInstallation.Tests/Framework/VirtualMachine.cs @@ -244,14 +244,14 @@ public VMGroupedAction CreateActionGroup(string name, params VMAction[] actions) }; } - public RemoteFile GetRemoteFile(string path) + public RemoteFile GetRemoteFile(string path, bool mustExist = false) { - return new VMRemoteFile(this, path); + return new VMRemoteFile(this, path, mustExist); } - public RemoteDirectory GetRemoteDirectory(string path) + public RemoteDirectory GetRemoteDirectory(string path, bool mustExist = false) { - return new VMRemoteDirectory(this, path); + return new VMRemoteDirectory(this, path, mustExist); } public VMSnapshot CreateSnapshot() @@ -400,6 +400,11 @@ VMActionResult Run(SerializedVMAction action) else { result.Exists = false; + if (action.MustExist) + { + // Sometimes a directory that exists on the VM seems not to be found, this lets us avoid caching a bad result + throw new DirectoryNotFoundException($"Expected to find directory {action.TargetPath} on VM, but it was not found."); + } } return result; } @@ -415,6 +420,11 @@ VMActionResult Run(SerializedVMAction action) else { result.Exists = false; + if (action.MustExist) + { + // Sometimes a file that exists on the VM seems not to be found, this lets us avoid caching a bad result + throw new DirectoryNotFoundException($"Expected to find directory {action.TargetPath} on VM, but it was not found."); + } } return result; } @@ -508,9 +518,11 @@ string SharePathToVMPath(string sharePath) class VMRemoteFile : RemoteFile { VirtualMachine _vm; - public VMRemoteFile(VirtualMachine vm, string path) : base(path) + bool _mustExist; + public VMRemoteFile(VirtualMachine vm, string path, bool mustExist) : base(path) { _vm = vm; + _mustExist = mustExist; } VMActionResult GetResult() @@ -519,7 +531,8 @@ VMActionResult GetResult() { Type = VMActionType.GetRemoteFile, TargetPath = Path, - IsReadOnly = true + IsReadOnly = true, + MustExist = _mustExist }); } @@ -539,9 +552,12 @@ public override string ReadAllText() class VMRemoteDirectory : RemoteDirectory { VirtualMachine _vm; - public VMRemoteDirectory(VirtualMachine vm, string path) : base(path) + bool _mustExist; + + public VMRemoteDirectory(VirtualMachine vm, string path, bool mustExist) : base(path) { _vm = vm; + _mustExist = mustExist; } VMActionResult GetResult() @@ -550,7 +566,8 @@ VMActionResult GetResult() { Type = VMActionType.GetRemoteDirectory, TargetPath = Path, - IsReadOnly = true + IsReadOnly = true, + MustExist = _mustExist }); } diff --git a/test/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs b/test/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs index afb526660a23..20e2e58f9a29 100644 --- a/test/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs +++ b/test/dotnet-MsiInstallation.Tests/WorkloadSetTests.cs @@ -9,29 +9,10 @@ namespace Microsoft.DotNet.MsiInstallerTests { - public class WorkloadSetTests : VMTestBase + public class WorkloadSetTests : WorkloadSetTestsBase { - readonly string SdkTestingDirectory = @"C:\SdkTesting"; - - - Lazy> _testWorkloadSetVersions; - string WorkloadSetVersion1 => _testWorkloadSetVersions.Value["version1"]; - string WorkloadSetVersion2 => _testWorkloadSetVersions.Value["version2"]; - string WorkloadSetPreviousBandVersion => _testWorkloadSetVersions.Value.GetValueOrDefault("previousbandversion", "8.0.204"); - public WorkloadSetTests(ITestOutputHelper log) : base(log) { - _testWorkloadSetVersions = new Lazy>(() => - { - string remoteFilePath = @"c:\SdkTesting\workloadsets\testworkloadsetversions.json"; - var versionsFile = VM.GetRemoteFile(remoteFilePath); - if (!versionsFile.Exists) - { - throw new FileNotFoundException($"Could not find file {remoteFilePath} on VM"); - } - - return JsonSerializer.Deserialize>(versionsFile.ReadAllText()); - }); } [Fact] @@ -39,7 +20,7 @@ public void DoesNotUseWorkloadSetsByDefault() { InstallSdk(); - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update") .Execute() .Should() .PassWithoutWarning(); @@ -48,7 +29,7 @@ public void DoesNotUseWorkloadSetsByDefault() AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update") .Execute() .Should() .PassWithoutWarning(); @@ -59,42 +40,6 @@ public void DoesNotUseWorkloadSetsByDefault() } - void UpdateAndSwitchToWorkloadSetMode(out string updatedWorkloadVersion, out WorkloadSet rollbackAfterUpdate) - { - var featureBand = new SdkFeatureBand(SdkInstallerVersion).ToStringWithoutPrerelease(); - var originalWorkloadVersion = GetWorkloadVersion(); - originalWorkloadVersion.Should().StartWith($"{featureBand}-manifests."); - - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews") - .Execute() - .Should() - .PassWithoutWarning(); - - rollbackAfterUpdate = GetRollback(); - updatedWorkloadVersion = GetWorkloadVersion(); - updatedWorkloadVersion.Should().StartWith($"{featureBand}-manifests."); - updatedWorkloadVersion.Should().NotBe(originalWorkloadVersion); - - GetUpdateMode().Should().Be("manifests"); - - VM.CreateRunCommand("dotnet", "workload", "config", "--update-mode", "workload-set") - .WithDescription("Switch mode to workload-set") - .Execute() - .Should() - .PassWithoutWarning(); - - GetWorkloadVersion().Should().Be(updatedWorkloadVersion); - - var expectedMessage = "Workloads are configured to install and update using workload versions, but none were found. Run \"dotnet workload restore\" to install a workload version."; - - GetDotnetInfo().Should().Contain(expectedMessage) - .And.NotContain("(not installed)"); - GetDotnetWorkloadInfo().Should().Contain(expectedMessage) - .And.NotContain("(not installed)"); - - GetUpdateMode().Should().Be("workload-set"); - } - [Fact] public void UpdateWithWorkloadSets() { @@ -104,13 +49,20 @@ public void UpdateWithWorkloadSets() AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update") .Execute().Should().PassWithoutWarning(); GetWorkloadVersion().Should().Be(WorkloadSetVersion2); var newRollback = GetRollback(); newRollback.ManifestVersions.Should().NotBeEquivalentTo(rollbackAfterUpdate.ManifestVersions); + + // A second workload update command should not try to install any updates + CreateInstallingCommand("dotnet", "workload", "update") + .Execute().Should().PassWithoutWarning() + .And.HaveStdOutContaining("No workload update found") + .And.NotHaveStdOutContaining("Installing workload version"); + } [Fact] @@ -121,7 +73,7 @@ public void UpdateInWorkloadSetModeWithNoAvailableWorkloadSet() UpdateAndSwitchToWorkloadSetMode(out string updatedWorkloadVersion, out WorkloadSet rollbackAfterUpdate); // Use a nonexistant source because there may be a valid workload set available on NuGet.org - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews", "--source", @"c:\SdkTesting\EmptySource") + CreateInstallingCommand("dotnet", "workload", "update", "--source", @"c:\SdkTesting\EmptySource") .Execute() .Should() .PassWithoutWarning(); @@ -154,7 +106,7 @@ private void UpdateToWorkloadSetVersion(string versionToInstall) AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); - VM.CreateRunCommand("dotnet", "workload", "update", "--version", versionToInstall, "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update", "--version", versionToInstall) .Execute() .Should() .PassWithoutWarning(); @@ -172,7 +124,7 @@ private void UpdateToWorkloadSetVersion(string versionToInstall) GetWorkloadVersion().Should().Be(versionToInstall); - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update") .Execute() .Should() .PassWithoutWarning(); @@ -189,7 +141,7 @@ public void UpdateToUnavailableWorkloadSetVersion() var workloadVersionBeforeUpdate = GetWorkloadVersion(); - VM.CreateRunCommand("dotnet", "workload", "update", "--version", unavailableWorkloadSetVersion, "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update", "--version", unavailableWorkloadSetVersion) .Execute() .Should() .Fail() @@ -215,7 +167,7 @@ public void UpdateWorkloadSetWithoutAvailableManifests() var workloadVersionBeforeUpdate = GetWorkloadVersion(); - VM.CreateRunCommand("dotnet", "workload", "update", "--source", @"c:\SdkTesting\workloadsets", "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update", "--source", @"c:\SdkTesting\workloadsets") .Execute() .Should() .Fail(); @@ -236,7 +188,7 @@ public void UpdateToWorkloadSetVersionWithManifestsNotAvailable() var workloadVersionBeforeUpdate = GetWorkloadVersion(); - VM.CreateRunCommand("dotnet", "workload", "update", "--version", WorkloadSetVersion2, "--source", @"c:\SdkTesting\workloadsets", "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update", "--version", WorkloadSetVersion2, "--source", @"c:\SdkTesting\workloadsets") .Execute() .Should() .Fail(); @@ -250,150 +202,6 @@ public void UpdateToWorkloadSetVersionWithManifestsNotAvailable() GetWorkloadVersion().Should().Be(workloadVersionBeforeUpdate); } - void SetupWorkloadSetInGlobalJson(out WorkloadSet originalRollback) - { - InstallSdk(); - - var versionToUpdateTo = WorkloadSetVersion2; - - string originalVersion = GetWorkloadVersion(); - - originalRollback = GetRollback(SdkTestingDirectory); - - VM.WriteFile("C:\\SdkTesting\\global.json", @$"{{""sdk"":{{""workloadVersion"":""{versionToUpdateTo}""}}}}").Execute().Should().PassWithoutWarning(); - - GetWorkloadVersion(SdkTestingDirectory).Should().Be(versionToUpdateTo + " (not installed)"); - GetDotnetInfo(SdkTestingDirectory).Should().Contain("Workload version: " + versionToUpdateTo + " (not installed)") - .And.Contain($@"Workload version {versionToUpdateTo}, which was specified in C:\SdkTesting\global.json, was not found"); - GetDotnetWorkloadInfo(SdkTestingDirectory).Should().Contain("Workload version: " + versionToUpdateTo + " (not installed)") - .And.Contain($@"Workload version {versionToUpdateTo}, which was specified in C:\SdkTesting\global.json, was not found"); - - // The version should have changed but not yet the manifests. Since we expect both, getting the rollback should fail. - var result = VM.CreateRunCommand("dotnet", "workload", "update", "--print-rollback") - .WithWorkingDirectory(SdkTestingDirectory) - .WithIsReadOnly(true) - .Execute(); - - result.Should().Fail(); - result.StdErr.Should().Contain("FileNotFoundException"); - result.StdErr.Should().Contain(versionToUpdateTo); - - AddNuGetSource(@"C:\SdkTesting\workloadsets", SdkTestingDirectory); - } - - [Fact] - public void RestoreWorkloadSetViaGlobalJson() - { - InstallSdk(); - - var testProjectFolder = Path.Combine(SdkTestingDirectory, "ConsoleApp"); - VM.CreateRunCommand("dotnet", "new", "console", "-o", "ConsoleApp") - .WithWorkingDirectory(SdkTestingDirectory) - .Execute().Should().PassWithoutWarning(); - - SetupWorkloadSetInGlobalJson(out var originalRollback); - - VM.CreateRunCommand("dotnet", "workload", "restore") - .WithWorkingDirectory(testProjectFolder) - .Execute().Should().PassWithoutWarning(); - - GetWorkloadVersion(SdkTestingDirectory).Should().Be(WorkloadSetVersion2); - - GetRollback(SdkTestingDirectory).Should().NotBe(originalRollback); - } - - [Theory] - [InlineData("update")] - [InlineData("install")] - public void UseGlobalJsonToSpecifyWorkloadSet(string command) - { - SetupWorkloadSetInGlobalJson(out var originalRollback); - - string[] args = command.Equals("install") ? ["dotnet", "workload", "install", "aspire"] : ["dotnet", "workload", command]; - VM.CreateRunCommand(args).WithWorkingDirectory(SdkTestingDirectory).Execute().Should().PassWithoutWarning(); - GetRollback(SdkTestingDirectory).Should().NotBe(originalRollback); - } - - [Fact] - public void DotnetInfoWithGlobalJson() - { - InstallSdk(); - - // Install a workload before setting up global.json. Commands like "dotnet workload --info" were previously crashing if global.json specified a workload set that wasn't installed - InstallWorkload("aspire", skipManifestUpdate: true); - - SetupWorkloadSetInGlobalJson(out _); - } - - [Fact] - public void InstallWithGlobalJsonAndSkipManifestUpdate() - { - SetupWorkloadSetInGlobalJson(out var originalRollback); - - VM.CreateRunCommand("dotnet", "workload", "install", "aspire", "--skip-manifest-update") - .WithWorkingDirectory(SdkTestingDirectory) - .Execute().Should().Fail() - .And.HaveStdErrContaining("--skip-manifest-update") - .And.HaveStdErrContaining(Path.Combine(SdkTestingDirectory, "global.json")); - } - - [Fact] - public void InstallWithVersionAndSkipManifestUpdate() - { - InstallSdk(); - - VM.CreateRunCommand("dotnet", "workload", "install", "aspire", "--skip-manifest-update", "--version", WorkloadSetVersion1) - .Execute().Should().Fail() - .And.HaveStdErrContaining("--skip-manifest-update") - .And.HaveStdErrContaining("--sdk-version"); - } - - [Fact] - public void InstallWithVersionWhenPinned() - { - InstallSdk(); - - AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); - - string originalVersion = GetWorkloadVersion(); - originalVersion.Should().NotBe(WorkloadSetVersion1); - - VM.CreateRunCommand("dotnet", "workload", "update", "--version", WorkloadSetVersion1, "--include-previews") - .Execute().Should().PassWithoutWarning(); - - GetWorkloadVersion().Should().Be(WorkloadSetVersion1); - - VM.CreateRunCommand("dotnet", "workload", "install", "aspire", "--version", WorkloadSetVersion2) - .Execute().Should().PassWithoutWarning(); - - GetWorkloadVersion().Should().Be(WorkloadSetVersion2); - } - - [Fact] - public void InstallWithGlobalJsonWhenPinned() - { - SetupWorkloadSetInGlobalJson(out var originalRollback); - - //AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); - - string originalVersion = GetWorkloadVersion(); - originalVersion.Should().NotBe(WorkloadSetVersion1); - - VM.CreateRunCommand("dotnet", "workload", "update", "--version", WorkloadSetVersion1, "--include-previews") - .Execute().Should().PassWithoutWarning(); - - GetWorkloadVersion().Should().Be(WorkloadSetVersion1); - - VM.CreateRunCommand("dotnet", "workload", "install", "aspire") - .WithWorkingDirectory(SdkTestingDirectory) - .Execute().Should().PassWithoutWarning(); - - GetWorkloadVersion(SdkTestingDirectory).Should().Be(WorkloadSetVersion2); - - GetRollback(SdkTestingDirectory).Should().NotBe(originalRollback); - - } - [Fact] public void UpdateShouldNotPinWorkloadSet() { @@ -402,23 +210,16 @@ public void UpdateShouldNotPinWorkloadSet() AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); - var packageVersion = WorkloadSetVersion.ToWorkloadSetPackageVersion(WorkloadSetVersion2, out var sdkFeatureBand); - - // Rename latest workload set so it won't be installed - VM.CreateActionGroup($"Disable {WorkloadSetVersion2}", - VM.CreateRunCommand("cmd", "/c", "ren", @$"c:\SdkTesting\WorkloadSets\Microsoft.NET.Workloads.{sdkFeatureBand}.{packageVersion}.nupkg", $"Microsoft.NET.Workloads.{sdkFeatureBand}.{packageVersion}.bak"), - VM.CreateRunCommand("cmd", "/c", "ren", @$"c:\SdkTesting\WorkloadSets\Microsoft.NET.Workloads.{sdkFeatureBand}.*.{packageVersion}.nupkg", $"Microsoft.NET.Workloads.{sdkFeatureBand}.*.{packageVersion}.bak")) - .Execute().Should().PassWithoutWarning(); + RemoveWorkloadSetFromLocalSource(WorkloadSetVersion2); - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update") .Execute().Should().PassWithoutWarning(); GetWorkloadVersion().Should().Be(WorkloadSetVersion1); // Bring latest workload set version back, so installing workload should update to it VM.CreateActionGroup($"Enable {WorkloadSetVersion2}", - VM.CreateRunCommand("cmd", "/c", "ren", @$"c:\SdkTesting\WorkloadSets\Microsoft.NET.Workloads.{sdkFeatureBand}.{packageVersion}.bak", $"Microsoft.NET.Workloads.{sdkFeatureBand}.{packageVersion}.nupkg"), - VM.CreateRunCommand("cmd", "/c", "ren", @$"c:\SdkTesting\WorkloadSets\Microsoft.NET.Workloads.{sdkFeatureBand}.*.{packageVersion}.bak", $"Microsoft.NET.Workloads.{sdkFeatureBand}.*.{packageVersion}.nupkg")) + VM.CreateRunCommand("cmd", "/c", "move", @"c:\SdkTesting\DisabledWorkloadSets\*.nupkg", @"c:\SdkTesting\WorkloadSets")) .Execute().Should().PassWithoutWarning(); InstallWorkload("aspire", skipManifestUpdate: false); @@ -426,14 +227,14 @@ public void UpdateShouldNotPinWorkloadSet() GetWorkloadVersion().Should().Be(WorkloadSetVersion2); } - [Fact] + [Fact(Skip = "Not Implemented")] public void WorkloadSetInstallationRecordIsWrittenCorrectly() { // Should the workload set version or the package version be used in the registry? throw new NotImplementedException(); } - [Fact] + [Fact(Skip = "Not Implemented")] public void TurnOffWorkloadSetUpdateMode() { // If you have a workload set installed and then turn off workload set update mode, what should happen? @@ -452,7 +253,7 @@ public void GarbageCollectWorkloadSets() AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); // Update to latest workload set version - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update") .Execute().Should().PassWithoutWarning(); GetWorkloadVersion().Should().Be(WorkloadSetVersion2); @@ -475,12 +276,12 @@ public void GarbageCollectWorkloadSets() VM.WriteFile("C:\\SdkTesting\\global.json", @$"{{""sdk"":{{""workloadVersion"":""{WorkloadSetVersion1}""}}}}").Execute().Should().PassWithoutWarning(); // Install pinned version - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update") .WithWorkingDirectory(SdkTestingDirectory) .Execute().Should().PassWithoutWarning(); // Update globally installed version to later version - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update") .Execute().Should().PassWithoutWarning(); // Check workload versions in global context and global.json directory @@ -495,13 +296,14 @@ public void GarbageCollectWorkloadSets() VM.WriteFile("C:\\SdkTesting\\global.json", "{}").Execute().Should().PassWithoutWarning(); // Run workload update to do a GC - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews") + CreateInstallingCommand("dotnet", "workload", "update") .Execute().Should().PassWithoutWarning(); // Workload set 1 should have been GC'd VM.GetRemoteDirectory(workloadSet1Path).Should().NotExist(); } + // Note: this may fail due to https://github.com/dotnet/sdk/issues/43876 [Fact] public void FinalizerUninstallsWorkloadSets() { @@ -518,6 +320,7 @@ public void FinalizerUninstallsWorkloadSets() VM.GetRemoteDirectory(workloadSetPath).Should().NotExist(); } + // Note: this may fail for rtm-branded non-stabilized SDKs: https://github.com/dotnet/sdk/issues/43890 [Fact] public void WorkloadSearchVersion() { @@ -557,7 +360,7 @@ public void WorkloadSearchVersion() var searchResultWorkloadSet = WorkloadSet.FromDictionaryForJson(JsonSerializer.Deserialize>(searchResultJson["manifestVersions"]), new SdkFeatureBand(SdkInstallerVersion)); // Update to the workload set version we got the search info from so we can check to see if the manifest versions match what we expect - VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews", "--version", WorkloadSetVersion2) + CreateInstallingCommand("dotnet", "workload", "update", "--version", WorkloadSetVersion2) .Execute() .Should() .PassWithoutWarning(); @@ -565,61 +368,5 @@ public void WorkloadSearchVersion() GetRollback().ManifestVersions.Should().BeEquivalentTo(searchResultWorkloadSet.ManifestVersions); } - string GetWorkloadVersion(string workingDirectory = null) - { - var result = VM.CreateRunCommand("dotnet", "workload", "--version") - .WithWorkingDirectory(workingDirectory) - .WithIsReadOnly(true) - .Execute(); - - result.Should().PassWithoutWarning(); - - return result.StdOut; - } - - string GetDotnetInfo(string workingDirectory = null) - { - var result = VM.CreateRunCommand("dotnet", "--info") - .WithWorkingDirectory(workingDirectory) - .WithIsReadOnly(true) - .Execute(); - - result.Should().PassWithoutWarning(); - - return result.StdOut; - } - - string GetDotnetWorkloadInfo(string workingDirectory = null) - { - var result = VM.CreateRunCommand("dotnet", "workload", "--info") - .WithWorkingDirectory(workingDirectory) - .WithIsReadOnly(true) - .Execute(); - - result.Should().PassWithoutWarning(); - - return result.StdOut; - } - - string GetUpdateMode() - { - var result = VM.CreateRunCommand("dotnet", "workload", "config", "--update-mode") - .WithIsReadOnly(true) - .Execute(); - - result.Should().PassWithoutWarning(); - - return result.StdOut; - } - - void AddNuGetSource(string source, string directory = null) - { - VM.CreateRunCommand("dotnet", "nuget", "add", "source", source) - .WithWorkingDirectory(directory) - .WithDescription($"Add {source} to NuGet.config") - .Execute() - .Should() - .PassWithoutWarning(); - } } } diff --git a/test/dotnet-MsiInstallation.Tests/WorkloadSetTests2.cs b/test/dotnet-MsiInstallation.Tests/WorkloadSetTests2.cs new file mode 100644 index 000000000000..bbdc43c839e6 --- /dev/null +++ b/test/dotnet-MsiInstallation.Tests/WorkloadSetTests2.cs @@ -0,0 +1,210 @@ +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.DotNet.MsiInstallerTests.Framework; +using Microsoft.NET.Sdk.WorkloadManifestReader; + +namespace Microsoft.DotNet.MsiInstallerTests +{ + public class WorkloadSetTests2 : WorkloadSetTestsBase + { + public WorkloadSetTests2(ITestOutputHelper log) : base(log) + { + } + + void SetupWorkloadSetInGlobalJson(out WorkloadSet originalRollback) + { + InstallSdk(); + + var versionToUpdateTo = WorkloadSetVersion2; + + string originalVersion = GetWorkloadVersion(); + + originalRollback = GetRollback(SdkTestingDirectory); + + VM.WriteFile("C:\\SdkTesting\\global.json", @$"{{""sdk"":{{""workloadVersion"":""{versionToUpdateTo}""}}}}").Execute().Should().PassWithoutWarning(); + + GetWorkloadVersion(SdkTestingDirectory).Should().Be(versionToUpdateTo + " (not installed)"); + GetDotnetInfo(SdkTestingDirectory).Should().Contain("Workload version: " + versionToUpdateTo + " (not installed)") + .And.Contain($@"Workload version {versionToUpdateTo}, which was specified in C:\SdkTesting\global.json, was not found"); + GetDotnetWorkloadInfo(SdkTestingDirectory).Should().Contain("Workload version: " + versionToUpdateTo + " (not installed)") + .And.Contain($@"Workload version {versionToUpdateTo}, which was specified in C:\SdkTesting\global.json, was not found"); + + // The version should have changed but not yet the manifests. Since we expect both, getting the rollback should fail. + var result = VM.CreateRunCommand("dotnet", "workload", "update", "--print-rollback") + .WithWorkingDirectory(SdkTestingDirectory) + .WithIsReadOnly(true) + .Execute(); + + result.Should().Fail(); + result.StdErr.Should().Contain("FileNotFoundException"); + result.StdErr.Should().Contain(versionToUpdateTo); + + AddNuGetSource(@"C:\SdkTesting\workloadsets", SdkTestingDirectory); + } + + [Fact] + public void RestoreWorkloadSetViaGlobalJson() + { + InstallSdk(); + + var testProjectFolder = Path.Combine(SdkTestingDirectory, "ConsoleApp"); + VM.CreateRunCommand("dotnet", "new", "console", "-o", "ConsoleApp") + .WithWorkingDirectory(SdkTestingDirectory) + .Execute().Should().PassWithoutWarning(); + + SetupWorkloadSetInGlobalJson(out var originalRollback); + + VM.CreateRunCommand("dotnet", "workload", "restore") + .WithWorkingDirectory(testProjectFolder) + .Execute().Should().PassWithoutWarning(); + + GetWorkloadVersion(SdkTestingDirectory).Should().Be(WorkloadSetVersion2); + + GetRollback(SdkTestingDirectory).Should().NotBe(originalRollback); + } + + [Theory] + [InlineData("update")] + [InlineData("install")] + public void UseGlobalJsonToSpecifyWorkloadSet(string command) + { + SetupWorkloadSetInGlobalJson(out var originalRollback); + + string[] args = command.Equals("install") ? ["dotnet", "workload", "install", "aspire"] : ["dotnet", "workload", command]; + VM.CreateRunCommand(args).WithWorkingDirectory(SdkTestingDirectory).Execute().Should().PassWithoutWarning(); + GetRollback(SdkTestingDirectory).Should().NotBe(originalRollback); + } + + [Fact] + public void InstallWithGlobalJsonAndSkipManifestUpdate() + { + SetupWorkloadSetInGlobalJson(out var originalRollback); + + VM.CreateRunCommand("dotnet", "workload", "install", "aspire", "--skip-manifest-update") + .WithWorkingDirectory(SdkTestingDirectory) + .Execute().Should().Fail() + .And.HaveStdErrContaining("--skip-manifest-update") + .And.HaveStdErrContaining(Path.Combine(SdkTestingDirectory, "global.json")); + } + + [Fact] + public void InstallWithVersionAndSkipManifestUpdate() + { + InstallSdk(); + + VM.CreateRunCommand("dotnet", "workload", "install", "aspire", "--skip-manifest-update", "--version", WorkloadSetVersion1) + .Execute().Should().Fail() + .And.HaveStdErrContaining("--skip-manifest-update") + .And.HaveStdErrContaining("--sdk-version"); + } + + [Fact] + public void InstallWithVersionWhenPinned() + { + InstallSdk(); + + AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); + + string originalVersion = GetWorkloadVersion(); + originalVersion.Should().NotBe(WorkloadSetVersion1); + + CreateInstallingCommand("dotnet", "workload", "update", "--version", WorkloadSetVersion1) + .Execute().Should().PassWithoutWarning(); + + GetWorkloadVersion().Should().Be(WorkloadSetVersion1); + + VM.CreateRunCommand("dotnet", "workload", "install", "aspire", "--version", WorkloadSetVersion2) + .Execute().Should().PassWithoutWarning(); + + GetWorkloadVersion().Should().Be(WorkloadSetVersion2); + } + + [Fact] + public void InstallWithGlobalJsonWhenPinned() + { + SetupWorkloadSetInGlobalJson(out var originalRollback); + + //AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); + + string originalVersion = GetWorkloadVersion(); + originalVersion.Should().NotBe(WorkloadSetVersion1); + + CreateInstallingCommand("dotnet", "workload", "update", "--version", WorkloadSetVersion1) + .Execute().Should().PassWithoutWarning(); + + GetWorkloadVersion().Should().Be(WorkloadSetVersion1); + + VM.CreateRunCommand("dotnet", "workload", "install", "aspire") + .WithWorkingDirectory(SdkTestingDirectory) + .Execute().Should().PassWithoutWarning(); + + GetWorkloadVersion(SdkTestingDirectory).Should().Be(WorkloadSetVersion2); + + GetRollback(SdkTestingDirectory).Should().NotBe(originalRollback); + + } + + [Fact] + public void DotnetInfoWithGlobalJson() + { + InstallSdk(); + + // Install a workload before setting up global.json. Commands like "dotnet workload --info" were previously crashing if global.json specified a workload set that wasn't installed + InstallWorkload("aspire", skipManifestUpdate: true); + + SetupWorkloadSetInGlobalJson(out _); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public void UpdateDoesNotTryToInstallOlderWorkloadSet(bool usePreview) + { + if (NeedsIncludePreviews && usePreview) + { + // This version of the test can't run when all of the test workload sets are previews + return; + } + + InstallSdk(); + + UpdateAndSwitchToWorkloadSetMode(out string _, out WorkloadSet rollbackAfterUpdate); + + AddNuGetSource(@"c:\SdkTesting\WorkloadSets"); + + if (usePreview) + { + RemoveWorkloadSetFromLocalSource(WorkloadSetVersion2); + } + + VM.CreateRunCommand("dotnet", "workload", "update", "--include-previews") + .Execute().Should().PassWithoutWarning(); + + GetWorkloadVersion().Should().Be(usePreview ? WorkloadSetVersionPreview : WorkloadSetVersion2); + + if (!usePreview) + { + RemoveWorkloadSetFromLocalSource(WorkloadSetVersion2); + } + + InstallWorkload("aspire", skipManifestUpdate: false) + .Should().NotHaveStdOutContaining("Installing workload version") + .And.NotHaveStdOutContaining("microsoft.net.workloads."); + + if (usePreview) + { + GetWorkloadVersion().Should().Be(WorkloadSetVersionPreview); + } + else + { + GetWorkloadVersion().Should().Be(WorkloadSetVersion2); + } + } + } +} diff --git a/test/dotnet-MsiInstallation.Tests/WorkloadSetTestsBase.cs b/test/dotnet-MsiInstallation.Tests/WorkloadSetTestsBase.cs new file mode 100644 index 000000000000..bbb6607ac502 --- /dev/null +++ b/test/dotnet-MsiInstallation.Tests/WorkloadSetTestsBase.cs @@ -0,0 +1,158 @@ +// 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.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.DotNet.MsiInstallerTests.Framework; +using Microsoft.DotNet.Workloads.Workload; +using Microsoft.NET.Sdk.WorkloadManifestReader; + +namespace Microsoft.DotNet.MsiInstallerTests +{ + public class WorkloadSetTestsBase : VMTestBase + { + protected readonly string SdkTestingDirectory = @"C:\SdkTesting"; + + + protected Lazy> _testWorkloadSetVersions; + protected string WorkloadSetVersion1 => _testWorkloadSetVersions.Value["version1"]; + protected string WorkloadSetVersionPreview => _testWorkloadSetVersions.Value["versionpreview"]; + protected string WorkloadSetVersion2 => _testWorkloadSetVersions.Value["version2"]; + protected string WorkloadSetPreviousBandVersion => _testWorkloadSetVersions.Value.GetValueOrDefault("previousbandversion", "8.0.204"); + + protected override bool NeedsIncludePreviews => bool.Parse(_testWorkloadSetVersions.Value.GetValueOrDefault("needsIncludePreviews", "false")); + public WorkloadSetTestsBase(ITestOutputHelper log) : base(log) + { + _testWorkloadSetVersions = new Lazy>(() => + { + string remoteFilePath = @"c:\SdkTesting\workloadsets\testworkloadsetversions.json"; + var versionsFile = VM.GetRemoteFile(remoteFilePath, mustExist: true); + if (!versionsFile.Exists) + { + throw new FileNotFoundException($"Could not find file {remoteFilePath} on VM"); + } + + return JsonSerializer.Deserialize>(versionsFile.ReadAllText()); + }); + } + + protected void UpdateAndSwitchToWorkloadSetMode(out string updatedWorkloadVersion, out WorkloadSet rollbackAfterUpdate) + { + var featureBand = new SdkFeatureBand(SdkInstallerVersion).ToStringWithoutPrerelease(); + var originalWorkloadVersion = GetWorkloadVersion(); + originalWorkloadVersion.Should().StartWith($"{featureBand}-manifests."); + + CreateInstallingCommand("dotnet", "workload", "update") + .Execute() + .Should() + .PassWithoutWarning(); + + rollbackAfterUpdate = GetRollback(); + updatedWorkloadVersion = GetWorkloadVersion(); + updatedWorkloadVersion.Should().StartWith($"{featureBand}-manifests."); + updatedWorkloadVersion.Should().NotBe(originalWorkloadVersion); + + GetUpdateMode().Should().Be("manifests"); + + VM.CreateRunCommand("dotnet", "workload", "config", "--update-mode", "workload-set") + .WithDescription("Switch mode to workload-set") + .Execute() + .Should() + .PassWithoutWarning(); + + GetWorkloadVersion().Should().Be(updatedWorkloadVersion); + + var expectedMessage = "Workloads are configured to install and update using workload versions, but none were found. Run \"dotnet workload restore\" to install a workload version."; + + GetDotnetInfo().Should().Contain(expectedMessage) + .And.NotContain("(not installed)"); + GetDotnetWorkloadInfo().Should().Contain(expectedMessage) + .And.NotContain("(not installed)"); + + GetUpdateMode().Should().Be("workload-set"); + } + + internal string GetWorkloadVersion(string workingDirectory = null) + { + var result = VM.CreateRunCommand("dotnet", "workload", "--version") + .WithWorkingDirectory(workingDirectory) + .WithIsReadOnly(true) + .Execute(); + + result.Should().PassWithoutWarning(); + + return result.StdOut; + } + + internal string GetDotnetInfo(string workingDirectory = null) + { + var result = VM.CreateRunCommand("dotnet", "--info") + .WithWorkingDirectory(workingDirectory) + .WithIsReadOnly(true) + .Execute(); + + result.Should().PassWithoutWarning(); + + return result.StdOut; + } + + internal string GetDotnetWorkloadInfo(string workingDirectory = null) + { + var result = VM.CreateRunCommand("dotnet", "workload", "--info") + .WithWorkingDirectory(workingDirectory) + .WithIsReadOnly(true) + .Execute(); + + result.Should().PassWithoutWarning(); + + return result.StdOut; + } + + internal string GetUpdateMode() + { + var result = VM.CreateRunCommand("dotnet", "workload", "config", "--update-mode") + .WithIsReadOnly(true) + .Execute(); + + result.Should().PassWithoutWarning(); + + return result.StdOut; + } + + internal void AddNuGetSource(string source, string directory = null) + { + VM.CreateRunCommand("dotnet", "nuget", "add", "source", source) + .WithWorkingDirectory(directory) + .WithDescription($"Add {source} to NuGet.config") + .Execute() + .Should() + .PassWithoutWarning(); + } + + // Creates a command and possibly adds "--include-previews" to the argument list + internal VMRunAction CreateInstallingCommand(params string[] args) + { + if (NeedsIncludePreviews) + { + args = [.. args, "--include-previews"]; + } + return VM.CreateRunCommand(args); + } + + // Moves workload set packages for a given version from C:\SdkTesting\WorkloadSets to C:\SdkTesting\DisabledWorkloadSets + protected void RemoveWorkloadSetFromLocalSource(string workloadSetVersion) + { + var packageVersion = WorkloadSetVersion.ToWorkloadSetPackageVersion(workloadSetVersion, out var sdkFeatureBand); + + VM.CreateActionGroup($"Disable {workloadSetVersion}", + VM.CreateRunCommand("cmd", "/c", "mkdir", @"c:\SdkTesting\DisabledWorkloadSets"), + VM.CreateRunCommand("cmd", "/c", "move", @$"c:\SdkTesting\WorkloadSets\Microsoft.NET.Workloads.{sdkFeatureBand}.{packageVersion}.nupkg", @"c:\SdkTesting\DisabledWorkloadSets"), + VM.CreateRunCommand("cmd", "/c", "move", @$"c:\SdkTesting\WorkloadSets\Microsoft.NET.Workloads.{sdkFeatureBand}.*.{packageVersion}.nupkg", @"c:\SdkTesting\DisabledWorkloadSets")) + .Execute().Should().PassWithoutWarning(); + } + } +} diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt index 5c619748b23f..593935c27256 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt @@ -44,4 +44,4 @@ Razor View view [C#] Solution File sln,solution Solution Web Config webconfig Config Worker Service worker [C#],F# Common/Worker/Web -xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web \ No newline at end of file +xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt index a5d4946c1ac8..ac3a91b3919c 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt @@ -51,4 +51,4 @@ WPF Application wpf [C#] WPF Class Library wpflib [C#],VB Common/WPF WPF Custom Control Library wpfcustomcontrollib [C#],VB Common/WPF WPF User Control Library wpfusercontrollib [C#],VB Common/WPF -xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web \ No newline at end of file +xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt index 5f864b5ef228..9cf877f31f40 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt @@ -40,4 +40,4 @@ Razor View view [C#] Solution File sln,solution Solution Web Config webconfig Config Worker Service worker [C#],F# Common/Worker/Web -xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web \ No newline at end of file +xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt index f183ab893b52..29aefcf207a9 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt @@ -47,4 +47,4 @@ WPF Application wpf [C#] WPF Class Library wpflib [C#],VB Common/WPF WPF Custom Control Library wpfcustomcontrollib [C#],VB Common/WPF WPF User Control Library wpfusercontrollib [C#],VB Common/WPF -xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web \ No newline at end of file +xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web diff --git a/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs b/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs index 0c1995a11340..985d1b07932b 100644 --- a/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs +++ b/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs @@ -7,7 +7,8 @@ namespace Microsoft.DotNet.Cli.New.IntegrationTests { public partial class DotnetNewListTests { - [Theory] +#pragma warning disable xUnit1004 // Test methods should not be skipped + [Theory(Skip = "https://github.com/dotnet/sdk/issues/45406")] [InlineData("-l")] [InlineData("--list")] public Task BasicTest_WhenLegacyCommandIsUsed(string commandName) @@ -27,7 +28,7 @@ public Task BasicTest_WhenLegacyCommandIsUsed(string commandName) .DisableRequireUniquePrefix(); } - [Fact] + [Fact(Skip = "https://github.com/dotnet/sdk/issues/45406")] public Task BasicTest_WhenListCommandIsUsed() { CommandResult commandResult = new DotnetNewCommand(_log, "list") @@ -41,6 +42,7 @@ public Task BasicTest_WhenListCommandIsUsed() return Verify(commandResult.StdOut).UniqueForOSPlatform(); } +#pragma warning restore xUnit1004 [Fact] public Task Constraints_CanShowMessageIfTemplateGroupIsRestricted() diff --git a/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj b/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj index 34dc8117fd36..667e5ddc88fd 100644 --- a/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj +++ b/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj @@ -81,7 +81,6 @@ namespace Microsoft.DotNet.Cli.New.IntegrationTests - diff --git a/test/dotnet-new.Tests/xunit.runner.json b/test/dotnet-new.Tests/xunit.runner.json deleted file mode 100644 index 4dca131cc476..000000000000 --- a/test/dotnet-new.Tests/xunit.runner.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", - "diagnosticMessages": true, - "longRunningTestSeconds": 120 -} diff --git a/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs b/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs index 1af8c78c493d..85d6749e07a5 100644 --- a/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs +++ b/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs @@ -18,7 +18,7 @@ public GivenDotnetTestBuildsAndRunsTestFromCsproj(ITestOutputHelper log) : base( [Fact] public void MSTestSingleTFM() { - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("3"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([]); // Call test CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true) @@ -160,7 +160,7 @@ public void GivenAFailingTestItDisplaysFailureDetails() public void ItAcceptsMultipleLoggersAsCliArguments() { // Copy and restore VSTestCore project in output directory of project dotnet-vstest.Tests - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("10"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([]); var trxFileNamePattern = "custom*.trx"; string trxLoggerDirectory = Path.Combine(testProjectDirectory, "RD"); @@ -197,7 +197,7 @@ public void ItAcceptsMultipleLoggersAsCliArguments() public void TestWillNotBuildTheProjectIfNoBuildArgsIsGiven() { // Copy and restore VSTestCore project in output directory of project dotnet-vstest.Tests - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("5"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([]); string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; string expectedError = Path.Combine(testProjectDirectory, "bin", configuration, ToolsetInfo.CurrentTargetFramework, "VSTestCore.dll"); @@ -225,7 +225,7 @@ public void TestWillNotBuildTheProjectIfNoBuildArgsIsGiven() public void TestWillCreateTrxLoggerInTheSpecifiedResultsDirectoryBySwitch() { // Copy and restore VSTestCore project in output directory of project dotnet-vstest.Tests - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("6"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([]); string trxLoggerDirectory = Path.Combine(testProjectDirectory, "TR", "x.y"); @@ -256,7 +256,7 @@ public void TestWillCreateTrxLoggerInTheSpecifiedResultsDirectoryBySwitch() public void ItCreatesTrxReportInTheSpecifiedResultsDirectoryByArgs() { // Copy and restore VSTestCore project in output directory of project dotnet-vstest.Tests - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("7"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([]); var trxFileNamePattern = "custom*.trx"; string trxLoggerDirectory = Path.Combine(testProjectDirectory, "RD"); @@ -342,7 +342,7 @@ public void ItBuildsAndTestsAppWhenRestoringToSpecificDirectory() public void ItUsesVerbosityPassedToDefineVerbosityOfConsoleLoggerOfTheTests(string verbosity, bool shouldShowPassedTests) { // Copy and restore VSTestCore project in output directory of project dotnet-vstest.Tests - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp($"9_{verbosity}"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([verbosity, shouldShowPassedTests]); // Call test CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true) @@ -414,7 +414,7 @@ public void ItTestsWithTheSpecifiedRuntimeOption() public void ItAcceptsNoLogoAsCliArguments() { // Copy and restore VSTestCore project in output directory of project dotnet-vstest.Tests - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("14"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([]); // Call test with logger enable CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true) @@ -434,7 +434,7 @@ public void ItAcceptsNoLogoAsCliArguments() [PlatformSpecificFact(TestPlatforms.Windows)] public void ItCreatesCoverageFileWhenCodeCoverageEnabledByRunsettings() { - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("11"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([]); string resultsDirectory = Path.Combine(testProjectDirectory, "RD"); @@ -475,7 +475,7 @@ public void ItCreatesCoverageFileWhenCodeCoverageEnabledByRunsettings() [PlatformSpecificFact(TestPlatforms.Windows | TestPlatforms.OSX | TestPlatforms.Linux)] public void ItCreatesCoverageFileInResultsDirectory() { - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("12"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([]); string resultsDirectory = Path.Combine(testProjectDirectory, "RD"); @@ -511,7 +511,7 @@ public void ItCreatesCoverageFileInResultsDirectory() [PlatformSpecificFact(TestPlatforms.Windows | TestPlatforms.OSX | TestPlatforms.Linux)] public void ItCreatesCoberturaFileProvidedByCommandInResultsDirectory() { - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("15"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([]); string resultsDirectory = Path.Combine(testProjectDirectory, "RD"); @@ -547,7 +547,7 @@ public void ItCreatesCoberturaFileProvidedByCommandInResultsDirectory() [PlatformSpecificFact(TestPlatforms.Windows)] public void ItHandlesMultipleCollectCommandInResultsDirectory() { - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("16"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([]); string resultsDirectory = Path.Combine(testProjectDirectory, "RD"); @@ -588,7 +588,7 @@ public void ItHandlesMultipleCollectCommandInResultsDirectory() [PlatformSpecificFact(TestPlatforms.FreeBSD)] public void ItShouldShowWarningMessageOnCollectCodeCoverage() { - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("13"); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([]); // Call test CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true) @@ -714,7 +714,7 @@ public void FilterPropertyCorrectlyHandlesComma(string filter, string folderSuff [InlineData("--results-directory")] public void EnsureOutputPathEscaped(string flag) { - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp(flag); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([flag]); var pathWithComma = Path.Combine(AppContext.BaseDirectory, "a,b"); @@ -763,7 +763,7 @@ public void PathEndsWithSlashOrBackslash(string flag, string slashesOrBackslashe { // NOTE: We also want to test with forward slashes because on Windows they // are converted to backslashes and so need to be handled correctly. - string testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp(Guid.NewGuid().ToString()); + string testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([flag, slashesOrBackslashes]); string flagDirectory = Path.Combine(testProjectDirectory, "flag-dir"); // Call test @@ -788,7 +788,7 @@ public void PathEndsWithSlashOrBackslash(string flag, string slashesOrBackslashe [InlineData("-e:foo=barexe")] public void ArgumentsEndWithDllOrExeShouldNotFail(string arg) { - var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp(); + var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp([arg]); // Call test CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true) @@ -804,12 +804,12 @@ public void ArgumentsEndWithDllOrExeShouldNotFail(string arg) } } - private string CopyAndRestoreVSTestDotNetCoreTestApp([CallerMemberName] string callingMethod = "") + private string CopyAndRestoreVSTestDotNetCoreTestApp(object[] parameters, [CallerMemberName] string callingMethod = "") { // Copy VSTestCore project in output directory of project dotnet-vstest.Tests string testAppName = "VSTestCore"; - var testInstance = _testAssetsManager.CopyTestAsset(testAppName, callingMethod: callingMethod) + var testInstance = _testAssetsManager.CopyTestAsset(testAppName, callingMethod: callingMethod, identifier: string.Join(",", parameters.Select(p => p.ToString()))) .WithSource() .WithVersionVariables(); diff --git a/test/dotnet-watch.Tests/CommandLineOptionsTests.cs b/test/dotnet-watch.Tests/CommandLineOptionsTests.cs index 00b40547dcc5..5e69e0f83ce7 100644 --- a/test/dotnet-watch.Tests/CommandLineOptionsTests.cs +++ b/test/dotnet-watch.Tests/CommandLineOptionsTests.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch.UnitTests { public class CommandLineOptionsTests { @@ -52,15 +52,15 @@ public void HelpArgs(string[] args) } [Theory] - [InlineData("P=V", "P", "V")] - [InlineData("P==", "P", "=")] - [InlineData("P=A=B", "P", "A=B")] - [InlineData(" P\t = V ", "P", " V ")] - [InlineData("P=", "P", "")] + [InlineData("-p:P=V", "P", "V")] + [InlineData("-p:P==", "P", "=")] + [InlineData("-p:P=A=B", "P", "A=B")] + [InlineData("-p: P\t = V ", "P", " V ")] + [InlineData("-p:P=", "P", "")] public void BuildProperties_Valid(string argValue, string name, string value) { - var options = VerifyOptions(["--property", argValue]); - Assert.Equal([(name, value)], options.BuildProperties); + var properties = CommandLineOptions.ParseBuildProperties([argValue]); + AssertEx.SequenceEqual([(name, value)], properties); } [Theory] @@ -68,10 +68,10 @@ public void BuildProperties_Valid(string argValue, string name, string value) [InlineData("=P3")] [InlineData("=")] [InlineData("==")] - public void BuildProperties_Invalid(string value) + public void BuildProperties_Invalid(string argValue) { - var options = VerifyOptions(["--property", value]); - Assert.Empty(options.BuildProperties); + var properties = CommandLineOptions.ParseBuildProperties([argValue]); + AssertEx.SequenceEqual([], properties); } [Fact] @@ -290,9 +290,9 @@ public void OptionsSpecifiedBeforeOrAfterRun(bool afterRun) Assert.Equal("P", options.ProjectPath); Assert.Equal("F", options.TargetFramework); - Assert.Equal([("P1", "V1"), ("P2", "V2")], options.BuildProperties); + Assert.Equal(["-property:TargetFramework=F", "--property:P1=V1", "--property:P2=V2"], options.BuildArguments); - Assert.Equal(["--project", "P", "--framework", "F", "--property", "P1=V1", "--property", "P2=V2"], options.CommandArguments); + Assert.Equal(["--project", "P", "--framework", "F", "--property:P1=V1", "--property:P2=V2"], options.CommandArguments); } public enum ArgPosition @@ -341,10 +341,10 @@ public void OptionDuplicates_Allowed_Bool( public void MultiplePropertyValues() { var options = VerifyOptions(["--property", "P1=V1", "run", "--property", "P2=V2"]); - AssertEx.SequenceEqual(["P1=V1", "P2=V2"], options.BuildProperties.Select(p => $"{p.name}={p.value}")); + AssertEx.SequenceEqual(["--property:P1=V1", "--property:P2=V2"], options.BuildArguments); // options must be repeated since --property does not support multiple args - AssertEx.SequenceEqual(["--property", "P1=V1", "--property", "P2=V2"], options.CommandArguments); + AssertEx.SequenceEqual(["--property:P1=V1", "--property:P2=V2"], options.CommandArguments); } [Theory] @@ -408,5 +408,39 @@ public void ShortFormForLaunchProfileArgumentWorks() var options = VerifyOptions(["-lp", "CustomLaunchProfile"]); Assert.Equal("CustomLaunchProfile", options.LaunchProfileName); } + + /// + /// Validates that options that the "run" command forwards to "build" command are forwarded by dotnet-watch. + /// + [Theory] + [InlineData(new[] { "--configuration", "release" }, new[] { "-property:Configuration=release" })] + [InlineData(new[] { "--framework", "net9.0" }, new[] { "-property:TargetFramework=net9.0" })] + [InlineData(new[] { "--runtime", "arm64" }, new[] { "-property:RuntimeIdentifier=arm64","-property:_CommandLineDefinedRuntimeIdentifier=true" })] + [InlineData(new[] { "--property", "b=1" }, new[] { "--property:b=1" })] + [InlineData(new[] { "--interactive" }, new[] { "-property:NuGetInteractive=true" })] + [InlineData(new[] { "--no-restore" }, new[] { "-restore:false" })] + [InlineData(new[] { "--sc" }, new[] { "-property:SelfContained=True", "-property:_CommandLineDefinedSelfContained=true"})] + [InlineData(new[] { "--self-contained" }, new[] { "-property:SelfContained=True", "-property:_CommandLineDefinedSelfContained=true" })] + [InlineData(new[] { "--no-self-contained" }, new[] { "-property:SelfContained=False","-property:_CommandLineDefinedSelfContained=true"})] + [InlineData(new[] { "--verbosity", "q" }, new[] { "-verbosity:q" })] + [InlineData(new[] { "--arch", "arm", "--os", "win" }, new[] { "-property:RuntimeIdentifier=win-arm" })] + [InlineData(new[] { "--disable-build-servers" }, new[] { "--property:UseRazorBuildServer=false", "--property:UseSharedCompilation=false", "/nodeReuse:false" })] + public void ForwardedBuildOptions(string[] args, string[] buildArgs) + { + var options = VerifyOptions(["run", .. args]); + AssertEx.SequenceEqual(buildArgs, options.BuildArguments); + } + + [Fact] + public void ForwardedBuildOptions_ArtifactsPath() + { + var path = TestContext.Current.TestAssetsDirectory; + + var args = new[] { "--artifacts-path", path }; + var buildArgs = new[] { @"-property:ArtifactsPath=" + path }; + + var options = VerifyOptions(["run", .. args]); + AssertEx.SequenceEqual(buildArgs, options.BuildArguments); + } } } diff --git a/test/dotnet-watch.Tests/ConsoleReporterTests.cs b/test/dotnet-watch.Tests/ConsoleReporterTests.cs index b7c4065cc4e6..32149ad17ef6 100644 --- a/test/dotnet-watch.Tests/ConsoleReporterTests.cs +++ b/test/dotnet-watch.Tests/ConsoleReporterTests.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.Extensions.Tools.Internal +namespace Microsoft.DotNet.Watch.UnitTests { public class ReporterTests { @@ -67,12 +67,9 @@ private class TestConsole : IConsole { private readonly StringBuilder _out; private readonly StringBuilder _error; - - event Action IConsole.KeyPressed - { - add { } - remove { } - } + public TextWriter Out { get; } + public TextWriter Error { get; } + public ConsoleColor ForegroundColor { get; set; } public TestConsole() { @@ -82,14 +79,17 @@ public TestConsole() Error = new StringWriter(_error); } - event ConsoleCancelEventHandler IConsole.CancelKeyPress + event Action IConsole.KeyPressed { add { } remove { } } - public string GetOutput() => _out.ToString(); - public string GetError() => _error.ToString(); + public string GetOutput() + => _out.ToString(); + + public string GetError() + => _error.ToString(); public void Clear() { @@ -99,16 +99,8 @@ public void Clear() public void ResetColor() { - ForegroundColor = default(ConsoleColor); + ForegroundColor = default; } - - public TextWriter Out { get; } - public TextWriter Error { get; } - public TextReader In { get; } - public bool IsInputRedirected { get; } - public bool IsOutputRedirected { get; } - public bool IsErrorRedirected { get; } - public ConsoleColor ForegroundColor { get; set; } } } } diff --git a/test/dotnet-watch.Tests/FileSetSerializerTests.cs b/test/dotnet-watch.Tests/FileSetSerializerTests.cs index 7b03d81ac55f..94c6b8577086 100644 --- a/test/dotnet-watch.Tests/FileSetSerializerTests.cs +++ b/test/dotnet-watch.Tests/FileSetSerializerTests.cs @@ -1,14 +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.Runtime.CompilerServices; using System.Runtime.Serialization.Json; using System.Text.Json; using DotNetWatchTasks; -using Microsoft.DotNet.Watcher.Internal; using Microsoft.NET.Build.Tasks.UnitTests; -namespace Microsoft.DotNet.Watcher.Tools; +namespace Microsoft.DotNet.Watch.UnitTests; public class FileSetSerializerTests(ITestOutputHelper output) { diff --git a/test/dotnet-watch.Tests/FileWatcherTests.cs b/test/dotnet-watch.Tests/FileWatcherTests.cs index eeadd08ceefd..ab12f6c40f45 100644 --- a/test/dotnet-watch.Tests/FileWatcherTests.cs +++ b/test/dotnet-watch.Tests/FileWatcherTests.cs @@ -1,10 +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.AspNetCore.Testing; -using Microsoft.DotNet.Watcher.Internal; - -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch.UnitTests { public class FileWatcherTests(ITestOutputHelper output) { @@ -19,7 +16,7 @@ private async Task TestOperation( Action operation) { using var watcher = FileWatcherFactory.CreateWatcher(dir, usePolling); - if (watcher is DotnetFileWatcher dotnetWatcher) + if (watcher is EventBasedDirectoryWatcher dotnetWatcher) { dotnetWatcher.Logger = m => output.WriteLine(m); } @@ -291,7 +288,7 @@ public async Task MultipleTriggers(bool usePolling) watcher.EnableRaisingEvents = false; } - private async Task AssertFileChangeRaisesEvent(string directory, IFileSystemWatcher watcher) + private async Task AssertFileChangeRaisesEvent(string directory, IDirectoryWatcher watcher) { var changedEv = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var expectedPath = Path.Combine(directory, Path.GetRandomFileName()); diff --git a/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs b/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs index b01fc4073e17..b67c51241295 100644 --- a/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs +++ b/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs @@ -1,11 +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 System.Text.RegularExpressions; -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Tests +namespace Microsoft.DotNet.Watch.UnitTests { public class ApplyDeltaTests(ITestOutputHelper logger) : DotNetWatchTestBase(logger) { @@ -69,6 +65,129 @@ public static void Print() await App.AssertOutputLineStartsWith("Changed!"); } + /// + /// Unchanged project doesn't build. Wait for source change and rebuild. + /// + [Fact] + public async Task BaselineCompilationError() + { + var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp") + .WithSource(); + + var programPath = Path.Combine(testAsset.Path, "Program.cs"); + File.WriteAllText(programPath, + """ + Console.Write + """); + + App.Start(testAsset, []); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForFileChangeBeforeRestarting, failure: _ => false); + + UpdateSourceFile(programPath, """ + System.Console.WriteLine(""); + """); + + await App.AssertOutputLineStartsWith(""); + } + + /// + /// We currently do not support applying project changes. + /// The workaround is to restart via Ctrl+R. + /// + [Fact] + public async Task ProjectChangeAndRestart() + { + var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp") + .WithSource(); + + var programPath = Path.Combine(testAsset.Path, "Program.cs"); + var projectPath = Path.Combine(testAsset.Path, "WatchNoDepsApp.csproj"); + + App.Start(testAsset, ["--no-exit"], testFlags: TestFlags.ReadKeyFromStdin); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForChanges); + + // missing System.Linq import: + UpdateSourceFile(programPath, content => content.Replace(""" + Console.WriteLine("Started"); + """, + """ + Console.WriteLine($">>> {typeof(Enumerable)}"); + """)); + + await App.AssertOutputLineStartsWith("dotnet watch ⌚ Unable to apply hot reload due to compilation errors.", failure: _ => false); + + UpdateSourceFile(projectPath, content => content.Replace(""" + + """, + """ + + """)); + + // project change not applied: + await App.AssertOutputLineStartsWith("dotnet watch ⌚ Unable to apply hot reload due to compilation errors.", failure: _ => false); + + // Ctlr+R rebuilds and restarts: + App.SendControlR(); + + await App.AssertOutputLineStartsWith(">>> System.Linq.Enumerable", failure: _ => false); + } + + [Fact] + public async Task ChangeFileInFSharpProject() + { + var testAsset = TestAssets.CopyTestAsset("FSharpTestAppSimple") + .WithSource(); + + App.Start(testAsset, []); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForFileChangeBeforeRestarting); + + UpdateSourceFile(Path.Combine(testAsset.Path, "Program.fs"), content => content.Replace("Hello World!", "")); + + await App.AssertOutputLineStartsWith(""); + } + + [Fact] + public async Task ChangeFileInFSharpProjectWithLoop() + { + var testAsset = TestAssets.CopyTestAsset("FSharpTestAppSimple") + .WithSource(); + + var source = """ + module ConsoleApplication.Program + + open System + open System.Threading + + [] + let main argv = + while true do + printfn "Waiting" + Thread.Sleep(200) + 0 + """; + + var sourcePath = Path.Combine(testAsset.Path, "Program.fs"); + + File.WriteAllText(sourcePath, source); + + App.Start(testAsset, []); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForChanges); + + UpdateSourceFile(sourcePath, content => content.Replace("Waiting", "")); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForChanges, failure: _ => false); + await App.AssertOutputLineStartsWith(""); + + UpdateSourceFile(sourcePath, content => content.Replace("", "")); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForChanges, failure: _ => false); + await App.AssertOutputLineStartsWith(""); + } + // Test is timing out on .NET Framework: https://github.com/dotnet/sdk/issues/41669 [CoreMSBuildOnlyFact] public async Task HandleTypeLoadFailure() @@ -180,23 +299,50 @@ class AppUpdateHandler else { // shouldn't see any agent messages: - AssertEx.DoesNotContain("🕵️", App.Process.Output); + App.AssertOutputDoesNotContain("🕵️"); } } - [Fact(Skip = "https://github.com/dotnet/sdk/issues/42920")] - public async Task BlazorWasm() + [Theory(Skip = "https://github.com/dotnet/sdk/issues/45299")] + [CombinatorialData] + public async Task BlazorWasm(bool projectSpecifiesCapabilities) { - var testAsset = TestAssets.CopyTestAsset("WatchBlazorWasm") + var testAsset = TestAssets.CopyTestAsset("WatchBlazorWasm", identifier: projectSpecifiesCapabilities.ToString()) .WithSource(); - App.Start(testAsset, [], testFlags: TestFlags.MockBrowser); + if (projectSpecifiesCapabilities) + { + testAsset = testAsset.WithProjectChanges(proj => + { + proj.Root.Descendants() + .First(e => e.Name.LocalName == "PropertyGroup") + .Add(XElement.Parse(""" + Baseline;AddMethodToExistingType + """)); + }); + } + + var port = TestOptions.GetTestPort(); + App.Start(testAsset, ["--urls", "http://localhost:" + port], testFlags: TestFlags.MockBrowser); await App.AssertWaitingForChanges(); App.AssertOutputContains(MessageDescriptor.ConfiguredToUseBrowserRefresh); App.AssertOutputContains(MessageDescriptor.ConfiguredToLaunchBrowser); - App.AssertOutputContains("dotnet watch ⌚ Launching browser: http://localhost:5000/"); + + // Browser is launched based on blazor-devserver output "Now listening on: ...". + await App.WaitUntilOutputContains($"dotnet watch ⌚ Launching browser: http://localhost:{port}/"); + + // Middleware should have been loaded to blazor-devserver before the browser is launched: + App.AssertOutputContains("dbug: Microsoft.AspNetCore.Watch.BrowserRefresh.BlazorWasmHotReloadMiddleware[0]"); + App.AssertOutputContains("dbug: Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserScriptMiddleware[0]"); + App.AssertOutputContains("Middleware loaded. Script /_framework/aspnetcore-browser-refresh.js"); + App.AssertOutputContains("Middleware loaded. Script /_framework/blazor-hotreload.js"); + App.AssertOutputContains("dbug: Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware"); + App.AssertOutputContains("Middleware loaded: DOTNET_MODIFIABLE_ASSEMBLIES=debug, __ASPNETCORE_BROWSER_TOOLS=true"); + + // shouldn't see any agent messages (agent is not loaded into blazor-devserver): + AssertEx.DoesNotContain("🕵️", App.Process.Output); var newSource = """ @page "/" @@ -205,6 +351,16 @@ public async Task BlazorWasm() UpdateSourceFile(Path.Combine(testAsset.Path, "Pages", "Index.razor"), newSource); await App.AssertOutputLineStartsWith(MessageDescriptor.HotReloadSucceeded, "blazorwasm (net9.0)"); + + // check project specified capapabilities: + if (projectSpecifiesCapabilities) + { + App.AssertOutputContains("dotnet watch 🔥 Hot reload capabilities: Baseline AddMethodToExistingType."); + } + else + { + App.AssertOutputContains("dotnet watch 🔥 Hot reload capabilities: Baseline AddMethodToExistingType AddStaticFieldToExistingType NewTypeDefinition ChangeCustomAttributes AddInstanceFieldToExistingType GenericAddMethodToExistingType GenericUpdateMethod UpdateParameters GenericAddFieldToExistingType."); + } } [Fact] @@ -222,12 +378,59 @@ public async Task BlazorWasm_MSBuildWarning() """)); }); - App.Start(testAsset, [], testFlags: TestFlags.MockBrowser); + var port = TestOptions.GetTestPort(); + App.Start(testAsset, ["--urls", "http://localhost:" + port], testFlags: TestFlags.MockBrowser); await App.AssertOutputLineStartsWith("dotnet watch ⚠ msbuild: [Warning] Duplicate source file"); await App.AssertWaitingForChanges(); } + [Fact(Skip = "https://github.com/dotnet/sdk/issues/45299")] + public async Task Razor_Component_ScopedCssAndStaticAssets() + { + var testAsset = TestAssets.CopyTestAsset("WatchRazorWithDeps") + .WithSource(); + + var port = TestOptions.GetTestPort(); + App.Start(testAsset, ["--urls", "http://localhost:" + port], relativeProjectDirectory: "RazorApp", testFlags: TestFlags.MockBrowser); + + await App.AssertWaitingForChanges(); + + App.AssertOutputContains(MessageDescriptor.ConfiguredToUseBrowserRefresh); + App.AssertOutputContains(MessageDescriptor.ConfiguredToLaunchBrowser); + App.AssertOutputContains($"dotnet watch ⌚ Launching browser: http://localhost:{port}/"); + App.Process.ClearOutput(); + + var scopedCssPath = Path.Combine(testAsset.Path, "RazorClassLibrary", "Components", "Example.razor.css"); + + var newCss = """ + .example { + color: blue; + } + """; + + UpdateSourceFile(scopedCssPath, newCss); + await App.AssertOutputLineStartsWith("dotnet watch 🔥 Hot reload change handled"); + + App.AssertOutputContains($"dotnet watch ⌚ Handling file change event for scoped css file {scopedCssPath}."); + App.AssertOutputContains($"dotnet watch ⌚ [RazorClassLibrary (net9.0)] No refresh server."); + App.AssertOutputContains($"dotnet watch ⌚ [RazorApp (net9.0)] Refreshing browser."); + App.AssertOutputContains($"dotnet watch 🔥 Hot reload of scoped css succeeded."); + App.AssertOutputContains($"dotnet watch ⌚ No C# changes to apply."); + App.Process.ClearOutput(); + + var cssPath = Path.Combine(testAsset.Path, "RazorApp", "wwwroot", "app.css"); + UpdateSourceFile(cssPath, content => content.Replace("background-color: white;", "background-color: red;")); + + await App.AssertOutputLineStartsWith("dotnet watch 🔥 Hot reload change handled"); + + App.AssertOutputContains($"dotnet watch ⌚ Sending static file update request for asset 'app.css'."); + App.AssertOutputContains($"dotnet watch ⌚ [RazorApp (net9.0)] Refreshing browser."); + App.AssertOutputContains($"dotnet watch 🔥 Hot Reload of static files succeeded."); + App.AssertOutputContains($"dotnet watch ⌚ No C# changes to apply."); + App.Process.ClearOutput(); + } + // Test is timing out on .NET Framework: https://github.com/dotnet/sdk/issues/41669 [CoreMSBuildOnlyFact] public async Task HandleMissingAssemblyFailure() @@ -378,16 +581,11 @@ public async Task Aspire() var testAsset = TestAssets.CopyTestAsset("WatchAspire") .WithSource(); - var workloadInstallCommandSpec = new DotnetCommand(Logger, ["workload", "install", "aspire", "--include-previews"]) - { - WorkingDirectory = testAsset.Path, - }; - - var result = workloadInstallCommandSpec.Execute(); - Assert.Equal(0, result.ExitCode); - var serviceSourcePath = Path.Combine(testAsset.Path, "WatchAspire.ApiService", "Program.cs"); - App.Start(testAsset, ["-lp", "http"], relativeProjectDirectory: "WatchAspire.AppHost"); + var serviceProjectPath = Path.Combine(testAsset.Path, "WatchAspire.ApiService", "WatchAspire.ApiService.csproj"); + var originalSource = File.ReadAllText(serviceSourcePath, Encoding.UTF8); + + App.Start(testAsset, ["-lp", "http"], relativeProjectDirectory: "WatchAspire.AppHost", testFlags: TestFlags.ReadKeyFromStdin); await App.AssertWaitingForChanges(); @@ -397,9 +595,10 @@ public async Task Aspire() // wait until after DCP session started: await App.WaitUntilOutputContains("dotnet watch ⭐ Session started: #1"); - var newSource = File.ReadAllText(serviceSourcePath, Encoding.UTF8); - newSource = newSource.Replace("Enumerable.Range(1, 5)", "Enumerable.Range(1, 10)"); - UpdateSourceFile(serviceSourcePath, newSource); + // valid code change: + UpdateSourceFile( + serviceSourcePath, + originalSource.Replace("Enumerable.Range(1, 5)", "Enumerable.Range(1, 10)")); await App.AssertOutputLineStartsWith("dotnet watch 🔥 Hot reload change handled"); @@ -409,6 +608,74 @@ public async Task Aspire() // Only one browser should be launched (dashboard). The child process shouldn't launch a browser. Assert.Equal(1, App.Process.Output.Count(line => line.StartsWith("dotnet watch ⌚ Launching browser: "))); + App.Process.ClearOutput(); + + // rude edit with build error: + UpdateSourceFile( + serviceSourcePath, + originalSource.Replace("record WeatherForecast", "record WeatherForecast2")); + + await App.AssertOutputLineStartsWith(" ❔ Do you want to restart these projects? Yes (y) / No (n) / Always (a) / Never (v)"); + + App.AssertOutputContains("dotnet watch ⌚ Unable to apply hot reload, restart is needed to apply the changes."); + App.AssertOutputContains("error ENC0020: Renaming record 'WeatherForecast' requires restarting the application."); + App.AssertOutputContains("dotnet watch ⌚ Affected projects:"); + App.AssertOutputContains("dotnet watch ⌚ WatchAspire.ApiService"); + App.Process.ClearOutput(); + + App.SendKey('y'); + + await App.AssertOutputLineStartsWith(MessageDescriptor.FixBuildError, failure: _ => false); + + // We don't have means to gracefully terminate process on Windows, see https://github.com/dotnet/runtime/issues/109432 + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + App.AssertOutputContains("dotnet watch ❌ [WatchAspire.ApiService (net9.0)] Exited with error code -1"); + } + else + { + // Unix process may return exit code = 128 + SIGTERM + // dotnet watch ❌ [WatchAspire.ApiService (net9.0)] Exited with error code 143 + App.AssertOutputContains("[WatchAspire.ApiService (net9.0)] Exited"); + } + + App.AssertOutputContains($"dotnet watch ⌚ Building '{serviceProjectPath}' ..."); + App.AssertOutputContains("error CS0246: The type or namespace name 'WeatherForecast' could not be found"); + App.Process.ClearOutput(); + + // fix build error: + UpdateSourceFile( + serviceSourcePath, + originalSource.Replace("WeatherForecast", "WeatherForecast2")); + + await App.AssertOutputLineStartsWith("dotnet watch ⌚ [WatchAspire.ApiService (net9.0)] Capabilities"); + + App.AssertOutputContains("dotnet watch ⌚ Build succeeded."); + App.AssertOutputContains("dotnet watch 🔥 Project baselines updated."); + App.AssertOutputContains($"dotnet watch ⭐ Starting project: {serviceProjectPath}"); + + App.SendControlC(); + + await App.AssertOutputLineStartsWith("dotnet watch 🛑 Shutdown requested. Press Ctrl+C again to force exit."); + + // We don't have means to gracefully terminate process on Windows, see https://github.com/dotnet/runtime/issues/109432 + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + await App.AssertOutputLineStartsWith("dotnet watch ❌ [WatchAspire.ApiService (net9.0)] Exited with error code -1"); + await App.AssertOutputLineStartsWith("dotnet watch ❌ [WatchAspire.AppHost (net9.0)] Exited with error code -1"); + } + else + { + // Unix process may return exit code = 128 + SIGTERM + // dotnet watch ❌ [WatchAspire.ApiService (net9.0)] Exited with error code 143 + await App.AssertOutputLine(line => line.Contains("[WatchAspire.ApiService (net9.0)] Exited"), failure: _ => false); + await App.AssertOutputLine(line => line.Contains("[WatchAspire.AppHost (net9.0)] Exited"), failure: _ => false); + } + + await App.AssertOutputLineStartsWith("dotnet watch ⭐ Waiting for server to shutdown ..."); + + App.AssertOutputContains("dotnet watch ⭐ Stop session #1"); + App.AssertOutputContains("dotnet watch ⭐ [#1] Sending 'sessionTerminated'"); } } } diff --git a/test/dotnet-watch.Tests/HotReload/CompilationHandlerTests.cs b/test/dotnet-watch.Tests/HotReload/CompilationHandlerTests.cs index 7c6bf4f191bd..5720c24cc6cd 100644 --- a/test/dotnet-watch.Tests/HotReload/CompilationHandlerTests.cs +++ b/test/dotnet-watch.Tests/HotReload/CompilationHandlerTests.cs @@ -3,10 +3,7 @@ #nullable enable -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Tests; +namespace Microsoft.DotNet.Watch.UnitTests; public class CompilationHandlerTests(ITestOutputHelper logger) : DotNetWatchTestBase(logger) { @@ -25,8 +22,7 @@ public async Task ReferenceOutputAssembly_False() var factory = new MSBuildFileSetFactory( rootProjectFile: options.ProjectPath, - targetFramework: null, - buildProperties: [], + buildArguments: [], environmentOptions: new EnvironmentOptions(Environment.CurrentDirectory, "dotnet"), reporter); diff --git a/test/dotnet-watch.Tests/HotReload/RuntimeProcessLauncherTests.cs b/test/dotnet-watch.Tests/HotReload/RuntimeProcessLauncherTests.cs index 25f4b52c0e71..851c702b214d 100644 --- a/test/dotnet-watch.Tests/HotReload/RuntimeProcessLauncherTests.cs +++ b/test/dotnet-watch.Tests/HotReload/RuntimeProcessLauncherTests.cs @@ -3,10 +3,7 @@ #nullable enable -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Tests; +namespace Microsoft.DotNet.Watch.UnitTests; public class RuntimeProcessLauncherTests(ITestOutputHelper logger) : DotNetWatchTestBase(logger) { @@ -17,6 +14,9 @@ public enum TriggerEvent WaitingForChanges, } + private TestAsset CopyTestAsset(string assetName, params object[] testParameters) + => TestAssets.CopyTestAsset("WatchAppMultiProc", identifier: string.Join(";", testParameters)).WithSource(); + private static async Task Launch(string projectPath, TestRuntimeProcessLauncher service, string workingDirectory, CancellationToken cancellationToken) { var projectOptions = new ProjectOptions() @@ -24,7 +24,7 @@ private static async Task Launch(string projectPath, TestRuntime IsRootProject = false, ProjectPath = projectPath, WorkingDirectory = workingDirectory, - BuildProperties = [], + BuildArguments = [], Command = "run", CommandArguments = ["--project", projectPath], LaunchEnvironmentVariables = [], @@ -34,14 +34,13 @@ private static async Task Launch(string projectPath, TestRuntime }; RestartOperation? startOp = null; - startOp = new RestartOperation(async (build, cancellationToken) => + startOp = new RestartOperation(async cancellationToken => { var result = await service.ProjectLauncher.TryLaunchProcessAsync( projectOptions, new CancellationTokenSource(), onOutput: null, restartOperation: startOp!, - build, cancellationToken); Assert.NotNull(result); @@ -51,15 +50,14 @@ private static async Task Launch(string projectPath, TestRuntime return result; }); - return await startOp(build: false, cancellationToken); + return await startOp(cancellationToken); } [Theory(Skip="https://github.com/dotnet/sdk/issues/42850")] [CombinatorialData] public async Task UpdateAndRudeEdit(TriggerEvent trigger) { - var testAsset = TestAssets.CopyTestAsset("WatchAppMultiProc", identifier: trigger.ToString()) - .WithSource(); + var testAsset = CopyTestAsset("WatchAppMultiProc", trigger); var workingDirectory = testAsset.Path; var hostDir = Path.Combine(testAsset.Path, "Host"); @@ -80,7 +78,7 @@ public async Task UpdateAndRudeEdit(TriggerEvent trigger) var program = Program.TryCreate( TestOptions.GetCommandLineOptions(["--verbose", "--non-interactive", "--project", hostProject]), console, - TestOptions.GetEnvironmentOptions(workingDirectory, TestContext.Current.ToolsetUnderTest?.DotNetHostPath), + TestOptions.GetEnvironmentOptions(workingDirectory, TestContext.Current.ToolsetUnderTest.DotNetHostPath, testAsset), reporter, out var errorCode); @@ -132,25 +130,35 @@ public async Task UpdateAndRudeEdit(TriggerEvent trigger) var changeHandled = reporter.RegisterSemaphore(MessageDescriptor.HotReloadChangeHandled); var sessionStarted = reporter.RegisterSemaphore(MessageDescriptor.HotReloadSessionStarted); - + var projectBaselinesUpdated = reporter.RegisterSemaphore(MessageDescriptor.ProjectBaselinesUpdated); + await launchCompletionA.Task; await launchCompletionB.Task; // let the host process start: + Log("Waiting for changes..."); await waitingForChanges.WaitAsync(); + + Log("Waiting for session started..."); await sessionStarted.WaitAsync(); await MakeRudeEditChange(); + + Log("Waiting for changed handled ..."); await changeHandled.WaitAsync(); - // Wait for a new session to start, so that we capture the new solution snapshot + // Wait for project baselines to be updated, so that we capture the new solution snapshot // and further changes are treated as another update. - await sessionStarted.WaitAsync(); + Log("Waiting for baselines updated..."); + await projectBaselinesUpdated.WaitAsync(); await MakeValidDependencyChange(); + + Log("Waiting for changed handled ..."); await changeHandled.WaitAsync(); // clean up: + Log("Shutting down"); watchCancellationSource.Cancel(); try { @@ -160,7 +168,7 @@ public async Task UpdateAndRudeEdit(TriggerEvent trigger) { } - Assert.Equal(4, launchedProcessCount); + Assert.Equal(6, launchedProcessCount); // Hot Reload shared dependency - should update both service projects async Task MakeValidDependencyChange() @@ -207,7 +215,10 @@ public static void Common() } """); + Log("Waiting for updated output from project A ..."); await hasUpdateSourceA.Task; + + Log("Waiting for updated output from project B ..."); await hasUpdateSourceB.Task; Assert.True(hasUpdateSourceA.Task.IsCompletedSuccessfully); @@ -233,11 +244,12 @@ async Task MakeRudeEditChange() [assembly: System.Reflection.AssemblyMetadata("TestAssemblyMetadata", "2")] """); + Log("Waiting for updated output from project A ..."); await hasUpdateSource.Task; Assert.True(hasUpdateSource.Task.IsCompletedSuccessfully); - Assert.Equal(4, launchedProcessCount); + Assert.Equal(6, launchedProcessCount); } } @@ -245,8 +257,7 @@ async Task MakeRudeEditChange() [CombinatorialData] public async Task UpdateAppliedToNewProcesses(bool sharedOutput) { - var testAsset = TestAssets.CopyTestAsset("WatchAppMultiProc", identifier: sharedOutput.ToString()) - .WithSource(); + var testAsset = CopyTestAsset("WatchAppMultiProc", sharedOutput); if (sharedOutput) { @@ -270,7 +281,7 @@ public async Task UpdateAppliedToNewProcesses(bool sharedOutput) var program = Program.TryCreate( TestOptions.GetCommandLineOptions(["--verbose", "--non-interactive", "--project", hostProject]), console, - TestOptions.GetEnvironmentOptions(workingDirectory, TestContext.Current.ToolsetUnderTest?.DotNetHostPath), + TestOptions.GetEnvironmentOptions(workingDirectory, TestContext.Current.ToolsetUnderTest.DotNetHostPath, testAsset), reporter, out var errorCode); @@ -313,9 +324,8 @@ public async Task UpdateAppliedToNewProcesses(bool sharedOutput) } }; - await Task.Delay(TimeSpan.FromSeconds(1)); - // let the host process start: + Log("Waiting for changes..."); await waitingForChanges.WaitAsync(); // service should have been created before Hot Reload session started: @@ -336,19 +346,27 @@ public static void Common() } """); + Log("Waiting for updated output from A ..."); await hasUpdateA.WaitAsync(); // Host and ServiceA received updates: + Log("Waiting for updates applied 1/2 ..."); await updatesApplied.WaitAsync(); + + Log("Waiting for updates applied 2/2 ..."); await updatesApplied.WaitAsync(); await Launch(serviceProjectB, service, workingDirectory, watchCancellationSource.Token); // ServiceB received updates: + Log("Waiting for updates applied ..."); await updatesApplied.WaitAsync(); + + Log("Waiting for updated output from B ..."); await hasUpdateB.WaitAsync(); // clean up: + Log("Shutting down"); watchCancellationSource.Cancel(); try { @@ -370,8 +388,7 @@ public enum UpdateLocation [CombinatorialData] public async Task HostRestart(UpdateLocation updateLocation) { - var testAsset = TestAssets.CopyTestAsset("WatchAppMultiProc", identifier: updateLocation.ToString()) - .WithSource(); + var testAsset = CopyTestAsset("WatchAppMultiProc", updateLocation); var workingDirectory = testAsset.Path; var hostDir = Path.Combine(testAsset.Path, "Host"); @@ -386,7 +403,7 @@ public async Task HostRestart(UpdateLocation updateLocation) var program = Program.TryCreate( TestOptions.GetCommandLineOptions(["--verbose", "--project", hostProject]), console, - TestOptions.GetEnvironmentOptions(workingDirectory, TestContext.Current.ToolsetUnderTest?.DotNetHostPath), + TestOptions.GetEnvironmentOptions(workingDirectory, TestContext.Current.ToolsetUnderTest.DotNetHostPath, testAsset), reporter, out var errorCode); @@ -428,6 +445,7 @@ public async Task HostRestart(UpdateLocation updateLocation) await Task.Delay(TimeSpan.FromSeconds(1)); // let the host process start: + Log("Waiting for changes..."); await waitingForChanges.WaitAsync(); switch (updateLocation) @@ -446,6 +464,7 @@ public static void Print() """); // Host received Hot Reload updates: + Log("Waiting for change handled ..."); await changeHandled.WaitAsync(); break; @@ -454,6 +473,7 @@ public static void Print() UpdateSourceFile(hostProgram, content => content.Replace("Waiting", "")); // Host received Hot Reload updates: + Log("Waiting for change handled ..."); await changeHandled.WaitAsync(); break; @@ -462,14 +482,17 @@ public static void Print() UpdateSourceFile(hostProgram, content => content.Replace("Started", "")); // ⚠ ENC0118: Changing 'top-level code' might not have any effect until the application is restarted. Press "Ctrl + R" to restart. + Log("Waiting for restart needed ..."); await restartNeeded.WaitAsync(); console.PressKey(new ConsoleKeyInfo('R', ConsoleKey.R, shift: false, alt: false, control: true)); + Log("Waiting for restart requested ..."); await restartRequested.WaitAsync(); break; } + Log("Waiting updated output from Host ..."); await hasUpdate.WaitAsync(); // clean up: @@ -486,8 +509,7 @@ public static void Print() [Fact] public async Task RudeEditInProjectWithoutRunningProcess() { - var testAsset = TestAssets.CopyTestAsset("WatchAppMultiProc") - .WithSource(); + var testAsset = CopyTestAsset("WatchAppMultiProc"); var workingDirectory = testAsset.Path; var hostDir = Path.Combine(testAsset.Path, "Host"); @@ -502,7 +524,7 @@ public async Task RudeEditInProjectWithoutRunningProcess() var program = Program.TryCreate( TestOptions.GetCommandLineOptions(["--verbose", "--non-interactive", "--project", hostProject]), console, - TestOptions.GetEnvironmentOptions(workingDirectory, TestContext.Current.ToolsetUnderTest.DotNetHostPath), + TestOptions.GetEnvironmentOptions(workingDirectory, TestContext.Current.ToolsetUnderTest.DotNetHostPath, testAsset), reporter, out var errorCode); @@ -526,12 +548,14 @@ public async Task RudeEditInProjectWithoutRunningProcess() var sessionStarted = reporter.RegisterSemaphore(MessageDescriptor.HotReloadSessionStarted); // let the host process start: + Log("Waiting for changes..."); await waitingForChanges.WaitAsync(); // service should have been created before Hot Reload session started: Assert.NotNull(service); var runningProject = await Launch(serviceProjectA, service, workingDirectory, watchCancellationSource.Token); + Log("Waiting for session started ..."); await sessionStarted.WaitAsync(); // Terminate the process: @@ -542,6 +566,7 @@ public async Task RudeEditInProjectWithoutRunningProcess() [assembly: System.Reflection.AssemblyMetadata("TestAssemblyMetadata", "2")] """); + Log("Waiting for change handled ..."); await changeHandled.WaitAsync(); reporter.ProcessOutput.Contains("verbose ⌚ Rude edits detected but do not affect any running process"); diff --git a/test/dotnet-watch.Tests/HotReload/UpdatePayloadTests.cs b/test/dotnet-watch.Tests/HotReload/UpdatePayloadTests.cs index fa4f9060173d..78c5fc317867 100644 --- a/test/dotnet-watch.Tests/HotReload/UpdatePayloadTests.cs +++ b/test/dotnet-watch.Tests/HotReload/UpdatePayloadTests.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Extensions.HotReload; +using Microsoft.DotNet.HotReload; -namespace Microsoft.DotNet.Watcher.Tests +namespace Microsoft.DotNet.Watch.UnitTests { public class UpdatePayloadTests { @@ -11,19 +11,20 @@ public class UpdatePayloadTests public async Task UpdatePayload_CanRoundTrip() { var initial = new UpdatePayload( - new[] - { + [ new UpdateDelta( moduleId: Guid.NewGuid(), - ilDelta: new byte[] { 0, 0, 1 }, - metadataDelta: new byte[] { 0, 1, 1 }, - updatedTypes: Array.Empty()), + ilDelta: [0, 0, 1], + metadataDelta: [0, 1, 1], + pdbDelta: [2, 3], + updatedTypes: [5, 4]), new UpdateDelta( moduleId: Guid.NewGuid(), - ilDelta: new byte[] { 1, 0, 0 }, - metadataDelta: new byte[] { 1, 0, 1 }, - updatedTypes: Array.Empty()) - }, + ilDelta: [1, 0, 0], + metadataDelta: [1, 0, 1], + pdbDelta: [7, 8], + updatedTypes: [9]) + ], responseLoggingLevel: ResponseLoggingLevel.Verbose); using var stream = new MemoryStream(); @@ -39,19 +40,20 @@ public async Task UpdatePayload_CanRoundTrip() public async Task UpdatePayload_CanRoundTripUpdatedTypes() { var initial = new UpdatePayload( - new[] - { + [ new UpdateDelta( moduleId: Guid.NewGuid(), - ilDelta: new byte[] { 0, 0, 1 }, - metadataDelta: new byte[] { 0, 1, 1 }, - updatedTypes: new int[] { 60, 74, 22323 }), + ilDelta: [0, 0, 1], + metadataDelta: [0, 1, 1], + pdbDelta: [], + updatedTypes: [60, 74, 22323]), new UpdateDelta( moduleId: Guid.NewGuid(), - ilDelta: new byte[] { 1, 0, 0 }, - metadataDelta: new byte[] { 1, 0, 1 }, - updatedTypes: new int[] { -18 }) - }, + ilDelta: [1, 0, 0], + metadataDelta: [1, 0, 1], + pdbDelta: [], + updatedTypes: [-18]) + ], responseLoggingLevel: ResponseLoggingLevel.WarningsAndErrors); using var stream = new MemoryStream(); @@ -67,14 +69,14 @@ public async Task UpdatePayload_CanRoundTripUpdatedTypes() public async Task UpdatePayload_WithLargeDeltas_CanRoundtrip() { var initial = new UpdatePayload( - new[] - { + [ new UpdateDelta( moduleId: Guid.NewGuid(), - ilDelta: Enumerable.Range(0, 68200).Select(c => (byte)(c%2)).ToArray(), - metadataDelta: new byte[] { 0, 1, 1 }, + ilDelta: Enumerable.Range(0, 68200).Select(c => (byte)(c % 2)).ToArray(), + metadataDelta: [0, 1, 1], + pdbDelta: [], updatedTypes: Array.Empty()) - }, + ], responseLoggingLevel: ResponseLoggingLevel.Verbose); using var stream = new MemoryStream(); diff --git a/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTest.cs b/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTest.cs index fb625d0ce6d8..75941f6762a6 100644 --- a/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTest.cs +++ b/test/dotnet-watch.Tests/Internal/EnvironmentVariablesBuilderTest.cs @@ -1,9 +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.Watcher.Tools; - -namespace Microsoft.DotNet.Watcher.Internal +namespace Microsoft.DotNet.Watch.UnitTests { public class EnvironmentVariablesBuilderTest { diff --git a/test/dotnet-watch.Tests/LaunchSettingsProfileTest.cs b/test/dotnet-watch.Tests/LaunchSettingsProfileTest.cs index 204691d9a583..c520c36f330b 100644 --- a/test/dotnet-watch.Tests/LaunchSettingsProfileTest.cs +++ b/test/dotnet-watch.Tests/LaunchSettingsProfileTest.cs @@ -1,10 +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.Watcher.Internal; -using Microsoft.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Tools; +namespace Microsoft.DotNet.Watch.UnitTests; public class LaunchSettingsProfileTest { diff --git a/test/dotnet-watch.Tests/MSBuildEvaluationFilterTest.cs b/test/dotnet-watch.Tests/MSBuildEvaluationFilterTest.cs index 004e75749db3..84a9f9e5e095 100644 --- a/test/dotnet-watch.Tests/MSBuildEvaluationFilterTest.cs +++ b/test/dotnet-watch.Tests/MSBuildEvaluationFilterTest.cs @@ -1,10 +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.Watcher.Internal; -using Microsoft.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch.UnitTests { public class MSBuildEvaluationFilterTest { @@ -28,7 +25,7 @@ public async Task ProcessAsync_EvaluatesFileSetIfProjFileChanges() evaluator.RequiresRevaluation = false; - await evaluator.EvaluateAsync(changedFile: new(new() { FilePath = "Test.csproj" }, ChangeKind.Update), CancellationToken.None); + await evaluator.EvaluateAsync(changedFile: new(new() { FilePath = "Test.csproj", ContainingProjectPaths = [] }, ChangeKind.Update), CancellationToken.None); Assert.True(evaluator.RequiresRevaluation); } @@ -52,7 +49,7 @@ public async Task ProcessAsync_DoesNotEvaluateFileSetIfNonProjFileChanges() evaluator.RequiresRevaluation = false; - await evaluator.EvaluateAsync(changedFile: new(new() { FilePath = "Controller.cs" }, ChangeKind.Update), CancellationToken.None); + await evaluator.EvaluateAsync(changedFile: new(new() { FilePath = "Controller.cs", ContainingProjectPaths = [] }, ChangeKind.Update), CancellationToken.None); Assert.False(evaluator.RequiresRevaluation); Assert.Equal(1, counter); @@ -78,7 +75,7 @@ public async Task ProcessAsync_EvaluateFileSetOnEveryChangeIfOptimizationIsSuppr evaluator.RequiresRevaluation = false; - await evaluator.EvaluateAsync(changedFile: new(new() { FilePath = "Controller.cs" }, ChangeKind.Update), CancellationToken.None); + await evaluator.EvaluateAsync(changedFile: new(new() { FilePath = "Controller.cs", ContainingProjectPaths = [] }, ChangeKind.Update), CancellationToken.None); Assert.True(evaluator.RequiresRevaluation); Assert.Equal(2, counter); @@ -93,8 +90,8 @@ public async Task ProcessAsync_SetsEvaluationRequired_IfMSBuildFileChanges_ButIs var result = new EvaluationResult( new Dictionary() { - { "Controlller.cs", new FileItem { FilePath = "Controlller.cs" } }, - { "Proj.csproj", new FileItem { FilePath = "Proj.csproj" } }, + { "Controlller.cs", new FileItem { FilePath = "Controlller.cs", ContainingProjectPaths = []} }, + { "Proj.csproj", new FileItem { FilePath = "Proj.csproj", ContainingProjectPaths = [] } }, }, projectGraph: null); @@ -121,7 +118,7 @@ public async Task ProcessAsync_SetsEvaluationRequired_IfMSBuildFileChanges_ButIs evaluator.RequiresRevaluation = false; evaluator.Timestamps["Proj.csproj"] = new DateTime(1007); - await evaluator.EvaluateAsync(new(new() { FilePath = "Controller.cs" }, ChangeKind.Update), CancellationToken.None); + await evaluator.EvaluateAsync(new(new() { FilePath = "Controller.cs", ContainingProjectPaths = [] }, ChangeKind.Update), CancellationToken.None); Assert.True(evaluator.RequiresRevaluation); } diff --git a/test/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs b/test/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs index ca3acea03d11..8776fcd70c82 100644 --- a/test/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs +++ b/test/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs @@ -3,11 +3,7 @@ #nullable enable -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.Extensions.Tools.Internal; -using Xunit.Sdk; - -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch.UnitTests { public class MsBuildFileSetFactoryTest(ITestOutputHelper output) { @@ -336,7 +332,7 @@ public async Task ProjectReferences_Graph() var output = new List(); _reporter.OnProcessOutput += line => output.Add(line.Content); - var filesetFactory = new MSBuildFileSetFactory(projectA, targetFramework: null, buildProperties: [("_DotNetWatchTraceOutput", "true")], options, _reporter); + var filesetFactory = new MSBuildFileSetFactory(projectA, buildArguments: ["/p:_DotNetWatchTraceOutput=true"], options, _reporter); var result = await filesetFactory.TryCreateAsync(requireProjectGraph: null, CancellationToken.None); Assert.NotNull(result); @@ -397,7 +393,7 @@ public async Task MsbuildOutput() var output = new List(); _reporter.OnProcessOutput += line => output.Add($"{(line.IsError ? "[stderr]" : "[stdout]")} {line.Content}"); - var factory = new MSBuildFileSetFactory(project1Path, targetFramework: null, buildProperties: [], options, _reporter); + var factory = new MSBuildFileSetFactory(project1Path, buildArguments: [], options, _reporter); var result = await factory.TryCreateAsync(requireProjectGraph: null, CancellationToken.None); Assert.Null(result); @@ -416,7 +412,7 @@ private async Task Evaluate(string projectPath) MuxerPath: MuxerPath, WorkingDirectory: Path.GetDirectoryName(projectPath)!); - var factory = new MSBuildFileSetFactory(projectPath, targetFramework: null, buildProperties: [], options, _reporter); + var factory = new MSBuildFileSetFactory(projectPath, buildArguments: [], options, _reporter); var result = await factory.TryCreateAsync(requireProjectGraph: null, CancellationToken.None); Assert.NotNull(result); return result; diff --git a/test/dotnet-watch.Tests/NoRestoreTests.cs b/test/dotnet-watch.Tests/NoRestoreTests.cs index ed32a6afb213..2d12166a6bed 100644 --- a/test/dotnet-watch.Tests/NoRestoreTests.cs +++ b/test/dotnet-watch.Tests/NoRestoreTests.cs @@ -1,9 +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.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch.UnitTests { public class NoRestoreTests { diff --git a/test/dotnet-watch.Tests/Utilities/AssertEx.cs b/test/dotnet-watch.Tests/Utilities/AssertEx.cs index 311479a1056a..c21042ac493f 100644 --- a/test/dotnet-watch.Tests/Utilities/AssertEx.cs +++ b/test/dotnet-watch.Tests/Utilities/AssertEx.cs @@ -5,7 +5,7 @@ using System.Text.RegularExpressions; using Xunit.Sdk; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch.UnitTests { internal static class AssertEx { diff --git a/test/dotnet-watch.Tests/Utilities/AwaitableProcess.cs b/test/dotnet-watch.Tests/Utilities/AwaitableProcess.cs index fb79e922dae8..757bf46d20c1 100644 --- a/test/dotnet-watch.Tests/Utilities/AwaitableProcess.cs +++ b/test/dotnet-watch.Tests/Utilities/AwaitableProcess.cs @@ -4,9 +4,9 @@ using System.Diagnostics; using System.Threading.Tasks.Dataflow; -namespace Microsoft.DotNet.Watcher.Tools +namespace Microsoft.DotNet.Watch.UnitTests { - internal class AwaitableProcess : IDisposable + internal class AwaitableProcess(DotnetCommand spec, ITestOutputHelper logger) : IDisposable { // cancel just before we hit timeout used on CI (XUnitWorkItemTimeout value in sdk\test\UnitTests.proj) private static readonly TimeSpan s_timeout = Environment.GetEnvironmentVariable("HELIX_WORK_ITEM_TIMEOUT") is { } value @@ -14,29 +14,14 @@ internal class AwaitableProcess : IDisposable private readonly object _testOutputLock = new(); + private readonly DotnetCommand _spec = spec; + private readonly List _lines = []; + private readonly BufferBlock _source = new(); private Process _process; - private readonly DotnetCommand _spec; - private readonly List _lines; - private BufferBlock _source; - private ITestOutputHelper _logger; - private TaskCompletionSource _exited; private bool _disposed; - public AwaitableProcess(DotnetCommand spec, ITestOutputHelper logger) - { - _spec = spec; - _logger = logger; - _source = new BufferBlock(); - _lines = new List(); - _exited = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - } - public IEnumerable Output => _lines; - - public Task Exited => _exited.Task; - public int Id => _process.Id; - public Process Process => _process; public void Start() @@ -70,6 +55,9 @@ public void Start() WriteTestOutput($"{DateTime.Now}: process started: '{_process.StartInfo.FileName} {_process.StartInfo.Arguments}'"); } + public void ClearOutput() + => _lines.Clear(); + public async Task GetOutputLineAsync(Predicate success, Predicate failure) { using var cancellationOnFailure = new CancellationTokenSource(); @@ -151,7 +139,7 @@ private void WriteTestOutput(string text) { if (!_disposed) { - _logger.WriteLine(text); + logger.WriteLine(text); } } } @@ -160,17 +148,9 @@ private void OnExit(object sender, EventArgs args) { // Wait to ensure the process has exited and all output consumed _process.WaitForExit(); - _source.Complete(); - _exited.TrySetResult(_process.ExitCode); - try - { - WriteTestOutput($"Process {_process.Id} has exited"); - } - catch - { - // test might not be running anymore - } + // Signal test methods waiting on all process output to be completed: + _source.Complete(); } public void Dispose() @@ -182,38 +162,40 @@ public void Dispose() _disposed = true; } - if (_process != null) + if (_process == null) { - try - { - _process.Kill(entireProcessTree: true); - } - catch - { - } + return; + } - try - { - _process.CancelErrorRead(); - } - catch - { - } + _process.ErrorDataReceived -= OnData; + _process.OutputDataReceived -= OnData; - try - { - _process.CancelOutputRead(); - } - catch - { - } + try + { + _process.CancelErrorRead(); + } + catch + { + } - _process.ErrorDataReceived -= OnData; - _process.OutputDataReceived -= OnData; - _process.Exited -= OnExit; - _process.Dispose(); - _process = null; + try + { + _process.CancelOutputRead(); + } + catch + { + } + + try + { + _process.Kill(entireProcessTree: false); + } + catch + { } + + _process.Dispose(); + _process = null; } } } diff --git a/test/dotnet-watch.Tests/Utilities/DebugTestOutputLogger.cs b/test/dotnet-watch.Tests/Utilities/DebugTestOutputLogger.cs index d9acca6bb08f..e0d03de58c61 100644 --- a/test/dotnet-watch.Tests/Utilities/DebugTestOutputLogger.cs +++ b/test/dotnet-watch.Tests/Utilities/DebugTestOutputLogger.cs @@ -5,7 +5,7 @@ using System.Diagnostics; -namespace Microsoft.DotNet.Watcher.Tests; +namespace Microsoft.DotNet.Watch.UnitTests; public class DebugTestOutputLogger(ITestOutputHelper logger) : ITestOutputHelper { diff --git a/test/dotnet-watch.Tests/Utilities/MockFileSetFactory.cs b/test/dotnet-watch.Tests/Utilities/MockFileSetFactory.cs index 0fa8f0d6aa9b..ba1d287369c6 100644 --- a/test/dotnet-watch.Tests/Utilities/MockFileSetFactory.cs +++ b/test/dotnet-watch.Tests/Utilities/MockFileSetFactory.cs @@ -1,14 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Tools; +namespace Microsoft.DotNet.Watch.UnitTests; internal class MockFileSetFactory() : MSBuildFileSetFactory( rootProjectFile: "test.csproj", - targetFramework: null, - buildProperties: [], + buildArguments: [], new EnvironmentOptions(Environment.CurrentDirectory, "dotnet"), NullReporter.Singleton) { diff --git a/test/dotnet-watch.Tests/Utilities/MockReporter.cs b/test/dotnet-watch.Tests/Utilities/MockReporter.cs index 9edeb48b3d4b..ce39c5cd308f 100644 --- a/test/dotnet-watch.Tests/Utilities/MockReporter.cs +++ b/test/dotnet-watch.Tests/Utilities/MockReporter.cs @@ -4,10 +4,8 @@ #nullable enable using Microsoft.Build.Graph; -using Microsoft.DotNet.Watcher.Internal; -using Microsoft.Extensions.Tools.Internal; -namespace Microsoft.DotNet.Watcher.Tools; +namespace Microsoft.DotNet.Watch.UnitTests; internal class MockReporter : IReporter { diff --git a/test/dotnet-watch.Tests/Utilities/TaskExtensions.cs b/test/dotnet-watch.Tests/Utilities/TaskExtensions.cs index 103fc51a39cb..d63492534d01 100644 --- a/test/dotnet-watch.Tests/Utilities/TaskExtensions.cs +++ b/test/dotnet-watch.Tests/Utilities/TaskExtensions.cs @@ -4,7 +4,7 @@ using System.Diagnostics; using System.Runtime.CompilerServices; -namespace Microsoft.AspNetCore.Testing +namespace Microsoft.DotNet.Watch.UnitTests { internal static class TaskExtensions { diff --git a/test/dotnet-watch.Tests/Utilities/TestConsole.cs b/test/dotnet-watch.Tests/Utilities/TestConsole.cs index 4e11c7b8f5d4..080b574c890a 100644 --- a/test/dotnet-watch.Tests/Utilities/TestConsole.cs +++ b/test/dotnet-watch.Tests/Utilities/TestConsole.cs @@ -5,11 +5,10 @@ using System.Reflection; -namespace Microsoft.Extensions.Tools.Internal +namespace Microsoft.DotNet.Watch.UnitTests { internal class TestConsole : IConsole { - public event ConsoleCancelEventHandler? CancelKeyPress; public event Action? KeyPressed; private readonly TestOutputWriter _testWriter; @@ -37,18 +36,6 @@ public void PressKey(ConsoleKeyInfo key) KeyPressed.Invoke(key); } - public void PressCancelKey() - { - Assert.NotNull(CancelKeyPress); - - var ctor = typeof(ConsoleCancelEventArgs) - .GetTypeInfo() - .DeclaredConstructors - .Single(c => c.GetParameters().First().ParameterType == typeof(ConsoleSpecialKey)); - - CancelKeyPress.Invoke(this, (ConsoleCancelEventArgs)ctor.Invoke([ConsoleSpecialKey.ControlC])); - } - public void ResetColor() { } diff --git a/test/dotnet-watch.Tests/Utilities/TestOptions.cs b/test/dotnet-watch.Tests/Utilities/TestOptions.cs index c083c93fdfa7..46c39e12386c 100644 --- a/test/dotnet-watch.Tests/Utilities/TestOptions.cs +++ b/test/dotnet-watch.Tests/Utilities/TestOptions.cs @@ -1,23 +1,33 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Extensions.Tools.Internal; +#nullable enable -namespace Microsoft.DotNet.Watcher; +namespace Microsoft.DotNet.Watch.UnitTests; internal static class TestOptions { + private static int s_testPort = 7000; + + public static int GetTestPort() + => Interlocked.Increment(ref s_testPort); + public static readonly ProjectOptions ProjectOptions = GetProjectOptions([]); - public static EnvironmentOptions GetEnvironmentOptions(string workingDirectory = "", string muxerPath = "") - => new(workingDirectory, muxerPath, TestFlags: TestFlags.RunningAsTest); + public static EnvironmentOptions GetEnvironmentOptions(string workingDirectory = "", string muxerPath = "", TestAsset? asset = null) + => new(workingDirectory, muxerPath, TestFlags: TestFlags.RunningAsTest, TestOutput: asset != null ? GetWatchTestOutputPath(asset) : ""); public static CommandLineOptions GetCommandLineOptions(string[] args) - => CommandLineOptions.Parse(args, NullReporter.Singleton, TextWriter.Null, out _); + => CommandLineOptions.Parse(args, NullReporter.Singleton, TextWriter.Null, out _) ?? throw new InvalidOperationException(); - public static ProjectOptions GetProjectOptions(string[] args = null) + public static ProjectOptions GetProjectOptions(string[]? args = null) { var options = GetCommandLineOptions(args ?? []); return options.GetProjectOptions(options.ProjectPath ?? "test.csproj", workingDirectory: ""); } + + public static string GetWatchTestOutputPath(this TestAsset asset) + => Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is { } ciOutputRoot + ? Path.Combine(ciOutputRoot, ".hotreload", asset.Name) + : asset.Path + ".hotreload"; } diff --git a/test/dotnet-watch.Tests/Utilities/TestReporter.cs b/test/dotnet-watch.Tests/Utilities/TestReporter.cs index e7054f2ed195..b02a7ee5d5e6 100644 --- a/test/dotnet-watch.Tests/Utilities/TestReporter.cs +++ b/test/dotnet-watch.Tests/Utilities/TestReporter.cs @@ -5,10 +5,8 @@ using System.Diagnostics; using Microsoft.Build.Graph; -using Microsoft.DotNet.Watcher; -using Microsoft.DotNet.Watcher.Internal; -namespace Microsoft.Extensions.Tools.Internal +namespace Microsoft.DotNet.Watch.UnitTests { internal class TestReporter(ITestOutputHelper output) : IReporter { @@ -18,12 +16,15 @@ internal class TestReporter(ITestOutputHelper output) : IReporter public bool EnableProcessOutputReporting => true; + public bool IsVerbose + => true; + public event Action? OnProjectProcessOutput; public event Action? OnProcessOutput; public void ReportProcessOutput(OutputLine line) { - output.WriteLine(line.Content); + WriteTestOutput(line.Content); ProcessOutput.Add(line.Content); OnProcessOutput?.Invoke(line); @@ -33,7 +34,7 @@ public void ReportProcessOutput(ProjectGraphNode project, OutputLine line) { var content = $"[{project.GetDisplayName()}]: {line.Content}"; - output.WriteLine(content); + WriteTestOutput(content); ProcessOutput.Add(content); OnProjectProcessOutput?.Invoke(project.ProjectInstance.FullPath, line); @@ -66,7 +67,7 @@ public void Report(MessageDescriptor descriptor, string prefix, object?[] args) { if (descriptor.TryGetMessage(prefix, args, out var message)) { - output.WriteLine($"{ToString(descriptor.Severity)} {descriptor.Emoji} {message}"); + WriteTestOutput($"{ToString(descriptor.Severity)} {descriptor.Emoji} {message}"); } if (descriptor.Id.HasValue && _actions.TryGetValue(descriptor.Id.Value, out var action)) @@ -75,6 +76,18 @@ public void Report(MessageDescriptor descriptor, string prefix, object?[] args) } } + private void WriteTestOutput(string message) + { + try + { + output.WriteLine(message); + } + catch (InvalidOperationException) + { + // May happen when a test is aborted and no longer running. + } + } + private static string ToString(MessageSeverity severity) => severity switch { diff --git a/test/dotnet-watch.Tests/Utilities/TestRuntimeProcessLauncher.cs b/test/dotnet-watch.Tests/Utilities/TestRuntimeProcessLauncher.cs index 35e8fc249c56..b4714791cc86 100644 --- a/test/dotnet-watch.Tests/Utilities/TestRuntimeProcessLauncher.cs +++ b/test/dotnet-watch.Tests/Utilities/TestRuntimeProcessLauncher.cs @@ -5,13 +5,13 @@ using Microsoft.Build.Graph; -namespace Microsoft.DotNet.Watcher.Tests; +namespace Microsoft.DotNet.Watch.UnitTests; internal class TestRuntimeProcessLauncher(ProjectLauncher projectLauncher) : IRuntimeProcessLauncher { public class Factory(Action? initialize = null) : IRuntimeProcessLauncherFactory { - public IRuntimeProcessLauncher TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, IReadOnlyList<(string name, string value)> buildProperties) + public IRuntimeProcessLauncher TryCreate(ProjectGraphNode projectNode, ProjectLauncher projectLauncher, IReadOnlyList buildArguments) { var service = new TestRuntimeProcessLauncher(projectLauncher); initialize?.Invoke(service); diff --git a/test/dotnet-watch.Tests/Watch/BrowserLaunchTests.cs b/test/dotnet-watch.Tests/Watch/BrowserLaunchTests.cs index a17a7f8e2294..fc55382456ac 100644 --- a/test/dotnet-watch.Tests/Watch/BrowserLaunchTests.cs +++ b/test/dotnet-watch.Tests/Watch/BrowserLaunchTests.cs @@ -1,9 +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.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Tests +namespace Microsoft.DotNet.Watch.UnitTests { public class BrowserLaunchTests : DotNetWatchTestBase { diff --git a/test/dotnet-watch.Tests/Watch/DotNetWatcherTests.cs b/test/dotnet-watch.Tests/Watch/DotNetWatcherTests.cs index 3635cb163001..d011b12fcd1e 100644 --- a/test/dotnet-watch.Tests/Watch/DotNetWatcherTests.cs +++ b/test/dotnet-watch.Tests/Watch/DotNetWatcherTests.cs @@ -3,7 +3,7 @@ using System.Globalization; -namespace Microsoft.DotNet.Watcher.Tests +namespace Microsoft.DotNet.Watch.UnitTests { public class DotNetWatcherTests : DotNetWatchTestBase { @@ -99,7 +99,7 @@ public async Task RunsWithIterationEnvVariable() var value = await App.AssertOutputLineStartsWith(messagePrefix); Assert.Equal(1, int.Parse(value, CultureInfo.InvariantCulture)); - await App.AssertWaitingForChanges(); + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForFileChangeBeforeRestarting); UpdateSourceFile(source); await App.AssertStarted(); diff --git a/test/dotnet-watch.Tests/Watch/GlobbingAppTests.cs b/test/dotnet-watch.Tests/Watch/GlobbingAppTests.cs index 6b44db35472f..48ff617568cc 100644 --- a/test/dotnet-watch.Tests/Watch/GlobbingAppTests.cs +++ b/test/dotnet-watch.Tests/Watch/GlobbingAppTests.cs @@ -1,9 +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.Watcher.Tools; - -namespace Microsoft.DotNet.Watcher.Tests +namespace Microsoft.DotNet.Watch.UnitTests { public class GlobbingAppTests : DotNetWatchTestBase { @@ -114,7 +112,7 @@ public async Task ListsFiles() App.DotnetWatchArgs.Clear(); App.Start(testAsset, ["--list"]); var lines = await App.Process.GetAllOutputLinesAsync(CancellationToken.None); - var files = lines.Where(l => !l.StartsWith("watch :")); + var files = lines.Where(l => !l.StartsWith("dotnet watch ⌚") && l.Trim() != ""); AssertEx.EqualFileList( testAsset.Path, diff --git a/test/dotnet-watch.Tests/Watch/NoDepsAppTests.cs b/test/dotnet-watch.Tests/Watch/NoDepsAppTests.cs index 98c90f9b4110..9614366519d9 100644 --- a/test/dotnet-watch.Tests/Watch/NoDepsAppTests.cs +++ b/test/dotnet-watch.Tests/Watch/NoDepsAppTests.cs @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace Microsoft.DotNet.Watcher.Tests +namespace Microsoft.DotNet.Watch.UnitTests { public class NoDepsAppTests(ITestOutputHelper logger) : DotNetWatchTestBase(logger) { diff --git a/test/dotnet-watch.Tests/Watch/ProgramTests.cs b/test/dotnet-watch.Tests/Watch/ProgramTests.cs index cb22f2cc4396..8fc4f2d20d55 100644 --- a/test/dotnet-watch.Tests/Watch/ProgramTests.cs +++ b/test/dotnet-watch.Tests/Watch/ProgramTests.cs @@ -1,19 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.AspNetCore.Testing; -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Tests +namespace Microsoft.DotNet.Watch.UnitTests { - public class ProgramTests : DotNetWatchTestBase + public class ProgramTests(ITestOutputHelper logger) : DotNetWatchTestBase(logger) { - public ProgramTests(ITestOutputHelper logger) - : base(logger) - { - } - [Fact] public async Task ConsoleCancelKey() { @@ -29,7 +20,7 @@ public async Task ConsoleCancelKey() var program = Program.TryCreate( TestOptions.GetCommandLineOptions(["--verbose"]), console, - TestOptions.GetEnvironmentOptions(workingDirectory: testAsset.Path, TestContext.Current.ToolsetUnderTest.DotNetHostPath), + TestOptions.GetEnvironmentOptions(workingDirectory: testAsset.Path, TestContext.Current.ToolsetUnderTest.DotNetHostPath, testAsset), reporter, out var errorCode); @@ -40,7 +31,7 @@ public async Task ConsoleCancelKey() await watching.WaitAsync(); - console.PressCancelKey(); + console.PressKey(new ConsoleKeyInfo('C', ConsoleKey.C, shift: false, alt: false, control: true)); var exitCode = await run; Assert.Equal(0, exitCode); @@ -202,16 +193,21 @@ public async Task TestCommand() App.Start(testAsset, ["--verbose", "test", "--list-tests", "/p:VSTestUseMSBuildOutput=false"]); - await App.AssertOutputLineEquals("The following Tests are available:"); - await App.AssertOutputLineEquals(" TestNamespace.VSTestXunitTests.VSTestXunitPassTest"); + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForFileChangeBeforeRestarting); + + App.AssertOutputContains("The following Tests are available:"); + App.AssertOutputContains(" TestNamespace.VSTestXunitTests.VSTestXunitPassTest"); + App.Process.ClearOutput(); // update file: var testFile = Path.Combine(testAsset.Path, "UnitTest1.cs"); var content = File.ReadAllText(testFile, Encoding.UTF8); File.WriteAllText(testFile, content.Replace("VSTestXunitPassTest", "VSTestXunitPassTest2"), Encoding.UTF8); - await App.AssertOutputLineEquals("The following Tests are available:"); - await App.AssertOutputLineEquals(" TestNamespace.VSTestXunitTests.VSTestXunitPassTest2"); + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForFileChangeBeforeRestarting); + + App.AssertOutputContains("The following Tests are available:"); + App.AssertOutputContains(" TestNamespace.VSTestXunitTests.VSTestXunitPassTest2"); } [Fact] @@ -220,7 +216,7 @@ public async Task TestCommand_MultiTargeting() var testAsset = TestAssets.CopyTestAsset("XunitMulti") .WithSource(); - App.Start(testAsset, ["--verbose", "--framework", ToolsetInfo.CurrentTargetFramework, "test", "--list-tests", "/p:VSTestUseMSBuildOutput=false"]); + App.Start(testAsset, ["--verbose", "test", "--framework", ToolsetInfo.CurrentTargetFramework, "--list-tests", "/p:VSTestUseMSBuildOutput=false"]); await App.AssertOutputLineEquals("The following Tests are available:"); await App.AssertOutputLineEquals(" TestNamespace.VSTestXunitTests.VSTestXunitFailTestNetCoreApp"); @@ -234,7 +230,89 @@ public async Task BuildCommand() App.Start(testAsset, ["--verbose", "--property", "TestProperty=123", "build", "/t:TestTarget"]); - await App.AssertOutputLine(line => line.Contains("warning : The value of property is '123'", StringComparison.Ordinal)); + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForFileChangeBeforeRestarting); + + // evaluation affected by -c option: + Assert.Contains("TestProperty", App.Process.Output.Single(line => line.Contains("/t:GenerateWatchList"))); + + App.AssertOutputContains("dotnet watch ⌚ Command 'build' does not support Hot Reload."); + App.AssertOutputContains("dotnet watch ⌚ Command 'build' does not support browser refresh."); + App.AssertOutputContains("warning : The value of property is '123'"); + } + + [Fact] + public async Task MSBuildCommand() + { + var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp") + .WithSource(); + + App.Start(testAsset, ["--verbose", "/p:TestProperty=123", "msbuild", "/t:TestTarget"]); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForFileChangeBeforeRestarting); + + // TestProperty is not passed to evaluation since msbuild command doesn't include it in forward options: + Assert.DoesNotContain("TestProperty", App.Process.Output.Single(line => line.Contains("/t:GenerateWatchList"))); + + App.AssertOutputContains("dotnet watch ⌚ Command 'msbuild' does not support Hot Reload."); + App.AssertOutputContains("dotnet watch ⌚ Command 'msbuild' does not support browser refresh."); + App.AssertOutputContains("warning : The value of property is '123'"); + } + + [Fact] + public async Task PackCommand() + { + var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp") + .WithSource(); + + App.Start(testAsset, ["--verbose", "pack", "-c", "Release"]); + + var packagePath = Path.Combine(testAsset.Path, "bin", "Release", "WatchNoDepsApp.1.0.0.nupkg"); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForFileChangeBeforeRestarting); + + // evaluation affected by -c option: + Assert.Contains("-property:Configuration=Release", App.Process.Output.Single(line => line.Contains("/t:GenerateWatchList"))); + + App.AssertOutputContains("dotnet watch ⌚ Command 'pack' does not support Hot Reload."); + App.AssertOutputContains("dotnet watch ⌚ Command 'pack' does not support browser refresh."); + App.AssertOutputContains($"Successfully created package '{packagePath}'"); + } + + [Fact] + public async Task PublishCommand() + { + var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp") + .WithSource(); + + App.Start(testAsset, ["--verbose", "publish", "-c", "Release"]); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForFileChangeBeforeRestarting); + + // evaluation affected by -c option: + Assert.Contains("-property:Configuration=Release", App.Process.Output.Single(line => line.Contains("/t:GenerateWatchList"))); + + App.AssertOutputContains("dotnet watch ⌚ Command 'publish' does not support Hot Reload."); + App.AssertOutputContains("dotnet watch ⌚ Command 'publish' does not support browser refresh."); + + App.AssertOutputContains(Path.Combine("Release", ToolsetInfo.CurrentTargetFramework, "publish")); + } + + [Fact] + public async Task FormatCommand() + { + var testAsset = TestAssets.CopyTestAsset("WatchNoDepsApp") + .WithSource(); + + App.DotnetWatchArgs.Clear(); + App.Start(testAsset, ["--verbose", "format", "--verbosity", "detailed"]); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForFileChangeBeforeRestarting); + + App.AssertOutputContains("dotnet watch ⌚ Command 'format' does not support Hot Reload."); + App.AssertOutputContains("dotnet watch ⌚ Command 'format' does not support browser refresh."); + + App.AssertOutputContains("format --verbosity detailed"); + App.AssertOutputContains("Format complete in"); } [Fact] diff --git a/test/dotnet-watch.Tests/Watch/Utilities/DotNetWatchTestBase.cs b/test/dotnet-watch.Tests/Watch/Utilities/DotNetWatchTestBase.cs index 780b5a7d39cb..4650141560af 100644 --- a/test/dotnet-watch.Tests/Watch/Utilities/DotNetWatchTestBase.cs +++ b/test/dotnet-watch.Tests/Watch/Utilities/DotNetWatchTestBase.cs @@ -1,9 +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.Watcher.Internal; - -namespace Microsoft.DotNet.Watcher.Tests; +namespace Microsoft.DotNet.Watch.UnitTests; /// /// Base class for all tests that create dotnet watch process. @@ -25,16 +23,19 @@ public DotNetWatchTestBase(ITestOutputHelper logger) public DebugTestOutputLogger Logger => (DebugTestOutputLogger)App.Logger; + public void Log(string message) + => Logger.WriteLine($"[TEST] {message}"); + public void UpdateSourceFile(string path, string text) { File.WriteAllText(path, text, Encoding.UTF8); - Logger.WriteLine($"File '{path}' updated ({HotReloadFileSetWatcher.FormatTimestamp(File.GetLastWriteTimeUtc(path))})."); + Log($"File '{path}' updated ({HotReloadDotNetWatcher.FormatTimestamp(File.GetLastWriteTimeUtc(path))})."); } public void UpdateSourceFile(string path, Func contentTransform) { File.WriteAllText(path, contentTransform(File.ReadAllText(path, Encoding.UTF8)), Encoding.UTF8); - Logger.WriteLine($"File '{path}' updated."); + Log($"File '{path}' updated."); } public void UpdateSourceFile(string path) diff --git a/test/dotnet-watch.Tests/Watch/Utilities/WatchableApp.cs b/test/dotnet-watch.Tests/Watch/Utilities/WatchableApp.cs index c6a0da60a072..c949b46140bd 100644 --- a/test/dotnet-watch.Tests/Watch/Utilities/WatchableApp.cs +++ b/test/dotnet-watch.Tests/Watch/Utilities/WatchableApp.cs @@ -1,11 +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 System.Runtime.CompilerServices; -using Microsoft.DotNet.Watcher.Tools; -using Microsoft.Extensions.Tools.Internal; - -namespace Microsoft.DotNet.Watcher.Tests +namespace Microsoft.DotNet.Watch.UnitTests { internal sealed class WatchableApp(ITestOutputHelper logger) : IDisposable { @@ -18,6 +14,8 @@ internal sealed class WatchableApp(ITestOutputHelper logger) : IDisposable private const string WatchErrorOutputEmoji = "❌"; private const string WatchFileChanged = "dotnet watch ⌚ File changed:"; + public TestFlags TestFlags { get; private set; } + public ITestOutputHelper Logger => logger; public AwaitableProcess Process { get; private set; } @@ -34,6 +32,9 @@ public static string GetLinePrefix(MessageDescriptor descriptor, string projectD public void AssertOutputContains(string message) => AssertEx.Contains(message, Process.Output); + public void AssertOutputDoesNotContain(string message) + => AssertEx.DoesNotContain(message, Process.Output); + public void AssertOutputContains(MessageDescriptor descriptor, string projectDisplay = null) => AssertOutputContains(GetLinePrefix(descriptor, projectDisplay)); @@ -53,7 +54,7 @@ public Task AssertOutputLineStartsWith(MessageDescriptor descriptor, str /// public async Task AssertOutputLineStartsWith(string expectedPrefix, Predicate failure = null) { - Logger.WriteLine($"Test waiting for output: '{expectedPrefix}'"); + Logger.WriteLine($"[TEST] Test waiting for output: '{expectedPrefix}'"); var line = await Process.GetOutputLineAsync( success: line => line.StartsWith(expectedPrefix, StringComparison.Ordinal), @@ -114,15 +115,19 @@ public void Start(TestAsset asset, IEnumerable arguments, string relativ WorkingDirectory = workingDirectory ?? projectDirectory, }; + var testOutputPath = asset.GetWatchTestOutputPath(); + Directory.CreateDirectory(testOutputPath); + commandSpec.WithEnvironmentVariable("HOTRELOAD_DELTA_CLIENT_LOG_MESSAGES", "1"); commandSpec.WithEnvironmentVariable("DOTNET_USE_POLLING_FILE_WATCHER", "true"); commandSpec.WithEnvironmentVariable("__DOTNET_WATCH_TEST_FLAGS", testFlags.ToString()); + commandSpec.WithEnvironmentVariable("__DOTNET_WATCH_TEST_OUTPUT_DIR", testOutputPath); + commandSpec.WithEnvironmentVariable("Microsoft_CodeAnalysis_EditAndContinue_LogDir", testOutputPath); - var encLogPath = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is { } ciOutputRoot - ? Path.Combine(ciOutputRoot, ".hotreload", asset.Name) - : asset.Path + ".hotreload"; - - commandSpec.WithEnvironmentVariable("Microsoft_CodeAnalysis_EditAndContinue_LogDir", encLogPath); + // suppress all DCP timeouts: + commandSpec.WithEnvironmentVariable("DCP_IDE_REQUEST_TIMEOUT_SECONDS", "100000"); + commandSpec.WithEnvironmentVariable("DCP_IDE_NOTIFICATION_TIMEOUT_SECONDS", "100000"); + commandSpec.WithEnvironmentVariable("DCP_IDE_NOTIFICATION_KEEPALIVE_SECONDS", "100000"); foreach (var env in EnvironmentVariables) { @@ -131,11 +136,27 @@ public void Start(TestAsset asset, IEnumerable arguments, string relativ Process = new AwaitableProcess(commandSpec, Logger); Process.Start(); + + TestFlags = testFlags; } public void Dispose() { Process?.Dispose(); } + + public void SendControlC() + => SendKey(PhysicalConsole.CtrlC); + + public void SendControlR() + => SendKey(PhysicalConsole.CtrlR); + + public void SendKey(char c) + { + Assert.True(TestFlags.HasFlag(TestFlags.ReadKeyFromStdin)); + + Process.Process.StandardInput.Write(c); + Process.Process.StandardInput.Flush(); + } } } diff --git a/test/dotnet-watch.Tests/dotnet-watch.Tests.csproj b/test/dotnet-watch.Tests/dotnet-watch.Tests.csproj index bf367142bbc3..774159200782 100644 --- a/test/dotnet-watch.Tests/dotnet-watch.Tests.csproj +++ b/test/dotnet-watch.Tests/dotnet-watch.Tests.csproj @@ -9,9 +9,6 @@ - - - diff --git a/test/dotnet-workload-search.Tests/GivenDotnetWorkloadSearch.cs b/test/dotnet-workload-search.Tests/GivenDotnetWorkloadSearch.cs index 443781d46533..9e614502f0c7 100644 --- a/test/dotnet-workload-search.Tests/GivenDotnetWorkloadSearch.cs +++ b/test/dotnet-workload-search.Tests/GivenDotnetWorkloadSearch.cs @@ -28,6 +28,22 @@ public GivenDotnetWorkloadSearch(ITestOutputHelper log) : base(log) _reporter = new BufferedReporter(); } + [Theory] + [InlineData("--invalidArgument")] + [InlineData("notAVersion")] + [InlineData("1.2")] // too short + [InlineData("1.2.3.4.5")] // too long + [InlineData("1.2-3.4")] // numbers after [-, +] don't count + public void GivenInvalidArgumentToWorkloadSearchVersionItFailsCleanly(string argument) + { + _reporter.Clear(); + var parseResult = Parser.Instance.Parse($"dotnet workload search version {argument}"); + var workloadResolver = new MockWorkloadResolver(Enumerable.Empty()); + var workloadResolverFactory = new MockWorkloadResolverFactory(dotnetPath: null, "9.0.100", workloadResolver); + var command = () => new WorkloadSearchVersionsCommand(parseResult, _reporter, workloadResolverFactory); + command.Should().Throw(); + } + [Fact] public void GivenNoWorkloadsAreInstalledSearchIsEmpty() { diff --git a/test/dotnet-workload-search.Tests/MockWorkloadResolver.cs b/test/dotnet-workload-search.Tests/MockWorkloadResolver.cs index 45120fe3d04a..9ba675d348d8 100644 --- a/test/dotnet-workload-search.Tests/MockWorkloadResolver.cs +++ b/test/dotnet-workload-search.Tests/MockWorkloadResolver.cs @@ -38,8 +38,8 @@ public void RefreshWorkloadManifests() { /* noop */ } public string GetManifestFeatureBand(string manifestId) => throw new NotImplementedException(); public IEnumerable GetInstalledManifests() => _installedManifests ?? throw new NotImplementedException(); public IWorkloadResolver CreateOverlayResolver(IWorkloadManifestProvider overlayManifestProvider) => throw new NotImplementedException(); - public string GetSdkFeatureBand() => "12.0.400"; - public IWorkloadManifestProvider.WorkloadVersionInfo GetWorkloadVersion() => new IWorkloadManifestProvider.WorkloadVersionInfo("12.0.400.2"); + public string GetSdkFeatureBand() => "8.0.100"; + public IWorkloadManifestProvider.WorkloadVersionInfo GetWorkloadVersion() => new IWorkloadManifestProvider.WorkloadVersionInfo("8.0.100.2"); public IEnumerable GetUpdatedWorkloads(WorkloadResolver advertisingManifestResolver, IEnumerable installedWorkloads) => throw new NotImplementedException(); WorkloadResolver IWorkloadResolver.CreateOverlayResolver(IWorkloadManifestProvider overlayManifestProvider) => throw new NotImplementedException(); WorkloadManifest IWorkloadResolver.GetManifestFromWorkload(WorkloadId workloadId) => throw new NotImplementedException(); diff --git a/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs b/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs index a901c2eb764c..96ea7eb70c28 100644 --- a/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs +++ b/test/dotnet.Tests/CommandTests/ToolInstallGlobalOrToolPathCommandTests.cs @@ -102,7 +102,6 @@ public void WhenPassingIgnoreFailedSourcesItShouldNotThrow() _fileSystem.File.Delete(Path.Combine(_temporaryDirectory, "nuget.config")); } - [Fact] public void WhenDuplicateSourceIsPassedIgnore() { diff --git a/test/dotnet.Tests/CommandTests/ToolUpdateGlobalOrToolPathCommandTests.cs b/test/dotnet.Tests/CommandTests/ToolUpdateGlobalOrToolPathCommandTests.cs index c31c9a615369..ad361a5932de 100644 --- a/test/dotnet.Tests/CommandTests/ToolUpdateGlobalOrToolPathCommandTests.cs +++ b/test/dotnet.Tests/CommandTests/ToolUpdateGlobalOrToolPathCommandTests.cs @@ -12,6 +12,8 @@ using Microsoft.Extensions.EnvironmentAbstractions; using LocalizableStrings = Microsoft.DotNet.Tools.Tool.Update.LocalizableStrings; using Parser = Microsoft.DotNet.Cli.Parser; +using Microsoft.DotNet.InternalAbstractions; +using Microsoft.DotNet.Tools.Tool.Uninstall; namespace Microsoft.DotNet.Tests.Commands.Tool { @@ -29,14 +31,15 @@ public class ToolUpdateGlobalOrToolPathCommandTests private const string HigherPreviewPackageVersion = "1.0.5-preview3"; private readonly string _shimsDirectory; private readonly string _toolsDirectory; + private readonly string _tempDirectory; public ToolUpdateGlobalOrToolPathCommandTests() { _reporter = new BufferedReporter(); _fileSystem = new FileSystemMockBuilder().UseCurrentSystemTemporaryDirectory().Build(); - var tempDirectory = _fileSystem.Directory.CreateTemporaryDirectory().DirectoryPath; - _shimsDirectory = Path.Combine(tempDirectory, "shims"); - _toolsDirectory = Path.Combine(tempDirectory, "tools"); + _tempDirectory = _fileSystem.Directory.CreateTemporaryDirectory().DirectoryPath; + _shimsDirectory = Path.Combine(_tempDirectory, "shims"); + _toolsDirectory = Path.Combine(_tempDirectory, "tools"); _environmentPathInstructionMock = new EnvironmentPathInstructionMock(_reporter, _shimsDirectory); _store = new ToolPackageStoreMock(new DirectoryPath(_toolsDirectory), _fileSystem); _mockFeeds = new List @@ -87,6 +90,25 @@ public ToolUpdateGlobalOrToolPathCommandTests() }; } + [Fact] + public void WhenPassingRestoreActionConfigOptions() + { + var parseResult = Parser.Instance.Parse($"dotnet tool update -g {_packageId} --ignore-failed-sources"); + var toolUpdateCommand = new ToolUpdateGlobalOrToolPathCommand(parseResult); + toolUpdateCommand._toolInstallGlobalOrToolPathCommand.restoreActionConfig.IgnoreFailedSources.Should().BeTrue(); + } + + [Fact] + public void WhenPassingIgnoreFailedSourcesItShouldNotThrow() + { + _fileSystem.File.WriteAllText(Path.Combine(_tempDirectory, "nuget.config"), _nugetConfigWithInvalidSources); + + var command = CreateUpdateCommand($"-g {_packageId} --ignore-failed-sources"); + + command.Execute().Should().Be(0); + _fileSystem.File.Delete(Path.Combine(_tempDirectory, "nuget.config")); + } + [Fact] public void GivenANonFeedExistentPackageItErrors() { @@ -471,6 +493,16 @@ private ShellShimRepository GetMockedShellShimRepository() appHostShellShimMaker: new AppHostShellShimMakerMock(_fileSystem), filePermissionSetter: new ToolInstallGlobalOrToolPathCommandTests.NoOpFilePermissionSetter()); } + + private string _nugetConfigWithInvalidSources = @"{ + + + + + + + +}"; } } diff --git a/test/dotnet.Tests/CommandTests/ToolUpdateLocalCommandTests.cs b/test/dotnet.Tests/CommandTests/ToolUpdateLocalCommandTests.cs index e74b80a7e8d8..a07fd6aca4b7 100644 --- a/test/dotnet.Tests/CommandTests/ToolUpdateLocalCommandTests.cs +++ b/test/dotnet.Tests/CommandTests/ToolUpdateLocalCommandTests.cs @@ -7,6 +7,7 @@ using Microsoft.DotNet.ToolManifest; using Microsoft.DotNet.ToolPackage; using Microsoft.DotNet.Tools.Tests.ComponentMocks; +using Microsoft.DotNet.Tools.Tool.Install; using Microsoft.DotNet.Tools.Tool.Restore; using Microsoft.DotNet.Tools.Tool.Update; using Microsoft.Extensions.DependencyModel.Tests; @@ -131,6 +132,32 @@ public ToolUpdateLocalCommandTests() _reporter); } + [Fact] + public void WhenPassingRestoreActionConfigOptions() + { + var parseResult = Parser.Instance.Parse($"dotnet tool update {_packageIdA.ToString()} --ignore-failed-sources"); + var command = new ToolUpdateLocalCommand(parseResult); + command._toolInstallLocalCommand.Value.restoreActionConfig.IgnoreFailedSources.Should().BeTrue(); + } + + [Fact] + public void WhenPassingIgnoreFailedSourcesItShouldNotThrow() + { + _fileSystem.File.WriteAllText(Path.Combine(_temporaryDirectory, "nuget.config"), _nugetConfigWithInvalidSources); + var parseResult = Parser.Instance.Parse($"dotnet tool update {_packageIdA.ToString()} --ignore-failed-sources"); + var updateLocalCommand = new ToolUpdateLocalCommand( + parseResult, + _toolPackageDownloaderMock, + _toolManifestFinder, + _toolManifestEditor, + _localToolsResolverCache, + _reporter); + + updateLocalCommand.Execute().Should().Be(0); + + _fileSystem.File.Delete(Path.Combine(_temporaryDirectory, "nuget.config")); + } + [Fact] public void WhenRunWithPackageIdItShouldUpdateFromManifestFile() { @@ -426,6 +453,16 @@ out RestoredCommand restoredCommand ""version"": 1, ""isRoot"": false, ""tools"": {} +}"; + + private string _nugetConfigWithInvalidSources = @"{ + + + + + + + }"; } } diff --git a/test/dotnet.Tests/dotnet.Tests.csproj b/test/dotnet.Tests/dotnet.Tests.csproj index 76d95d0b1c39..4bb8bfdc1df5 100644 --- a/test/dotnet.Tests/dotnet.Tests.csproj +++ b/test/dotnet.Tests/dotnet.Tests.csproj @@ -125,10 +125,6 @@ - - - - diff --git a/test/dotnet.Tests/xunit.runner.json b/test/dotnet.Tests/xunit.runner.json deleted file mode 100644 index d766d6750a82..000000000000 --- a/test/dotnet.Tests/xunit.runner.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", - "diagnosticMessages": true, - "internalDiagnosticMessages": true, - "longRunningTestSeconds": 120 -} diff --git a/test/dotnet-watch.Tests/xunit.runner.json b/test/xunit.runner.json similarity index 74% rename from test/dotnet-watch.Tests/xunit.runner.json rename to test/xunit.runner.json index b6b56f537621..1fca20845e33 100644 --- a/test/dotnet-watch.Tests/xunit.runner.json +++ b/test/xunit.runner.json @@ -2,5 +2,6 @@ "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", "diagnosticMessages": true, "longRunningTestSeconds": 20, - "showLiveOutput": true + "showLiveOutput": true, + "shadowCopy": false }