What I'm trying to accomplish is detecting changes to projects during build so I can set a flag indicating that the project was changed. I've already figured out how to detect when a C# component has changed by utilizing incremental builds and CoreCompileDependsOn. But this doesn't seem to trigger when a content file of a project has changed. From what I understand, there would be a Copy task somewhere specifying SkipUnchangedFiles="true" depending on the setting of the content file within the project, Copy to Output Directory (Do not copy, Copy Always, Copy if Newer). I'm not entirely sure where this process happens, possibly the Microsoft.CSharp.targets file? Could someone please advise as to how I would add a dependent task that executes only if an updated file was copied to the bin output? A very simple example would suffice.
相关问题
- Visual Studio 2019 - error MSB8020: The build tool
- Is It possible to build asp.net core project using
- Delete files older 6 months
- msbuild: build as to a appxbundle (AppxBundle=Alwa
- Programmatically adding and editing the Targets in
相关文章
- Build errors of missing packages in Visual Studio
- Copy different file to output directory for releas
- Why doesn't AutogenerateBindingRedirects work
- MSBuild - How to build multiple files AND projects
- Visual Studio Solution — Any way to create a “spec
- Invalid value for the configfile paramter of the g
- using Visual Studio to copy files?
- dotnet core 2 long build time because of long rest
I figured it out. This will write a text file with the name of the project ONLY if any content files that have 'Copy If Newer' set have been changed during a build: