Closed jsmrcina closed 2 months ago
Looks like this is the main culprit https://github.com/premake/premake-core/blob/d842e671c7bc7e09f2eeaafd199fd01e48b87ee7/modules/vstudio/vs2005_dotnetbase.lua#L236-L242
I'm guessing that should be looping over each configuration and adding the configuration's condition with something like:
p.push('<PropertyGroup %s>', dotnetbase.condition(cfg))
What seems to be the problem? In the example below, I would expect there to be a PropertyGroup which contains the PostBuildEvent for each configuration. Instead, the generated csproj contains only a single un-filtered PropertyGroup that has the PostBuildEvent for echoing "Debug" and no PropertyGroup that has the PostBuildEvent for echoing "Release".
In contrast, the other properties, such as "symbols" and "optimize", are correctly placed into filtered property groups.
premake.lua
Generated csproj
What did you expect to happen? I expected to have two separate sets of post build commands that are filtered by each configuration.
What have you tried so far? I verified that other properties are being filtered correctly, and I verified that this isn't an issue in C++ projects.
How can we reproduce this? I am generating for VS2022, as follows:
What version of Premake are you using?
Anything else we should know? Nothing else that I can think of. I looked through existing issues and didn't see one filed for this. Please let me know if there's anything else I can provide to help diagnose the problem. Thank you!