1

I'm building a mod for Unity based game RimWorld. I have the following assembly references in my .csproj file, using a variable so other people can build the project regardless of where RimWorld is installed:

        <Reference Include="Assembly-CSharp">
            <HintPath>$(RimWorldManagedDir)\Assembly-CSharp.dll</HintPath>
        </Reference>
        <Reference Include="UnityEngine.CoreModule">
            <HintPath>$(RimWorldManagedDir)\UnityEngine.CoreModule.dll</HintPath>
        </Reference>

At build time, I can define $(RimWorldManagedDir) on the command line, and it builds just fine:

msbuild Source/HGAPatchset.csproj -p:Configuration=Release -p:RimWorldManagedDir=/home/nicole/.local/share/Steam/steamapps/common/RimWorld/RimWorldLinux_Data/Managed/

But VSCode can't properly feed this into the language server, likely because I can't define this variable anywhere, and as a result I get autocomplete errors and the following message in the output window of the C# extension:

2025-11-22 13:53:16.735 [warning] [solution/open] [LanguageServerProjectLoader] Project /home/nicole/.local/share/Steam/steamapps/common/RimWorld/Mods/HGAPatchset/Source/HGAPatchset.csproj has unresolved dependencies

I'm very certain I can define this variable somewhere, but I can't seem to find any information on it. How do I define this variable somewhere the C# extension (any completion service) can see it?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.