microsoft / microsoft/vscode-dotnettools
[NETSDKE2E][Green] Error MSB4057 'The target "ResolveProjectReferences" does not exist in the project.' occurs after switching single TFM to multiple TFM.
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 321
- Forks
- 54
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 2
Description
REGRESSION INFO:
Also repro in C# DevKit public Prerelease 3.33.194
INSTALL STEP
OS: windows x64/Linux x64
Install the SDK 10.0.400, SDK 9.0.318
Install VS Code stable - 1.138.0
Install C# Dev Kit V3 Sept release 3.40.201, includes C# 2.151.28
REPRO STEPS
- Click the Create .NET Project button to create a Console app project (e.g. ConsoleApp1).
- Expand C# Project Details from the Explorer sidebar.
- Open csproj file, switch from single TFM to multiple TFM (e.g. net10.0;net9.0)
- Press "Ctrl+S" or build the project.
Expected
Error MSB4057 'The target "ResolveProjectReferences" does not exist in the project.' occurs in the "Problems" window.
Actual
No error occurs.
Note:
- If you DON'T expand C# Project Details in step2, the bug is not repro.
- After close and re-open the VS Code, the error disappeared.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue through the Create .NET Project flow, expand C# Project Details, then change the csproj from one TargetFramework to multiple TargetFrameworks and build. Start by reviewing the attached csdevkit logs and the behavior around the C# Project Details view. Done means the multi-targeting change no longer produces the reported MSB4057 error, with the expected and actual behavior clarified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, vscode
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100