Dear SCOM Experts,
I have been creating mpbundle using C# . I was able to add resources to the images. I was able to import the .mpb file. I was able to discover and monitor the components, but I could not see the images for components in diagram view. I have followed the procedure in msdn website
http://msdn.microsoft.com/en-us/library/gg986188.aspx
EnterpriseManagementGroup mg = new EnterpriseManagementGroup("localhost"); ManagementPack mp = new ManagementPack("Folder\\RePackaging.Library.xml"); System.IO.FileStream fileStream1 = new System.IO.FileStream("Folder\\Resources\\package_16.png", System.IO.FileMode.Open); System.IO.FileStream fileStream2 = new System.IO.FileStream("Folder\\Resources\\package_32.png", System.IO.FileMode.Open); System.IO.FileStream fileStream3 = new System.IO.FileStream("Folder\\Resources\\package_64.png", System.IO.FileMode.Open); ResourceStream resStream1 = new ResourceStream(mg, fileStream1); ResourceStream resStream2 = new ResourceStream(mg, fileStream2); ResourceStream resStream3 = new ResourceStream(mg, fileStream3); ManagementPackBundleWriter bundleWriter = ManagementPackBundleFactory.CreateBundleWriter(".\\"); ManagementPackBundle bundle = ManagementPackBundleFactory.CreateBundle(); bundle.ManagementPacks.Add(mp); bundle.AddResourceStream(mp, "RePackaging.Library.Resources.Images.Package_16", resStream1, ManagementPackBundleStreamSignature.Empty); bundle.AddResourceStream(mp, "RePackaging.Library.Resources.Images.Package_32", resStream2, ManagementPackBundleStreamSignature.Empty); bundle.AddResourceStream(mp, "RePackaging.Library.Resources.Images.Package_64", resStream3, ManagementPackBundleStreamSignature.Empty); bundleWriter.Write(bundle, "RePackaging.Library");
I had even used MPViewer to check if the images are in .mpb and I could see the images in Resources section
in MPViewer software. I dont understand why i could not see images in diagram view.Please help!!!!!!