vscode-csproj icon indicating copy to clipboard operation
vscode-csproj copied to clipboard

Tries to add files to .NET Core projects

Open JesseNewman19 opened this issue 8 years ago • 3 comments

.NET Core projects do not need to "include" files by default--they only exclude.

I think there should be proper support for detecting when the csproj file is a .NET Core project and properly disable the "File is not found in project" popups for those files.

JesseNewman19 avatar Oct 25 '17 20:10 JesseNewman19

I also found this issue today

alexjamesbrown avatar Dec 28 '17 14:12 alexjamesbrown

The workaround I used is to add to settings: "csproj.excludeRegex": "ProjectName"

szyb avatar Mar 27 '18 10:03 szyb

Checking the <Project> element for Sdk="Microsoft.NET.Sdk" should suffice. SDK-style projects use implicit File Includes regardless of the TargetFramework in both DotNet/VSCode and VS IDE.

Projects that use the .NET Framework (.NET 4.x) format lack the Sdk property and require explicit includes.

BinToss avatar Oct 21 '21 01:10 BinToss