Skip to content

Commit 52d8b79

Browse files
committed
Stabilize ReSharper test discovery/build
1 parent c960a13 commit 52d8b79

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

.vscode/extensions.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"atlassian.atlassian-vscode"
1616
],
1717
"unwantedRecommendations": [
18-
// This workspace is ReSharper-first; C# Dev Kit is discouraged.
19-
"ms-dotnettools.csdevkit"
18+
// This workspace is ReSharper-first; dotnet test providers are discouraged.
19+
"ms-dotnettools.csdevkit",
20+
"ms-dotnettools.csharp"
2021
]
2122
}

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@
7474
"dotnet.preferCSharpExtension": true,
7575
"dotnet.automaticallyBuildProjects": false,
7676
"resharper.solution.autoOpenLastSolution": true,
77+
"resharper.build.useResharperBuild": false,
78+
"resharper.build.restorePackagesOnBuild": true,
79+
"resharper.build.smartNugetRestore": true,
80+
"resharper.build.customMsbuildPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\amd64\\MSBuild.exe",
7781
// Git Graph extension settings
7882
"git-graph.dialog.merge.noFastForward": false,
7983
"git-graph.dialog.merge.squashCommits": false,

Directory.Build.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
<!-- Default all managed projects to x64 unless explicitly overridden -->
3636
<PlatformTarget Condition="'$(PlatformTarget)' == ''">x64</PlatformTarget>
3737
<Platforms Condition="'$(Platforms)' == ''">x64</Platforms>
38+
<!--
39+
ReSharper test/build controller can invoke SDK-style net48 projects with RuntimeIdentifier=win-x64.
40+
If restore only produced net48 (no RID graph), ResolvePackageAssets fails with NETSDK1005/NETSDK1047.
41+
Restore win-x64 runtime targets by default so both plain net48 and net48/win-x64 builds succeed.
42+
-->
43+
<RuntimeIdentifiers Condition="'$(MSBuildProjectExtension)' == '.csproj' and '$(RuntimeIdentifiers)' == ''">win-x64</RuntimeIdentifiers>
3844
<!-- Force 64-bit MSBuild host to avoid crashes loading 64-bit native DLLs in build tasks -->
3945
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
4046
<!-- Disable determinism to allow wildcard versions in CommonAssemblyInfo.cs -->

Docs/core-developer-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ git checkout release/9.3
123123

124124
Recommended VS Code extensions for daily development:
125125
- **ReSharper for VS Code** (`jetbrains.resharper-code`) for C# editing, navigation, refactoring, and test explorer
126-
- **C# Dev Kit** (`ms-dotnettools.csdevkit`) is discouraged in this workspace
126+
- **C# Dev Kit** (`ms-dotnettools.csdevkit`) and **C#** (`ms-dotnettools.csharp`) are discouraged in this workspace
127127
- **C/C++** (`ms-vscode.cpptools`) for native editing/debugging
128128
- **PowerShell** (`ms-vscode.powershell`) for build/test scripts
129129

Docs/vscode-stability-profile.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This repository is a mixed native + managed solution (C++ + .NET Framework `net4
55
## Supported inner-loop in VS Code
66

77
- Use ReSharper for VS Code (`jetbrains.resharper-code`) as the default C# experience in VS Code.
8-
- C# Dev Kit (`ms-dotnettools.csdevkit`) is discouraged in this workspace.
8+
- C# Dev Kit (`ms-dotnettools.csdevkit`) and C# (`ms-dotnettools.csharp`) are discouraged in this workspace.
99
- Use `ms-vscode.cpptools` for C/C++ editing and IntelliSense.
1010
- Build and test through repo scripts/tasks:
1111
- `./build.ps1`
@@ -15,6 +15,11 @@ This repository is a mixed native + managed solution (C++ + .NET Framework `net4
1515

1616
- `dotnet.preferCSharpExtension=true` avoids activating C# Dev Kit as the default C# experience.
1717
- `dotnet.automaticallyBuildProjects=false` avoids background build churn/conflicts in large mixed-language solutions.
18+
- ReSharper build settings in `.vscode/settings.json` are pinned for stability:
19+
- `resharper.build.useResharperBuild=false` (delegates full build to MSBuild.exe)
20+
- `resharper.build.restorePackagesOnBuild=true`
21+
- `resharper.build.smartNugetRestore=true`
22+
- `resharper.build.customMsbuildPath` points to `...\\MSBuild\\Current\\Bin\\amd64\\MSBuild.exe`
1823

1924
## Test/build authority
2025

0 commit comments

Comments
 (0)