I have a .NET Core meta package project defined in project.json. It does not contain code, but simply links to several other subprojects. This meta-batch project exists for two purposes:
- You can create a NuGet meta package that references the NuGet packages of these subprojects.
- a top-level project can only reference this meta-package project in order to associate the dependency with these subprojects.
This works great with project.json- when creating a meta-package project, all related subprojects are created, and the meta-package project itself does not produce anything.
Now with the .NET Core SDK 1.0, I go from project.jsonto .csprojthrough dotnet migrateand I find that the behavior has changed. Building a meta-package project still gets the associated subproject but starts to build an empty assembly itself. This leads to the appearance of an empty meta-package.dlltop-level project in the publication folder, and I can’t just delete it for the purpose after the assembly, since it is also recorded in the generated file .deps.json, which makes it part of TPA (reliable platform builds). Thus, simply removing the empty assembly will cause the application to crash at startup.
Is there a way to not generate an empty assembly when creating this meta-package project using MSBuild?
source
share