question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changes in Directory.Build.props not detected

See original GitHub issue

We work with a Directory.Build.Props file that adds some of the Tags to all projects in the same folder. When this file changes, dotnet-affected does not detect the change, even if it can affect the whole project (for example changing .net version)

Example:

<Project>
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <LangVersion>10.0</LangVersion>
    <RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
    <Product>My Product</Product>
  </PropertyGroup>
</Project>

I dont know how that could be detected either.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
garcipatcommented, Jul 30, 2022

Yes I have seen it. Im very excited. I wanted to check it out. Will do that next week when I get back to work.

Leonardo Chaia @.***> schrieb am Sa., 30. Juli 2022, 13:42:

Hi @garcipat https://github.com/garcipat. v3.0.0-preview-1 has been released on nuget. Would you give it a go and report back?

It should detect Directory.Package.props properly.

Have a great weekend! Leo

— Reply to this email directly, view it on GitHub https://github.com/leonardochaia/dotnet-affected/issues/42#issuecomment-1200142760, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXTN46VS63MH6K3JI43C4TVWUII5ANCNFSM53HH6JVA . You are receiving this because you were mentioned.Message ID: @.***>

1reaction
leonardochaiacommented, Jul 11, 2022

Hi @garcipat! Thanks for reaching out.

Yeah, unfortunately, that is one of the caveats in the readme.

It would be great if we could support it; my team also uses Directory.Build.props to customize a lot of stuff.

For props files that are “global”, meaning they affect all projects it is not hard: run git diff against those files and if there’s any changes trigger a complete build (which can be done using wildcards + Traversal SDK file).

For props files that are in a directory recursively affecting all projects down the hierarchy I am not sure how we could implement it.

I’m gonna leave this open since this is an actual issue, even if it is a “known issue”. Perhaps someone can think something out 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

msbuild - Why doesn't Directory.Build.props work when ...
I had added the directory.build.props as a solution item. This somehow prevented Visual Studio from picking it up and using it in the...
Read more >
Customize your build by folder or solution - MSBuild
Make sure the casing of the Directory. Build. props filename matches exactly, or it won't be detected during the build process. See this...
Read more >
What is this Directory.Build.props file all about?
props searches your directory structure for the Directory.Build.props file. Once found it imports the file and reads the properties defined ...
Read more >
[Feature] Directory.Solution.props and ...
sln directory, I need to copy the Directory.Build.props file, or even have to add my own SDK to handle this. Having my own...
Read more >
Versioning .NET projects with Directory.Build.props
Easily move between LTS and STS versions by using a versioning config file in your .NET projects. Using Directory Build Props.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found