Is it possible to choose a default platform?

Every time I add a new project to my solution, it defaults to Any CPU even though at this time I only build for x86. I add my own <Platforms>x86</Platforms> tag to the csproj, but there are always still entries in the .sln file that say Any CPU and I have to go into configuration manager, find the one entry and change it to x86, and do this for both Debug and Release configurations.

Is there a way that I could just say to default to x86 when adding new projects?

Possibly related, is there a way to easily modify the project templates, since that may be where this is set?


Comment actions Permalink

Hello Dave!

Thank you for reporting the issue, I have created a corresponding record on our bug tracker: RIDER-78397. The issue is handled by a dedicated developer there. Please upvote it and click on Watch to monitor the progress of the issue.

I hope my reply was helpful. If any further questions remain - please let me know.

Comment actions Permalink

I think you misunderstood slightly.

The issue is not so much about the .csproj file as it is about the .sln file. I guess it's true that if I could default new projects to x86, that it could generate a <Platforms> tag that says x86 in the .csproj file (at the moment it doesn't generate any Platform tag). But the .csproj file is easy enough to change, and I have to customize it anyway. The issue is more about these lines from the .sln file:

{<GUID>}.Debug|x86.ActiveCfg = Debug|Any CPU
{<GUID>}.Debug|x86.Build.0 = Debug|Any CPU
{<GUID>}.Release|x86.ActiveCfg = Release|Any CPU
{<GUID>}.Release|x86.Build.0 = Release|Any CPU

There is no easy way to change these to x86. Doing it with an editor is cumbersome, and doing it through the configuration manager is very cumbersome. If I could just default them to x86 somehow it would save a lot of work and make adding projects a bit easier.


Please sign in to leave a comment.