VS2022 count down begins

Are you ready for this? Visual Studio 2022 Launch

Maybe GHI should make an announcement as well :wink:

5 Likes

Has anyone tried vs2022 yet?

3 Likes

Yes, seems to work just fine with TinyCLR.
When can we expect hot reload support? :stuck_out_tongue:

1 Like

Haha… That’s would be awesome but that also means you would require to upload to ram. It is a tough one.

1 Like

This in itself would be a cool option because I would expect it would allow way quicker upload times? Can be useful when developing and then deploying the done application to flash.

Maybe faster add there are a lot of things to account for. However, we do have faster deploying already in some cases. I was using FEZ Bit and following and debugging went from 7 seconds to 3 second

1 Like

I’d vote for best-effort emulation with or without hot reload. That would serve much the same purpose.

Even if most device I/O was mocked, you could still fiddle the details of your UI without having to do deployment cycles. And the library is already structured in a way that would facilitate that pretty well.

I think you could pull this off with a desktop firmware interop layer that links up to the native interop libs created during compilation. Not sure if we have enough in the public libs to pull that off, but it’d be something fun to investigate.

I just loaded VS2022 and the TinyClr extension.

I noticed that there are now two sets of TinyClr project templates; TinyClr and TinyClr with C# 9.0.

Any GHI comments about what is supported from C# 9.0?

When to use which type of template?

I’ve been using the C#9 templates for a few months and haven’t noticed anything not being supported or any issues like that.

This has been there for a while. C#9 was mainly added to allow for top level statements. This allows for easier sample code in docs.

And record type?

It should work as long as doesn’t rely on genetics internally. We haven’t tested it so I am not sure.

Here is a list of things I have tested from the C# 8 and C# 9 features
The features that work have a + in the first column and the things that do not work have a - in the first column, +/- can be made to work with a little trickery but there might be a better way, I just put something together based on the compiler error.

C# 8.0

  • - Readonly members
  • - Default interface methods
  • + Switch expression pattern matching
  • + Property patterns
  • - Tuple patterns
  • - Positional patterns
  • + Using declarations
  • + Static local functions
  • + Nullable reference types
  • - Indices and ranges
  • + Null-coalescing assignment
  • + Enhancement of interpolated verbatim strings

C# 9.0

  • - Records
  • +/- Init only setters: Needs the following defined and then they will work
namespace System.Runtime.CompilerServices
{
    public static class IsExternalInit { }
}
  • + Top-level statements
  • + Enhanced parrern matching
  • + Omit type when initializing
  • + Enhanced partial methods
1 Like

That is a great list to have, thanks