outlook-matters
outlook-matters copied to clipboard
Error Converting value "G" to type 'OutlookMatters.Core.Mattermost.v4.Interface.ChannelType'.Path
I'm running Win10, Fall creators update, Outlook 2010. instlled the runtime as described in the instructions. wenn I refresh the channels, I get the error above.
I've already changed the name of VSTOInstaller.config --> to *.old in C:\Program Files (x86)\Common Files\microsoft shared\VSTO\10.0 as described in a different issue. didnt help.
On my hdd, there ist also \VSTO\9.0 installed...

do you have any ideas?
I got the same error when I tried it today (version 2.0). I am also on Windows 10 Outlook 2013

Same here. Outlook 2016 on Windows 7
Actually here it's on another line:

I have the same error
No solution ?
A bit late, but just in case it helps somebody ... This happens because newer Mattermost versions create some channels with type "G" in the Channels table (at least when using MySQL/MariaDB):
MariaDB [mattermost]> select DisplayName, Type from Channels;
+------------------------------------------------------------+------+
| DisplayName | Type |
+------------------------------------------------------------+------+
| Channel-1 | D |
| Firmantes | P |
| Channel-5 | P |
| user01, user07, user22 | G | <--- This channel
| Channel-7 | P |
+------------------------------------------------------------+------+
I was able to solve this (quick and dirty) by:
1-Adding a new "G" value to the ChannelType enum in ChannelType.cs under OutlookMattersCore Interface V4:
namespace OutlookMatters.Core.Mattermost.v4.Interface
{
[JsonConverter(typeof(StringEnumConverter))]
public enum ChannelType
{
[EnumMember(Value = "O")] Public,
[EnumMember(Value = "P")] Private,
[EnumMember(Value = "D")] Direct,
[EnumMember(Value = "G")] Peers <--- Add this value
}
}
2-Adding a new case to the ConvertType method in ChatChannels.cs:
private ChannelTypeSetting ConvertType(ChannelType type)
{
switch (type)
{
case ChannelType.Direct:
return ChannelTypeSetting.Direct;
case ChannelType.Public:
return ChannelTypeSetting.Public;
case ChannelType.Private:
return ChannelTypeSetting.Public;
case ChannelType.Peers: <--- Add these two lines
return ChannelTypeSetting.Direct;
default:
return ChannelTypeSetting.Public;
}
}
Then rebuilding the solution and reinstalling the VSTO plugin from the bin\Release folder (previously removing the old one from Control Panel -> Programs and Features, and deleting the "2.0" folder under "C:\Users\your-user\AppData\Local\Apps" on Win 10).