These are chat archives for picoe/Eto

29th
Nov 2017
se5a
@se5a
Nov 29 2017 22:01
any ideas why I'm getting TypeInitialzationExceptions when creating a ViewModel?
MD is not letting me step through the code
this is just: public MainForm()
{
XamlReader.Load(this);
DataContext = new MainViewModel();
}
if I put a breakpoint where the DataContext is set. it'll break there, but if I StepInto it just crashes instantly with the above error
Curtis Wensley
@cwensley
Nov 29 2017 22:05
you're either missing a dependency (good luck trying to find what using mono), or some static constructor is failing
se5a
@se5a
Nov 29 2017 22:05
it runs on windows annoyingly, but not linux
Curtis Wensley
@cwensley
Nov 29 2017 22:06
you could catch the exception and look at the detailed stuff in TypeInitializationException, like TypeName, InnerException, etc.
did you install mono-complete?
are you using any windows-only dll's?
se5a
@se5a
Nov 29 2017 22:06
it's quite possible we are
checking for that now
Curtis Wensley
@cwensley
Nov 29 2017 22:07
look at the exception details, it'll give you an idea of what is going on
se5a
@se5a
Nov 29 2017 22:09
looks like it might be something in System.Reflection it doesn't like
se5a
@se5a
Nov 29 2017 22:20
ah ok right, we were trying to get stuff like if the mouse or keyboard had been used, and a couple of other os specific things
Curtis Wensley
@cwensley
Nov 29 2017 23:21
@cra0zy: btw, finally found out why gtk-sharp references weren't working.. md 7.1 writes an invalid pkgconfig cache in ~/.config/xbuild
the target framework is set to "Unknown" for all the pc files
so, delete ~/.config/xbuild and run with 7.0 and all should be good!
Curtis Wensley
@cwensley
Nov 29 2017 23:27
now to figure out how to get it to compile gtk-sharp2 stuff when gtk-sharp3 is installed.. grrrr
mono/MD on linux is just crap these days, at least when it comes to GTK stuff.
Curtis Wensley
@cwensley
Nov 29 2017 23:43
and to further add insult to injury, all files in Eto.Gtk3 get millions of errors due to referencing gtk-sharp.dll directly.. probably something to do with pcl crap as it's saying things like "Predefined type 'System.Void' is not defined or imported"
Harry
@cra0zy
Nov 29 2017 23:55
pfahahaha
(laughing at MD)
btw. I somewhat stopped using it unless I really really have to