Skip to content

Simplify csproj configuration - Set x64 as default platform and unify LangVersion #32

Description

@SamLJackson2

The current [buddy.csproj] has unnecessary configuration complexity:

  1. AnyCPU as default: Heartopia is a 64-bit game using MelonLoader (net6), so x64 is the only target. AnyCPU configs are unused and confusing.
  2. LangVersion mismatch: Global config specifies LangVersion 8.0, but x64 platform configs explicitly override to 7.3. The codebase uses only C# 7.3 features (no nullable refs, records, init-only properties, or switch expressions).
  3. Verbose build commands: Users must type dotnet build buddy.csproj -c Debug -p:Platform=x64 instead of just dotnet build.

Solution

  1. Change default platform from AnyCPU → x64
  2. Unify LangVersion to 7.3 globally (verified via codebase scan)
  3. Keep minimal AnyCPU configs as transparent proxies that output to bin\x64* and set PlatformTarget=x64
    This allows dotnet build to work without flags while maintaining x64 output
  4. Remove redundant LangVersion overrides from platform-specific configs

In my testing
dotnet build → builds Debug to bin\x64\Debug
dotnet build -c Release → builds Release to bin\x64\Release
No compilation errors (12 warnings, all pre-existing)

If theres a reason it is the way that it is please let me know, otherwise i can make a PR if you have the same issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions