-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble with System.MissingMethodException #59
Comments
I removed adding image
And all working normal |
I made my own extensions methods for adding images.
panel.AddPushButton<StartupCommand>("Армирование")
.OwnAddSmallImage(Properties.Resources.wallsReinforcenet16)
.OwnAddLargeImage(Properties.Resources.wallsReinforcenet32); ⏬⏬⏬ public static class RibbonButtonExtension
{
public static RibbonButton OwnAddSmallImage(this RibbonButton ribbonButton, byte[] image)
{
ribbonButton.Image = image.ToBitmap().ToImageSource();
return ribbonButton;
}
public static RibbonButton OwnAddLargeImage(this RibbonButton ribbonButton, byte[] image)
{
ribbonButton.LargeImage = image.ToBitmap().ToImageSource();
return ribbonButton;
}
} ⏬⏬⏬ public static class ByteArrayExtension
{
public static Bitmap ToBitmap(this byte[] data)
{
if (data == null || data.Length == 0)
{
throw new ArgumentNullException(nameof(data));
}
using (var ms = new MemoryStream(data))
{
return new Bitmap(ms);
}
}
} public static class BitmapExtension
{
public static ImageSource ToImageSource(this Bitmap bitmap)
{
IntPtr handle = bitmap.GetHbitmap();
try
{
return Imaging.CreateBitmapSourceFromHBitmap(handle, IntPtr.Zero, Int32Rect.Empty,
BitmapSizeOptions.FromEmptyOptions());
}
finally
{
NativeMethods.DeleteObject(handle);
}
}
private static class NativeMethods
{
[DllImport("gdi32.dll", EntryPoint = "DeleteObject")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool DeleteObject([In] IntPtr hObject);
}
} |
This exception means that your colleague has a conflicting plugin installed, most likely an outdated version of RevitLookup. Try to update it or use a tool to find conflicting versions of Nice3point.Revit.Extensions library jeremytammik/RevitLookup#269 (comment) |
He haven't LookUp on his Revit |
So, use the DependenciesReport from the link above and share report here |
Good morning. If u need all text from file - can send for u
|
@DmitryYalchik sorry for late response. Thats totally fine for your environment, no conflict. But your colleague have to run this tool and than send me his file |
No problem :) |
Debug on my PC working cool.
But when i make
nuke createInstaller
and send to my colleague for tests. He starting and plugin is not working.Some trouble with
SetImage
.Had think that's only in my project. Make new (clear) solution and application into. Same trouble.
The text was updated successfully, but these errors were encountered: