Skip to content

Commit a2e7d82

Browse files
Merging main into darc-main-9c426504-cf32-4925-b1a9-d5d072fa1d05
2 parents 49f80c6 + 7ee7342 commit a2e7d82

Some content is hidden

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

42 files changed

+237
-117
lines changed

.github/workflows/update-man-pages.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,21 @@ jobs:
2222
rm ./documentation/manpages/sdk/*
2323
2424
./documentation/manpages/tool/run_docker.sh
25-
26-
if [[ -n $(git status -s) ]]; then
25+
26+
# Only add files with more than 2 changed lines
27+
for line in $(git diff --numstat | awk '$1+$2 > 2 {print $3}'); do
28+
git add "$line"
29+
done
30+
31+
if ! git diff --cached --quiet; then
2732
git config user.name 'github-actions'
2833
git config user.email 'github-actions@github.com'
2934
date=$(date +%F)
30-
git add .
3135
title="[automated] Update man pages"
3236
body="This action is executed twice a month to automatically update the manpages based on the latest changes to the dotnet/docs repo"
3337
branch=update-man-page-$date
3438
git checkout -b $branch
35-
git commit -a -m "$title"
39+
git commit -m "$title"
3640
git push -u origin $branch --force
3741
gh pr create --base main --head $branch --title "$title" --body "$body"
3842
fi

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<!-- Using multiple feeds isn't supported by Maestro: https://github.com/dotnet/arcade/issues/14155. -->
55
<NoWarn>$(NoWarn);NU1507</NoWarn>
66
</PropertyGroup>
7-
87
<ItemGroup>
98
<PackageVersion Include="Basic.CompilerLog.Util" Version="0.9.9" />
109
<PackageVersion Include="AwesomeAssertions" Version="$(AwesomeAssertionsVersion)" />
10+
<PackageVersion Include="BenchmarkDotNet" Version="$(BenchmarkDotNetPackageVersion)" />
1111
<PackageVersion Include="AwesomeAssertions.Json" Version="$(AwesomeAssertionsJsonVersion)" />
1212
<PackageVersion Include="MicroBuild.Plugins.SwixBuild.Dotnet" Version="1.1.87-gba258badda" />
1313
<PackageVersion Include="Microsoft.ApplicationInsights" Version="$(MicrosoftApplicationInsightsPackageVersion)" />

documentation/general/decouple-vs-and-net-sdk.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,6 @@ Solutions that mix .NET SDK and Visual Studio projects will end up with multiple
119119

120120
The compiler will offer a property that allows SDK projects to use the MSBuild version of the compiler when being built with `msbuild`: `<RoslynCompilerType>Framework</RoslynCompilerType>`. This can be added to a `Directory.Build.props` file to impact the entire solution. This is not expected to be a common scenario but is available for customers who need it. This property will be ignored when using `dotnet build` as there is no way to fall back to the Visual Studio compiler in that scenario.
121121

122-
> [!NOTE]
123-
> These values are recognized for property `RoslynCompilerType`:
124-
> - `Core`: use the compiler that comes with the .NET SDK
125-
> - `Framework`: use the compiler that comes with .NET Framework MSBuild
126-
> - `FrameworkPackage`: download the Microsoft.Net.Sdk.Compilers.Toolset package which contains the .NET Framework compiler corresponding to the .NET SDK version
127-
128122
### .NET Framework based analyzers
129123

130124
There are a few analyzers which are built against .NET Framework TFMs. That means when loaded in a .NET Core compiler it could lead to compatibility issues. This is not expected to be a significant issue as our processes have been pushing customers to target `netstandard` in analyzers for 5+ years. However it is possible that some customers will run into issues here.
@@ -137,6 +131,20 @@ Today there is not a 100% reliable way to shutdown the VBCSCompiler process. The
137131

138132
To mitigate this we will be fixing the `build-server shutdown` command to be reliable across all the scenarios we care about. The details of this are captured in [issue 45956](https://github.com/dotnet/sdk/issues/45956).
139133

134+
## RoslynCompilerType
135+
136+
Based on the value of the `RoslynCompilerType` property, the SDK sets property `RoslynTasksAssembly` to a full path to a [Roslyn build task DLL][roslyn-build-task],
137+
and the SDK targets use `$(RoslynTasksAssembly)` to load the build task.
138+
139+
The SDK also sets `RoslynTargetsPath` to the directory path of the roslyn tasks assembly. This property is used by some targets
140+
but it should be avoided if possible because the tasks assembly name can change as well, not just the directory path.
141+
142+
These values are recognized for property `RoslynCompilerType`:
143+
- `Core`: use the compiler that comes with the .NET SDK
144+
- `Framework`: use the compiler that comes with .NET Framework MSBuild
145+
- `FrameworkPackage`: download the Microsoft.Net.Sdk.Compilers.Toolset package which contains the .NET Framework compiler corresponding to the .NET SDK version
146+
- `Custom`: the SDK will not override `RoslynTasksAssembly` - used for example by Microsoft.Net.Compilers.Toolset package which injects its own version of the build task
147+
140148
## Alternative
141149

142150
### Make the compiler in Visual Studio pluggable
@@ -189,6 +197,7 @@ There is only one version of the DevKit extension. It is released using the late
189197
[matrix-of-paine]: https://aka.ms/dotnet/matrixofpaine
190198
[sdk-lifecycle]: https://learn.microsoft.com/en-us/dotnet/core/porting/versioning-sdk-msbuild-vs#lifecycle
191199
[code-razor-vs-load]: https://github.com/dotnet/roslyn/blob/9aea80927e3d4e5a2846efaa710438c0d8d2bfa2/src/Workspaces/Core/Portable/Workspace/ProjectSystem/ProjectSystemProject.cs#L1009
200+
[roslyn-build-task]: https://github.com/dotnet/roslyn/blob/ccb05769e5298ac23c01b33a180a0b3715f53a18/src/Compilers/Core/MSBuildTask/README.md
192201
[setup-dotnet]: https://github.com/actions/setup-dotnet
193202
[pr-detect-torn-state]: https://github.com/dotnet/installer/pull/19144
194203
[issue-analyzer-mt]: https://github.com/dotnet/sdk/issues/20355

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,13 +549,13 @@
549549
<Uri>https://github.com/dotnet/arcade-services</Uri>
550550
<Sha>d2a784a45bb47bc72c63eb6c6023a7a23869f148</Sha>
551551
</Dependency>
552-
<Dependency Name="Microsoft.Testing.Platform" Version="1.8.0-preview.25318.4">
552+
<Dependency Name="Microsoft.Testing.Platform" Version="1.8.0-preview.25319.7">
553553
<Uri>https://github.com/microsoft/testfx</Uri>
554-
<Sha>0138b4a65787965df7e592b83d32a237b9e65b26</Sha>
554+
<Sha>2fa4fcacf57fd871084100200c41d526ef15c5a6</Sha>
555555
</Dependency>
556-
<Dependency Name="MSTest" Version="3.10.0-preview.25318.4">
556+
<Dependency Name="MSTest" Version="3.10.0-preview.25319.7">
557557
<Uri>https://github.com/microsoft/testfx</Uri>
558-
<Sha>0138b4a65787965df7e592b83d32a237b9e65b26</Sha>
558+
<Sha>2fa4fcacf57fd871084100200c41d526ef15c5a6</Sha>
559559
</Dependency>
560560
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="10.0.0-preview.7.25320.118">
561561
<Uri>https://github.com/dotnet/dotnet</Uri>

eng/Versions.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<UsingToolVSSDK>true</UsingToolVSSDK>
3131
<FlagNetStandard1XDependencies Condition="'$(DotNetBuildSourceOnly)' == 'true'">true</FlagNetStandard1XDependencies>
3232
<!-- This property is only used in the dotnet test integration tests. -->
33-
<MicrosoftTestingPlatformVersion>1.8.0-preview.25318.4</MicrosoftTestingPlatformVersion>
33+
<MicrosoftTestingPlatformVersion>1.8.0-preview.25319.7</MicrosoftTestingPlatformVersion>
3434
</PropertyGroup>
3535
<PropertyGroup Label="Servicing version information">
3636
<VersionFeature21>30</VersionFeature21>
@@ -323,9 +323,10 @@
323323
<AwesomeAssertionsVersion>8.0.2</AwesomeAssertionsVersion>
324324
<AwesomeAssertionsJsonVersion>8.0.0</AwesomeAssertionsJsonVersion>
325325
<MoqPackageVersion>4.18.4</MoqPackageVersion>
326-
<MSTestVersion>3.10.0-preview.25318.4</MSTestVersion>
326+
<MSTestVersion>3.10.0-preview.25319.7</MSTestVersion>
327327
<XunitCombinatorialVersion>1.3.2</XunitCombinatorialVersion>
328328
<MicrosoftDotNetInstallerWindowsSecurityTestDataPackageVersion>8.0.0-beta.23607.1</MicrosoftDotNetInstallerWindowsSecurityTestDataPackageVersion>
329+
<BenchmarkDotNetPackageVersion>0.14.0</BenchmarkDotNetPackageVersion>
329330
</PropertyGroup>
330331
<PropertyGroup Label="Workload manifest package versions">
331332
<AspireFeatureBand>8.0.100</AspireFeatureBand>

sdk.slnx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@
138138
<Folder Name="/src/StaticWebAssetsSdk/">
139139
<File Path="src/StaticWebAssetsSdk/.editorconfig" />
140140
</Folder>
141+
<Folder Name="/src/StaticWebAssetsSdk/benchmarks/">
142+
<Project Path="src/StaticWebAssetsSdk/benchmarks/Microsoft.NET.Sdk.StaticWebAssets.Benchmarks.csproj" />
143+
</Folder>
141144
<Folder Name="/src/StaticWebAssetsSdk/Sdk/">
142145
<File Path="src/StaticWebAssetsSdk/Sdk/Sdk.props" />
143146
<File Path="src/StaticWebAssetsSdk/Sdk/Sdk.StaticWebAssets.StaticAssets.ProjectSystem.props" />

src/Cli/Microsoft.TemplateEngine.Cli/Help/HelpBuilder.Default.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,22 @@ public static string GetArgumentUsageLabel(Symbol parameter)
5050
// By default Option.Name == Argument.Name, don't repeat it
5151
return parameter switch
5252
{
53-
Argument argument => GetUsageLabel(argument.HelpName, argument.ValueType, argument.CompletionSources, argument) ?? $"<{argument.Name}>",
54-
Option option => GetUsageLabel(option.HelpName, option.ValueType, option.CompletionSources, option) ?? "",
53+
Argument argument => GetUsageLabel(argument.HelpName, argument.ValueType, argument.CompletionSources, argument, argument.Arity) ?? $"<{argument.Name}>",
54+
Option option => GetUsageLabel(option.HelpName, option.ValueType, option.CompletionSources, option, option.Arity) ?? "",
5555
_ => throw new InvalidOperationException()
5656
};
5757

58-
static string? GetUsageLabel(string? helpName, Type valueType, List<Func<CompletionContext, IEnumerable<CompletionItem>>> completionSources, Symbol symbol)
58+
static string? GetUsageLabel(string? helpName, Type valueType, List<Func<CompletionContext, IEnumerable<CompletionItem>>> completionSources, Symbol symbol, ArgumentArity arity)
5959
{
6060
// Argument.HelpName is always first choice
6161
if (!string.IsNullOrWhiteSpace(helpName))
6262
{
6363
return $"<{helpName}>";
6464
}
65-
else if (!(valueType == typeof(bool) || valueType == typeof(bool?)) && completionSources.Count > 0)
65+
else if (
66+
!(valueType == typeof(bool) || valueType == typeof(bool?))
67+
&& arity.MaximumNumberOfValues > 0 // allowing zero arguments means we don't need to show usage
68+
&& completionSources.Count > 0)
6669
{
6770
IEnumerable<string> completions = symbol
6871
.GetCompletions(CompletionContext.Empty)

src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)