Skip to content

Commit 49a96a8

Browse files
authored
Add support for new output path format (#29599)
2 parents 10f550c + 3a9f255 commit 49a96a8

File tree

105 files changed

+1643
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1643
-409
lines changed

src/Assets/TestPackages/PackageLibraryDirectDependency/PackageLibraryDirectDependency/PackageLibraryDirectDependency.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
2-
32
<PropertyGroup>
43
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
5-
</PropertyGroup>
6-
7-
<PropertyGroup>
84
<TargetFramework>net8.0</TargetFramework>
95
<Copyright>© Microsoft</Copyright>
106
<Product>Razor Test</Product>

src/Assets/TestPackages/PackageLibraryDirectDependency/PackageLibraryTransitiveDependency/PackageLibraryTransitiveDependency.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
<PropertyGroup>
44
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
5-
</PropertyGroup>
6-
7-
<PropertyGroup>
85
<TargetFramework>net8.0</TargetFramework>
96
<Copyright>© Microsoft</Copyright>
107
<Product>Razor Test</Product>

src/Assets/TestPackages/PackageLibraryNoStaticAssets/PackageLibraryNoStaticAssets.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
<PropertyGroup>
44
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
5-
</PropertyGroup>
6-
7-
<PropertyGroup>
85
<TargetFramework>net8.0</TargetFramework>
96
<Copyright>© Microsoft</Copyright>
107
<Product>Razor Test</Product>

src/Assets/TestPackages/PackageLibraryTransitiveDependency/PackageLibraryTransitiveDependency.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
<PropertyGroup>
44
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
5-
</PropertyGroup>
6-
7-
<PropertyGroup>
85
<TargetFramework>net8.0</TargetFramework>
96
<Copyright>© Microsoft</Copyright>
107
<Product>Razor Test</Product>

src/Assets/TestProjects/AllResourcesInSatellite/AllResourcesInSatellite.csproj

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@
88
<PublicSign>true</PublicSign>
99
</PropertyGroup>
1010

11-
<!--
12-
Also target desktop on Windows to get more test coverage:
13-
* Desktop requires satellites to have same public key as parent whereas coreclr does not.
14-
* Reference path handling of satellite assembly generation used to be incorrect for desktop.
15-
-->
16-
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform(`Windows`))">
17-
<TargetFrameworks>$(TargetFrameworks);net46</TargetFrameworks>
18-
</PropertyGroup>
19-
2011
<PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
2112
<PublicSign>false</PublicSign>
2213
</PropertyGroup>

src/Assets/TestProjects/AllResourcesInSatelliteDisableVersionGenerate/AllResourcesInSatellite.csproj

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@
99
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1010
</PropertyGroup>
1111

12-
<!--
13-
Also target desktop on Windows to get more test coverage:
14-
* Desktop requires satellites to have same public key as parent whereas coreclr does not.
15-
* Reference path handling of satellite assembly generation used to be incorrect for desktop.
16-
-->
17-
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform(`Windows`))">
18-
<TargetFrameworks>$(TargetFrameworks);net46</TargetFrameworks>
19-
</PropertyGroup>
20-
2112
<PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
2213
<PublicSign>false</PublicSign>
2314
</PropertyGroup>

src/Assets/TestProjects/RazorClassLibrary/ClassLibrary.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
<PropertyGroup>
44
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
5-
</PropertyGroup>
6-
7-
<PropertyGroup>
85
<TargetFramework>$(AspNetTestTfm)</TargetFramework>
96
<Copyright>© Microsoft</Copyright>
107
<Product>Razor Test</Product>

src/Assets/TestProjects/x64SolutionBuild/x64SolutionBuild.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" />
4-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" />
5-
62
<PropertyGroup>
73
<OutputType>Exe</OutputType>
84
<TargetFramework>$(CurrentTargetFramework)</TargetFramework>
95
</PropertyGroup>
106

7+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" />
8+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" />
9+
1110
<Target Name="CheckPlatform" BeforeTargets="Build">
1211
<Error Condition="'$(Platform)' != 'x64'" Text="This test project expects to be built via solution and have Platform=x64" />
1312
</Target>

src/Cli/dotnet/CommonLocalizableStrings.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,4 +717,10 @@ The default is 'true' if a runtime identifier is specified.</value>
717717
<data name="OSArgumentName" xml:space="preserve">
718718
<value>OS</value>
719719
</data>
720+
<data name="ArtifactsPathOptionDescription" xml:space="preserve">
721+
<value>The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.</value>
722+
</data>
723+
<data name="ArtifactsPathArgumentName" xml:space="preserve">
724+
<value>ARTIFACTS_DIR</value>
725+
</data>
720726
</root>

src/Cli/dotnet/CommonOptions.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ public static Option<string> FrameworkOption(string description) =>
5151
}.ForwardAsSingle(o => $"-property:TargetFramework={o}")
5252
.AddCompletions(Complete.TargetFrameworksFromProjectFile);
5353

54+
public static Option<string> ArtifactsPathOption =
55+
new ForwardedOption<string>(
56+
// --artifacts-path is pretty verbose, should we use --artifacts instead (or possibly support both)?
57+
new string[] { "--artifacts-path" },
58+
description: CommonLocalizableStrings.ArtifactsPathOptionDescription)
59+
{
60+
ArgumentHelpName = CommonLocalizableStrings.ArtifactsPathArgumentName
61+
}.ForwardAsSingle(o => $"-property:ArtifactsPath={CommandDirectoryContext.GetFullPath(o)}");
62+
5463
private static string RuntimeArgName = CommonLocalizableStrings.RuntimeIdentifierArgumentName;
5564
public static IEnumerable<string> RuntimeArgFunc(string rid)
5665
{

0 commit comments

Comments
 (0)