GithubHelp home page GithubHelp logo

Comments (7)

ceztko avatar ceztko commented on July 17, 2024 9

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 $(SolutionPlatform) and just rely on $(Platform), by default 32 bit C# projects will go to a x86 folder, and 32 bit C++projects will go to a Win32 folder. Renaming platforms in either C# or C++ projects seems to be only partially supported and will fail with VisualStudio misbehaviors if you try to quickly do it for C# projects (I didn't invest too much time on this, though). Having a stock $(SolutionPlatform) would just be the right solution. I understood this is not so easy to have it working since it's not only about adding some kind of support of it in msbuild, but it's more about ensuring it will work language engines for C#, VC++, and so on. Again, in 2020 with all this need for crossplatform support I think it's the time to think more about it, or at least provide a truly fitting workaround, if possible.

@dannyvv : you suggested to add shared property file. How this is gonna help? The requirement here is to have two $(SolutionConfiguration), $(SolutionPlatform) that reflects the value of the checkboxes in the IDE.
image

from msbuild.

dannyvv avatar dannyvv commented on July 17, 2024

Hi Daniel,
Thanks for your suggestion. We recognize the elegance of the approach, but this doesn't meet the bar for our roadmap at this time.

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.
People commonly add a folder to the solution and add the shared props files to that folder for convenient editing.

from msbuild.

SergiusTheBest avatar SergiusTheBest commented on July 17, 2024

It's pity that this feature is not implemented. I have different $(Configuration) in several projects and I want to put all output to bin\$(SolutionConfiguration)\$(SolutionPlatform). Currently this is not possible without hardcoding.

from msbuild.

zeromus avatar zeromus commented on July 17, 2024

Lame. This workaround is no substitute. Incorporate the extension, please.

from msbuild.

zezba9000 avatar zezba9000 commented on July 17, 2024

Are there plans to add this? This idea is great!
csproj need better ways to work with native binaries in the post-build steps. Hope VS 2019 gets an update in this area.

from msbuild.

trueqbit avatar trueqbit commented on July 17, 2024

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.

from msbuild.

giladnoy avatar giladnoy commented on July 17, 2024

We are also looking for a workaround for this issue for VS 2022.
We have multiple variations of apps in the same solution that we can switch between more easily by changing the solution configuration name, and since VS 2019 (and 2022) the extension we're using can no longer help us read the $(SolutionConfiguration) macro from the .csproj files.
We will be very grateful if you will consider adding the $(SolutionConfiguration) macro natively.

from msbuild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.