Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 7 additions & 4 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,16 @@

<!-- Direct references to cDAC projects for packing -->
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\Microsoft.Diagnostics.DataContractReader\Microsoft.Diagnostics.DataContractReader.csproj;
$(SharedNativeRoot)managed\cdac\Microsoft.Diagnostics.DataContractReader.Abstractions\Microsoft.Diagnostics.DataContractReader.Abstractions.csproj;
$(SharedNativeRoot)managed\cdac\Microsoft.Diagnostics.DataContractReader.Legacy\Microsoft.Diagnostics.DataContractReader.Legacy.csproj;
$(SharedNativeRoot)managed\cdac\Microsoft.Diagnostics.DataContractReader.Contracts\Microsoft.Diagnostics.DataContractReader.Contracts.csproj" Category="tools" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
$(SharedNativeRoot)managed\cdac\Microsoft.Diagnostics.DataContractReader.Abstractions\Microsoft.Diagnostics.DataContractReader.Abstractions.csproj;
$(SharedNativeRoot)managed\cdac\Microsoft.Diagnostics.DataContractReader.Legacy\Microsoft.Diagnostics.DataContractReader.Legacy.csproj;
$(SharedNativeRoot)managed\cdac\Microsoft.Diagnostics.DataContractReader.Contracts\Microsoft.Diagnostics.DataContractReader.Contracts.csproj" Category="tools" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />

<!-- Transport package for added testing -->
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\tests\Microsoft.Diagnostics.Internal.RuntimeMemoryMocks\Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.csproj" Category="tools" />
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ProjectToBuild entry is part of the “Direct references … for packing” block, but unlike the other entries here it isn’t conditioned on $(DotNetBuildSourceOnly) != 'true'. If source-build skips packing these projects, this unconditional build can reintroduce source-build failures; consider applying the same condition for consistency.

Suggested change
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\tests\Microsoft.Diagnostics.Internal.RuntimeMemoryMocks\Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.csproj" Category="tools" />
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\tests\Microsoft.Diagnostics.Internal.RuntimeMemoryMocks\Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.csproj" Category="tools" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />

Copilot uses AI. Check for mistakes.
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+tools.cdactests+'))">
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\tests\Microsoft.Diagnostics.DataContractReader.Tests.csproj" Test="true" Category="tools"/>
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\tests\Microsoft.Diagnostics.DataContractReader.Tests\Microsoft.Diagnostics.DataContractReader.Tests.csproj" Test="true" Category="tools"/>
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+tools.cdacdumptests+'))">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
<TargetFramework>$(NetMinimum)</TargetFramework>
<RootNamespace>Microsoft.Diagnostics.DataContractReader</RootNamespace>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
<TargetFramework>$(NetMinimum)</TargetFramework>
<RootNamespace>Microsoft.Diagnostics.DataContractReader</RootNamespace>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand All @@ -14,6 +14,7 @@

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Diagnostics.DataContractReader.Tests" />
<InternalsVisibleTo Include="Microsoft.Diagnostics.Internal.RuntimeMemoryMocks" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
<TargetFramework>$(NetMinimum)</TargetFramework>
<RootNamespace>Microsoft.Diagnostics.DataContractReader.Legacy</RootNamespace>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
<TargetFramework>$(NetMinimum)</TargetFramework>
<RootNamespace>Microsoft.Diagnostics.DataContractReader</RootNamespace>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion src/native/managed/cdac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Use the `dotnet.sh` (or `dotnet.cmd`) script in the repo root:

```bash
./dotnet.sh build /t:Test \
src/native/managed/cdac/tests/Microsoft.Diagnostics.DataContractReader.Tests.csproj \
src/native/managed/cdac/tests/Microsoft.Diagnostics.DataContractReader.Tests/Microsoft.Diagnostics.DataContractReader.Tests.csproj \
-c Debug -p:RuntimeConfiguration=Debug -p:LibrariesConfiguration=Release
```

Expand Down
3 changes: 2 additions & 1 deletion src/native/managed/cdac/cdac.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<Project Path="mscordaccore_universal/mscordaccore_universal.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/Microsoft.Diagnostics.DataContractReader.Tests.csproj" />
<Project Path="tests/Microsoft.Diagnostics.Internal.RuntimeMemoryMocks/Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.csproj" />
<Project Path="tests/Microsoft.Diagnostics.DataContractReader.Tests/Microsoft.Diagnostics.DataContractReader.Tests.csproj" />
<Project Path="tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj" />
</Folder>
</Solution>
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
</ItemGroup>

<ItemGroup>
<Compile Include="$(LibrariesProjectRoot)Common\src\System\HResults.cs" Link="Common\System\HResults.cs" />
<Compile Include="..\TestHelpers.cs" Link="TestHelpers.cs" />
<Compile Include="$(LibrariesProjectRoot)Common\src\System\HResults.cs" Link="Common\System\HResults.cs" />
<Compile Include="..\Microsoft.Diagnostics.DataContractReader.Tests\TestHelpers.cs" Link="TestHelpers.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Diagnostics.DataContractReader.Contracts;
using Moq;
using Xunit;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Xunit;
using Microsoft.Diagnostics.DataContractReader.Contracts;
using Microsoft.Diagnostics.DataContractReader.Legacy;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using Microsoft.Diagnostics.DataContractReader.Legacy;
using Xunit;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
namespace Microsoft.Diagnostics.DataContractReader.Tests;

using static Microsoft.Diagnostics.DataContractReader.Tests.MockExtensions;
using MockCodeVersions = MockDescriptors.CodeVersions;
using MockCodeVersions = Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.MockDescriptors.CodeVersions;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

internal static class MockExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Diagnostics;
using System.Linq;
using System.Text;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests.ContractDescriptor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests.ContractDescriptor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Runtime.CompilerServices;
using System.Text;
using Xunit;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests.ContractDescriptor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Runtime.CompilerServices;
using System.Text;
using Xunit;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests.ContractDescriptor;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -7,6 +7,7 @@
using Microsoft.Diagnostics.DataContractReader.Contracts;
using Moq;
using Xunit;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +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 Xunit;

using System.Collections.Generic;
using Microsoft.Diagnostics.DataContractReader.Contracts;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.ExecutionManager;
using Moq;
using Xunit;

namespace Microsoft.Diagnostics.DataContractReader.Tests.ExecutionManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Xunit;

using Microsoft.Diagnostics.DataContractReader.ExecutionManagerHelpers;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests.ExecutionManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using Xunit;

using Microsoft.Diagnostics.DataContractReader.ExecutionManagerHelpers;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.ExecutionManager;

namespace Microsoft.Diagnostics.DataContractReader.Tests.ExecutionManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Xunit;

using Microsoft.Diagnostics.DataContractReader.ExecutionManagerHelpers;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests.ExecutionManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Collections.Generic;
using System;
using Moq;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests.ExecutionManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using Microsoft.Diagnostics.DataContractReader.Contracts;
using Xunit;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Diagnostics.DataContractReader.Legacy;
using Moq;
using Xunit;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

namespace Microsoft.Diagnostics.DataContractReader.Tests;

using MockLoader = MockDescriptors.Loader;
using MockLoader = Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.MockDescriptors.Loader;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

public unsafe class LoaderTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Microsoft.Diagnostics.DataContractReader.RuntimeTypeSystemHelpers;
using Moq;
using Xunit;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

namespace Microsoft.Diagnostics.DataContractReader.Tests;

using MockRTS = MockDescriptors.RuntimeTypeSystem;
using MockRTS = Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.MockDescriptors.RuntimeTypeSystem;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

public class MethodTableTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@
<JsonSerializerIsReflectionEnabledByDefault>false</JsonSerializerIsReflectionEnabledByDefault>
</PropertyGroup>

<ItemGroup>
<!-- DumpTests is a separate test project with its own csproj -->
<Compile Remove="DumpTests\**" />
</ItemGroup>

<Import Project="..\..\subproject.props" />
<Import Project="..\..\..\subproject.props" />

<ItemGroup>
<ProjectReference Include="..\mscordaccore_universal\mscordaccore_universal.csproj" AdditionalProperties="$(SplitSubprojectProps)" />
<ProjectReference Include="..\..\mscordaccore_universal\mscordaccore_universal.csproj" AdditionalProperties="$(SplitSubprojectProps)" />
<ProjectReference Include="..\Microsoft.Diagnostics.Internal.RuntimeMemoryMocks\Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Moq" Version="$(MoqVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

namespace Microsoft.Diagnostics.DataContractReader.Tests;

using MockObject = MockDescriptors.Object;
using MockObject = Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.MockDescriptors.Object;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

public unsafe class ObjectTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Collections.Generic;
using System;
using System.Reflection;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

namespace Microsoft.Diagnostics.DataContractReader.Tests;

using MockReJIT = MockDescriptors.ReJIT;
using MockReJIT = Microsoft.Diagnostics.Internal.RuntimeMemoryMocks.MockDescriptors.ReJIT;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

public class ReJITTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.Diagnostics.DataContractReader.Contracts;
using Moq;
using Xunit;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using Microsoft.Diagnostics.DataContractReader.Legacy;
using Xunit;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Xunit;

using Microsoft.Diagnostics.DataContractReader.Contracts;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Xunit;

using Microsoft.Diagnostics.DataContractReader.Contracts;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Diagnostics.DataContractReader.RuntimeTypeSystemHelpers;
using Moq;
using Xunit;
using Microsoft.Diagnostics.Internal.RuntimeMemoryMocks;

namespace Microsoft.Diagnostics.DataContractReader.Tests;

Expand Down
Loading
Loading