judero01col / GMap.NET

GMap.NET Windows Forms & Presentation is an excellent open source, powerful, free and cross-platform .NET control. Allows the use of routing, geocoding, directions and maps from Google, Yahoo!, Bing, OpenStreetMap, ArcGIS, Pergo, SigPac, Yendux, Mapy.cz, Maps.lt, iKarte.lv, NearMap, HereMap, CloudMade, WikiMapia, MapQuest and many more.
Other
466 stars 205 forks source link

Deprecated SHA1CryptoServiceProvider constructor causes visual studio 2022 designer problems #194

Open fellrnr opened 1 year ago

fellrnr commented 1 year ago

The deprecated constructor shown below can cause an exception when adding the map control in VS 2022.

static readonly SHA1CryptoServiceProvider HashProvider = new SHA1CryptoServiceProvider();

This can be replaced with

static readonly SHA1 HashProvider = SHA1CryptoServiceProvider.Create();

Which resolves the issue.

This occurs several times in GMap.NET.Core, Cache.cs, Stuff.cs, GMapProviders.cs, and GoogleMapProviders.cs, with variations on how the constructor is called.