-
Notifications
You must be signed in to change notification settings - Fork 26
None MSBuild items added for .fs files when compiling #94
Description
If you compile a F# console project you see None items added for each .fs file in the project.
To reproduce:
.NET SDK 1.0.1 installed.
- dotnet new console -lang F#
- dotnet restore
- dotnet build /v:diag > build.log
If you look in the build.log you see a None and a Compile item for Program.fs:
Compile
Program.fs
DebugSymbolsProjectOutputGroupOutput
~/Projects/Tests/dotnet/bar/obj/Debug/netcoreapp1.1/bar.pdb
FinalOutputPath = ~/Tests/dotnet/bar/bin/Debug/netcoreapp1.1/bar.pdb
TargetPath = bar.pdb
DeployManifest
obj/Debug/netcoreapp1.1/bar.application
TargetPath = bar.application
IntermediateAssembly
obj/Debug/netcoreapp1.1/bar.dll
None
Program.fs
If you edit the .fsproj file and add <EnableDefaultItems>false</EnableDefaultItems> the None items are not added.
The FSharp.NET.Sdk 1.0.1 NuGet package has the following in its FSharp.NET.Sdk.props:
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
So maybe this should also have EnableDefaultItems set to false. Not sure if EnableDefaultEmbeddedResourceItems and EnableDefaultNoneItems need to be set to false. It looks like just setting EnableDefaultItems to false would fix the problem.
In general this does not seem to break anything. The build still works. I only noticed it with recent VS for Mac builds since VS for Mac is now using the SDK imports to determine the files that should be displayed in the Solution window and I was seeing duplicate files. The duplicate files in VS for Mac was not caused by this, since due to another bug it is using resolved MSBuild items ignoring the conditions, but I whilst debugging I ran across this and initially thought it was the cause.