Skip to content

Commit

Permalink
Merge branch 'main' into feature/codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
aleks-ivanov committed Jan 21, 2025
2 parents 6e3e6c9 + 79742e5 commit d6d35c0
Show file tree
Hide file tree
Showing 16 changed files with 294 additions and 44 deletions.
28 changes: 14 additions & 14 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Internal.CodeCoverage" Version="17.14.0-preview.25059.1">
<Dependency Name="Microsoft.Internal.CodeCoverage" Version="17.14.0-preview.25067.3">
<Uri>https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage</Uri>
<Sha>0d62d044028d9ac809f02d898d5d7349bbcd00a4</Sha>
<Sha>d52391c515fffc2d8e12bccbd54758ca92b66e9a</Sha>
</Dependency>
<Dependency Name="Microsoft.Diagnostics.NETCore.Client" Version="0.2.606201">
<Dependency Name="Microsoft.Diagnostics.NETCore.Client" Version="0.2.606601">
<Uri>https://github.com/dotnet/diagnostics</Uri>
<Sha>63fa5d84e9ef80a1b4fc9efaa89fd45c1cbccdc0</Sha>
<Sha>d2289f3930280269f658d2ba65bd7ea6a5c328b7</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.diagnostics" Version="9.0.0-preview.25062.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.diagnostics" Version="9.0.0-preview.25066.1">
<Uri>https://github.com/dotnet/diagnostics</Uri>
<Sha>63fa5d84e9ef80a1b4fc9efaa89fd45c1cbccdc0</Sha>
<Sha>d2289f3930280269f658d2ba65bd7ea6a5c328b7</Sha>
<SourceBuild RepoName="diagnostics" ManagedOnly="true" />
</Dependency>
<!-- Intermediate is necessary for source build. -->
Expand All @@ -22,9 +22,9 @@
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="10.0.606004">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="10.0.606501">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>1d0bf118044fc096231bfba85b0cd68aad0d1507</Sha>
<Sha>be366997dfae0aa6e3c9a78bad10bfb3f79cbde1</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<!-- Necessary for source-build. This allows the live version of the package to be used by source-build. -->
Expand All @@ -44,14 +44,14 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.25058.5">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.25065.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>8cc6ecd76c24ef6665579a5c5e386a211a1e7c54</Sha>
<Sha>c4bbc67763bf0c5a868862df874079380e647d61</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.25058.5">
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.25065.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>8cc6ecd76c24ef6665579a5c5e386a211a1e7c54</Sha>
<Sha>c4bbc67763bf0c5a868862df874079380e647d61</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DiaSymReader.Pdb2Pdb" Version="1.1.0-beta2-19575-01">
Expand All @@ -62,9 +62,9 @@
<Uri>https://github.com/dotnet/symreader-converter</Uri>
<Sha>c5ba7c88f92e2dde156c324a8c8edc04d9fa4fe0</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.25058.5">
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.25065.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>8cc6ecd76c24ef6665579a5c5e386a211a1e7c54</Sha>
<Sha>c4bbc67763bf0c5a868862df874079380e647d61</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
8 changes: 4 additions & 4 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@
<MicrosoftCodeAnalysisBannedApiAnalyzersVersion>3.11.0-beta1.23525.2</MicrosoftCodeAnalysisBannedApiAnalyzersVersion>
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.11.0-beta1.23525.2</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
<MicrosoftCodeCoverageIOVersion>17.7.0</MicrosoftCodeCoverageIOVersion>
<MicrosoftDiagnosticsNETCoreClientVersion>0.2.606201</MicrosoftDiagnosticsNETCoreClientVersion>
<MicrosoftDiagnosticsNETCoreClientVersion>0.2.606601</MicrosoftDiagnosticsNETCoreClientVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>3.1.0</MicrosoftExtensionsDependencyModelPackageVersion>
<MicrosoftExtensionsFileSystemGlobbingVersion>2.0.0</MicrosoftExtensionsFileSystemGlobbingVersion>
<MicrosoftFakesVersion>17.9.0-beta.24058.4</MicrosoftFakesVersion>
<MicrosoftInternalCodeCoverageVersion>17.14.0-preview.25059.1</MicrosoftInternalCodeCoverageVersion>
<MicrosoftVisualStudioDiagnosticsUtilitiesVersion>17.10.34924.118</MicrosoftVisualStudioDiagnosticsUtilitiesVersion>
<MicrosoftInternalCodeCoverageVersion>17.14.0-preview.25067.3</MicrosoftInternalCodeCoverageVersion>
<MicrosoftVisualStudioDiagnosticsUtilitiesVersion>17.13.35716.53</MicrosoftVisualStudioDiagnosticsUtilitiesVersion>
<MicrosoftVisualStudioEnterpriseAspNetHelper>$(MicrosoftVisualStudioDiagnosticsUtilitiesVersion)</MicrosoftVisualStudioEnterpriseAspNetHelper>
<MicrosoftVisualStudioInteropVersion>17.10.525-preview.1</MicrosoftVisualStudioInteropVersion>
<MicrosoftVSTelemetryVersion>17.6.46</MicrosoftVSTelemetryVersion>
<MicrosoftVSUtilitiesInternalVersion>16.3.42</MicrosoftVSUtilitiesInternalVersion>
<MicrosoftVSSDKBuildToolsVersion>17.4.2124</MicrosoftVSSDKBuildToolsVersion>
<NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
<NewtonsoftJsonVersion Condition="'$(DotNetBuildSourceOnly)' == 'true'">13.0.3</NewtonsoftJsonVersion>
<SystemCollectionsImmutableVersion>1.5.0</SystemCollectionsImmutableVersion>
<SystemComponentModelCompositionVersion>4.5.0</SystemComponentModelCompositionVersion>
Expand Down
2 changes: 1 addition & 1 deletion eng/common/template-guidance.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extends:
Note: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`).

# Development notes
## Development notes

**Folder / file structure**

Expand Down
6 changes: 3 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"version": "9.0.102",
"rollForward": "minor",
"allowPrerelease": false,
"architecture": "x64"
Expand Down Expand Up @@ -28,9 +28,9 @@
"version": "17.8.0"
},
"vswhere": "2.2.7",
"dotnet": "9.0.100"
"dotnet": "9.0.102"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25058.5"
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25065.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
<!-- / CVE-2017-11770 -->

<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ private FeatureFlag() { }
// Disable not sharing .NET Framework testhosts. Which will return behavior to sharing testhosts when they are running .NET Framework dlls, and are not disabling appdomains or running in parallel.
public const string VSTEST_DISABLE_SHARING_NETFRAMEWORK_TESTHOST = nameof(VSTEST_DISABLE_SHARING_NETFRAMEWORK_TESTHOST);

// Disable outputting Traits into TRX file in the Properties node.
public const string VSTEST_DISABLE_TRX_WRITE_PROPERTIES = nameof(VSTEST_DISABLE_TRX_WRITE_PROPERTIES);

[Obsolete("Only use this in tests.")]
internal static void Reset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Microsoft.TestPlatform.TestHostRuntimeProvider, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("vstest.console, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("vstest.console.arm64, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("Microsoft.TestPlatform.CoreUtilities.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

<ItemGroup>
<Compile Include="$(RepoRoot)src\Microsoft.TestPlatform.TestHostProvider\Properties\TestExtensionTypesAttribute.cs" Link="Properties\TestExtensionTypesAttribute.cs" />
<Compile Include="..\..\shared\NullableAttributes.cs" Link="NullableAttributes.cs" />
</ItemGroup>

<ItemGroup>
Expand All @@ -49,11 +48,6 @@
</ItemGroup>

<ItemGroup>
<Compile Update="NullableHelpers.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>NullableHelpers.tt</DependentUpon>
</Compile>
<Compile Update="Resources\TrxResource.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
Expand Down Expand Up @@ -81,13 +75,6 @@
<AdditionalFiles Include="PublicAPI/$(TargetFramework)/PublicAPI.Unshipped.txt" />
</ItemGroup>

<ItemGroup>
<None Update="NullableHelpers.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>NullableHelpers.cs</LastGenOutput>
</None>
</ItemGroup>

<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;

using Microsoft.TestPlatform.Extensions.TrxLogger.XML;
using Microsoft.VisualStudio.TestPlatform.Extensions.TrxLogger;

namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel;

/// <summary>
/// Stores a string which categorizes the Test
/// </summary>
internal sealed class Property : IXmlTestStore
{
[StoreXmlSimpleField(Location = "@Key", DefaultValue = "")]
private readonly string _key = string.Empty;
[StoreXmlSimpleField(Location = "@Value", DefaultValue = "")]
private readonly string _value = string.Empty;

/// <summary>
/// Create a new item with the property set
/// </summary>
public Property(string key, string value)
{
// Treat null as empty.

_key = StripIllegalChars(key);
_value = StripIllegalChars(value);
}

/// <summary>
/// Gets the property for this Trait
/// </summary>
public string Trait
{
get
{
return _key;
}
}

private static string StripIllegalChars(string property)
{
string ret = property.Trim();
ret = ret.Replace("&", string.Empty);
ret = ret.Replace("|", string.Empty);
ret = ret.Replace("!", string.Empty);
ret = ret.Replace(",", string.Empty);
return ret;
}

/// <summary>
/// Compare the values of the items
/// </summary>
/// <param name="other">Value being compared to.</param>
/// <returns>True if the values are the same and false otherwise.</returns>
public override bool Equals(object? other)
{
if (other is not Property otherItem)
{
return false;
}

TPDebug.Assert(_key != null, "property is null");
return string.Equals(_key, otherItem._key, StringComparison.OrdinalIgnoreCase);
}

/// <summary>
/// Convert the property name to a hashcode
/// </summary>
/// <returns>Hashcode of the property.</returns>
public override int GetHashCode()
{
TPDebug.Assert(_key != null, "property is null");
return _key.ToUpperInvariant().GetHashCode();
}

/// <summary>
/// Convert the property name to a string
/// </summary>
/// <returns>The property.</returns>
public override string ToString()
{
TPDebug.Assert(_key != null, "property is null");
return _key;
}

/// <summary>
/// Saves the class under the XmlElement.
/// </summary>
/// <param name="element"> XmlElement element </param>
/// <param name="parameters"> XmlTestStoreParameters parameters</param>
public void Save(System.Xml.XmlElement element, XmlTestStoreParameters? parameters)
{
new XmlPersistence().SaveSingleFields(element, this, parameters);
}
}
Loading

0 comments on commit d6d35c0

Please sign in to comment.