-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for $(SolutionConfiguration) and $(SolutionPlatform) #70
Comments
Hi Daniel, The recommended way for people to obtain this behavior is to add an import to a shared props file that lives next to the solution. <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),Common.props))\Common.props" /> This approach also works for targets one might want to share and for people that use traversal projects rather than solutions. |
It's pity that this feature is not implemented. I have different |
Lame. This workaround is no substitute. Incorporate the extension, please. |
Merge upstream master
Are there plans to add this? This idea is great! |
I'm the author of the extension "Solution Configuration Name". For several years, before release of VS2019, developing it as always been kind of a fun for me, as it was clear from the beginning that it was impossible to develop it cleanly without full access to VisualStudio source code. Especially having it supported in C++ projects became a nightmare and with VisualStudio 2019 I definitely stopped spending my time in trying to fix it. To my full admission, I never used the extension myself in any of my projects, but the more I get involved in cross platform projects, the more I would need it. Think about a solution that builds both C# and C++ projects: if you don't have @dannyvv : you suggested to add shared property file. How this is gonna help? The requirement here is to have two |
Also, with ARM64EC and the availability of Windows 11 ARM64 this requirement is becoming even more prevalent. I am just dealing with a real-life example where the C++ application executables are compiled native ARM64 (using the ARM64EC configuration), but for some reason a dependent DLL in the solution can only be built with the x64 configuration. This means that the x64 DLL ends up in a folder different from the .exe files, and it is just harder to configure and glue everything together. |
We are also looking for a workaround for this issue for VS 2022. |
Please consider adding support for$(SolutionConfiguration) and $ (SolutionPlatform) macros.
We already have$(Configuration) and $ (Platform) however these only represent the project configuration and platform respectively.
Having solution level macros would be super useful, as this would allow solutions with many projects to configure themselves depending on the overall solution configuration rather than having to define separate configurations for every solution/project combination.
Although I'm suggesting this be added to msbuild, just as a side note, there is a VS extension that attempts to add this missing functionality by injecting the solution macros during the build:
https://visualstudiogallery.msdn.microsoft.com/dc5d3209-d6a5-4675-a258-984577b5e979
However it would be much more convenient if these basic macros could be baked directly into msbuild, especially when it comes to headless build servers where installing plugins may not be an option.
Thanks,
Daniel
The text was updated successfully, but these errors were encountered: