I’m dealing with the NETSDK1152: Found multiple publish output files with the same relative path
error while building a rather complex project. My project A depends on some classes in project B, both are to be compiled as executables, with their own appsettings.json
. It’s not an option to rename things, and I don’t have time to make big refactorings.
I have followed every guide and solution I have been able to scrounge up, and I have spent about two hours reading the awful documentation for the MSBuild syntax, and no solution has presented itself, which is very frustrating.
What I need is to conditionally include the appsettings.json
in project B only when project B is compiled as an executable.
How do I write that as a condition?