Quantcast

"Could not load file or assembly" on Ubuntu

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

"Could not load file or assembly" on Ubuntu

Steve Chadsey
Ubuntu 16.04
Installed monodevelop 6.1.2 via flatpak.

I have a console application that reference System.ServiceModel.  I can successfully build and run the solution via the IDE.  However, when I run the binary from the shell, I get:

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

I saw an option for the references, "Local Copy".  Setting that for System.ServiceModel and rebuilding would yield the same error, but for a different reference (System.Xml.Linq). If I set "Local Copy" for that one, then I get this horrible mess when running the rebuild binary from the shell:

* Assertion at metadata.c:3643, condition `ptr' not met

Stacktrace:


Native stacktrace:

        /usr/bin/cli() [0x4a77ca]
        /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f3d5e0bb390]
        /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7f3d5db00428]
        /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f3d5db0202a]
        /usr/bin/cli() [0x6408d9]
        /usr/bin/cli() [0x640ae7]
        /usr/bin/cli() [0x640c36]
        /usr/bin/cli() [0x56513e]
        /usr/bin/cli() [0x4155a4]
        /usr/bin/cli() [0x4600ba]
        /usr/bin/cli() [0x46ad6a]
        /usr/bin/cli() [0x45659a]
        /usr/bin/cli() [0x504d42]
        /usr/bin/cli() [0x50653f]
        /usr/bin/cli() [0x425332]
        /usr/bin/cli() [0x425ff9]
        /usr/bin/cli(mono_runtime_invoke+0x61) [0x5b5591]
        /usr/bin/cli(mono_runtime_exec_main+0xbf) [0x5b734f]
        /usr/bin/cli(mono_jit_exec+0x9f) [0x478bbf]
        /usr/bin/cli(mono_main+0x1230) [0x47a1e0]
        /usr/bin/cli() [0x421818]
        /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f3d5daeb830]
        /usr/bin/cli() [0x421c11]

Debug info from gdb:

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No threads.

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Aborted (core dumped)

I did not have these issues when using monodevelop that was installed via the Ubuntu package manager.  How do I resolve this, besides reverting to the old version of monodevelop?

Thanks,


--
Steve Chadsey <[hidden email]>

_______________________________________________
Monodevelop-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/monodevelop-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Could not load file or assembly" on Ubuntu

knocte
On Saturday, March 25, 2017 07:40 AM, Steve Chadsey wrote:
> * Assertion at metadata.c:3643, condition `ptr' not met

That assertion seems to suggest a bug in mono. What version of mono are
you using?

_______________________________________________
Monodevelop-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/monodevelop-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Could not load file or assembly" on Ubuntu

Steve Chadsey
On Fri, Mar 31, 2017 at 8:06 AM, Andres <[hidden email]> wrote:
>
> On Saturday, March 25, 2017 07:40 AM, Steve Chadsey wrote:
>>
>> * Assertion at metadata.c:3643, condition `ptr' not met
>
>
> That assertion seems to suggest a bug in mono. What version of mono are you using?

$ mono --version
Mono JIT compiler version 4.4.2 (Stable 4.4.2.11/f72fe45 Fri Jul 29 09:58:49 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen

--
Steve Chadsey <[hidden email]>

_______________________________________________
Monodevelop-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/monodevelop-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: "Could not load file or assembly" on Ubuntu

knocte
On Friday, March 31, 2017 10:14 PM, Steve Chadsey wrote:

> On Fri, Mar 31, 2017 at 8:06 AM, Andres <[hidden email]
> <mailto:[hidden email]>> wrote:
>>
>> On Saturday, March 25, 2017 07:40 AM, Steve Chadsey wrote:
>>>
>>> * Assertion at metadata.c:3643, condition `ptr' not met
>>
>>
>> That assertion seems to suggest a bug in mono. What version of mono
> are you using?
>
> $ mono --version
> Mono JIT compiler version 4.4.2 (Stable 4.4.2.11/f72fe45

That's not the version that ships by default in Ubuntu16.04. Then I
would recommend you either:


a) Downgrade to distro packages (4.2.1), hopefully more stable.

OR

b) Upgrade mono to 4.8.


If after (a) it still fails, do (b).
If after (b) it still fails, file a runtime bug in
http://bugzilla.xamarin.com

_______________________________________________
Monodevelop-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/monodevelop-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Stupid Noob Question: MonoDevelop VB .net

Lewis Balentine
I have Linux Mint Mate 18.2. One of the things I like about Linux Mint is that using the package manager most applications have been test and work more or less as advertised .... Monodevelop (version 5.10) not so much. It does install but when I try to use VB to create "Hello Word" everything goes awry.

Problem one:
Error while trying to load the project '/home/lewis/MonoProjects/HellowWordlVB/HellowWordlVB/HellowWordlVB.vbproj': Project does not support framework '.NETFramework,Version=v4.5'

So searching around a bit I found that I needed to edit line 10 of the file '/home/lewis/MonoProjects/HellowWordlVB/HellowWordlVB/HellowWordlVB.vbproj'  to the Framework Version reference from 4.5 to 4.0
Then restart Monodelevop and reload the project

Joy, Joy, Joy ..... well not so much

Problem two: .Net 4.0 not installed


lewis@HP8460W ~ $ mono --version
Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug
    LLVM:          supported, not enabled.
    GC:            sgen

Changing the reference to "4.2.1" also gave a similar error.
Despite hours of searching I have NOT found any fix/patch/solution to this problem although I did find a number questions about it.

STUPID NOOB QUESTIONS:
======================
Does anyone have Monodevelop VB operating as expected ?
Is there any Linux Distribution that Monodevelop VB  does run on as expected ?

To be fair: Monodevelop C# does compile, debug and run "Hello World" as expected.

Back in the day I wrote a lot of VB6 code on Windows XP. I even wrote a couple of programs in VB .Net on Windows 7. Until VB works as expected, I have rate monodevelop as "not ready for prime time".   I am an old man but I have high hopes of seeing this change before I die.


Respectfully,

Lewis Balentine
Houston, Texas







_______________________________________________
Monodevelop-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/monodevelop-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Stupid Noob Question: MonoDevelop VB .net

Lewis Balentine

oops .... I have Linux Mint Mate 18.1


On 05/14/2017 01:00 PM, Lewis Balentine wrote:
I have Linux Mint Mate 18.2. One of the things I like about Linux Mint is that using the package manager most applications have been test and work more or less as advertised .... Monodevelop (version 5.10) not so much. It does install but when I try to use VB to create "Hello Word" everything goes awry.
...


_______________________________________________
Monodevelop-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/monodevelop-list


_______________________________________________
Monodevelop-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/monodevelop-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Flatpak Uninstall

Lewis Balentine
In reply to this post by Lewis Balentine
I would suggest adding "uninstall" instructions to the Web page:
http://www.monodevelop.com/download/linux/
Install MonoDevelop preview via FlatPak

FYI: this is the command that is needed
flatpak --user uninstall com.xamarin.MonoDevelop

followed by:
sudo apt-get remove flatpak

l am going to be polite and NOT comment on flatpak.
(Shame on me: I should know better than to install anything labeled 'preview')


_______________________________________________
Monodevelop-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/monodevelop-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Stupid Noob Question: MonoDevelop VB .net

Lewis Balentine
In reply to this post by Lewis Balentine
It does not appear that the mail list has much activity but on the off chance that someone in the developer group does on occasion check the list .......

I have tried all Linux versions of Monodevelop that I could find. Despite any claims to the contrary VB.NET does NOT work in any of them. I tried the Flatpak 'preview' distribution and that proved to be the worst of the lot. In my opinion Flatpak should be considered a non-starter. My current installation is:
=====================================
MonoDevelop: Version 5.10
Installation UUID: 52518412-b276-4425-8171-bda7cb775914
Runtime:
    Mono 5.0.0 (Stable 5.0.0.100/9667aa6 Thu May 11 14:33:04 UTC 2017) (64-bit)
    GTK+ 2.24.30 (Mint-X-Grey theme)

Build Information: Build information unavailable

Operating System
Linux Mint 18.1, Mate Desktop, Linux 4.4.0-77-generic #98-Ubuntu SMP Wed Apr 26 08:34:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Hardware: HP8460W, 20GB
=====================================
MonoDevelop does work with C# in console mode or the GTK Gui.
Perhaps Monodevelop VB.NET works on Mac or Windows but I find it hard to believe anyone has the nerve to claim it works on Linux. I strongly suspect it is one of those situations where no one gives flying f###.




On 05/14/2017 01:00 PM, Lewis Balentine wrote:
I have Linux Mint Mate 18.2. One of the things I like about Linux Mint is that using the package manager most applications have been test and work more or less as advertised .... Monodevelop (version 5.10) not so much. It does install but when I try to use VB to create "Hello Word" everything goes awry.

Problem one:
Error while trying to load the project '/home/lewis/MonoProjects/HellowWordlVB/HellowWordlVB/HellowWordlVB.vbproj': Project does not support framework '.NETFramework,Version=v4.5'

So searching around a bit I found that I needed to edit line 10 of the file '/home/lewis/MonoProjects/HellowWordlVB/HellowWordlVB/HellowWordlVB.vbproj'  to the Framework Version reference from 4.5 to 4.0
Then restart Monodelevop and reload the project

Joy, Joy, Joy ..... well not so much

Problem two: .Net 4.0 not installed


lewis@HP8460W ~ $ mono --version
Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug
    LLVM:          supported, not enabled.
    GC:            sgen

Changing the reference to "4.2.1" also gave a similar error.
Despite hours of searching I have NOT found any fix/patch/solution to this problem although I did find a number questions about it.

STUPID NOOB QUESTIONS:
======================
Does anyone have Monodevelop VB operating as expected ?
Is there any Linux Distribution that Monodevelop VB  does run on as expected ?

To be fair: Monodevelop C# does compile, debug and run "Hello World" as expected.

Back in the day I wrote a lot of VB6 code on Windows XP. I even wrote a couple of programs in VB .Net on Windows 7. Until VB works as expected, I have rate monodevelop as "not ready for prime time".   I am an old man but I have high hopes of seeing this change before I die.


Respectfully,

Lewis Balentine
Houston, Texas








_______________________________________________
Monodevelop-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/monodevelop-list


_______________________________________________
Monodevelop-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/monodevelop-list
Loading...