Trying to tweak some settings in a mod for Subnautica 1. It thankfully has a github page, and even has a fork with the change I’m looking for (or close enough): https://github.com/sgsregde-ui/PrimeSonicSubnauticaMods
I can’t get a grasp on how to compile it into the DLL I need, though. I got VS Code and can open the files and make changes, but can’t figure out how to “build” it. It says I need a task, but none of the defaults work. I have no real experience coding or compiling, so I have no idea what’s going wrong here. Any help would be appreciated.


For the particular mod I’m looking at, I’m messing with the NuclearUpgrades. Specifically I want to change the overheating mechanic, which the repo I linked actually already changed (probably for the same reason). I can’t even get the unmodified version to build/compile, though, so I don’t think that’s what’s holding things up.
You would think, but the guides I’ve been able to find all seem to think “then click build” is sufficient for that step, which it apparently isn’t. I’m not sure what I’m missing that is so obvious to others.
I feel like my biggest problem is just trying to figure out how the build task should be formatted. The only templates are MSBuild, maven, and .NET Core. When I use the .NET version, which seems most applicable, I get
error NETSDK1013: The TargetFramework value '' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly.. I tried to that add in, but couldn’t figure out what version might work.And sometimes it opens up the C# Doctor on its own and I always get
MSB4181 The "RestoreTask" task returned false but did not log an errorin the “Restore NuGet Packages” step. Some guides linked a set of Subnautica nuget templates, but I’m not sure if I’ve put them in the wrong place or if that’s just a dead end.Ok, this took some tracking.
https://github.com/MrPurple6411/UnifiedVSSolution
Mr Purple has a Common folder in here that is used by all the projects. You’ll want to clone this repository (possibly recursively), then work on
UnifiedVSSolution/PrimeSonicSubnauticaMods/CyclopsNuclearUpgrades. That should get you past the NuGet Packages stage. I still get some errors, but hopefully you can figure it out from there.Omg, thank you! I’m still getting errors, but I’m making some progress at least. Never would have found that myself.
Ok, now I’m stuck on hundreds of namespace errors, e.g.
The type or namespace name 'TechType' could not be found (are you missing a using directive or an assembly reference?). I’ve tried ItemGroup -> Reference -> Aliases, and that seems to do something, but not fixing things. Will keep poking around at it.I think I’ve found a way to get things to work:
UnifiedVSSolution, changeSubnautica.selective.slnfline 5 to"PrimeSonicSubnauticaMods/CyclopsNuclearUpgrades/CyclopsNuclearUpgrades.csproj"(if you ever want to build multiple mods, you’d add them as extra lines, comma separated, here)CyclopsNuclearUpgrades.csprojto forward slashes (no idea why that’s the only time OS-specific folder separators come up as an issue…)Subnautica.selective.slnfand hit Build and the output was put inbin/SubnauticaIf you ever want to try something simpler from scratch I can recommend https://subnauticamodding.github.io/Nautilus/guides/dev-setup.html though. And I’m sure the modding discord is very helpful too.
That worked! Thanks so much for your patience and effort. I really appreciate it ^.^
Happy to help! Just happened to have time during work, and trouble-shooting VS Code (though usually for Java) feels like half my day job anyway.