Currently having issues with Build Macros in VS 2019 evaluating to empty

Shawn Eckley 101 Reputation points

Hi ;
I just upgraded our Winforms solution to use .NET5. We are using VS 2019 16.9.4. Ever since the conversion to .NET5 all the build macros we use in the pre and post build events have started showing up as empty during compilation. When you look at the values in the Build Event editor they show the correct values. It is just at compile time that they show up as empty.
When i revert the code back to using .Net Framework 4.8 the macros go back to working.
Does any one know how to correct this? Has anyone else had this issue?

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,101 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,068 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 25,186 Reputation points Microsoft Vendor

    Hi @Shawn Eckley , yes, there are some differences between .net framework projects and .net core/.net projects, please check if this document: In the project file helps.