More testing ...
My previous post was Net5.
Not a very helpful error message.
If I use Net Framework 4.8 I get this error:-
[INFO]: **** Starting FSUIPC7 WASM Interface (WAPI) version 0.5.1
[INFO]: Connected to MSFS
Managed Debugging Assistant 'CallbackOnCollectedDelegate'
A callback was made on a garbage collected delegate of type 'fsuipcClient!FSUIPC.WAPI+NotifyLVarChangedCallback::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called.
The program '[20936] WpfApp3.exe' has exited with code -1 (0xffffffff).
Hope it helps
Steve.