A file named 'Directory.Build.targets' is already included in 'ConsoleApp1'
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- csharp, vscode
- Domain
- build-system, tooling
Research direction
Start with the New .NET File command in the C# Dev Kit flow and reproduce the issue by adding MSBuild Directory.Build.props and Directory.Build.targets to a C# Console App in sequence. Done means both files can be selected and added together without the duplicate-file message; no source files or tests are named in the issue.
Written by the indexing model from the issue text.
Description
1.Not a regression.
2.Low priority.
Describe the issue
If adding either the MSBuild Directory.Build.props file or the MSBuild Directory.Build.targets file first, you'll get a message saying it already exists when you try to add the other one.
Collect logs
csdevkit-logs-2026-07-31T05-50-25.zip
Steps to reproduce
1.Create a C# Console App.
2.Right-click the project folder->New .NET File->Select MSBuild Directory.Build.props file and MSBuild Directory.Build.targets files to add.
Expected behavior
These two files can be added together.
Environment information
.NET Install Tool: Pre-release 3.1.0
C# Dev Kit Extension: Pre-release v3.27.234
C# Extension: Pre-release v2.147.94
.NET SDKs: 11.0.100-preview.6.26359.118
VSCode Insiders: 1.132.0
Platform: Windows X64
- Dominant language
- No language data
- Stars
- 321
- Forks
- 54
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 2
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.
More from microsoft/vscode-dotnettools
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
microsoft/vscode-dotnettools#3563 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoft/vscode-dotnettools#3561 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/vscode-dotnettools#3560 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/vscode-dotnettools#3557 ·
-
AIEngineering
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/vscode-dotnettools#3286 ·
All issues in microsoft/vscode-dotnettools
Similar issues
-
Needs Design Priority: Wishlist
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
elementary/flatpak-platform#253 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
objectionary/hone-maven-plugin#1060 ·
-
0.kind: build failure
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Update Vish to 1.1.5 Openpackage-update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
oSoWoSo/vOid_Community_repOsitory#144 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100