Closed virzak closed 8 months ago
@virzak VSIX has the target net48
and appropriate langversion:
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>8.0</LangVersion>
(because VS itself is net 4.8 application).
LangVersion 8.0 is not supporting records... there are compilation errors.
Bumping LangVersion
above is not safe, as I can read.
Choosing a language version newer than the default can cause hard to diagnose compile-time and runtime errors.
To be honest, we have net48 application at my work too, but with lang=latest and did not see any error for few years. But VSIX development is different by its nature, we are injecting into the app, VS...
so I would prefer not to play with fire.
Thanks for you suggestion!
Fair enough. And obviously this was just a suggestion, which has no effect of any of what I do, but could potentially reduce the your amount of work in the future.
One last thing about it is that Mads Kristensen almost never uses preview
either. Except here:
@madskristensen, could weigh in?
I don't have much to say here. I like to use latest
which seems to work most of the time even on GitHub Actions CI workflows.
https://github.com/lsoft/SyncToAsyncExtension/blob/1a071280952cb4985222f3bf2c3da1df2cccf9ab/Shared/Dto/CodeLensSibling.cs#L5-L11
This construction looks like a perfect candidate for a record: