C
C#7d ago
JakenVeina

Directory.Build.targets is ignored (with Rider?)

I'm trying out Rider for the first time, and I'm guessing I have some kinda configuration issue, cause I can't get https://github.com/reactivemarbles/DynamicData to build with a fresh clone. I didn't have any issues building in VS a few weeks ago, and it built successfully in CI/CD last week. There's been no changes to project or solution config in months. It appears that MSBuild is ignoring the Directory.Build.targets file in the solution root, because all the build errors relate to some #if symbols that are conditionally defined in that file. If I remove the conditions and just define the constants statically, they still seem to be missing. Putting them in Directory.Build.props works, though. Is there some Rider configuration that could be causing this? Or did MSBuild maybe change recently? I'm using the copy of MSBuild (17.14) that's bundled with .NET SDK 9.0.305, which is the latest SDK version. Also confirmed I get the same behavior in the CLI with just dotnet build in the solution directory.
GitHub
GitHub - reactivemarbles/DynamicData: Reactive collections based on...
Reactive collections based on Rx.Net. Contribute to reactivemarbles/DynamicData development by creating an account on GitHub.
14 Replies
Petris
Petris7d ago
well if props works then it's probably caused by the ordering
JakenVeina
JakenVeinaOP7d ago
the ordering of what?
Petris
Petris7d ago
props are appended before the project file, targets are after so if you have props, targets and project
JakenVeina
JakenVeinaOP7d ago
as far as when the file runs, yeah
Petris
Petris7d ago
you get
<props>
<project>
<targets>
<props>
<project>
<targets>
when its loaded
JakenVeina
JakenVeinaOP7d ago
correct
Petris
Petris7d ago
so if something checks stuff in the project, it won't see stuff in targets and will error out but it'll be fine with props
JakenVeina
JakenVeinaOP7d ago
no, this has been working this way for years the only thing that's changed is my system just confirmed, it still builds fine under VS HAH okay so, the issue is that the file was mis-named Directory.build.targets instead of Directory.Build.targets apparently, no one's ever attempted to build this project on Linux works fine on Windows
Unknown User
Unknown User7d ago
Message Not Public
Sign In & Join Server To View
Petris
Petris7d ago
technically no but most windows stuff doesn't work with it :kekw:
Unknown User
Unknown User7d ago
Message Not Public
Sign In & Join Server To View
JakenVeina
JakenVeinaOP6d ago
git doesn't seem to have any issues with the change
Unknown User
Unknown User6d ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?