Visual Studio 2022 - Custom MSBuild Targets Not Executing as Expected in a .NET Core Project
I've been struggling with this for a few days now and could really use some help. I'm currently working on a .NET Core 6.0 project in Visual Studio 2022, and I've been trying to implement some custom MSBuild targets to automate certain tasks during the build process. However, it seems that my custom targets are not executing as expected. I've defined a custom target in my `.csproj` file like this: ```xml <Target Name="CustomBuildStep" AfterTargets="Build"> <Message Importance="high" Text="Running custom build step..." /> <!-- Custom actions go here --> </Target> ``` I added a `Message` task for debugging purposes to see if it gets executed, but when I build the project, I don't see the message in the output window. I have tried running a `Clean` followed by a `Rebuild`, but that didn’t help. Additionally, I’ve verified that the target is being loaded by adding another `Message` task before my custom target, which prints a message saying "Before Custom Build Step". That message appears, but my custom target does not run afterward. I have also checked the build configuration and ensured that it is set to `Debug` and not `Release`. I suspect that it might be due to the way the build process is configured for .NET Core projects compared to traditional projects, but I’m not sure how to troubleshoot this further. Has anyone experienced a similar scenario or can anyone provide insights into why my custom MSBuild targets might not be executing? Any help would be greatly appreciated! For reference, this is a production microservice. Any ideas what could be causing this?