Why using Directory.Packages.props for non CPM related settings

258 views Asked by At

Recently TreatWarningsAsErrors and TargetFramework moved into Directory.Packages.props. While I can totally understand why it‘s now configured at a central place I‘m unsure why it moved to the CPM related file. Isn‘t this something that should be located in Directory.Build.props? Or am I missing something here?

In my opinion the Packages file should only contain CPM related stuff while the Build file should contain everything else.

1

There are 1 answers

0
Mik4sa On BEST ANSWER

I opened an issue in the original repository and I basically was right. Read more here: https://github.com/ardalis/CleanArchitecture/issues/491

Yeah, that's a good catch. We should separate them. Honestly I forgot there were 2 directory.*.props files... (and it would actually be nice, IMO, if there were just one but given that there are two and each one has its own responsibilities I agree we should split them out).