Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9b2a21c
Support artifacts output format
dsplaisted Dec 16, 2022
deb72ce
Update tests for artifacts output format
dsplaisted Dec 16, 2022
6c2ccc7
Update publish tests for new output path format
dsplaisted Jan 6, 2023
967c5c8
Revert removing TargetFramework from calls to GetOutputDirectory
dsplaisted Jan 6, 2023
f8defcb
Fix package output path, don't check if TargetFramework is a global p…
dsplaisted Jan 10, 2023
a303e46
Fix handling of RuntimeIdentifier for blazor wasm and artifacts output
dsplaisted Jan 11, 2023
1b10d4c
Fix tests
dsplaisted Jan 11, 2023
52287bb
Update blazor wasm baselines
dsplaisted Jan 11, 2023
3c56e27
Update tests
dsplaisted Jan 11, 2023
cc0cbfc
Update tests
dsplaisted Jan 12, 2023
e3c18e4
Fix tests
dsplaisted Jan 12, 2023
caa24c4
Fix test
dsplaisted Jan 12, 2023
aeb1caa
Switch from artifacts to bin folder for new format, rename properties
dsplaisted Jan 27, 2023
14d554d
Add support for RootOutputPath
dsplaisted Jan 27, 2023
ea679fa
Don't default to standard output paths based on target framework
dsplaisted Jan 27, 2023
8eb2f36
Revert blazor wasm baseline update
dsplaisted Jan 31, 2023
73d8d6a
Fix tests
dsplaisted Jan 31, 2023
53cc787
Fix tests
dsplaisted Jan 31, 2023
e772177
Fix path casing in test
dsplaisted Jan 31, 2023
498f932
Update to latest version of output path design proposal
dsplaisted Feb 24, 2023
6838534
Update Artifacts output tests
dsplaisted Feb 28, 2023
581a780
Fix test code null reference
dsplaisted Feb 28, 2023
57da37a
Fix test issues
dsplaisted Mar 1, 2023
c747974
Fix tests
dsplaisted Mar 1, 2023
51265a5
Fix publish path calculation for tests
dsplaisted Mar 1, 2023
11d5b6e
Implement rest of design, fix bugs, add tests
dsplaisted Mar 9, 2023
ab17774
Apply feedback, fix bugs, add test
dsplaisted Mar 9, 2023
5595c27
Remove duplication in ArtifactsPath logic
dsplaisted Mar 24, 2023
3816470
Add telemetry for how artifacts paths are used
dsplaisted Mar 24, 2023
b9b67fb
Update telemetry tests
dsplaisted Mar 24, 2023
b07548f
Consolidate TestSolution with TestAssetsManager.CreateTestProjects
dsplaisted Mar 30, 2023
c2d6049
Merge upstream changes
dsplaisted Mar 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Implement rest of design, fix bugs, add tests
  • Loading branch information
dsplaisted committed Mar 23, 2023
commit 11d5b6edd48f1ab547730f3ec1386b742c3fe81a
6 changes: 6 additions & 0 deletions src/Cli/dotnet/CommonLocalizableStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -717,4 +717,10 @@ The default is 'true' if a runtime identifier is specified.</value>
<data name="OSArgumentName" xml:space="preserve">
<value>OS</value>
</data>
<data name="ArtifactsPathOptionDescription" xml:space="preserve">
<value>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</value>
</data>
<data name="ArtifactsPathArgumentName" xml:space="preserve">
<value>ARTIFACTS_DIR</value>
</data>
</root>
9 changes: 9 additions & 0 deletions src/Cli/dotnet/CommonOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ public static Option<string> FrameworkOption(string description) =>
}.ForwardAsSingle(o => $"-property:TargetFramework={o}")
.AddCompletions(Complete.TargetFrameworksFromProjectFile);

public static Option<string> ArtifactsPathOption =
new ForwardedOption<string>(
// --artifacts-path is pretty verbose, should we use --artifacts instead (or possibly support both)?
new string[] { "--artifacts-path" },
description: CommonLocalizableStrings.ArtifactsPathOptionDescription)
{
ArgumentHelpName = CommonLocalizableStrings.ArtifactsPathArgumentName
}.ForwardAsSingle(o => $"-property:ArtifactsPath={CommandDirectoryContext.GetFullPath(o)}");

private static string RuntimeArgName = CommonLocalizableStrings.RuntimeIdentifierArgumentName;
public static IEnumerable<string> RuntimeArgFunc(string rid)
{
Expand Down
1 change: 1 addition & 0 deletions src/Cli/dotnet/commands/dotnet-build/BuildCommandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ private static Command ConstructCommand()
command.AddOption(CommonOptions.VerbosityOption);
command.AddOption(CommonOptions.DebugOption);
command.AddOption(OutputOption);
command.AddOption(CommonOptions.ArtifactsPathOption);
command.AddOption(NoIncrementalOption);
command.AddOption(NoDependenciesOption);
command.AddOption(NoLogoOption);
Expand Down
1 change: 1 addition & 0 deletions src/Cli/dotnet/commands/dotnet-clean/CleanCommandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ private static Command ConstructCommand()
command.AddOption(CommonOptions.InteractiveMsBuildForwardOption);
command.AddOption(CommonOptions.VerbosityOption);
command.AddOption(OutputOption);
command.AddOption(CommonOptions.ArtifactsPathOption);
command.AddOption(NoLogoOption);
command.AddOption(CommonOptions.DisableBuildServersOption);

Expand Down
1 change: 1 addition & 0 deletions src/Cli/dotnet/commands/dotnet-pack/PackCommandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ private static Command ConstructCommand()

command.AddArgument(SlnOrProjectArgument);
command.AddOption(OutputOption);
command.AddOption(CommonOptions.ArtifactsPathOption);
command.AddOption(NoBuildOption);
command.AddOption(IncludeSymbolsOption);
command.AddOption(IncludeSourceOption);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ private static Command ConstructCommand()
command.AddArgument(SlnOrProjectArgument);
RestoreCommandParser.AddImplicitRestoreOptions(command, includeRuntimeOption: false, includeNoDependenciesOption: true);
command.AddOption(OuputOption);
command.AddOption(CommonOptions.ArtifactsPathOption);
command.AddOption(ManifestOption);
command.AddOption(NoBuildOption);
command.AddOption(SelfContainedOption);
Expand Down
1 change: 1 addition & 0 deletions src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ private static Command ConstructCommand()
command.AddOption(AdapterOption);
command.AddOption(LoggerOption);
command.AddOption(OutputOption);
command.AddOption(CommonOptions.ArtifactsPathOption);
command.AddOption(DiagOption);
command.AddOption(NoBuildOption);
command.AddOption(ResultsOption);
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">Cílová architektura</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">Nepovedlo se vyřešit aktuální identifikátor modulu runtime.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">Die Zielarchitektur.</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">Fehler beim Auflösen des aktuellen Runtimebezeichners.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">La arquitectura de destino.</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">No se ha podido resolver el identificador en el tiempo de ejecución actual.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">L’architecture cible</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">Échec de la résolution de l’identificateur d’exécution actuel</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">Architettura di destinazione.</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">La risoluzione dell'identificatore di runtime corrente non è riuscita.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">ターゲット アーキテクチャ。</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">現在のランタイム識別子を解決できませんでした。</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">대상 아키텍처입니다.</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">현재 런타임 식별자를 확인하지 못했습니다.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">Architektura docelowa.</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">Rozpoznawanie bieżącego identyfikatora środowiska uruchomieniowego nie powiodło się.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">A arquitetura de destino.</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">Falha ao resolver o identificador de tempo de execução atual.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">Целевая архитектура.</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">Не удалось разрешить текущий идентификатор среды выполнения.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">Hedef mimari.</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">Geçerli çalışma zamanı tanımlayıcısı çözümlenemedi.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hans.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">目标体系结构。</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">解决当前运行时标识符失败。</target>
Expand Down
10 changes: 10 additions & 0 deletions src/Cli/dotnet/xlf/CommonLocalizableStrings.zh-Hant.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
<target state="translated">目標結構。</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathArgumentName">
<source>ARTIFACTS_DIR</source>
<target state="new">ARTIFACTS_DIR</target>
<note />
</trans-unit>
<trans-unit id="ArtifactsPathOptionDescription">
<source>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</source>
<target state="new">The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</target>
<note />
</trans-unit>
<trans-unit id="CannotResolveRuntimeIdentifier">
<source>Resolving the current runtime identifier failed.</source>
<target state="translated">解析目前執行階段識別碼失敗。</target>
Expand Down
1 change: 1 addition & 0 deletions src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<!-- Setting ArtifactsPath automatically opts in to the artifacts output format -->
<PropertyGroup Condition="'$(ArtifactsPath)' != ''">
<UseArtifactsOutput Condition="'$(UseArtifactsOutput)' == ''">true</UseArtifactsOutput>
<IncludeProjectNameInArtifactsPaths Condition="'$(IncludeProjectNameInArtifactsPaths)' == ''">true</IncludeProjectNameInArtifactsPaths>
</PropertyGroup>

<!-- Set up base output folders if UseArtifactsOutput is set -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ Copyright (c) .NET Foundation. All rights reserved.
<ArtifactsBinOutputName Condition="'$(ArtifactsBinOutputName)' == ''">bin</ArtifactsBinOutputName>
<ArtifactsPublishOutputName Condition="'$(ArtifactsPublishOutputName)' == ''">publish</ArtifactsPublishOutputName>
<ArtifactsPackageOutputName Condition="'$(ArtifactsPackageOutputName)' == ''">package</ArtifactsPackageOutputName>
</PropertyGroup>

<!-- ArtifactsPivots instead? -->
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(ArtifactsPivots)' == ''">
<ArtifactsPivots>$(Configuration.ToLowerInvariant())</ArtifactsPivots>

<!-- Include the TargetFramework in the pivots if the project is multi-targeted (ie TargetFrameworks) is defined -->
Expand All @@ -73,11 +74,10 @@ Copyright (c) .NET Foundation. All rights reserved.
RuntimeIdentifier in the path if it was explicitly specified, not if it was inferred. This is the
behavior we want.

The BlazorWebAssembly .props file sets the RuntimeIdentifier to blazor-wasm, so treat that as a special case.
The BlazorWebAssembly .props file sets the RuntimeIdentifier to browser-wasm, so treat that as a special case.
-->
<ArtifactsPivots Condition="'$(RuntimeIdentifier)' != '' And !('$(RuntimeIdentifier)' == 'browser-wasm' And '$(AppendRuntimeIdentifierToOutputPath)' == 'false')"
>$(ArtifactsPivots)_$(RuntimeIdentifier.ToLowerInvariant())</ArtifactsPivots>

</PropertyGroup>

<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(IncludeProjectNameInArtifactsPaths)' == 'true'">
Expand Down Expand Up @@ -136,6 +136,8 @@ Copyright (c) .NET Foundation. All rights reserved.

<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true'">
<DefaultItemExcludes>$(DefaultItemExcludes);$(ArtifactsPath)/**</DefaultItemExcludes>
<!-- Exclude bin and obj folders to avoid issues with projects that switch to using artifacts output format -->
<DefaultItemExcludes>$(DefaultItemExcludes);bin/**;obj/**</DefaultItemExcludes>
</PropertyGroup>

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ Copyright (c) .NET Foundation. All rights reserved.
<ImportFrameworkWinFXTargets Condition="'$(ImportFrameworkWinFXTargets)' == ''">false</ImportFrameworkWinFXTargets>
</PropertyGroup>

<PropertyGroup>
<_TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))</_TargetFrameworkVersionWithoutV>
</PropertyGroup>

<!--
Import targets from RazorSDK if referenced
Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
Expand Down
Loading