This problem occurs after working a couple of hours with ArcGIS pro (version 2.4.1) - shapefiles that were loaded correctly before, now throwing exception "unsupported data type " 
CIMStroke polygonOutline = SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.CreateColor(color),                                              2.0, SimpleLineStyle.Solid);
 CIMPolygonSymbol polygonSymbol = SymbolFactory.Instance.ConstructPolygonSymbol(ColorFactory.Instance.RedRGB, SimpleFillStyle.Null, polygonOutline);
 await QueuedTask.Run( () => {
                                                    layerToAdd = LayerFactory.Instance.CreateLayer(new Uri(layerPath), viewMap);
 });
  the layer path is correct ( i checked).
anyone have ideas on how to solve it?