Skip to content

[Unity] generated csproj does not contain nullable enable when enabled via csc.rsp #2828

@BarionLP

Description

@BarionLP

Describe the Issue

in unity can compile with nullable warnings enabled via the compiler response file (csc.rsp) but the generated csproj does not contain <Nullable>enable</Nullable> resulting in the nullable warnings only being displayed in unity.

Right now this is a very niche thing to do but I assume it will become more relevant with unity moving to core clr

Steps To Reproduce

  1. add -nullable:enable to a projects csc.rsp file
  2. nullable warnings will show up in unity but not in vs code, vs code will show warnings when using nullable related features

Expected Behavior

nullable warnings show up in vs code and vs code shows no warnings when using nullable related features

Environment Information

  • Windows 11
  • VS Code 1.109.4
  • Unity 6000.3.7f1
  • Unity Extension: 1.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-unityUnity supportbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions