Skip to content

[Feature Request] Simplify platform configurations #115

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

Open
julealgon opened this issue Apr 16, 2025 · 0 comments
Open

[Feature Request] Simplify platform configurations #115

julealgon opened this issue Apr 16, 2025 · 0 comments

Comments

@julealgon
Copy link

I'd like to propose a simpler configuration setup, where when a single platform is defined, it would automatically apply to every single project without having to explicitly specify the platform on a per-project basis.

We converted our ~170 project solution to slnx and it resulted in a structure like this:

<Solution>
  <Configurations>
    <Platform Name="x64" />
  </Configurations>
  <Project Path="Project1.csproj">
    <Platform Project="x64" />
  </Project>
  <Project Path="Project2.csproj">
    <Platform Project="x64" />
  </Project>
  <Project Path="Project3.csproj">
    <Platform Project="x64" />
  </Project>

  ...

  <Project Path="Project170.csproj">
    <Platform Project="x64" />
  </Project>
</Solution>

As you can see, the added <Platform node adds a ton of noise and redundancy. Effectively, it triples the overall line count of the file.

I'd love to have something like this instead:

<Solution>
  <Configurations>
    <Platform Name="x64" />
  </Configurations>
  <Project Path="Project1.csproj" />
  <Project Path="Project2.csproj" />
  <Project Path="Project3.csproj" />

  ...

  <Project Path="Project170.csproj" />
</Solution>

Literally every single project in our solution is configured the same way, as the settings are defined in a Directory.Build.props file like this:

<Project>

 <PropertyGroup>
   <ImplicitUsings>enable</ImplicitUsings>
   <Platforms>x64</Platforms>
   <PlatformTarget>x64</PlatformTarget>
   <AppendPlatformToOutputPath>false</AppendPlatformToOutputPath>
   <RuntimeIdentifier>win-x64</RuntimeIdentifier>
   <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
 </PropertyGroup>

</Project>

The added verbosity on our slnx file defeats some of the purpose of moving into the new format.

I actually tried removing those nodes just to see what would happen, but then the projects stop building in Visual Studio and I get a warning at the top when the solution loads saying that "the configurations are wrong"

Image

Interestingly enough, opening the configuration manager doesn't do anything in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant