My open source project DataTier.Net (https://github.com/DataJuggler/DataTier.Net) has a feature where after i code generate files that make up a data tier I would launch a tool called Visual Studio Project Updater I wrote where I include all the code generated files in a multi-project data-tier.
.Net Core came along, and I no longer had to do this for .Net Core projects, so my code had a contition:
// Only launch the VS Project Updater if this new files were added and this is a .Net Framework project
// This is only needed for a .Net Framework project, as Dot Net Core didn't need this
if ((this.HasFileManager) && (FileManager.WereNewFilesCreated) && (!project.DotNetCore))
{
// include the files generated in the project.
IncludeProjectFiles();
}
Recently I started converting to .Net 5, and I abandoned support for .Net Core, but I noticed .Net 5 files are not automatically included in a project/solution after code generation in a folder of the project.
Did this change between .Net Core 3.1 and .Net 5?
I ported to .Net 5 and changed the above to (!project.Net5) and the files are not included when new files are added.
Yes I know how to manually include the files, it is about 7 files per database table, and if there are many tables it is a pain to do it manually, that is why I wrote my VS Project Updater. The new problem is my VS project editor for .Net Framework so I am sure this will require a change to convert to .Net 5 project structure.
I can't find any documentation or don't where to look on changes between .Net 5 and .Net Core 3.1.
I just want my code generator to work in .Net 5 and this change threw me a curve I wasn't expecting after a month of updating Nuget packages.
Thank you.