I ported a library targeting the .NET Framework to a .NET Standard 2.0 library. The two project files (.NET Framework library and the .NET Standard library) are in the same folder and share most of the source code. Everything is working well.
Recently, I added a new class to both projects. When I look at the .NET Standard project file in a text editor I see there are no source file includes (Compile Include="). It appears to just pick up the files from the project folder and subfolders. The only source file entries in the project file are Compile Remove= entries for source files that are not needed.
Even when I add a source file to the project from the project folder, no new Compile Include element is added to the project file, yet the new file is present in Solution Explorer.
Is this normal? The .NET Framework project has a Compile Include elements for all the source files it uses.
Is this normal?
Yes. "SDK style" projects end up being much more compact due to the default includes and excludes for compile items and embedded resources. No more merge conflicts with your colleagues due to both of you adding a C# file etc.
It's a thoroughly good thing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With