Captain-of-industry-modding
Captain-of-industry-modding copied to clipboard
.csproj have no explicit language version declaration
.csproj have no explicit language version declaration, which can lead to hard to understand magic bugs like #9.
The error I got was:
source\repos\Captain-of-industry-modding\src\ExampleMod\ExampleMachineData.cs(7,1,7,10): error CS8370: Feature 'file-scoped namespace' is not available in C# 7.3. Please use language version 10.0 or greater.
After quite a long investigation - first time working with C# - I found out that for some magical reason language version is fixed to 7.3 According to StackOverflow this may magically happen, if version is not declared at all.
Solution can be to set it e.g. to latest:
<LangVersion>Latest</LangVersion>
Hovever, more professional would be to set it to exact version you decided to use for CoI.
Omg thank you !!!
Can you maybe change title to file-scoped namespace - I looked over this one at first glance..
Feels kind of scary indeed to just assume the latest language features are supported, but will do for now.
I can’t find where to make the modifications, an example or a copy would be appreciated
thank you