Re: [Mono-list] Mono does not include full stacktrace while rethrowing exception

2016-06-22 Thread Bernhard Urban
I agree with Edward, here's a PR: https://github.com/mono/mono/pull/3201

-Bernhard


From: mono-list-boun...@lists.ximian.com <mono-list-boun...@lists.ximian.com> 
on behalf of Edward Ned Harvey (mono) <edward.harvey.m...@clevertrove.com>
Sent: Wednesday, June 22, 2016 4:52 AM
To: Алексей Богомолов; mono-list@lists.ximian.com
Subject: Re: [Mono-list] Mono does not include full stacktrace while rethrowing 
exception

> From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
> boun...@lists.ximian.com] On Behalf Of ??? ?
>

First, just to be sure you know, you *almost* should never catch and rethrow, 
because you're not adding new information. If you want to add new information, 
generally you should throw a new exception and include an InnerException. Here 
are some examples of situations you would want to catch and rethrow:
https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2f0yd65esw.aspx=01%7c01%7cbeurba%40microsoft.com%7c8f639762e9994b298d1308d39aa0b29e%7c72f988bf86f141af91ab2d7cd011db47%7c1=r%2fwVA7R%2fwmNwL59E03eJ9lzTA7HuOkswoPcSe2V8ago%3d

And just to confirm you're right, you *should* expect the stack to be 
preserved, if you throw without any arguments.
https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fms182363.aspx=01%7c01%7cbeurba%40microsoft.com%7c8f639762e9994b298d1308d39aa0b29e%7c72f988bf86f141af91ab2d7cd011db47%7c1=PcQ5QhsbXHxVUhu2vJKNRTAdoYFrbgaShShhNmSXFB0%3d

I've confirmed the behavior you reported. In a debug build, on windows, and on 
mono, the behavior is not the same on .NET and on mono. It should be.

I think this is probably an actual bug and I'll go report it.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2flists.ximian.com%2fmailman%2flistinfo%2fmono-list=01%7c01%7cbeurba%40microsoft.com%7c8f639762e9994b298d1308d39aa0b29e%7c72f988bf86f141af91ab2d7cd011db47%7c1=VayCRiA7CUa04VaCV3lZ4%2bLYsJJl9ApomsOSmWcS4TU%3d
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono does not include full stacktrace while rethrowing exception

2016-06-22 Thread Alan
Hey,

It's not just inlining that'll cause a problem, it's also tailcalls. Read
the section that starts right after this sentence: "Plus, we haven't tried
64-bit yet. Let's run the Release build on 64-bit:"

It's pretty hard to guarantee you'll always get every stackframe on either
.NET or mono without hacking up every method because that stackframe may
not actually exist at runtime. This is especially true if you're running F#.

Alan

On 22 June 2016 at 10:36, Алексей Богомолов <horse...@gmail.com> wrote:

> Hi, Alan! I understand inlining in Release configuration. I should have
> mentioned that I'm running in Debug mode in both cases.
>
> Bernard, I tried running with and without inlining in Debug configuration.
> Thre result *with* inlining is:
>
> System.NotImplementedException: The method or operation is not implemented.
>   at TestApp.ExceptionReThrow.M2 () [0x1] in
> D:\source\TestApp\TestApp\ExceptionReThrow.cs:31
>
> *without *inlining:
>
> System.NotImplementedException: The method or operation is not implemented.
>   at TestApp.ExceptionReThrow.M3 () [0x1] in
> D:\source\TestApp\TestApp\ExceptionReThrow.cs:42
>   at TestApp.ExceptionReThrow.M2 () [0x3] in
> D:\source\TestApp\TestApp\ExceptionReThrow.cs:32
>
> So, in Mono a allways loose original Test-M1-M2 method call chain.
>
>
> 2016-06-21 20:55 GMT+03:00 Bernhard Urban <beu...@microsoft.com>:
>
>> You can try to run mono without inlining: `mono -O=-inline [...]'
>>
>>
>> --
>> *From:* mono-list-boun...@lists.ximian.com <
>> mono-list-boun...@lists.ximian.com> on behalf of Alan <
>> alan.mcgov...@gmail.com>
>> *Sent:* Tuesday, June 21, 2016 2:33 AM
>> *To:* Алексей Богомолов
>> *Cc:* Mono List
>> *Subject:* Re: [Mono-list] Mono does not include full stacktrace while
>> rethrowing exception
>>
>> This happens on .NET too. This gives a good description of what's
>> happening and why.
>>
>>
>> http://www.hanselman.com/blog/ReleaseISNOTDebug64bitOptimizationsAndCMethodInliningInReleaseBuildCallStacks.aspx
>> <https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.hanselman.com%2fblog%2fReleaseISNOTDebug64bitOptimizationsAndCMethodInliningInReleaseBuildCallStacks.aspx=01%7c01%7cbeurba%40microsoft.com%7cf5f2327fd4a34d18817208d399b71770%7c72f988bf86f141af91ab2d7cd011db47%7c1=OW3ca33WcWiqD83Jujdu9dArjwARXrWC5ssdRcMU0CU%3d>
>>
>> Alan
>>
>> On 21 June 2016 at 09:31, Алексей Богомолов <horse...@gmail.com> wrote:
>>
>>> This behavior makes difficult to troubleshoot errors, especially in
>>> external libraries. Example code:
>>>
>>> public class ExceptionReThrow{
>>> public void Test(){
>>> try
>>> {
>>> M1 ();
>>> }
>>> catch (Exception ex)
>>> {
>>> Console.WriteLine(ex);
>>> }
>>> }
>>>
>>> public void M1()
>>> {
>>> M2();
>>> }
>>>
>>> private void M2()
>>> {
>>> try{
>>> M3();
>>> }catch{
>>> throw;
>>> }
>>> }
>>>
>>> private void M3()
>>> {
>>> throw new NotImplementedException();
>>> }}
>>>
>>> For Microsoft .Net output will be:
>>>
>>> System.NotImplementedException: The method or operation is not
>>> implemented. at TestApp.ExceptionReThrow.M3() in
>>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 38 at
>>> TestApp.ExceptionReThrow.M2() in
>>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 32 at
>>> TestApp.ExceptionReThrow.M1() in
>>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 24 at
>>> TestApp.ExceptionReThrow.Test() in
>>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 14
>>>
>>> For mono (4.2.3) output will be:
>>>
>>> System.NotImplementedException: The method or operation is not
>>> implemented. at TestApp.ExceptionReThrow.M3 () [0x1] in
>>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:38 at
>>> TestApp.ExceptionReThrow.M2 () [0x3] in
>>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:30
>>>
>>> As you can see, mono looses stack between first and second catch
>>> statements. What is the explanation for this feature? Can I disable it?
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> Mono-list maillist  -  Mono-list@lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>> <https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2flists.ximian.com%2fmailman%2flistinfo%2fmono-list=01%7c01%7cbeurba%40microsoft.com%7cf5f2327fd4a34d18817208d399b71770%7c72f988bf86f141af91ab2d7cd011db47%7c1=HCjwCdQLyKc7gIOR1gMdBebupL2mSvlwxQGIGcDvYGM%3d>
>>>
>>>
>>
>
>
> --
> С уважением, Алексей Богомолов horse...@gmail.com
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono does not include full stacktrace while rethrowing exception

2016-06-22 Thread Алексей Богомолов
Thanks! CA2200 exactly explains my confusion. In my real-life case DB
driver re-throws its own exception and we loose the name of a query that
caused error. It brings a lot of problems in production, when there are
many queries in one batch.
For me the question is closed, thanks again.
Edward, could you please give us a link to bug report when you open one!

2016-06-22 14:52 GMT+03:00 Edward Ned Harvey (mono) <
edward.harvey.m...@clevertrove.com>:

> > From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
> > boun...@lists.ximian.com] On Behalf Of ??? ?
> >
>
> First, just to be sure you know, you *almost* should never catch and
> rethrow, because you're not adding new information. If you want to add new
> information, generally you should throw a new exception and include an
> InnerException. Here are some examples of situations you would want to
> catch and rethrow:
> https://msdn.microsoft.com/en-us/library/0yd65esw.aspx
>
> And just to confirm you're right, you *should* expect the stack to be
> preserved, if you throw without any arguments.
> https://msdn.microsoft.com/en-us/library/ms182363.aspx
>
> I've confirmed the behavior you reported. In a debug build, on windows,
> and on mono, the behavior is not the same on .NET and on mono. It should be.
>
> I think this is probably an actual bug and I'll go report it.
>



-- 
С уважением, Алексей Богомолов horse...@gmail.com
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono does not include full stacktrace while rethrowing exception

2016-06-22 Thread Edward Ned Harvey (mono)
> From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
> boun...@lists.ximian.com] On Behalf Of ??? ?
> 

First, just to be sure you know, you *almost* should never catch and rethrow, 
because you're not adding new information. If you want to add new information, 
generally you should throw a new exception and include an InnerException. Here 
are some examples of situations you would want to catch and rethrow:
https://msdn.microsoft.com/en-us/library/0yd65esw.aspx

And just to confirm you're right, you *should* expect the stack to be 
preserved, if you throw without any arguments.
https://msdn.microsoft.com/en-us/library/ms182363.aspx

I've confirmed the behavior you reported. In a debug build, on windows, and on 
mono, the behavior is not the same on .NET and on mono. It should be.

I think this is probably an actual bug and I'll go report it.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono does not include full stacktrace while rethrowing exception

2016-06-22 Thread Алексей Богомолов
Hi, Alan! I understand inlining in Release configuration. I should have
mentioned that I'm running in Debug mode in both cases.

Bernard, I tried running with and without inlining in Debug configuration.
Thre result *with* inlining is:

System.NotImplementedException: The method or operation is not implemented.
  at TestApp.ExceptionReThrow.M2 () [0x1] in
D:\source\TestApp\TestApp\ExceptionReThrow.cs:31

*without *inlining:

System.NotImplementedException: The method or operation is not implemented.
  at TestApp.ExceptionReThrow.M3 () [0x1] in
D:\source\TestApp\TestApp\ExceptionReThrow.cs:42
  at TestApp.ExceptionReThrow.M2 () [0x3] in
D:\source\TestApp\TestApp\ExceptionReThrow.cs:32

So, in Mono a allways loose original Test-M1-M2 method call chain.


2016-06-21 20:55 GMT+03:00 Bernhard Urban <beu...@microsoft.com>:

> You can try to run mono without inlining: `mono -O=-inline [...]'
>
>
> --
> *From:* mono-list-boun...@lists.ximian.com <
> mono-list-boun...@lists.ximian.com> on behalf of Alan <
> alan.mcgov...@gmail.com>
> *Sent:* Tuesday, June 21, 2016 2:33 AM
> *To:* Алексей Богомолов
> *Cc:* Mono List
> *Subject:* Re: [Mono-list] Mono does not include full stacktrace while
> rethrowing exception
>
> This happens on .NET too. This gives a good description of what's
> happening and why.
>
>
> http://www.hanselman.com/blog/ReleaseISNOTDebug64bitOptimizationsAndCMethodInliningInReleaseBuildCallStacks.aspx
> <https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.hanselman.com%2fblog%2fReleaseISNOTDebug64bitOptimizationsAndCMethodInliningInReleaseBuildCallStacks.aspx=01%7c01%7cbeurba%40microsoft.com%7cf5f2327fd4a34d18817208d399b71770%7c72f988bf86f141af91ab2d7cd011db47%7c1=OW3ca33WcWiqD83Jujdu9dArjwARXrWC5ssdRcMU0CU%3d>
>
> Alan
>
> On 21 June 2016 at 09:31, Алексей Богомолов <horse...@gmail.com> wrote:
>
>> This behavior makes difficult to troubleshoot errors, especially in
>> external libraries. Example code:
>>
>> public class ExceptionReThrow{
>> public void Test(){
>> try
>> {
>> M1 ();
>> }
>> catch (Exception ex)
>> {
>> Console.WriteLine(ex);
>> }
>> }
>>
>> public void M1()
>> {
>> M2();
>> }
>>
>> private void M2()
>> {
>> try{
>> M3();
>> }catch{
>> throw;
>> }
>> }
>>
>> private void M3()
>> {
>> throw new NotImplementedException();
>> }}
>>
>> For Microsoft .Net output will be:
>>
>> System.NotImplementedException: The method or operation is not
>> implemented. at TestApp.ExceptionReThrow.M3() in
>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 38 at
>> TestApp.ExceptionReThrow.M2() in
>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 32 at
>> TestApp.ExceptionReThrow.M1() in
>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 24 at
>> TestApp.ExceptionReThrow.Test() in
>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 14
>>
>> For mono (4.2.3) output will be:
>>
>> System.NotImplementedException: The method or operation is not
>> implemented. at TestApp.ExceptionReThrow.M3 () [0x1] in
>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:38 at
>> TestApp.ExceptionReThrow.M2 () [0x3] in
>> D:\source\TestApp\TestApp\ExceptionReThrow.cs:30
>>
>> As you can see, mono looses stack between first and second catch
>> statements. What is the explanation for this feature? Can I disable it?
>>
>>
>>
>>
>>
>> ___
>> Mono-list maillist  -  Mono-list@lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>> <https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2flists.ximian.com%2fmailman%2flistinfo%2fmono-list=01%7c01%7cbeurba%40microsoft.com%7cf5f2327fd4a34d18817208d399b71770%7c72f988bf86f141af91ab2d7cd011db47%7c1=HCjwCdQLyKc7gIOR1gMdBebupL2mSvlwxQGIGcDvYGM%3d>
>>
>>
>


-- 
С уважением, Алексей Богомолов horse...@gmail.com
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono does not include full stacktrace while rethrowing exception

2016-06-21 Thread Bernhard Urban
You can try to run mono without inlining: `mono -O=-inline [...]'



From: mono-list-boun...@lists.ximian.com <mono-list-boun...@lists.ximian.com> 
on behalf of Alan <alan.mcgov...@gmail.com>
Sent: Tuesday, June 21, 2016 2:33 AM
To: Алексей Богомолов
Cc: Mono List
Subject: Re: [Mono-list] Mono does not include full stacktrace while rethrowing 
exception

This happens on .NET too. This gives a good description of what's happening and 
why.

http://www.hanselman.com/blog/ReleaseISNOTDebug64bitOptimizationsAndCMethodInliningInReleaseBuildCallStacks.aspx<https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.hanselman.com%2fblog%2fReleaseISNOTDebug64bitOptimizationsAndCMethodInliningInReleaseBuildCallStacks.aspx=01%7c01%7cbeurba%40microsoft.com%7cf5f2327fd4a34d18817208d399b71770%7c72f988bf86f141af91ab2d7cd011db47%7c1=OW3ca33WcWiqD83Jujdu9dArjwARXrWC5ssdRcMU0CU%3d>

Alan

On 21 June 2016 at 09:31, Алексей Богомолов 
<horse...@gmail.com<mailto:horse...@gmail.com>> wrote:

This behavior makes difficult to troubleshoot errors, especially in external 
libraries. Example code:

public class ExceptionReThrow
{
public void Test(){
try
{
M1 ();
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}

public void M1()
{
M2();
}

private void M2()
{
try{
M3();
}catch{
throw;
}
}

private void M3()
{
throw new NotImplementedException();
}
}

For Microsoft .Net output will be:

System.NotImplementedException: The method or operation is not implemented. at 
TestApp.ExceptionReThrow.M3() in 
D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 38 at 
TestApp.ExceptionReThrow.M2() in 
D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 32 at 
TestApp.ExceptionReThrow.M1() in 
D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 24 at 
TestApp.ExceptionReThrow.Test() in 
D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 14

For mono (4.2.3) output will be:

System.NotImplementedException: The method or operation is not implemented. at 
TestApp.ExceptionReThrow.M3 () [0x1] in 
D:\source\TestApp\TestApp\ExceptionReThrow.cs:38 at TestApp.ExceptionReThrow.M2 
() [0x3] in D:\source\TestApp\TestApp\ExceptionReThrow.cs:30

As you can see, mono looses stack between first and second catch statements. 
What is the explanation for this feature? Can I disable it?





___
Mono-list maillist  -  
Mono-list@lists.ximian.com<mailto:Mono-list@lists.ximian.com>
http://lists.ximian.com/mailman/listinfo/mono-list<https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2flists.ximian.com%2fmailman%2flistinfo%2fmono-list=01%7c01%7cbeurba%40microsoft.com%7cf5f2327fd4a34d18817208d399b71770%7c72f988bf86f141af91ab2d7cd011db47%7c1=HCjwCdQLyKc7gIOR1gMdBebupL2mSvlwxQGIGcDvYGM%3d>


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono does not include full stacktrace while rethrowing exception

2016-06-21 Thread Alan
This happens on .NET too. This gives a good description of what's happening
and why.

http://www.hanselman.com/blog/ReleaseISNOTDebug64bitOptimizationsAndCMethodInliningInReleaseBuildCallStacks.aspx

Alan

On 21 June 2016 at 09:31, Алексей Богомолов <horse...@gmail.com> wrote:

> This behavior makes difficult to troubleshoot errors, especially in
> external libraries. Example code:
>
> public class ExceptionReThrow{
> public void Test(){
> try
> {
> M1 ();
> }
> catch (Exception ex)
> {
> Console.WriteLine(ex);
> }
> }
>
> public void M1()
> {
> M2();
> }
>
> private void M2()
> {
> try{
> M3();
> }catch{
> throw;
> }
> }
>
> private void M3()
> {
> throw new NotImplementedException();
> }}
>
> For Microsoft .Net output will be:
>
> System.NotImplementedException: The method or operation is not
> implemented. at TestApp.ExceptionReThrow.M3() in
> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 38 at
> TestApp.ExceptionReThrow.M2() in
> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 32 at
> TestApp.ExceptionReThrow.M1() in
> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 24 at
> TestApp.ExceptionReThrow.Test() in
> D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 14
>
> For mono (4.2.3) output will be:
>
> System.NotImplementedException: The method or operation is not
> implemented. at TestApp.ExceptionReThrow.M3 () [0x1] in
> D:\source\TestApp\TestApp\ExceptionReThrow.cs:38 at
> TestApp.ExceptionReThrow.M2 () [0x3] in
> D:\source\TestApp\TestApp\ExceptionReThrow.cs:30
>
> As you can see, mono looses stack between first and second catch
> statements. What is the explanation for this feature? Can I disable it?
>
>
>
>
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono does not include full stacktrace while rethrowing exception

2016-06-21 Thread Алексей Богомолов
This behavior makes difficult to troubleshoot errors, especially in
external libraries. Example code:

public class ExceptionReThrow{
public void Test(){
try
{
M1 ();
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}

public void M1()
{
M2();
}

private void M2()
{
try{
M3();
}catch{
throw;
}
}

private void M3()
{
throw new NotImplementedException();
}}

For Microsoft .Net output will be:

System.NotImplementedException: The method or operation is not implemented.
at TestApp.ExceptionReThrow.M3() in
D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 38 at
TestApp.ExceptionReThrow.M2() in
D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 32 at
TestApp.ExceptionReThrow.M1() in
D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 24 at
TestApp.ExceptionReThrow.Test() in
D:\source\TestApp\TestApp\ExceptionReThrow.cs:line 14

For mono (4.2.3) output will be:

System.NotImplementedException: The method or operation is not implemented.
at TestApp.ExceptionReThrow.M3 () [0x1] in
D:\source\TestApp\TestApp\ExceptionReThrow.cs:38 at
TestApp.ExceptionReThrow.M2 () [0x3] in
D:\source\TestApp\TestApp\ExceptionReThrow.cs:30

As you can see, mono looses stack between first and second catch
statements. What is the explanation for this feature? Can I disable it?
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono C# Console Application dies unexpectedly every ~20 minuts

2016-06-15 Thread akurilo
In addition the app is running as a service (/etc/init.d/), so i'm not
connected to terminal and i don't see the app's output, the only thing i can
do is watch the process using ps axg (or htop) or checkout the logs i write
inside the program.



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-C-Console-Application-dies-unexpectedly-every-20-minuts-tp4667992p4668001.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono C# Console Application dies unexpectedly every ~20 minuts

2016-06-15 Thread akurilo
Could you please tell me how can i check it out?

It doesn't go to any of the evenhandlers i set up in my app, so i'm not sure
how can i check it.



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-C-Console-Application-dies-unexpectedly-every-20-minuts-tp4667992p4668000.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono C# Console Application dies unexpectedly every ~20 minuts

2016-06-14 Thread Chris Swiedler
What is the exit code of the process? If it's in the 128-150 range then it's 
receiving a signal.

chris

-Original Message-
From: mono-list-boun...@lists.ximian.com 
[mailto:mono-list-boun...@lists.ximian.com] On Behalf Of akurilo
Sent: Tuesday, June 14, 2016 10:23 AM
To: mono-list@lists.ximian.com
Subject: [Mono-list] Mono C# Console Application dies unexpectedly every ~20 
minuts

Hi, i've developed an application for raspberry pi (wheezy) using C# .Net it 
has a lot of code and about 5 active threads all the time, i've set up event 
handlers for ExitProcess, UnhandeledException, whatever events, but every 20 
minutes my app dies with no warning or any message.

I've spent hours trying to find any information about how the app died, but 
haven't found anything in system logs. So i'm wondering if someone knows about 
if mono can kill the process by some reason.

P.S. My process uses 2.5% of memory and ususally no CPU. It has an infinity 
while loop where it does all the mess, but it doesn't seem to be reason why it 
should be killed.

Thanks



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-C-Console-Application-dies-unexpectedly-every-20-minuts-tp4667992.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com 
http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono C# Console Application dies unexpectedly every ~20 minuts

2016-06-14 Thread akurilo
Hi, i've developed an application for raspberry pi (wheezy) using C# .Net it
has a lot of code and about 5 active threads all the time, i've set up event
handlers for ExitProcess, UnhandeledException, whatever events, but every 20
minutes my app dies with no warning or any message.

I've spent hours trying to find any information about how the app died, but
haven't found anything in system logs. So i'm wondering if someone knows
about if mono can kill the process by some reason.

P.S. My process uses 2.5% of memory and ususally no CPU. It has an infinity
while loop where it does all the mess, but it doesn't seem to be reason why
it should be killed.

Thanks



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-C-Console-Application-dies-unexpectedly-every-20-minuts-tp4667992.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mono-core still required after using mkbundle --static to make executable

2016-03-09 Thread Edward Ned Harvey (mono)
> From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
> boun...@lists.ximian.com] On Behalf Of Eugene Kobrinsky
> 
> We finally got mkbundle --static to build a single executable of our
> microservice, but when we move it to another machine, it fails to run unless
> we install mono-core (this is all on Cent0S 7 installs).

mkbundle works poorly. If you need to use it, please ignore me. The advice is 
to rely on having a functional mono installation, unless you have a solid 
reason not to (and hence require mkbundle).
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mono-core still required after using mkbundle --static to make executable

2016-03-08 Thread Alexander Köplinger
You’re missing the dllmaps that remap „libc“ in p/invoke declarations to 
libc.dylib/libc.so.6/msvcrt.dll, so the program doesn’t find the library.
Pass --config /etc/mono/config to use the default dllmap config that ships with 
Mono (after verifying the entries make sense for your target).

- Alex

> Am 09.03.2016 um 01:28 schrieb Eugene Kobrinsky <c...@integrate.com>:
> 
> We're being slowly driven nuts by this <OutlookEmoji-#X1f60a.png>
>  
> We finally got mkbundle --static to build a single executable of our 
> microservice, but when we move it to another machine, it fails to run unless 
> we install mono-core (this is all on Cent0S 7 installs).
> 
> I've included the error below, but it appears to be MassTransit library 
> specific while the issue gets resolved with installing mono-core (yum install 
> mono-core). This leads us to believe there is some other issue at hand and 
> the error is misleading.  
> 
> Our mkbundle command:
> mkbundle --deps --machine-config /etc/mono/4.5/machine.config --static 
> Integrate.Identity.Gateway.exe /workspace/output/Integrate.dll 
> /workspace/output/Integrate.Nancy.dll /workspace/output/Nancy.dll 
> /workspace/output/MongoDB.Driver.dll /workspace/output/MongoDB.Bson.dll 
> /workspace/output/Newtonsoft.Json.dll 
> /workspace/output/Newtonsoft.Json.7.0.1.dll 
> /workspace/output/Integrate.Identity.dll 
> /workspace/output/Nancy.Hosting.Self.dll 
> /workspace/output/Integrate.Identity.Storage.dll 
> /workspace/output/Integrate.Identity.Service.dll 
> /workspace/output/MassTransit.dll /workspace/output/Magnum.dll 
> /workspace/output/Integrate.MassTransit.dll 
> /workspace/output/MassTransit.Transports.RabbitMq.dll 
> /workspace/output/Integrate.Cache.Redis.dll 
> /workspace/output/ServiceStack.Interfaces.dll 
> /workspace/output/ServiceStack.Redis.dll 
> /workspace/output/ServiceStack.Text.dll 
> /workspace/output/ServiceStack.Common.dll 
> /workspace/output/nunit.framework.dll /workspace/output/Simple.Mocking.dll 
> /workspace/output/Integrate.Identity.Tests.dll /workspace/output/log4net.dll 
> -o integrateapp.exe
> 
> Error when trying to run executable without mono-core installed:
> Unhandled Exception:
> MassTransit.Exceptions.ConfigurationException: An exception was thrown during 
> service bus creation ---> MassTransit.Exceptions.MassTransitException: Failed 
> to start bus services ---> 
> RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified 
> endpoints were reachable ---> System.TypeInitializationException: The type 
> initializer for 'System.Net.NetworkInformation.NetworkInterface' threw an 
> exception. ---> System.DllNotFoundException: libc
>   at (wrapper managed-to-native) System.Platform:uname (intptr)
>   at System.Platform.CheckOS () <0x40a34570 + 0x00047> in :0
>   at System.Platform.get_IsMacOS () <0x40a34540 + 0x00017> in  unknown>:0
>   at System.Net.NetworkInformation.NetworkInterfaceFactory.Create () 
> <0x40a34450 + 0x0005b> in :0
>   at System.Net.NetworkInformation.NetworkInterface..cctor () <0x40a34420 + 
> 0xb> in :0
>   --- End of inner exception stack trace ---
>   at System.Net.Sockets.Socket.get_OSSupportsIPv6 () <0x40a78cd0 + 0x00017> 
> in :0
> (error text continues but cutting it off here)
> 
> Does anyone have any pointers on what we can try next? We've spent a few days 
> on this at this point and are at a dead end. 
> 
> We use bindingredirect in our app.config if that matters.
> 
> Thanks,
> 
> Eugene
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com 
> <mailto:Mono-list@lists.ximian.com>
> http://lists.ximian.com/mailman/listinfo/mono-list 
> <http://lists.ximian.com/mailman/listinfo/mono-list>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] mono-core still required after using mkbundle --static to make executable

2016-03-08 Thread Eugene Kobrinsky
We're being slowly driven nuts by this []



We finally got mkbundle --static to build a single executable of our 
microservice, but when we move it to another machine, it fails to run unless we 
install mono-core (this is all on Cent0S 7 installs).


I've included the error below, but it appears to be MassTransit library 
specific while the issue gets resolved with installing mono-core (yum install 
mono-core). This leads us to believe there is some other issue at hand and the 
error is misleading.


Our mkbundle command:

mkbundle --deps --machine-config /etc/mono/4.5/machine.config --static 
Integrate.Identity.Gateway.exe /workspace/output/Integrate.dll 
/workspace/output/Integrate.Nancy.dll /workspace/output/Nancy.dll 
/workspace/output/MongoDB.Driver.dll /workspace/output/MongoDB.Bson.dll 
/workspace/output/Newtonsoft.Json.dll 
/workspace/output/Newtonsoft.Json.7.0.1.dll 
/workspace/output/Integrate.Identity.dll 
/workspace/output/Nancy.Hosting.Self.dll 
/workspace/output/Integrate.Identity.Storage.dll 
/workspace/output/Integrate.Identity.Service.dll 
/workspace/output/MassTransit.dll /workspace/output/Magnum.dll 
/workspace/output/Integrate.MassTransit.dll 
/workspace/output/MassTransit.Transports.RabbitMq.dll 
/workspace/output/Integrate.Cache.Redis.dll 
/workspace/output/ServiceStack.Interfaces.dll 
/workspace/output/ServiceStack.Redis.dll 
/workspace/output/ServiceStack.Text.dll 
/workspace/output/ServiceStack.Common.dll /workspace/output/nunit.framework.dll 
/workspace/output/Simple.Mocking.dll 
/workspace/output/Integrate.Identity.Tests.dll /workspace/output/log4net.dll -o 
integrateapp.exe


Error when trying to run executable without mono-core installed:

Unhandled Exception:
MassTransit.Exceptions.ConfigurationException: An exception was thrown during 
service bus creation ---> MassTransit.Exceptions.MassTransitException: Failed 
to start bus services ---> 
RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified 
endpoints were reachable ---> System.TypeInitializationException: The type 
initializer for 'System.Net.NetworkInformation.NetworkInterface' threw an 
exception. ---> System.DllNotFoundException: libc
  at (wrapper managed-to-native) System.Platform:uname (intptr)
  at System.Platform.CheckOS () <0x40a34570 + 0x00047> in :0
  at System.Platform.get_IsMacOS () <0x40a34540 + 0x00017> in :0
  at System.Net.NetworkInformation.NetworkInterfaceFactory.Create () 
<0x40a34450 + 0x0005b> in :0
  at System.Net.NetworkInformation.NetworkInterface..cctor () <0x40a34420 + 
0xb> in :0
  --- End of inner exception stack trace ---
  at System.Net.Sockets.Socket.get_OSSupportsIPv6 () <0x40a78cd0 + 0x00017> in 
:0
(error text continues but cutting it off here)


Does anyone have any pointers on what we can try next? We've spent a few days 
on this at this point and are at a dead end.

We use bindingredirect in our app.config if that matters.


Thanks,


Eugene
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mono with llvm build errors

2016-02-27 Thread flutos






It's been a while but I think I had some ok problems also. What I can do is 
raise a mono support issue and pass along the errors you were getting and see 
what they say and let you know. I should be able to get an answer 
by Monday anyhow 


Thanks yaakoub 


Scott 



Sent from 
Nine 



From: Yaakoub El Khamra [via Mono] 
ml-nodes1490590n4667500...@n4.nabble.com 
Sent: Feb 27, 2016 11:01 PM 
To: Scott Fluto 
Subject: mono with llvm build errors 







Greetings
I am running into lots of problems building mono with llvm (from git) on fedora 
21 with gcc 5.3.1. I am following directions here: 
http://www.mono-project.com/docs/advanced/mono-llvm/ 



and I configured mono with the following options: 
--enable-loadedllvm --enable-llvm --enable-llvm-runtime --enable-parallel-mark 
--with-llvm=$MONO_INSTALL --with-large-heap=yes 





the compile time errors are below. I could not get past these issues in eglib 
and could not find a way around them. Did anyone build mono with llvm recently 
on linux? Does anyone have any pointers? 


Regards 
Yaakoub 



/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
 In function `monoeg_g_array_new': 
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:70: multiple definition 
of `monoeg_g_array_new' 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:70:
 first defined here 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
 In function `monoeg_g_array_sized_new': 
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:86: multiple definition 
of `monoeg_g_array_sized_new' 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:86:
 first defined here 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
 In function `monoeg_g_array_free': 
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:100: multiple definition 
of `monoeg_g_array_free' 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:100:
 first defined here 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
 In function `monoeg_g_array_append_vals': 
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:119: multiple definition 
of `monoeg_g_array_append_vals' 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:119:
 first defined here 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
 In function `monoeg_g_array_insert_vals': 
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:146: multiple definition 
of `monoeg_g_array_insert_vals' 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:146:
 first defined here 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
 In function `monoeg_g_array_remove_index': 
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:178: multiple definition 
of `monoeg_g_array_remove_index' 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:178:
 first defined here 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
 In function `monoeg_g_array_remove_index_fast': 
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:201: multiple definition 
of `monoeg_g_array_remove_index_fast' 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:201:
 first defined here 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
 In function `monoeg_g_array_set_size': 
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:223: multiple definition 
of `monoeg_g_array_set_size' 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:223:
 first defined here 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-gbytearray.o):
 In function `monoeg_g_byte_array_new': 
/work/mono_llvm/src/stock_mono/mono/eglib/src/gbytearray.c:34: multiple 
definition of `monoeg_g_byte_array_new' 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-gbytearray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/gbytearray.c:34:
 first defined here 
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-gbytearray.o):
 In function `monoeg_g_byte_array_free': 
/work/mono_llvm/src/stock_mono/mono/eglib/src/gbytearray.c:41: multiple 
definition of `monoeg_g_byte_array_free' 

[Mono-list] mono with llvm build errors

2016-02-27 Thread Yaakoub El Khamra
Greetings
I am running into lots of problems building mono with llvm (from git) on
fedora 21 with gcc 5.3.1. I am following directions here:
http://www.mono-project.com/docs/advanced/mono-llvm/

and I configured mono with the following options:
--enable-loadedllvm --enable-llvm --enable-llvm-runtime
--enable-parallel-mark --with-llvm=$MONO_INSTALL --with-large-heap=yes

the compile time errors are below. I could not get past these issues in
eglib and could not find a way around them. Did anyone build mono with llvm
recently on linux? Does anyone have any pointers?

Regards
Yaakoub

/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
In function `monoeg_g_array_new':
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:70: multiple
definition of `monoeg_g_array_new'
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:70:
first defined here
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
In function `monoeg_g_array_sized_new':
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:86: multiple
definition of `monoeg_g_array_sized_new'
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:86:
first defined here
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
In function `monoeg_g_array_free':
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:100: multiple
definition of `monoeg_g_array_free'
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:100:
first defined here
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
In function `monoeg_g_array_append_vals':
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:119: multiple
definition of `monoeg_g_array_append_vals'
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:119:
first defined here
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
In function `monoeg_g_array_insert_vals':
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:146: multiple
definition of `monoeg_g_array_insert_vals'
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:146:
first defined here
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
In function `monoeg_g_array_remove_index':
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:178: multiple
definition of `monoeg_g_array_remove_index'
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:178:
first defined here
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
In function `monoeg_g_array_remove_index_fast':
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:201: multiple
definition of `monoeg_g_array_remove_index_fast'
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:201:
first defined here
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):
In function `monoeg_g_array_set_size':
/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:223: multiple
definition of `monoeg_g_array_set_size'
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-garray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/garray.c:223:
first defined here
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-gbytearray.o):
In function `monoeg_g_byte_array_new':
/work/mono_llvm/src/stock_mono/mono/eglib/src/gbytearray.c:34: multiple
definition of `monoeg_g_byte_array_new'
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-gbytearray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/gbytearray.c:34:
first defined here
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-gbytearray.o):
In function `monoeg_g_byte_array_free':
/work/mono_llvm/src/stock_mono/mono/eglib/src/gbytearray.c:41: multiple
definition of `monoeg_g_byte_array_free'
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-gbytearray.o):/work/mono_llvm/src/stock_mono/mono/eglib/src/gbytearray.c:41:
first defined here
/work/mono_llvm/src/stock_mono/mono/eglib/src/.libs/libeglib.a(libeglib_la-gbytearray.o):
In function `monoeg_g_byte_array_append':
/work/mono_llvm/src/stock_mono/mono/eglib/src/gbytearray.c:49: multiple
definition of `monoeg_g_byte_array_append'

Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-02-09 Thread George, Glover E ERDC-RDE-ITL-MS CIV
Hi Miguel,

Thanks for the response.  After digging into the mono source a bit, as well as 
writing a few test programs, I’ve discovered a bit more.  The Background worker 
threads actually work without Windows Forms.
— — —
Glover E. George
Computer Scientist
Information Technology Laboratory
US Army Engineer Research and Development Center
Vicksburg, MS 39180
601-634-4730


From: Miguel de Icaza <mig...@xamarin.com<mailto:mig...@xamarin.com>>
Date: Monday, February 8, 2016 at 9:19 PM
To: Glover George 
<glover.e.geo...@erdc.dren.mil<mailto:glover.e.geo...@erdc.dren.mil>>
Cc: "mono-list@lists.ximian.com<mailto:mono-list@lists.ximian.com>" 
<mono-list@lists.ximian.com<mailto:mono-list@lists.ximian.com>>
Subject: Re: [Mono-list] Mono, Windows Forms, and Headless operation

Hello,

ThreadPools are available on .NET 2.0, just not the fancier TPL-based ones.

Perhaps you could consider replacing that bit of code with using the ThreadPool?

Miguel

On Thu, Jan 7, 2016 at 4:24 PM, George, Glover E ERDC-RDE-ITL-MS 
<glover.e.geo...@erdc.dren.mil<mailto:glover.e.geo...@erdc.dren.mil>> wrote:
Hi all,

We’re currently porting a Windows Forms Application to Mono, and have generally 
had great success.  However, we have now hit a critical decision point, and 
were hoping for some guidance on the best route forward.   If we don’t have 
X11, mono fails to run Windows Forms code with the following error:

From: System.Windows.Forms, at: Void .ctor(), Error Message: The type 
initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw 
an exception.

Question First:
The main question I had for the Mono list is this.  Is it possible to have mono 
run Windows Forms code without trying to open X11 (I.e. headless mode)?  What 
triggers mono to request an X11 display? Is it the project type?  Is it the 
call to an object that inherits from a Windows Forms control?  I don’t need to 
see the form, but if I’m using BackgroundWorkers, I need the form's event 
handler, don’t I?

Details Last:
Requirements dictate that make every attempt possible to keep a single code 
base.  I.e., either if’s or #ifdefs if different code needs to run on Linux 
than on Windows.

The code uses multiple concurrent BackgroundWorkers (it’s a .net 2.0 app, and 
we currently don’t have permission to move it to 4.0 and thread pools) that 
process data in parallel.  We’re trying to run this code on a large Linux-based 
HPC system that uses a batch (PBS) queueing system.  The problem is that we do 
not have X11  available on the compute nodes (well, at least not unless we’re 
in interactive mode, and that’s against the requirements).  There is a large 
amount of logic that is tied into using BackgroundWorkers, and those seem to 
require a visible form to provide an event loop to handle events generated by 
the BackgroundWorkers.  Essentially, this app was designed to only be run 
interactively, but now we’re both parallelizing it, as well as giving it a 
headless option (I.e. if a command line option is given, we’re running with no 
GUI).

1. We tried creating a Windows Console app in Visual Studio, essentially a 
driver, that then instantiated the the forms and ran them.  Although nothing is 
shown on the screen, it still required us to use X11. giving the error at the 
top of this message.

2.  We tried just not using BackgroundWorkers.  This meant the code was single 
threaded, but it still relies on logic in the Windows forms.  We could move 
this logic to classes that don’t have anything to do with Windows Forms, but 
now we have two code bases, essentially.  However, it still fails even though 
we don’t display anything on screen, we get the error at the top of this 
message.

3.  Xvfb.  This works on local VM’s, but not on our cluster, which we don’t 
have admin rights to (it’s not installed).  There is a possibility that we 
could install X11-Xvfb from source, but this seems overkill.

4.  Worst case option - remove all background worker logic, and change it to 
just use C# threads.  REALLY don’t want to do this if we don’t have to.

I know this may be confusing, and if so, please feel free to ask for 
clarifications, or even just to say “Why would you want to do that?”

Cheers.
— — —
Glover E. George
Computer Scientist
Information Technology Laboratory
US Army Engineer Research and Development Center
Vicksburg, MS 39180
601-634-4730


___
Mono-list maillist  -  
Mono-list@lists.ximian.com<mailto:Mono-list@lists.ximian.com>
Blockedhttp://lists.ximian.com/mailman/listinfo/mono-listBlocked


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-02-09 Thread George, Glover E ERDC-RDE-ITL-MS CIV
My apologies, but I actually hit send before I was done.  The BackgroundWorker 
works without Windows Forms, but I need a message pump provided by an actual 
form or manually calling Application.Run, both of which trigger the XPlatUI 
subsystem in Mono to look for an actual X11 display.  My initial thought was, 
can’t I just put a dummy class in there which replaces XPlatUIX11 stuff, but it 
seems that the code might be tightly coupled to the X11 specific code (it seems 
to be non-trivial to do this).  I had hope to speak to the author of this code, 
Peter Bartok, but it seems his been out of the loop for a while and I can’t 
find current contact information for him.

That being said, we’re now going to do it the hard way.  We have a small time 
extension, so we’re going to start removing any non-windows logic from the 
forms code, stick it in is own class, and go the route of ThreadPools.

The previous concern I had with the fact that many of the hundred or so classes 
have [Attributes] related to property grid editing doesn’t seem to trigger any 
X11 code in mono since they’re from System.ComponentModel (as is 
BackgroundWorker).  It’s the pesky message pump that’s causing the problem.  I 
admit, it is slightly unusual to want to run a Windows Forms code headless, but 
it’s what fell in our lap.

Cheers.

— — —
Glover E. George
Computer Scientist
Information Technology Laboratory
US Army Engineer Research and Development Center
Vicksburg, MS 39180
601-634-4730


From: Glover George 
<glover.e.geo...@erdc.dren.mil<mailto:glover.e.geo...@erdc.dren.mil>>
Date: Tuesday, February 9, 2016 at 10:38 AM
To: Miguel de Icaza <mig...@xamarin.com<mailto:mig...@xamarin.com>>
Cc: "mono-list@lists.ximian.com<mailto:mono-list@lists.ximian.com>" 
<mono-list@lists.ximian.com<mailto:mono-list@lists.ximian.com>>
Subject: Re: [Mono-list] Mono, Windows Forms, and Headless operation

Hi Miguel,

Thanks for the response.  After digging into the mono source a bit, as well as 
writing a few test programs, I’ve discovered a bit more.  The Background worker 
threads actually work without Windows Forms.
— — —
Glover E. George
Computer Scientist
Information Technology Laboratory
US Army Engineer Research and Development Center
Vicksburg, MS 39180
601-634-4730


From: Miguel de Icaza <mig...@xamarin.com<mailto:mig...@xamarin.com>>
Date: Monday, February 8, 2016 at 9:19 PM
To: Glover George 
<glover.e.geo...@erdc.dren.mil<mailto:glover.e.geo...@erdc.dren.mil>>
Cc: "mono-list@lists.ximian.com<mailto:mono-list@lists.ximian.com>" 
<mono-list@lists.ximian.com<mailto:mono-list@lists.ximian.com>>
Subject: Re: [Mono-list] Mono, Windows Forms, and Headless operation

Hello,

ThreadPools are available on .NET 2.0, just not the fancier TPL-based ones.

Perhaps you could consider replacing that bit of code with using the ThreadPool?

Miguel

On Thu, Jan 7, 2016 at 4:24 PM, George, Glover E ERDC-RDE-ITL-MS 
<glover.e.geo...@erdc.dren.mil<mailto:glover.e.geo...@erdc.dren.mil>> wrote:
Hi all,

We’re currently porting a Windows Forms Application to Mono, and have generally 
had great success.  However, we have now hit a critical decision point, and 
were hoping for some guidance on the best route forward.   If we don’t have 
X11, mono fails to run Windows Forms code with the following error:

From: System.Windows.Forms, at: Void .ctor(), Error Message: The type 
initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw 
an exception.

Question First:
The main question I had for the Mono list is this.  Is it possible to have mono 
run Windows Forms code without trying to open X11 (I.e. headless mode)?  What 
triggers mono to request an X11 display? Is it the project type?  Is it the 
call to an object that inherits from a Windows Forms control?  I don’t need to 
see the form, but if I’m using BackgroundWorkers, I need the form's event 
handler, don’t I?

Details Last:
Requirements dictate that make every attempt possible to keep a single code 
base.  I.e., either if’s or #ifdefs if different code needs to run on Linux 
than on Windows.

The code uses multiple concurrent BackgroundWorkers (it’s a .net 2.0 app, and 
we currently don’t have permission to move it to 4.0 and thread pools) that 
process data in parallel.  We’re trying to run this code on a large Linux-based 
HPC system that uses a batch (PBS) queueing system.  The problem is that we do 
not have X11  available on the compute nodes (well, at least not unless we’re 
in interactive mode, and that’s against the requirements).  There is a large 
amount of logic that is tied into using BackgroundWorkers, and those seem to 
require a visible form to provide an event loop to handle events generated by 
the BackgroundWorkers.  Essentially, this app was designed to only be run 
interactively, but now we’re both parallelizing it, as well as giving it a 
headless 

Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-02-08 Thread Miguel de Icaza
Hello,

ThreadPools are available on .NET 2.0, just not the fancier TPL-based ones.

Perhaps you could consider replacing that bit of code with using the
ThreadPool?

Miguel

On Thu, Jan 7, 2016 at 4:24 PM, George, Glover E ERDC-RDE-ITL-MS <
glover.e.geo...@erdc.dren.mil> wrote:

> Hi all,
>
> We’re currently porting a Windows Forms Application to Mono, and have
> generally had great success.  However, we have now hit a critical decision
> point, and were hoping for some guidance on the best route forward.   If we
> don’t have X11, mono fails to run Windows Forms code with the following
> error:
>
> From: System.Windows.Forms, at: Void .ctor(), Error Message: The type
> initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext'
> threw an exception.
>
> Question First:
> The main question I had for the Mono list is this.  Is it possible to have
> mono run Windows Forms code without trying to open X11 (I.e. headless
> mode)?  What triggers mono to request an X11 display? Is it the project
> type?  Is it the call to an object that inherits from a Windows Forms
> control?  I don’t need to see the form, but if I’m using BackgroundWorkers,
> I need the form's event handler, don’t I?
>
> Details Last:
> Requirements dictate that make every attempt possible to keep a single
> code base.  I.e., either if’s or #ifdefs if different code needs to run on
> Linux than on Windows.
>
> The code uses multiple concurrent BackgroundWorkers (it’s a .net 2.0 app,
> and we currently don’t have permission to move it to 4.0 and thread pools)
> that process data in parallel.  We’re trying to run this code on a large
> Linux-based HPC system that uses a batch (PBS) queueing system.  The
> problem is that we do not have X11  available on the compute nodes (well,
> at least not unless we’re in interactive mode, and that’s against the
> requirements).  There is a large amount of logic that is tied into using
> BackgroundWorkers, and those seem to require a visible form to provide an
> event loop to handle events generated by the BackgroundWorkers.
> Essentially, this app was designed to only be run interactively, but now
> we’re both parallelizing it, as well as giving it a headless option (I.e.
> if a command line option is given, we’re running with no GUI).
>
> 1. We tried creating a Windows Console app in Visual Studio, essentially a
> driver, that then instantiated the the forms and ran them.  Although
> nothing is shown on the screen, it still required us to use X11. giving the
> error at the top of this message.
>
> 2.  We tried just not using BackgroundWorkers.  This meant the code was
> single threaded, but it still relies on logic in the Windows forms.  We
> could move this logic to classes that don’t have anything to do with
> Windows Forms, but now we have two code bases, essentially.  However, it
> still fails even though we don’t display anything on screen, we get the
> error at the top of this message.
>
> 3.  Xvfb.  This works on local VM’s, but not on our cluster, which we
> don’t have admin rights to (it’s not installed).  There is a possibility
> that we could install X11-Xvfb from source, but this seems overkill.
>
> 4.  Worst case option - remove all background worker logic, and change it
> to just use C# threads.  REALLY don’t want to do this if we don’t have to.
>
> I know this may be confusing, and if so, please feel free to ask for
> clarifications, or even just to say “Why would you want to do that?”
>
> Cheers.
> — — —
> Glover E. George
> Computer Scientist
> Information Technology Laboratory
> US Army Engineer Research and Development Center
> Vicksburg, MS 39180
> 601-634-4730
>
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, C#, RaspberryPi2 and MS Azure

2016-02-05 Thread Edward Ned Harvey (mono)
Well, the one thing that's clear is "Invalid certificate received from server." 
You said it works on other systems, so most likely there isn't an *actual* 
problem with the certificate, so the question is why mono on the pi is 
rejecting it.

Can you print the URL? From another system, we can connect to the URL and look 
at the certificate chain, to see if there's some other possible cause of the 
problem ... like multiple intermediates, or signed by a root that isn't in the 
Mozilla list, or using EC keys, or supporting only up to SSLv3, or supporting 
only TLS >= 1.1. Any of these would be possible explanations, that will only be 
found by inspecting the cert from another system.

If there's a general problem with mono on the pi, can you try fetching some 
other URL, such as 
https://raw.githubusercontent.com/mono/mono/master/README.md
This is just a random HTTPS url for a small file you can fetch. So you have 
more clues to figure out the cause of the problem.


> I cannot find the certificates directory to
> physically confirm they are there 

Did you check those directories?
To find out if you have root CA's installed, look in... (There's a distinct 
possibility these directories will be different for a raspberry pi ... I'm just 
not sure...)
~/.config/.mono/certs/Trust/
and
/usr/share/.mono/certs/Trust/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, C#, RaspberryPi2 and MS Azure

2016-02-04 Thread Edward Ned Harvey (mono)
> From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
> boun...@lists.ximian.com] On Behalf Of myusername
>  
> 

Looks like you're getting TlsException, when fetching from the https server. 
Most likely this means you don't have any installed trusted root CA's. I'm not 
sure how mono gets installed in raspberry pi, but the mono trusted root CA list 
is separate from the OS root CA list (which you may or may not have).

To find out if you have root CA's installed, look in...
(There's a distinct possibility these directories will be different for a 
raspberry pi ... I'm just not sure...)
~/.config/.mono/certs/Trust/
and
/usr/share/.mono/certs/Trust/

If there's nothing there, you might need to populate it with cert-sync or 
mozroots. (Executables that are installed as part of mono). Mozroots downloads 
the certs from mozilla over the internet. Cert-sync copies them from your /etc 
directory. 

If cert-sync and mozroots aren't available (or don't work) in raspberry pi, you 
can run it on some other system, and then copy the files, preserving 
permissions.

Since some recent version of mono (I guess around 4.1) the yum and apt packages 
automatically run cert-sync during installation. The same is not true when 
building from source, copying binaries, using an older version, or on a non-rpm 
non-deb system. Also, if raspberry pi uses a different OS root ca package, then 
even if cert-sync is run automatically on the pi, it would still fail to 
populate anything, and mozroots would then be your best bet.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, C#, RaspberryPi2 and MS Azure

2016-02-04 Thread myusername
I ran mozroots which copied 140 certificates to my raspberryPi and also
certs-sync which copied 3. I cannot find the certificates directory to
physically confirm they are there but Im still getting the same error. If I
cant fix this Im going to have to switch from linux-raspbian to Win IOT Core
and start everything from scratch 



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-C-RaspberryPi2-and-MS-Azure-tp4667362p4667372.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono, C#, RaspberryPi2 and MS Azure

2016-02-03 Thread myusername
Hi,
Im trying to download blobs from Azure using my Respberry Pi and Raspbian
Jessie. The code is solid, it works fine on my desktop. It appears that mono
does not have azure assemblies capability, but I read that you can use mono
to access azure so I'm wondering if Im making a mistake? 

My code:
using System.Collections.Generic;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
using System.Configuration;

namespace CPGetFamilyPhotos
{
class Program
{
static void Main(string[] args)
{
// Retrieve storage account from connection string.
CloudStorageAccount storageAccount =
CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["AzureImagesConnection"].ConnectionString);
// Create the blob client.
CloudBlobClient blobClient =
storageAccount.CreateCloudBlobClient();
// Retrieve a reference to a container.
var container =
blobClient.GetContainerReference("newAdverts").ListBlobs();
// Retrieve filenames from container List
var urls = new List();
int fileName = 1;

foreach (var blob in container)
{
using (var fileStream =
System.IO.File.OpenWrite(@"\home\pi\Pictures\" + fileName + ".jpg"))
{
var blobReference =
blobClient.GetBlobReferenceFromServer(blob.Uri);
blobReference.DownloadToStream(fileStream);
fileName++;
}
}

}
}
}

I also attach the image of the release files on my Pi and the error message.
There is a small overlap in the error message images (Image 2 & 3).

Does anyone have any idea what I'm doing wrong please?
 

 

 



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-C-RaspberryPi2-and-MS-Azure-tp4667362.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-01-09 Thread Mladen Mihajlovic
90 + 0x0001b> in :0
> [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The
> type initializer for
> 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an
> exception. ---> System.TypeInitializationException: The type initializer
> for 'System.Windows.Forms.XplatUI' threw an exception. --->
> System.ArgumentNullException: Could not open display (X-Server required.
> Check your DISPLAY environment variable)
> Parameter name: Display
>   at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle)
> <0x4100b560 + 0x00b9b> in :0
>   at System.Windows.Forms.XplatUIX11..ctor () <0x41009890 + 0x001df> in
> :0
>   at System.Windows.Forms.XplatUIX11.GetInstance () <0x410096c0 + 0x0005b>
> in :0
>   at System.Windows.Forms.XplatUI..cctor () <0x41009390 + 0x00137> in
> :0
>   --- End of inner exception stack trace ---
>   at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined ()
> <0x41009340 + 0xb> in :0
>   at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined
> () <0x41004790 + 0x00017> in :0
>   at System.Windows.Forms.Control..ctor () <0x410033b0 + 0x00243> in
> :0
>   at (wrapper remoting-invoke-with-check)
> System.Windows.Forms.Control:.ctor ()
>   at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor ()
> <0x410046c0 + 0x0001f> in :0
>   --- End of inner exception stack trace ---
>   at System.Windows.Forms.Control..ctor () <0x410033b0 + 0x00053> in
> :0
>   at System.Windows.Forms.ScrollableControl..ctor () <0x41002e40 +
> 0xf> in :0
>   at System.Windows.Forms.ContainerControl..ctor () <0x41002cb0 + 0x00027>
> in :0
>   at System.Windows.Forms.Form..ctor () <0x41002430 + 0x000bb> in
> :0
>   at test2.Form1..ctor () <0x4090 + 0x0001f> in :0
>   at (wrapper remoting-invoke-with-check) test2.Form1:.ctor ()
>   at test2.Program.Main () <0x40fffd90 + 0x0001b> in :0
>
>
>
> From the looks of that error message, is X truly a requirement for any app
> that is calling Windows Forms controls?  Also note, the project type for
> this project is Console App.  It appears that by dynamically loading (or
> is it the link?) anything from System.Windows.Forms causes mono to require
> X.
> ‹ ‹ ‹
>
> Glover E. George
> Computer Scientist
> Information Technology Laboratory
> US Army Engineer Research and Development Center
> Vicksburg, MS 39180
> 601-634-4730
>
>
>
>
>
> On 1/8/16, 10:29 AM, "mono-list-boun...@lists.ximian.com <javascript:;>
> on behalf of
> Robert Jordan" <mono-list-boun...@lists.ximian.com <javascript:;> on
> behalf of
> robe...@gmx.net <javascript:;>> wrote:
>
> >On 07.01.2016 22:24, George, Glover E ERDC-RDE-ITL-MS wrote:
> >> Hi all,
> >>
> >> We¹re currently porting a Windows Forms Application to Mono, and have
> >> generally had great success.  However, we have now hit a critical
> >> decision point, and were hoping for some guidance on the best route
> >> forward.   If we don¹t have X11, mono fails to run Windows Forms code
> >> with the following error:
> >>
> >> From: System.Windows.Forms, at: Void .ctor(), Error Message: The type
> >> initializer for
> >> 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an
> >> exception.
> >>
> >> Question First: The main question I had for the Mono list is this.
> >> Is it possible to have mono run Windows Forms code without trying to
> >> open X11 (I.e. headless mode)?  What triggers mono to request an X11
> >> display? Is it the project type?  Is it the call to an object that
> >> inherits from a Windows Forms control?  I don¹t need to see the form,
> >> but if I¹m using BackgroundWorkers, I need the form's event handler,
> >> don¹t I?
> >
> >
> >BackgroundWorker does not depend upon System.Windows.Forms, i.e.
> >it can use it headless.
> >
> >The exception you're experiencing is caused by the synchronization
> >context set and used by WinForms.
> >
> >Supposing that you don't need any kind of synchronization, you
> >may want to replace the synchronization context with a simple
> >one.
> >
> >I don't know if the most simple one
> >(System.Threading.SynchronizationContext)
> >would be enough or if you have to subclass it. Have a look
> >at its sources and at
> >System.Windows.Forms.WindowsFormsSynchronizationContext.
> >
> >Robert
> >
> >___
> >Mono-list maillist  -  Mono-list@lists.ximian.com <javascript:;>
> >Blockedhttp://lists.ximian.com/mailman/listinfo/mono-listBlocked
> >
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com <javascript:;>
> http://lists.ximian.com/mailman/listinfo/mono-list
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-01-08 Thread Edward Ned Harvey (mono)
I think the advice would generally be:

1. Yes you can absolutely write a Console Application, which works perfectly 
cross-platform, and does not need any WinForms or X11. (Right click your 
solution, new project, Console Application). It's better to create a new 
project than to convert an existing WinForms project, unless you know all the 
details of what's different between the two types of projects. They launch 
differently, in different thread compartments, and some stuff like that - it's 
not as simple as merely removing the System.Windows.Forms reference. Which 
brings me to the second point...
2. You really should separate your business logic from the GUI code.
3. In general, you should not expect WinForms to work well on anything other 
than windows. If you need a GUI for other platforms, design a new one, or use a 
cross-platform GUI toolkit such as Eto.Forms. If you don't need a GUI... Then 
separate the WinForms GUI code from the non-GUI code, so you can build your 
non-windows project independently of WinForms.

Really, the core logic should be moved to its own assembly, so the winforms 
project and console project can both reference it.

There is *some* support for WinForms on non-windows platforms. Rarely does it 
ever work well - nobody on a mac or linux wants windows that look like WinForms 
- and that's if it works at all. (Lots of times it's straight up 
nonfunctional). Even if it works perfectly, nobody wants to be dependent on 
launching X11 on a mac, and it's only *sometimes* acceptable on linux.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-01-08 Thread George, Glover E ERDC-RDE-ITL-MS
Thanks Jordan.

It turns out, I may have been conflating two problems into one.  The fact
that I needed to show the windows form was because I needed a message loop
to process the BackgroundWorker¹s events.  Turns out I can just call
Application.Run() with no parameter, and it will cause the UI thread to
start a message loop that works fine.

The real problem is that it still seems as though mono requires X11 for
Windows Forms apps.  So I created a new project from scratch to test this
theory.  It is a very simple app.  It¹s a simple form with a button
(runButton) and a progress bar (progressBar1) (Designer code is left out
due to space).

PROGRAM.CS
static class Program
{
/// 
/// The main entry point for the application.
/// 
  [STAThread]
  static void Main()
  {
// Instantiate the Main Form
Form frm = new Form1();
Application.Run();
  }
}


#FORM1.cs
public partial class Form1 : Form
{
  public Form1()
  {
InitializeComponent();
runButton_Click(this,null);
  }

  private void runButton_Click(object sender, EventArgs e)
  {
BackgroundWorker worker = new BackgroundWorker();
worker.WorkerReportsProgress = true;
worker.DoWork += DoWork;
worker.ProgressChanged += ProgressChanged;
worker.RunWorkerCompleted += WorkerCompleted;
worker.RunWorkerAsync(worker);
  }

  public void DoWork(object sender, EventArgs e)
  {
var worker = sender as BackgroundWorker;
for (int i = 0; i < 100; i++)
{
  Thread.Sleep(100);
  worker.ReportProgress(i);
}
  }

  public void ProgressChanged(object sender, ProgressChangedEventArgs e)
  {
progressBar1.Value = e.ProgressPercentage;
  }

  public void WorkerCompleted(object sender, EventArgs e)
  {
MessageBox.Show("I'm done!!!");
Application.Exit();
  }
}


This program runs perfectly well without displaying anything so long as
DISPLAY is set to a valid X11 Display (:0).  However, if I unset DISPLAY
(export DISPLAY=), then I get the following error.  Note, this is similar
to the error I previously posted, but the stack trace and error message is
a bit more detailed (don¹t know why yet):


Unhandled Exception:
System.TypeInitializationException: The type initializer for
'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an
exception. ---> System.TypeInitializationException: The type initializer
for 'System.Windows.Forms.XplatUI' threw an exception. --->
System.ArgumentNullException: Could not open display (X-Server required.
Check your DISPLAY environment variable)
Parameter name: Display
  at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle)
<0x4100b560 + 0x00b9b> in :0
  at System.Windows.Forms.XplatUIX11..ctor () <0x41009890 + 0x001df> in
:0
  at System.Windows.Forms.XplatUIX11.GetInstance () <0x410096c0 + 0x0005b>
in :0
  at System.Windows.Forms.XplatUI..cctor () <0x41009390 + 0x00137> in
:0
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined ()
<0x41009340 + 0xb> in :0
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined
() <0x41004790 + 0x00017> in :0
  at System.Windows.Forms.Control..ctor () <0x410033b0 + 0x00243> in
:0
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control:.ctor ()
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor ()
<0x410046c0 + 0x0001f> in :0
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Control..ctor () <0x410033b0 + 0x00053> in
:0
  at System.Windows.Forms.ScrollableControl..ctor () <0x41002e40 +
0xf> in :0
  at System.Windows.Forms.ContainerControl..ctor () <0x41002cb0 + 0x00027>
in :0
  at System.Windows.Forms.Form..ctor () <0x41002430 + 0x000bb> in
:0
  at test2.Form1..ctor () <0x4090 + 0x0001f> in :0
  at (wrapper remoting-invoke-with-check) test2.Form1:.ctor ()
  at test2.Program.Main () <0x40fffd90 + 0x0001b> in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The
type initializer for
'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an
exception. ---> System.TypeInitializationException: The type initializer
for 'System.Windows.Forms.XplatUI' threw an exception. --->
System.ArgumentNullException: Could not open display (X-Server required.
Check your DISPLAY environment variable)
Parameter name: Display
  at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle)
<0x4100b560 + 0x00b9b> in :0
  at System.Windows.Forms.XplatUIX11..ctor () <0x41009890 + 0x001df> in
:0
  at System.Windows.Forms.XplatUIX11.GetInstance () <0x410096c0 + 0x0005b>
in :0
  at System.Windows.Forms.XplatUI..cctor () <0x41009390 + 0x00137> in
:0
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined ()
<0x41009340 + 0xb> in :0
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined
() <0x41004790 + 0x00017> in :0
  at System.Windows.Forms.Control..ctor () <0x410033b0 + 

Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-01-08 Thread George, Glover E ERDC-RDE-ITL-MS
Hi Timotheus,

Thanks for your reply.  Unfortunately, changing from WinExe to Exe doesn¹t
help as it still wants an X Display.  Also, most of the business logic is
separate from the gui .  However, the multithreading uses Background
Workers, which to my knowledge, requires an event loop to handle the
ProgressChanged and WorkerCompleted events.  If I don¹t display the form,
the Progress Changed event is raised, but the UI thread doesn¹t handle it.
So if I drive the business logic without any forms (which would be nice),
I¹d be forced to change the implementation to using C# threads instead of
Background Workers.  This isn¹t entirely impossible, but will take much
longer.  I have three weeks (otherwise, I wouldn¹t try to bother the list,
I¹d work it out myself :D).

Perhaps there are generic Event Loops in C# that could listen for events
from the BackgroundWorkers, but I¹ve yet to find them.

Note:  This isn¹t exactly a problem with Mono.  If I create and display
the form, from which the Background Workers are created and run, it works
fine in both Mono and Windows.  If I create the form but do not display it
(insatiate, initialize the form, and instantiate several background
workers), the UI thread terminates before the Background Workers in BOTH
Mono and Windows.  The question is really a matter of what Makes Mono
require X?  Is it the project type (doesn¹t seem to be), or is it the fact
that I¹m creating objects from the Forms object hierarchy? Also, is there
a cheap, dirty trick to just not attempt to connect to X, yet still have
the logic run?

It¹s looking more and more inevitable that if I wanted a multithreaded C#
app under mono, and require it to run without X, BackgroundWorker isn¹t a
solution.  If that¹s the case, I guess I can accept that.


‹ ‹ ‹ 

Glover E. George
Computer Scientist
Information Technology Laboratory
US Army Engineer Research and Development Center
Vicksburg, MS 39180
601-634-4730





On 1/8/16, 1:13 AM, "mono-list-boun...@lists.ximian.com on behalf of
Timotheus Pokorra"  wrote:

>Hello George,
>
>> Question First:
>> The main question I had for the Mono list is this.  Is it possible to
>>have
>> mono run Windows Forms code without trying to open X11 (I.e. headless
>>mode)?
>> What triggers mono to request an X11 display? Is it the project type?
>>Is it
>> the call to an object that inherits from a Windows Forms control?  I
>>don¹t
>> need to see the form, but if I¹m using BackgroundWorkers, I need the
>>form's
>> event handler, don¹t I?
>
>You should try to modify the project type, ie OutputType in the csproj
>file, WinExe vs Exe.
>
>> I know this may be confusing, and if so, please feel free to ask for
>> clarifications, or even just to say ³Why would you want to do that?²
>
>I wonder if you could cleanly separate the business logic from the
>gui. Then you can have a dll with the business logic, which you can
>reference from your winforms forms, but also from your console
>application.
>
>hope this helps,
>  Timotheus
>___
>Mono-list maillist  -  Mono-list@lists.ximian.com
>Blockedhttp://lists.ximian.com/mailman/listinfo/mono-listBlocked

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-01-08 Thread Robert Jordan

On 07.01.2016 22:24, George, Glover E ERDC-RDE-ITL-MS wrote:

Hi all,

We’re currently porting a Windows Forms Application to Mono, and have
generally had great success.  However, we have now hit a critical
decision point, and were hoping for some guidance on the best route
forward.   If we don’t have X11, mono fails to run Windows Forms code
with the following error:

From: System.Windows.Forms, at: Void .ctor(), Error Message: The type
initializer for
'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an
exception.

Question First: The main question I had for the Mono list is this.
Is it possible to have mono run Windows Forms code without trying to
open X11 (I.e. headless mode)?  What triggers mono to request an X11
display? Is it the project type?  Is it the call to an object that
inherits from a Windows Forms control?  I don’t need to see the form,
but if I’m using BackgroundWorkers, I need the form's event handler,
don’t I?



BackgroundWorker does not depend upon System.Windows.Forms, i.e.
it can use it headless.

The exception you're experiencing is caused by the synchronization
context set and used by WinForms.

Supposing that you don't need any kind of synchronization, you
may want to replace the synchronization context with a simple
one.

I don't know if the most simple one 
(System.Threading.SynchronizationContext)

would be enough or if you have to subclass it. Have a look
at its sources and at
System.Windows.Forms.WindowsFormsSynchronizationContext.

Robert

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-01-08 Thread George, Glover E ERDC-RDE-ITL-MS
Again, I agree with the separation of business logic from the GUI.  In
fact, on mono, I never want to see the GUI.  It¹s due to the fact that my
parallelism relies on multiple concurrent BackgroundWorkers.  I¹m
restricted to .net 2.0 , nothing later.  So I don¹t have the TPL
available.  I have BackgroundWorkers, Threads, and Threadpool.  As I
understand it, Threadpools don¹t have a way to know when they are finished
(at least, not directly).  Perhaps I misunderstand.  BackgroundWorkers are
simple, and are performing their function perfectly on Mono, so long as X
is there.  The only option left is directly using Threads.

So to be clear, the only reason I wanted Windows Forms on Mono is to use
BackgroundWorker because it¹s simple and it works.
‹ ‹ ‹ 

Glover E. George
Computer Scientist
Information Technology Laboratory
US Army Engineer Research and Development Center
Vicksburg, MS 39180
601-634-4730





On 1/8/16, 10:09 AM, "Edward Ned Harvey (mono)"
 wrote:

>I think the advice would generally be:
>
>1. Yes you can absolutely write a Console Application, which works
>perfectly cross-platform, and does not need any WinForms or X11. (Right
>click your solution, new project, Console Application). It's better to
>create a new project than to convert an existing WinForms project, unless
>you know all the details of what's different between the two types of
>projects. They launch differently, in different thread compartments, and
>some stuff like that - it's not as simple as merely removing the
>System.Windows.Forms reference. Which brings me to the second point...
>2. You really should separate your business logic from the GUI code.
>3. In general, you should not expect WinForms to work well on anything
>other than windows. If you need a GUI for other platforms, design a new
>one, or use a cross-platform GUI toolkit such as Eto.Forms. If you don't
>need a GUI... Then separate the WinForms GUI code from the non-GUI code,
>so you can build your non-windows project independently of WinForms.
>
>Really, the core logic should be moved to its own assembly, so the
>winforms project and console project can both reference it.
>
>There is *some* support for WinForms on non-windows platforms. Rarely
>does it ever work well - nobody on a mac or linux wants windows that look
>like WinForms - and that's if it works at all. (Lots of times it's
>straight up nonfunctional). Even if it works perfectly, nobody wants to
>be dependent on launching X11 on a mac, and it's only *sometimes*
>acceptable on linux.
>

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-01-07 Thread netgear
I have been trying to port my windows winforms app to Mac.I have managed to
port it successfully by replacing winforms with gtk#.Background worker has
some issues when there was concurrent execution,i switched to threads
,threads gave some other issues  so i switched back to background worker and
ironed out the issues. 

 
The point i want to make is even if you manage to port the application the
following problems exists which keeps you from proper deployment 

-If you are using System.Drawing then your app first launch in a new
computer will take around 3 minutes.The user does not see any progress

-Bundling Mono Runtime(Standalone app)- simply does not work properly.You
need to write some custom script 

-Mono(Mono.Mac not Xamarin.Mac) support is non existent.You can see this
forum is full of spam and rarely someone replies.

I have done all the hardwork,including the tons of workarounds for the buggy
IDE which wasted lots of my time.Finally im here unable to properly deploy
my app,because MONO is broken(if you go the gtk or the winforms way)

If you want to use Mono and want 'support' and a thing that runs.You can
build a Native UI using cocoa and use c# code.

Just sharing :) 
-  



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-Windows-Forms-and-Headless-operation-tp4667273p4667275.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-01-07 Thread Timotheus Pokorra
Hello George,

> Question First:
> The main question I had for the Mono list is this.  Is it possible to have
> mono run Windows Forms code without trying to open X11 (I.e. headless mode)?
> What triggers mono to request an X11 display? Is it the project type?  Is it
> the call to an object that inherits from a Windows Forms control?  I don’t
> need to see the form, but if I’m using BackgroundWorkers, I need the form's
> event handler, don’t I?

You should try to modify the project type, ie OutputType in the csproj
file, WinExe vs Exe.

> I know this may be confusing, and if so, please feel free to ask for
> clarifications, or even just to say “Why would you want to do that?”

I wonder if you could cleanly separate the business logic from the
gui. Then you can have a dll with the business logic, which you can
reference from your winforms forms, but also from your console
application.

hope this helps,
  Timotheus
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-01-07 Thread Timotheus Pokorra
Hello Netgear,

> -Mono(Mono.Mac not Xamarin.Mac) support is non existent.You can see this
> forum is full of spam and rarely someone replies.
I don't think the original poster is refering to Mono.Mac? X11 is not OSX ;)

And the mono list itself is quite clean from spam. You are using the
nabble interface, and that seems pretty bad with spam piling up.
Fortunately those messages don't get through to the mailing list.
for example see the archive from December:
http://lists.ximian.com/pipermail/mono-list/2015-December/thread.html
And there have been replies to messages. Not to every message, because
some issues are complicated.
Asking on the IRC #mono channel sometimes helps as well.

Timotheus
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono, Windows Forms, and Headless operation

2016-01-07 Thread George, Glover E ERDC-RDE-ITL-MS
Hi all,

We’re currently porting a Windows Forms Application to Mono, and have generally 
had great success.  However, we have now hit a critical decision point, and 
were hoping for some guidance on the best route forward.   If we don’t have 
X11, mono fails to run Windows Forms code with the following error:

From: System.Windows.Forms, at: Void .ctor(), Error Message: The type 
initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw 
an exception.

Question First:
The main question I had for the Mono list is this.  Is it possible to have mono 
run Windows Forms code without trying to open X11 (I.e. headless mode)?  What 
triggers mono to request an X11 display? Is it the project type?  Is it the 
call to an object that inherits from a Windows Forms control?  I don’t need to 
see the form, but if I’m using BackgroundWorkers, I need the form's event 
handler, don’t I?

Details Last:
Requirements dictate that make every attempt possible to keep a single code 
base.  I.e., either if’s or #ifdefs if different code needs to run on Linux 
than on Windows.

The code uses multiple concurrent BackgroundWorkers (it’s a .net 2.0 app, and 
we currently don’t have permission to move it to 4.0 and thread pools) that 
process data in parallel.  We’re trying to run this code on a large Linux-based 
HPC system that uses a batch (PBS) queueing system.  The problem is that we do 
not have X11  available on the compute nodes (well, at least not unless we’re 
in interactive mode, and that’s against the requirements).  There is a large 
amount of logic that is tied into using BackgroundWorkers, and those seem to 
require a visible form to provide an event loop to handle events generated by 
the BackgroundWorkers.  Essentially, this app was designed to only be run 
interactively, but now we’re both parallelizing it, as well as giving it a 
headless option (I.e. if a command line option is given, we’re running with no 
GUI).

1. We tried creating a Windows Console app in Visual Studio, essentially a 
driver, that then instantiated the the forms and ran them.  Although nothing is 
shown on the screen, it still required us to use X11. giving the error at the 
top of this message.

2.  We tried just not using BackgroundWorkers.  This meant the code was single 
threaded, but it still relies on logic in the Windows forms.  We could move 
this logic to classes that don’t have anything to do with Windows Forms, but 
now we have two code bases, essentially.  However, it still fails even though 
we don’t display anything on screen, we get the error at the top of this 
message.

3.  Xvfb.  This works on local VM’s, but not on our cluster, which we don’t 
have admin rights to (it’s not installed).  There is a possibility that we 
could install X11-Xvfb from source, but this seems overkill.

4.  Worst case option - remove all background worker logic, and change it to 
just use C# threads.  REALLY don’t want to do this if we don’t have to.

I know this may be confusing, and if so, please feel free to ask for 
clarifications, or even just to say “Why would you want to do that?”

Cheers.
— — —
Glover E. George
Computer Scientist
Information Technology Laboratory
US Army Engineer Research and Development Center
Vicksburg, MS 39180
601-634-4730

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono Font Cache Location in Macintosh

2015-12-31 Thread rainbow cool
Hi,

Where does Mono Build the font cache in Mac? I tried Looking in 
~/Library/Caches 

There is a Lag associated with building the font cache,im trying to overcome 
this.

Thanks 
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mono embedding in c++: how to get a array from C# code?

2015-11-09 Thread Jonathan Mitchell

> On 9 Nov 2015, at 00:22, sunsflower  wrote:
> 
> 
> and how can I pass a pointer to mono?...
> 
> stuct test
> {
>int index;
>string name;
> };
> 
> 
> MonoMethod* method = mono_class_get_method_from_name(klass, "testfunc", 2);
> MonoException* ex;
> typedef int(__stdcall *func)(MonoObject*, test*, MonoException**);
> func f1 = (func)(mono_method_get_unmanaged_thunk(method));
> test t1;
> 
> something like this? but C# won't accept a pointer except in unsafe context.
> is there some other way of doing this - to read from a pointer to a struct
> in C# and change it? or should I just pass the struct as a value?
> 
I am not quite sure what your intention is here.
The managed struct is of course a value type.
Try passing your struct reference like so (MonoObject *)
I think that a struct returned by a method is a MonoObject * that you can 
access using normal field and property accessors.

If curious, you could glance at the following - it’s Obj-C not C++ but it might 
help.
https://github.com/ThesaurusSoftware/Dubrovnik/blob/master/Framework/XCode/Utility/DBInvoke.m
https://github.com/ThesaurusSoftware/Dubrovnik/blob/master/Framework/XCode/Dubrovnik%20Unit%20Tests/DBUReferenceObject.m

I agree that Mono is great but the embedded API is quite opaque and the headers 
and overall level of documentation is minimalist to say the least.
It does make for quite a steep learning curve but the community is genuinely 
helpful.


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mono embedding in c++: how to get a array from C# code?

2015-11-08 Thread Jonathan Mitchell


> On 8 Nov 2015, at 02:41, sunsflower  wrote:
> 
> I've tried to use a monoclassfield but it doesn't work with a string array in
> C#. the return value is invalide. 
> c++:
> 
>   MonoClassField* field;
>   field = mono_class_get_field_from_name(klass, "entry");
>   char* val[100];
>   MonoString* monoval[100];
>   mono_field_get_value(obj, field, monoval);  
>   val[0] = mono_string_to_utf8(monoval[0]);
> 
> 
I reckon that mono_field_get_value will return a MonoArray,
Try something a bit like this:

MonoArray* monoArray = NULL;
mono_field_get_value(obj, field, monoArrayl);
MonoString *monoString = mono_array_get(monoArray, MonoString *, 0)
char *s = mono_string_to_utf8(monoString); // copy this into a buffer that you 
manage
mono_free(s);

J

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mono embedding in c++: how to get a array from C# code?

2015-11-08 Thread sunsflower
//I reckon that mono_field_get_value will return a MonoArray,
//Try something a bit like this:
//
//MonoArray* monoArray = NULL;
//mono_field_get_value(obj, field, monoArrayl);
//MonoString *monoString = mono_array_get(monoArray, MonoString *, 0)
//char *s = mono_string_to_utf8(monoString); // copy this into a buffer that
you manage
//mono_free(s);

and how can I pass a pointer to mono?...

stuct test
{
int index;
string name;
};


MonoMethod* method = mono_class_get_method_from_name(klass, "testfunc", 2);
MonoException* ex;
typedef int(__stdcall *func)(MonoObject*, test*, MonoException**);
func f1 = (func)(mono_method_get_unmanaged_thunk(method));
test t1;

something like this? but C# won't accept a pointer except in unsafe context.
is there some other way of doing this - to read from a pointer to a struct
in C# and change it? or should I just pass the struct as a value?



--
View this message in context: 
http://mono.1490590.n4.nabble.com/mono-embedding-in-c-how-to-get-a-array-from-C-code-tp4666903p4666907.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mono embedding in c++: how to get a array from C# code?

2015-11-08 Thread sunsflower
thanks, it did work! only I need to pass a monoarray** to this function
"mono_field_get_value(obj, field, );" . Mono is so poor
documented, but it is really good!



--
View this message in context: 
http://mono.1490590.n4.nabble.com/mono-embedding-in-c-how-to-get-a-array-from-C-code-tp4666903p4666906.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] mono embedding in c++: how to get a array from C# code?

2015-11-07 Thread sunsflower
I've tried to use a monoclassfield but it doesn't work with a string array in
C#. the return value is invalide. 
c++:

MonoClassField* field;
field = mono_class_get_field_from_name(klass, "entry");
char* val[100];
MonoString* monoval[100];
mono_field_get_value(obj, field, monoval);  
val[0] = mono_string_to_utf8(monoval[0]);

C#

public class SAssemblies
{
string[] entry = new string[] {
"add",
"subtract"
};
}

thanks!



--
View this message in context: 
http://mono.1490590.n4.nabble.com/mono-embedding-in-c-how-to-get-a-array-from-C-code-tp4666903.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono ASP.NET and Global.asax

2015-10-20 Thread Jérémy Carnus

Hi All,

I successfully configured a apache2.4 + mod mono and mono-server-4.

I managed to start the application , as I can test to browser the 
website and I see webform and all.

But I have one major issue, the Global.asax is not trigered ?
Do someone can have an idea ?

The project has the Global.asax file which is compiled to a 
App_global_asax.dll file during publish operation


Thanks for a response

Jérémy

--
Jérémy Carnus
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono throws "OutOfMemoryException" on Linux but Visual Studio does not on Windows

2015-10-02 Thread Edward Ned Harvey (mono)
> From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
> boun...@lists.ximian.com] On Behalf Of Mohamadsoltani
> 
> It's 2.10.2.
> Do you now whether it is resolved in newer versions?

I'm not saying your mono version is the problem, but that is very old 
(ancient), and it seems clear you're likely to upgrade as the first attempt of 
solving the problem.

I recommend following this: (First, remove your existing mono packages)
http://www.mono-project.com/ (click Download, Linux)

They have instructions that start with adding yum or apt repositories. 
Definitely be sure to do that. It's by far the easiest best way.

And then apt or yum install mono-complete
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono throws "OutOfMemoryException" on Linux but Visual Studio does not on Windows

2015-10-01 Thread William Ivanski
You can check which garbage collector you are using with "mono --version".

William Ivanski

2015-10-01 17:44 GMT-03:00 William Ivanski <william.ivan...@gmail.com>:

> Mono 2.* uses Boehm as memory garbage collector. Newest garbage collector
> is SGEN, which is default in newer versions.
>
> We use Mono 3.2.8 in our Debian servers here and it works pretty well with
> heavy memory usage processes.
>
> William Ivanski
>
> 2015-10-01 17:27 GMT-03:00 Mohamadsoltani <solt...@ualberta.ca>:
>
>> It's 2.10.2.
>> Do you now whether it is resolved in newer versions?
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://mono.1490590.n4.nabble.com/Mono-throws-OutOfMemoryException-on-Linux-but-Visual-Studio-does-not-on-Windows-tp469p471.html
>> Sent from the Mono - General mailing list archive at Nabble.com.
>> _______
>> Mono-list maillist  -  Mono-list@lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono throws "OutOfMemoryException" on Linux but Visual Studio does not on Windows

2015-10-01 Thread William Ivanski
What are the version of Mono you are using on Linux?

William Ivanski

2015-10-01 16:34 GMT-03:00 Mohamadsoltani <solt...@ualberta.ca>:

> Hi all,
>
> I need to run my C#-based code on a server with Linux. I am using Visual
> Studio on my pc, but now I should switch to mono on the server.
> I have tried to test my code by running a single job with mono. But there
> is
> a strange problem. When I run my code by directly using Visual Studio on my
> pc, everything is working well. Surprisingly, when I try the same thing on
> Linux, an "OutOfMemoryException" happens when the code is in a line to
> generate an array. The size of this array is (6,156 * 24,624), which is
> totally fine! I have arrays with similar size earlier in my code, and there
> is no "OutOfMemoryException" for them.
>
> I would be grateful if anyone can help me to understand what is the main
> reason for this issue and how can I handle it?
>
>
>
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/Mono-throws-OutOfMemoryException-on-Linux-but-Visual-Studio-does-not-on-Windows-tp469.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono throws "OutOfMemoryException" on Linux but Visual Studio does not on Windows

2015-10-01 Thread Mohamadsoltani
Hi all,

I need to run my C#-based code on a server with Linux. I am using Visual
Studio on my pc, but now I should switch to mono on the server.
I have tried to test my code by running a single job with mono. But there is
a strange problem. When I run my code by directly using Visual Studio on my
pc, everything is working well. Surprisingly, when I try the same thing on
Linux, an "OutOfMemoryException" happens when the code is in a line to
generate an array. The size of this array is (6,156 * 24,624), which is
totally fine! I have arrays with similar size earlier in my code, and there
is no "OutOfMemoryException" for them.

I would be grateful if anyone can help me to understand what is the main
reason for this issue and how can I handle it?



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-throws-OutOfMemoryException-on-Linux-but-Visual-Studio-does-not-on-Windows-tp469.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono throws "OutOfMemoryException" on Linux but Visual Studio does not on Windows

2015-10-01 Thread Mohamadsoltani
It's 2.10.2.
Do you now whether it is resolved in newer versions?




--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-throws-OutOfMemoryException-on-Linux-but-Visual-Studio-does-not-on-Windows-tp469p471.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono throws "OutOfMemoryException" on Linux but Visual Studio does not on Windows

2015-10-01 Thread William Ivanski
Mono 2.* uses Boehm as memory garbage collector. Newest garbage collector
is SGEN, which is default in newer versions.

We use Mono 3.2.8 in our Debian servers here and it works pretty well with
heavy memory usage processes.

William Ivanski

2015-10-01 17:27 GMT-03:00 Mohamadsoltani <solt...@ualberta.ca>:

> It's 2.10.2.
> Do you now whether it is resolved in newer versions?
>
>
>
>
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/Mono-throws-OutOfMemoryException-on-Linux-but-Visual-Studio-does-not-on-Windows-tp469p471.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono latest version

2015-09-29 Thread Angelo Compagnucci
Hello list,

I'm looking for the latest mono version to download, but cannot
understand which is the latest official mono version.

The website says:

The latest Mono release is: 4.0.4 SR 4 (4.0.4.1)

But downloading from the tarball page the latest version seems to be
mono 4.2.1.36 as well as on github.

Which is the latest mono version?

Thank you!

Sincerely, Angelo

-- 
Profile: http://it.linkedin.com/in/compagnucciangelo
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono latest version

2015-09-29 Thread Timotheus Pokorra
Hello Angelo,

Nowadays, the best source to know which are alpha, beta and stable
releases, is the Xamarin release block:
https://releases.xamarin.com

for example, 4.2.1.36 is an Alpha preview:
https://releases.xamarin.com/alpha-release-cycle-6-3rd-alpha-preview/

You find stable releases with this filter:
https://releases.xamarin.com/category/stable/

Hope this helps,
  Timotheus

On 29 September 2015 at 11:14, Angelo Compagnucci
 wrote:
> Hello list,
>
> I'm looking for the latest mono version to download, but cannot
> understand which is the latest official mono version.
>
> The website says:
>
> The latest Mono release is: 4.0.4 SR 4 (4.0.4.1)
>
> But downloading from the tarball page the latest version seems to be
> mono 4.2.1.36 as well as on github.
>
> Which is the latest mono version?
>
> Thank you!
>
> Sincerely, Angelo
>
> --
> Profile: http://it.linkedin.com/in/compagnucciangelo
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



-- 
Kontaktdaten:
in Plauen: 03741 7424995
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono Embedding - List enumeration

2015-07-28 Thread Robert Jordan

Hi,

On 27.07.2015 19:53, Henry wrote:

Can anyone shed some light on the best way to enumerate a List using mono
embedding?  I have a managed method that returns a List, I need to
enumerate this list in c code using mono embedding.  I can't seem to find
any documentation or examples on this that provide a definitive answer on
how to do this.  I've tried GetEnumerator and MoveNext, but there appears to
be some kind of issue with the generic implementations.



When it comes to accessing generic objects/classes, it's usually easier 
to implement managed helper methods than doing all the footwork in

C/C++, e.g.:

static void int GetCount(Liststring list)
{
return list.Count;
}

static string GetElementAt(Liststring list, int pos)
{
return list[pos];
}


Manually (in C/C++), you'd need to obtain the method
IEnumerable_GetEnumerator (notice the rule of building
explicit interface method names) from the class of the list
object, something like that:

MonoObject *list = ...
MonoClass *klass = mono_object_get_class (list);
MonoMethod *method = mono_class_get_method_from_name(klass,
IEnumerable_GetEnumerator, 0);

Then invoke the method to obtain the enumerator with
mono_runtime_invoke ().

Robert


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono Embedding - List enumeration

2015-07-27 Thread Henry
Can anyone shed some light on the best way to enumerate a List using mono
embedding?  I have a managed method that returns a List, I need to
enumerate this list in c code using mono embedding.  I can't seem to find
any documentation or examples on this that provide a definitive answer on
how to do this.  I've tried GetEnumerator and MoveNext, but there appears to
be some kind of issue with the generic implementations.  





--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-Embedding-List-enumeration-tp4666381.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono 64 Bit Framework for Mac OS X Yosemite

2015-07-16 Thread Dave
Hi All,

I’d like to use the Mono Framework coupled with Dubrovnik, but I can’t seem to 
figure out how to produce a 64 bit framework file.

Firstly, is there a 64 Bit version of the Mono Framework available anywhere?


If not, then I’m trying to follow the instructions at:

http://www.mono-project.com/docs/compiling-mono/mac/

I installed the dependancies using HomeBrew and this seemed to work ok.

My first confusion is from the page above:

It is strongly advised not to install Mono from source in /usr as it might 
conflict with Mono as installed by the Mono package.

PREFIX=/usr/local

# Ensure you have write permissions to /usr/local

mkdir $PREFIX
sudo chown -R `whoami` $PREFIX

Firstly, should PREFIX be set = to /usr/local or not? If yes, when what is the 
point of the warning above? If not, when what should it be set to. I’m not sure 
if it matters in this case, since I used Home-brew, but I’m wondering if this 
causes a problem later in the process - see further on.

After installing the dependancies I see this from the above URL:

Building Mono From a Git Source Code Checkout

To build Mono from a Git Source Code checkout, you will want to have the 
official Mono installed on the system, as the build requires a working C# 
compiler to run. Once you do this, run the following commands, remember to 
replace PREFIX with your installation prefix that you selected:

PATH=$PREFIX/bin:$PATH

git clone https://github.com/mono/mono.git

cd mono 
./autogen.sh --prefix=$PREFIX --disable-nls
make
make install

What should prefix be set to? 

I haven’t done any serious Unix hacking in so long and I really not sure if the 
command above should be in .sh files? I put them into a .sh file and ran it 
with PREFIX set to /usr/local (having manually created it) and now it’s 
populated. Do I need to clean it out before attempting to do this again?

Any help on this would be greatly appreciated and if anyone has the latest Mono 
Framework already built or knows of some clearer or cleaner way of making a 64 
bit version that would be the icing on the cake!

Thanks a lot
All the Best
Dave













___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] mono/gtk on beagle bone black

2015-07-14 Thread Bill Swartz
We are looking at options for a UI on a beagle bone black for an embedded
system. The UI and embedded system will be connected by RS232. Mono/gtk is
one possibility. The lead for the UI development is concerned about system
response. His note is copied below. Does any one know of resources for using
mono/gtk on a BBB? If anyone has experience with mono/gtk on a BBB, we want
to take advantage of your knowledge.

Bill

from the UI dev:


1) We need have as close to 20ms response time to a click as possible. My
tests with GTK+ apps in XFCE on the Beagle Bone Black running either
Angstrom or Debian did not have reliable response times, and sometimes were
upwards of 1 second.  I haven't tested any Mono apps, but I would be
surprised if they were much better.  Even touch event response in XFCE alone
was not very deterministic.  (This was with the prebuilt OS's for the BBB. 
Optimizations could make this better, but it would have to be significantly
better).

2) The standard mouse drivers that the touchscreen uses on the above OSs do
not do proper touch position filtering/averaging and are nearly useless with
resistive screens being touched by a finger.  This could be fixed by a new
mouse driver, but I haven't dug into it yet.  (With an app running on SDL
directly to the framebuffer, doing the position filtering/averaging is easy,
although doing it at a driver level is still probably the right choice. 
Last I remembered, I had a rudimentary mouse event interpreter in place in
my UI framework).

3) Given that this is a purpose-build UI, I'm somewhat hesitant to bring
along the look and feel of a window manager.  The big thing that I suspect
that Mono would bring along, beyond what I've already built, is sub-window
drawing (I had this nearly implemented the last time I hacked on the code),
and out-of-the-box UI widgets (I have about 70% of the UI widgets the app
needs already done).  That would be valuable, but I'm concerned about
everything listed above and a few widgets aren't enough to offset those
concerns.

If anyone has performance data on Mono apps writing directly to the
framebuffer on an ARM SoC (ideally the Beagle Bone Black/BlueSteel, or
Raspberry Pi 2) that would be interesting.

-Kris




--
View this message in context: 
http://mono.1490590.n4.nabble.com/mono-gtk-on-beagle-bone-black-tp4666337.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono-list Digest, Vol 122, Issue 12

2015-06-23 Thread Evgeny Pirogov
Custom Command Mono Soft Debugger in mono 4.0.1

Hello, I have a problem with remote debugging my raspberry pi. When I add
breakpoint to method the it  does not stop and program runs to end. This
problem reproduced for mono 4.0.1 but does not reproduced for mono 3.2.8
for example.

I need to know is update to 4.0.2 can help breakpoints stops on remote
debugging?

Thank you.
Eugene Pirogov.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] [Mono-dev] Cross-compiling Mono for ARM

2015-06-19 Thread Gutemberg Ribeiro
Yes… We was looking at it and looks that they changed lots of standard headers…

Unfortunately, here in Brazil they don’t have a dev team, only in France and 
take ages to get a reply…

Will try get them on table and see what we can do…

Thank you,

Best regards,
Gutemberg

From: Rafael Teixeira [mailto:mono...@gmail.com]
Sent: Friday, June 19, 2015 2:52 PM
To: Gutemberg Ribeiro gutemb...@fgrit.com
Cc: Andres G. Aragoneses kno...@gmail.com; mono-devel-l...@lists.xamarin.com; 
mono-l...@lists.xamarin.com
Subject: Re: [Mono-dev] Cross-compiling Mono for ARM

From these:
...arm-elf/include/stdint.h:243: error: conflicting types for 'intptr_t'
...arm-elf/include/stdint.h:244: error: conflicting types for 'uintptr_t'

it is pretty clear that ingenico messed with the standard header files, and 
guard clauses (#IFDEFs) aren't thus able to avoid such duplications, You'll 
need to see how to avoid the duplication but that may instead define things 
wrongly for symbols mono uses.

I wish you luck,

Rafael Teixeira
O..:.)

On Fri, Jun 19, 2015 at 2:11 PM, Gutemberg Ribeiro 
gutemb...@fgrit.commailto:gutemb...@fgrit.com wrote:
Hello Andres...

I think I finally got it compiled but, now when I'm including on my C project 
the mono headers, my app don't compile anymore:

In file included from 
../../Desktop/mono-build/usr/local/include/mono-2.0/mono/utils/mono-publib.h:45,
 from 
../../Desktop/mono-build/usr/local/include/mono-2.0/mono/metadata/appdomain.h:13,
 from 
../../Desktop/mono-build/usr/local/include/mono-2.0/mono/jit/jit.h:11,
 from 
C:/Users/Gutemberg/IngeDev7_workspace/MonoWrapper/Inc/mono_loader.h:1,
 from Src/Entry.c:43:
/cygdrive/c/Ingenico/IngeDev_7.22.2.1/plugins/com.ingenico.ingedev.telium.bin.win32.gnuarm.v434_7.20.0.1/os/win32/GNUARM/4.3.4/bin/../lib/gcc/arm-elf/4.3.4/../../../../arm-elf/include/stdint.h:243:
 error: conflicting types for 'intptr_t'
C:/Ingenico/TeliumSDK/SDK 
9.20.2.04/SDKTPLUS/HW_T2/gnu_434/inc/oem_vfs_def.h:35http://9.20.2.04/SDKTPLUS/HW_T2/gnu_434/inc/oem_vfs_def.h:35:
 error: previous declaration of 'intptr_t' was here
/cygdrive/c/Ingenico/IngeDev_7.22.2.1/plugins/com.ingenico.ingedev.telium.bin.win32.gnuarm.v434_7.20.0.1/os/win32/GNUARM/4.3.4/bin/../lib/gcc/arm-elf/4.3.4/../../../../arm-elf/include/stdint.h:244:
 error: conflicting types for 'uintptr_t'
C:/Ingenico/TeliumSDK/SDK 
9.20.2.04/SDKTPLUS/HW_T2/gnu_434/inc/oem_vfs_def.h:38http://9.20.2.04/SDKTPLUS/HW_T2/gnu_434/inc/oem_vfs_def.h:38:
 error: previous declaration of 'uintptr_t' was here
C:\Ingenico\IngeDev_7.22.2.1\plugins\com.ingenico.ingedev.generic.bin.win32_7.16.0.1\os\win32\tools\make.exe:
 *** [Obj/GNU_ARM_DEBUG/Entry.o] Error 1
C:\Ingenico\IngeDev_7.22.2.1\plugins\com.ingenico.ingedev.generic.bin.win32_7.16.0.1\os\win32\tools\make.exe:
 Target `build' not remade because of errors.

Any clues?


Thanks

-Original Message-
From: Andres G. Aragoneses [mailto:kno...@gmail.commailto:kno...@gmail.com]
Sent: Friday, June 19, 2015 8:58 AM
To: Gutemberg Ribeiro gutemb...@fgrit.commailto:gutemb...@fgrit.com
Subject: Re: Cross-compiling Mono for ARM

On 18/06/15 21:03, Gutemberg Ribeiro wrote:
 Hello guys,

 I'm trying to cross-compile (from Ubuntu 14.04) Mono for ARM following
 this tutorial
 http://www.mono-project.com/docs/about-mono/supported-platforms/arm/
 but the links that show how configure ScratchBox are outdated and I
 can't find anything on the internet on how to successful setup an
 environment and cross-compile mono for ARM...

 The idea is to build it as a static library so I can use it embedded
 as suggested here:
 http://www.mono-project.com/docs/advanced/embedding/

 For the sake of information, the target ARM device runs a proprietary
 striped down distribution based on debian and we have no access to its
 terminal or any kind of access to the OS. It is a payment terminal
 from www.ingenico.comhttp://www.ingenico.com http://www.ingenico.com and 
 it has an ARM9
 processor and uses a proprietary SDK that looks like uses GNU ARM
 4.3.4 toolchain with an IDE based on Eclipse as you can see in the following 
 picture:

 The only way we have to use mono on it is by adding it as a static lib
 and import the header in order to embedded it, create a thin C layer
 that will only bootstrap the .net app (all their API calls will be
 PInvoked after add Mono to it).

 Anyone has has a good documentation on:

 1.How to setup a cross-compile environment on Ubuntu

 2.Compile Mono to ARM as an static library

 Any help would be very appreciated.

 Thank you very much!

 Best regards,

Hey, I recommend you to put more details on what you have already tried.
For example the details you already posted on the gitter channel when you were 
talking with Miguel about using CC='armv6-cc' ./configure.

___
Mono-devel-list mailing list
mono-devel-l...@lists.ximian.commailto:mono-devel-l...@lists.ximian.com

Re: [Mono-list] Mono REST Service

2015-06-11 Thread Wayne Douglas
Check out ServiceStack and Asp.Net MVC VNext

On Wed, Jun 10, 2015 at 8:11 PM, discofire discof...@aol.com wrote:

 There seems to be very little online related to this, so I am having a very
 difficult time even determining if it is even possible, but is there any
 way
 to implement a REST service in Mono that runs through Apache?  In windows
 .NET we are currently using System.ServiceModel.Activation.ServiceRoute
 which does not appear to be available in Mono, but if there is any
 alternate
 way to perform any sort of REST activities, it would be extremely useful.
 I
 was hoping to avoid using a separate package (something like ServiceStack)
 if at all possible.

 The very few bits of information I have managed to find online mention
 nothing of HTTP Verbs.

 Is there any way at all to do this?  I assume this will not be part of the
 recent MS Source since it involves tight integration with IIS and would be
 useless anywhere outside of windows, but it looks as though there has been
 work ongoing for many years.



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/Mono-REST-Service-tp4666174.html
 Sent from the Mono - General mailing list archive at Nabble.com.
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono on Linux and Missing methods

2015-05-29 Thread Zacharia Karami
To finalize this voyage into missing methods, here's my fix for any future
(would-be) users of MapToIPv4/6.


namespace ExtensionMethods

 {

 public static class IPextension

 {

 internal static object GetInstanceField (Type type, object instance,
 string fieldName)//Steals private values from classes

 {

 BindingFlags bindFlags = BindingFlags.Instance | BindingFlags.Public |
 BindingFlags.NonPublic

  | BindingFlags.Static;

 FieldInfo field = type.GetField (fieldName, bindFlags);

 return field.GetValue (instance);

 }


 public static IPAddress MapToIPv4 (this IPAddress ipa)

 {

 ushort[] m_Numbers = GetInstanceField (typeof(IPAddress), ipa,
 m_Numbers) as ushort[];


 foreach (ushort u in m_Numbers) {

 Console.WriteLine (u);

 }


 if (ipa.AddressFamily == AddressFamily.InterNetwork)

 return ipa;

 if (ipa.AddressFamily != AddressFamily.InterNetworkV6)

 throw new Exception (Only AddressFamily.InterNetworkV6 can be converted
 to IPv4);

  //Test for        

 for (int i = 0; i  5; i++) {

 if (m_Numbers[i] != 0x)

 throw new Exception (Address does not have the :: prefix);

 }

 if (m_Numbers [5] != 0x)

 throw new Exception (Address does not have the :: prefix);

  //We've got an IPv4 address

 byte[] ipv4Bytes = new byte [4];

 Buffer.BlockCopy (m_Numbers, 12, ipv4Bytes, 0, 4);

 return new IPAddress (ipv4Bytes);

 }


 public static IPAddress MapToIPv6 (this IPAddress ipa)

 {

 if (ipa.AddressFamily == AddressFamily.InterNetworkV6)

 return ipa;

 if (ipa.AddressFamily != AddressFamily.InterNetwork)

 throw new Exception (Only AddressFamily.InterNetworkV4 can be converted
 to IPv6);

  byte[] ipv4Bytes = ipa.GetAddressBytes ();

 byte[] ipv6Bytes = new byte [16] {

 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF,

 ipv4Bytes [0], ipv4Bytes [1], ipv4Bytes [2], ipv4Bytes [3]

 };

 return new IPAddress (ipv6Bytes);

 }

 }

 }


Simply use the methods as you would in NET 4.5. Add using
ExtensionMethods.
Note, this steals the private values from IPAddress because that's how the
solution was implemented (it needs those values as the original solution
was made to be INSIDE the IPAddress class).

Credit obviously goes to the person who implemented the original solution.

Good luck  regards,
Zack

On Fri, May 22, 2015 at 1:51 PM, Zacharia Karami heatedphoe...@gmail.com
wrote:

 Thank you, this is indeed the conclusion I stumbled upon right before your
 previous email.

 My solution (for anyone else reading with this issue at some point) is to
 just implement the patch as produced by someone for the Mono project myself
 (as linked to here https://github.com/mono/mono/pull/641).

 Just turn it into an extension method for IPaddress and there you go. I'll
 use your tip in the future, though.

 Thanks and regards,
 Zacharia

 On Fri, May 22, 2015 at 1:42 PM, Edward Ned Harvey (mono) 
 edward.harvey.m...@clevertrove.com wrote:

  From: Zacharia Karami [mailto:heatedphoe...@gmail.com]
 
  It works in 4.5 on Windows. But again, there is a problem (in so far
 that

 Oh! Ok, I get it. You should check the mono class compatibility page.
 Although *most* stuff in .Net is implemented in mono, there are areas where
 things are known absent or broken. So whenever you encounter something like
 this, which works in .Net and doesn't work in mono, always start by
 checking the class status page.

 From http://mono-project.com, Documentation, About Mono, Class Status,
 Status.

 Here, you can browse the 4.5 column, System.Net.IPAddress, and the two
 methods MapToIPv4 and MapToIPv6 are both marked as broken. There may be
 more info somewhere about *why* it's broken and what needs to happen to fix
 it, but that would be a discussion best for the mono-dev list, to assist in
 fixing mono sources.

 In this case, you have a definite answer. That method is definitely just
 broken in mono, end of story. Your only solution is not to use that method
 on mono... Hopefully there is a workaround you can use without suffering
 too much pain.



___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono on Linux and Missing methods

2015-05-29 Thread Edward Ned Harvey (mono)
 From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
 boun...@lists.ximian.com] On Behalf Of Zacharia Karami
 
 To finalize this voyage into missing methods, here's my fix for any future
 (would-be) users of MapToIPv4/6.

Why don't you submit it as a pull request for the mono source? Also, did you 
look up the Microsoft reference source?

There are two Microsoft reference sources - you have to make sure you look at 
the right one (MIT licensed) because you're forbidden to contribute to mono 
sources if you looked at the other reference source (MSPL licensed).

There's a contributing guide here: http://www.mono-project.com/community/

The contributing guide has some verbage about If you have looked at 
Microsoft's proprietary... you will not be able to contribute, but it's all 
striked-out, and added the new verbage, Microsoft open-sourced parts of .Net 
and includes a link to .Net Source Code Integration.

http://www.mono-project.com/docs/about-mono/dotnet-integration/

The first question there would be, has MS open-sourced the part that you care 
about?
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono on Linux and Missing methods

2015-05-22 Thread Edward Ned Harvey (mono)
 From: Zacharia Karami [mailto:heatedphoe...@gmail.com]
 
 It works in 4.5 on Windows. But again, there is a problem (in so far that

Oh! Ok, I get it. You should check the mono class compatibility page. Although 
*most* stuff in .Net is implemented in mono, there are areas where things are 
known absent or broken. So whenever you encounter something like this, which 
works in .Net and doesn't work in mono, always start by checking the class 
status page.

From http://mono-project.com, Documentation, About Mono, Class Status,  Status.

Here, you can browse the 4.5 column, System.Net.IPAddress, and the two methods 
MapToIPv4 and MapToIPv6 are both marked as broken. There may be more info 
somewhere about *why* it's broken and what needs to happen to fix it, but that 
would be a discussion best for the mono-dev list, to assist in fixing mono 
sources.

In this case, you have a definite answer. That method is definitely just broken 
in mono, end of story. Your only solution is not to use that method on mono... 
Hopefully there is a workaround you can use without suffering too much pain.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono on Linux and Missing methods

2015-05-22 Thread Zacharia Karami
Thank you, this is indeed the conclusion I stumbled upon right before your
previous email.

My solution (for anyone else reading with this issue at some point) is to
just implement the patch as produced by someone for the Mono project myself
(as linked to here https://github.com/mono/mono/pull/641).

Just turn it into an extension method for IPaddress and there you go. I'll
use your tip in the future, though.

Thanks and regards,
Zacharia

On Fri, May 22, 2015 at 1:42 PM, Edward Ned Harvey (mono) 
edward.harvey.m...@clevertrove.com wrote:

  From: Zacharia Karami [mailto:heatedphoe...@gmail.com]
 
  It works in 4.5 on Windows. But again, there is a problem (in so far
 that

 Oh! Ok, I get it. You should check the mono class compatibility page.
 Although *most* stuff in .Net is implemented in mono, there are areas where
 things are known absent or broken. So whenever you encounter something like
 this, which works in .Net and doesn't work in mono, always start by
 checking the class status page.

 From http://mono-project.com, Documentation, About Mono, Class Status,
 Status.

 Here, you can browse the 4.5 column, System.Net.IPAddress, and the two
 methods MapToIPv4 and MapToIPv6 are both marked as broken. There may be
 more info somewhere about *why* it's broken and what needs to happen to fix
 it, but that would be a discussion best for the mono-dev list, to assist in
 fixing mono sources.

 In this case, you have a definite answer. That method is definitely just
 broken in mono, end of story. Your only solution is not to use that method
 on mono... Hopefully there is a workaround you can use without suffering
 too much pain.

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono on Linux and Missing methods

2015-05-21 Thread Zacharia Karami
Anyone else any ideas?

On Tue, May 19, 2015 at 5:14 PM, Zacharia Karami heatedphoe...@gmail.com
wrote:

 According to mono --version the version is 4.0.1.

 First thing I did was try to update mono. I've done apt-get update,
 upgrade and dist-upgrade.

 Regards,
 Zacharia

 On Tue, May 19, 2015 at 5:09 PM, Timotheus Pokorra 
 timotheus.poko...@solidcharity.com wrote:

 Hello,

 what version of mono do you have?
 mono --version
 If it is the default that comes with Debian Wheezy, then it is
 probably too old (Mono 2.10.8)

 It might be advisable to install the packages provided by Xamarin (Mono
 4.0.1):
 http://www.mono-project.com/download/#download-lin

 Also the latest MonoDevelop:
 http://www.monodevelop.com/download/

 Hope this helps,
   Timotheus


 On 19 May 2015 at 16:45, Heatphoenix heatedphoe...@gmail.com wrote:
  Hey everyone,
 
  Been trying to program a GTK# app that works on Linux (though GTK# is
 not
  directly related to my question).
  Now, the problem I've run into is that I'm using the function
 MapToIPv4() in
  IPaddress. When targeting Mono 4.5 this function works just fine but
 when
  rolling it out to my Linux development environment the function throws
 
  Missing Method System.Net.IPAddress::MapToIPv4() in assembly
  /usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll,
 referenced in
  assembly myapp.exe
 
  After a bit of research, I've found out that this is because this
 function
  is only in MONO / .NET 4.5 and not 4.0 and seemingly my Linux
 environment
  only goes up to 4.0 (because if I target 4.0 it will not compile with
 this
  function). (4.5 also does not show up as an installed mono package,
 though
  something called Mono Core library (for CLI 4.5), does.
 
  How do I get my Linux to allow the usage of this function? Is this even
  possible? I am using Debian Wheezy (7.8). If any more information is
  required, please let me know.
  Thank you.
 
 
 
  --
  View this message in context:
 http://mono.1490590.n4.nabble.com/Mono-on-Linux-and-Missing-methods-tp4665972.html
  Sent from the Mono - General mailing list archive at Nabble.com.
  ___
  Mono-list maillist  -  Mono-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-list



 --
 Kontaktdaten:
 in Plauen: 03741 7424995



___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono on Linux and Missing methods

2015-05-21 Thread Edward Ned Harvey (mono)
 From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
 boun...@lists.ximian.com] On Behalf Of Heatphoenix
 
 IPaddress. When targeting Mono 4.5 this function works just fine but when
 rolling it out to my Linux development environment the function throws
 
 After a bit of research, I've found out that this is because this function
 is only in MONO / .NET 4.5 and not 4.0 and seemingly my Linux environment
 only goes up to 4.0 (because if I target 4.0 it will not compile with this
 function).
 
 How do I get my Linux to allow the usage of this function? Is this even
 possible? I am using Debian Wheezy (7.8). If any more information is
 required, please let me know.

Why is this confusing? You seem to answer your own question - It works in 4.5, 
but your target runtime environment only goes up to 4.0. So you either need to 
avoid using that method, or upgrade your target environment.

But then you said you upgraded to mono 4.0.1, which definitely supports 4.5. So 
the obvious solution seems to be, build and run with 4.5. You already said this 
works, and now that you have a recent version of mono runtime on your target 
environment, you should be good to go.

So what's the problem?
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono on Linux and Missing methods

2015-05-19 Thread Zacharia Karami
According to mono --version the version is 4.0.1.

First thing I did was try to update mono. I've done apt-get update, upgrade
and dist-upgrade.

Regards,
Zacharia

On Tue, May 19, 2015 at 5:09 PM, Timotheus Pokorra 
timotheus.poko...@solidcharity.com wrote:

 Hello,

 what version of mono do you have?
 mono --version
 If it is the default that comes with Debian Wheezy, then it is
 probably too old (Mono 2.10.8)

 It might be advisable to install the packages provided by Xamarin (Mono
 4.0.1):
 http://www.mono-project.com/download/#download-lin

 Also the latest MonoDevelop:
 http://www.monodevelop.com/download/

 Hope this helps,
   Timotheus


 On 19 May 2015 at 16:45, Heatphoenix heatedphoe...@gmail.com wrote:
  Hey everyone,
 
  Been trying to program a GTK# app that works on Linux (though GTK# is not
  directly related to my question).
  Now, the problem I've run into is that I'm using the function
 MapToIPv4() in
  IPaddress. When targeting Mono 4.5 this function works just fine but when
  rolling it out to my Linux development environment the function throws
 
  Missing Method System.Net.IPAddress::MapToIPv4() in assembly
  /usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll,
 referenced in
  assembly myapp.exe
 
  After a bit of research, I've found out that this is because this
 function
  is only in MONO / .NET 4.5 and not 4.0 and seemingly my Linux environment
  only goes up to 4.0 (because if I target 4.0 it will not compile with
 this
  function). (4.5 also does not show up as an installed mono package,
 though
  something called Mono Core library (for CLI 4.5), does.
 
  How do I get my Linux to allow the usage of this function? Is this even
  possible? I am using Debian Wheezy (7.8). If any more information is
  required, please let me know.
  Thank you.
 
 
 
  --
  View this message in context:
 http://mono.1490590.n4.nabble.com/Mono-on-Linux-and-Missing-methods-tp4665972.html
  Sent from the Mono - General mailing list archive at Nabble.com.
  ___
  Mono-list maillist  -  Mono-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-list



 --
 Kontaktdaten:
 in Plauen: 03741 7424995

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono on Linux and Missing methods

2015-05-19 Thread Timotheus Pokorra
Hello,

what version of mono do you have?
mono --version
If it is the default that comes with Debian Wheezy, then it is
probably too old (Mono 2.10.8)

It might be advisable to install the packages provided by Xamarin (Mono 4.0.1):
http://www.mono-project.com/download/#download-lin

Also the latest MonoDevelop:
http://www.monodevelop.com/download/

Hope this helps,
  Timotheus


On 19 May 2015 at 16:45, Heatphoenix heatedphoe...@gmail.com wrote:
 Hey everyone,

 Been trying to program a GTK# app that works on Linux (though GTK# is not
 directly related to my question).
 Now, the problem I've run into is that I'm using the function MapToIPv4() in
 IPaddress. When targeting Mono 4.5 this function works just fine but when
 rolling it out to my Linux development environment the function throws

 Missing Method System.Net.IPAddress::MapToIPv4() in assembly
 /usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll, referenced in
 assembly myapp.exe

 After a bit of research, I've found out that this is because this function
 is only in MONO / .NET 4.5 and not 4.0 and seemingly my Linux environment
 only goes up to 4.0 (because if I target 4.0 it will not compile with this
 function). (4.5 also does not show up as an installed mono package, though
 something called Mono Core library (for CLI 4.5), does.

 How do I get my Linux to allow the usage of this function? Is this even
 possible? I am using Debian Wheezy (7.8). If any more information is
 required, please let me know.
 Thank you.



 --
 View this message in context: 
 http://mono.1490590.n4.nabble.com/Mono-on-Linux-and-Missing-methods-tp4665972.html
 Sent from the Mono - General mailing list archive at Nabble.com.
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list



-- 
Kontaktdaten:
in Plauen: 03741 7424995
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono GUI toolkits

2015-05-11 Thread Elmar Haneke

 Hi,

 The lack of a true multiplatform toolkit for Mono is like a
 never.ending story.

Gtk is an multi-platform-toolkit, you can use it on all important
Desktop systems: Windows, MacOS and Linux.

The only problem is that for CLI the transition from GTK2 to GTK3 is
rather slow: GTK3 is out for 4 years but GTK#-3 is still beta and
Stetic-designer still does suport GTK2 only.

Is Eto.Forms of equal stability?

Is there an GUI-Designer for Eto.Forms?

Elmar

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono GUI toolkits

2015-05-11 Thread Baltasar García Perez-Schofield
Hi,

The lack of a true multiplatform toolkit for Mono is like a never.ending
story.

GTK isn't usually used anywhere except on Linux.
Normally on the mac, you're using Xamarin.Mac, or MonoMac.
Normally on windows, you're using WinForms or WPF. Definitely *don't*
bother with winforms on non-windows platforms. Nobody has ever had a good
experience with that. If you're looking for a cross-platform GUI toolkit,
you can look at Eto.Forms and XSP. But I think most people just design
business logic separate from GUI code, and build native GUI's on Xam.Mac,
GTK#, and Winforms/WPF.

Yes, this is the sad scenario for mono: a supposedly cross-platform
environment which is not cross-platform at all... unless you use a CLI.

The best alternative is Eto.Forms (BTW is Xamarin planning to employ this
guy?), which is capable to use one toolkit or another depending on the
platform. This is just the automation of code the user interface for each
separate OS, which does not make sense to me.

I wonder if the future of UI does not lay in just one component which
supports HTML and CSS. That way, you would program your whole interface in
HTML/CSS, and access the pieces of data from C#. Something like Atom,
Brackets, or Visual Studio Code (though these I think are built directly in
JavaScript).

-- Baltasar
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono GUI toolkits

2015-05-11 Thread Edward Ned Harvey (mono)
 From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
 boun...@lists.ximian.com] On Behalf Of Elmar Haneke
 
 Gtk is an multi-platform-toolkit, you can use it on all important
 Desktop systems: Windows, MacOS and Linux.
 
 The only problem is 

... Let me stop you right there. Because to me, the only problem is the fact 
that GTK is not natively included with either windows, mac, or mobile OSes, and 
due to LGPL, it's very unclear if you can legally bundle it with your 
application. 

GTK is LGPL, not GPL. But you need a lawyer to understand if that's ok for you, 
because the GPL itself is one long-ass license, and the Lesser part almost 
doubles its length. It's not an attractive license, like MIT.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono GUI toolkits

2015-05-11 Thread Rodrigo Kumpera
On Mon, May 11, 2015 at 9:45 AM, Edward Ned Harvey (mono) 
edward.harvey.m...@clevertrove.com wrote:

  From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
  boun...@lists.ximian.com] On Behalf Of Elmar Haneke
 
  Gtk is an multi-platform-toolkit, you can use it on all important
  Desktop systems: Windows, MacOS and Linux.
 
  The only problem is

 ... Let me stop you right there. Because to me, the only problem is the
 fact that GTK is not natively included with either windows, mac, or mobile
 OSes, and due to LGPL, it's very unclear if you can legally bundle it with
 your application.

 GTK is LGPL, not GPL. But you need a lawyer to understand if that's ok for
 you, because the GPL itself is one long-ass license, and the Lesser part
 almost doubles its length. It's not an attractive license, like MIT.


Those small details have not stopped xamarin to ship Xamarin Studio on
Windows and Mac use gtk+. And the open source counter-part, MonoDevelop,
runs fine on all 3.

The problem of cross platform toolkits is that they either look like ass
everywhere or they look great on one target and crazy horrible on others.
See Java and Swing for evidence of this.

At Xamarin, in order to make Xamarin Studio great, we had to drop parts of
gtk+ and replace with the native toolkit.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono GUI toolkits

2015-05-11 Thread Madars Vitolins
LGPL is less restrictive than GPL. It allows you to link your software 
against shared libraries (in this case GTK) and not to publish your 
source code. When you distribute your software, you may include copy of 
GTK binary libraries installer and it's source code.


Madars

On 11/05/15 16:45, Edward Ned Harvey (mono) wrote:

From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
boun...@lists.ximian.com] On Behalf Of Elmar Haneke

Gtk is an multi-platform-toolkit, you can use it on all important
Desktop systems: Windows, MacOS and Linux.

The only problem is

... Let me stop you right there. Because to me, the only problem is the fact 
that GTK is not natively included with either windows, mac, or mobile OSes, and 
due to LGPL, it's very unclear if you can legally bundle it with your 
application.

GTK is LGPL, not GPL. But you need a lawyer to understand if that's ok for you, because 
the GPL itself is one long-ass license, and the Lesser part almost doubles 
its length. It's not an attractive license, like MIT.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list



___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] mono-fastcgi-server4 Debian package seems broken

2015-05-09 Thread Daniel Lo Nigro
I'm trying to upgrade from Mono 3.10 to Mono 4.0, and the Debian package
for the FastCGI server appears to be broken. It's still got a version
number of 3.8 rather than 4.0, and installing it returns this error:

perl-modules : Breaks: mono-fastcgi-server4 ( 3.8-2.1) but 3.8-0xamarin2
is to be installed

It seems like I can't downgrade perl-modules since other packages on the
system rely on it.

For now I've just installed XSP from source, but this is not ideal as I'd
like to keep using everything from packages where possible. Any ideas?

The good news is that 4.0 seems to have fixed some of the regressions that
were preventing me from running my sites on 3.12 :)

--
Regards,
Daniel Lo Nigro
http://dan.cx/ | Twitter http://twitter.com/Daniel15 | Facebook
http://www.facebook.com/daaniel
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono-Tarballs

2015-05-06 Thread Elmar Haneke
In the sources download there is an 4.0.1 dated 2015-04-26 and an 4.0.0
dated 2015-05-05.

Which one is the latest version?

Elmar

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono-Tarballs

2015-05-06 Thread Timotheus Pokorra
Hello Elmar,

have a look at the tags on Github:
https://github.com/mono/mono/releases

What I read on IRC was that 4.0.0 got the full QA and took longer, and
4.0.1 was a quick release with some important fix that needed to get
out there before the fully tested 4.0.0 was released.
Since 4.0.0 was tagged earlier than 4.0.1, I assume that 4.0.1 is more recent.

Timotheus


On 6 May 2015 at 10:21, Elmar Haneke el...@haneke.de wrote:
 In the sources download there is an 4.0.1 dated 2015-04-26 and an 4.0.0
 dated 2015-05-05.

 Which one is the latest version?

 Elmar

 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list



-- 
Kontaktdaten:
in Plauen: 03741 7424995
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] [mono][CPPSharp][GSoC'15] Introduction and asking for furthur guidance

2015-04-28 Thread Edward Ned Harvey (mono)
 From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
 boun...@lists.ximian.com] On Behalf Of Abhinav Tripathi
 
         I am Abhinav Tripathi. I have been selected for CPPSharp - Inline C++
 Code Improvement project under Mono... I have a good C++ experience
 and am new to C#. I am a 2nd year B.Tech Student.
 I was looking for guidance on how to start the project and as a first step how
 to set-up my development environment (which tools will be
 preferred/required)!

Go get monodevelop, for whatever platform you're on (windows, linux, mac). If 
you're on windows, you should consider getting Visual Studio (they have some 
free versions).

Simple as that, go nuts. If you feel like it, google for some hello world 
projects, but it's really not needed - just click New Project, Console App or 
windows forms, or wpf, or monomac (xamarin.mac free), or whatever.

Yeah, on mac, I would recommend reading the Xamarin.Mac getting started guide. 
And I'm sure there's something similar for Gtk# for linux.

And just start reading everything everywhere.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] [mono][CPPSharp][GSoC'15] Introduction and asking for furthur guidance

2015-04-27 Thread Abhinav Tripathi
Hello!
I am Abhinav Tripathi. I have been selected for CPPSharp - Inline
C++ Code Improvement project under Mono... I have a good C++ experience
and am new to C#. I am a 2nd year B.Tech Student.
I was looking for guidance on how to start the project and as a first step
how to set-up my development environment (which tools will be
preferred/required)!
.
Regards,
Abhinav
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono performance with llvm is faster but crashes under load

2015-04-08 Thread Igor Birman
I need go get our code to run faster with mono on Linux, and we have been 
testing llvm.  It does improve speed, but crashes with a segmentation fault 
when we put it under load.  I'm having trouble figuring out what's blowing up, 
the core dump doesn't have much information in it.  What can I do to learn more 
about debugging mono problems so I can trace the source of this error?___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono performance with llvm is faster but crashes under load

2015-04-08 Thread Igor Birman
I was using the default sgen, I'm running boehm now and it seems to be stable, 
great idea thanks!
Igor 


 On Wednesday, April 8, 2015 12:54 PM, Alexandre Faria spi...@gmail.com 
wrote:
   

 Have you tried with both GC? sgen and boehm (mono-boehm)
I'm having those kind of issues with sgen, so I advise you to try boehm.
I was able to reproduce it and filed a test case.
On Wed, Apr 8, 2015 at 5:12 PM, Igor Birman igor_bir...@yahoo.com wrote:

I need go get our code to run faster with mono on Linux, and we have been 
testing llvm.  It does improve speed, but crashes with a segmentation fault 
when we put it under load.  I'm having trouble figuring out what's blowing up, 
the core dump doesn't have much information in it.  What can I do to learn more 
about debugging mono problems so I can trace the source of this error?
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list





  ___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono performance with llvm is faster but crashes under load

2015-04-08 Thread Alexandre Faria
When I found out about that issue with sgen (by the way, its actually a
regression), I always thought that it had to affect a lot more people.

Anyway, they fixed it before, so they should fix it again soon :)

If you want to follow it:
https://bugzilla.xamarin.com/show_bug.cgi?id=13813

That was how I was able to isolate it, but I get it in other scenarios as
well, last time they fixed it, the other scenarios also went away, so lets
hope the same!

Happy hunting... :)

On Wed, Apr 8, 2015 at 6:14 PM, Igor Birman igor_bir...@yahoo.com wrote:

 I was using the default sgen, I'm running boehm now and it seems to be
 stable, great idea thanks!

 Igor



   On Wednesday, April 8, 2015 12:54 PM, Alexandre Faria spi...@gmail.com
 wrote:


 Have you tried with both GC? sgen and boehm (mono-boehm)

 I'm having those kind of issues with sgen, so I advise you to try boehm.

 I was able to reproduce it and filed a test case.

 On Wed, Apr 8, 2015 at 5:12 PM, Igor Birman igor_bir...@yahoo.com wrote:

 I need go get our code to run faster with mono on Linux, and we have been
 testing llvm.  It does improve speed, but crashes with a segmentation fault
 when we put it under load.  I'm having trouble figuring out what's blowing
 up, the core dump doesn't have much information in it.  What can I do to
 learn more about debugging mono problems so I can trace the source of this
 error?

 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list





___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono performance with llvm is faster but crashes under load

2015-04-08 Thread Alexandre Faria
Have you tried with both GC? sgen and boehm (mono-boehm)

I'm having those kind of issues with sgen, so I advise you to try boehm.

I was able to reproduce it and filed a test case.

On Wed, Apr 8, 2015 at 5:12 PM, Igor Birman igor_bir...@yahoo.com wrote:

 I need go get our code to run faster with mono on Linux, and we have been
 testing llvm.  It does improve speed, but crashes with a segmentation fault
 when we put it under load.  I'm having trouble figuring out what's blowing
 up, the core dump doesn't have much information in it.  What can I do to
 learn more about debugging mono problems so I can trace the source of this
 error?

 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono cross compilation on MIPS

2015-03-30 Thread Prashanth Mn
Hi all,

Can anyone suggest me how can i cross compile Mono to the MIPS architecture
(for SetTopBox device using Broadcom SoC) ?  Is there any separate Mono
package available for this MIPS architecture?  What version of Mono i need
to download.

On Linux (Intel platform), i've used the sequence of commands to install
Mono
 apt-get install mono-devel
 apt-get install mono-complete
 apt-get install referenceassemblies-pcl

What are the sequence of installations required to Make it work on MIPS
architecture (SetTopBox)?

Regards,
Prashanth
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono in the mainstream

2015-03-24 Thread Edward Ned Harvey (mono)
 From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
 boun...@lists.ximian.com] On Behalf Of Tony Gravagno
 
 run over CentOS or Ubuntu, Apache or Nginx. They're used to mod_perl and
 mod_php, but not mod_mono, and they may support FastCGI. But they

Right now, asp.net doesn't work out of the box on debian/redhat based distros 
that I'm aware of.  But hopefully this will be improving soon, because in fact 
it *does* work when you build from source, which is straightforward and easy.

I have also found, that there's almost no compatibility between MS asp.ent, and 
Mono asp.net.  Meaning - if you create an asp.net project in VS, or in XS/MD, 
and then try to run it on the other platform - there is almost no template that 
works on both, and the templates bear almost no semblance to each other.

For the time being, if you want to host asp.net, I would suggest:  This is 
something MS does extremely well on Azure.  You just go into VS, click New 
ASP.Net project, and then Publish using your Azure username  password.  
Nothing could possibly be simpler or more powerful...   This is assuming you 
have VS and Windows laying around to do development on...
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono-list Digest, Vol 119, Issue 16

2015-03-23 Thread mohamed magdi
Ubuntu user wants do see College videos that only works
      with Silverlight (acrym)yes
 Thanks  regards mohamed magdiSales  DepartmentDirector of SalesRetal solution 
 Developer Program Mobile: 002- 01005440676  Mobile: 002-01000409898E-Mail: : 
mohamed_magdi...@yahoo.com Web Site: retalsolve.weebly.com  
    
 


 On Monday, March 23, 2015 2:00 PM, mono-list-requ...@lists.ximian.com 
mono-list-requ...@lists.ximian.com wrote:
   

 Send Mono-list mailing list submissions to
    mono-list@lists.ximian.com

To subscribe or unsubscribe via the World Wide Web, visit
    http://lists.ximian.com/mailman/listinfo/mono-list
or, via email, send a message with subject or body 'help' to
    mono-list-requ...@lists.ximian.com

You can reach the person managing the list at
    mono-list-ow...@lists.ximian.com

When replying, please edit your Subject line so it is more specific
than Re: Contents of Mono-list digest...


Today's Topics:

  1. Re: Ubuntu user wants do see College videos that only works
      with Silverlight (acrym)


--

Message: 1
Date: Sun, 22 Mar 2015 15:06:24 -0700 (PDT)
From: acrym soreri...@gmail.com
To: mono-list@lists.ximian.com
Subject: Re: [Mono-list] Ubuntu user wants do see College videos that
    only works with Silverlight
Message-ID: 1427061984796-4665672.p...@n4.nabble.com
Content-Type: text/plain; charset=us-ascii

I don't know if Moonlight can run Silverlight, but it's worth a try.

http://www.maketecheasier.com/install-and-run-silverlight-in-linux/



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Ubuntu-user-wants-do-see-College-videos-that-only-works-with-Silverlight-tp4665668p4665672.html
Sent from the Mono - General mailing list archive at Nabble.com.


--

___
Mono-list mailing list
Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


End of Mono-list Digest, Vol 119, Issue 16
**


  ___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono Embedding: How can I use a Generic Class from mscorlib.dll

2015-03-23 Thread LinWuxiang
Hello everybody.




How can I instantiate a generic type, like ListString from mscorlib?




I thought I should use “mono_class_from_generic_parameter”, but not sure how to 
use this function.




Thanks for any hints and suggestions. 




Wuxiang___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono Embedding: How can I use a Generic Class from mscorlib.dll

2015-03-23 Thread LinWuxiang
Sorry for the an incomplete question. Here is more information.




I am trying to embed mono inside c++ in Windows and Linux. I have tried:




MonoImage* image = mono_get_corlib();




MonoClass* class = mono_class_from_name(image, System.Collections.Generic, 
ListT);

MonoClass* class = mono_class_from_name(image, System.Collections.Generic, 
ListString);

MonoClass* class = mono_class_from_name(image, System.Collections.Generic, 
List);




but with no success. Thanks for any suggestions!





From: Wuxiang Lin
Sent: ‎Monday‎, ‎March‎ ‎23‎, ‎2015 ‎10‎:‎42‎ ‎PM
To: mono-list@lists.ximian.com





Hello everybody.




How can I instantiate a generic type, like ListString from mscorlib?




I thought I should use “mono_class_from_generic_parameter”, but not sure how to 
use this function.




Thanks for any hints and suggestions. 




Wuxiang___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono Embedding: How can I use a Generic Class from mscorlib.dll

2015-03-23 Thread Robert Jordan

On 23.03.2015 15:13, LinWuxiang wrote:

Hello everybody.

How can I instantiate a generic type, like ListString from mscorlib?

I thought I should use “mono_class_from_generic_parameter”, but not sure
how to use this function.


There used to be no embedding APIs for this in the past, and it
doesn't look that this was changed.

You can achieve this by mono_runtime_invoke()-ing
System.Type.MakeGenericType (see MSDN).

Note that System.Type is represented by MonoReflectionType*
in the embedding world. You can get the MonoReflectionType*
of a MonoType* with mono_type_get_object().

You can get back the MonoType* of a MonoReflectionType* with
mono_reflection_type_get_type().

Robert


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono in the mainstream

2015-03-23 Thread David Curylo
On Mar 23, 2015, at 3:14 PM, Jonathan Shore jonathan.sh...@gmail.com wrote:

 It should be mentioned that popular Linux distributions (such as ubuntu) have 
 very dated versions of mono available as packages (often default to 2.x)

They are kind of old, but not unusable 2.x versions anymore.  Ubuntu 14.04 LTS, 
for example, is on 3.2.8.

http://packages.ubuntu.com/search?keywords=monosearchon=namessuite=trustysection=all

But it’s also extremely easy to add the mono-project repos and install very new 
packages:

http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives

That ^ is what improved greatly in recent months, and spinning up a VM and 
getting mono installed from these repos is really, really easy.  Like this in a 
bootstrapping script:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 
3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo deb http://download.mono-project.com/repo/debian wheezy main | sudo tee 
/etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get -y install mono-complete

And then to get nuget working like it does on Windows so you can pull 
dependencies after deploying:

wget http://nuget.org/nuget.exe
mozroots --import --sync
yes | certmgr -ssl https://nuget.org/   

Getting nginx working with mono is a little more involved, and it would be 
great if it were just one more package.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono in the mainstream

2015-03-23 Thread Jonathan Shore
It should be mentioned that popular Linux distributions (such as ubuntu) have 
very dated versions of mono available as packages (often default to 2.x).   
Compiling mono w/ LLVM from github is non-trivial, so would not expect anyone 
but a die-hard mono user to take the trouble ...


 On Mar 23, 2015, at 3:08 PM, David Curylo cury...@asme.org wrote:
 
 It's in a much better state than a few years ago, and even in the last 6 
 months with the CI and all the official packaging, I think it's easier than 
 ever to get mono running.  That said, I think it's really difficult to get 
 service providers to include and advertise their servers with mono support 
 without some sort of commercial entity that will provide Linux support if 
 they need it.  I'm not sure this is in Xamarin's direct interests, but it 
 would be really great if there was some sort of certification program for 
 service providers where they would be encouraged to do the basic support and 
 help their users understand how to avoid common pitfalls.  In exchange, they 
 are referred from the mono site to where providers can be found that offer 
 mono hosting.
 
 Before long, this lower tier of shared hosting providers is likely going 
 away, but the problem still remains of complexity of setting up mono with a 
 web server.  Cloud services are cheap, getting cheaper, and you can go to 
 AWS, Dreamhost, etc. and get an Ubuntu/CentOS/whatever VM, deploy mono, and 
 [do a bunch of web server configuration] and you're up and running.  If we 
 can remove [do a bunch of web server configuration] with some packages, 
 puppet modules, or even simple scripts to configure Apache and Nginx to work 
 with mono, then that further takes the burden off service providers or 
 developers to configure all of that.  IMHO the closest thing to this is the 
 mono buildpack on heroku: https://github.com/friism/heroku-buildpack-mono.  
 But that's for Heroku, and if you want to use just about any other cloud 
 provider, I think you're stuck doing all the DevOps work.
 
 Probably what would be best would be some additional packages that can be 
 installed to configure the web servers to work with mono properly so that 
 shared hosting providers (the LAMP stack people) can install those packages 
 and have a shared hosting setup and offer it without a huge undertaking.  
 That would also help all the people that show up on the forums every month or 
 so asking how to get ASP.NET up and running.  Would be nice to just say sudo 
 apt-get install nginx-mono-fastcgi will install all the dependencies, 
 configure fastcgi, create an upstart job to keep it running, and all anyone 
 has to deal with is their own application specifics.
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono in the mainstream

2015-03-23 Thread David Curylo
It's in a much better state than a few years ago, and even in the last 6 months 
with the CI and all the official packaging, I think it's easier than ever to 
get mono running.  That said, I think it's really difficult to get service 
providers to include and advertise their servers with mono support without some 
sort of commercial entity that will provide Linux support if they need it.  I'm 
not sure this is in Xamarin's direct interests, but it would be really great if 
there was some sort of certification program for service providers where they 
would be encouraged to do the basic support and help their users understand how 
to avoid common pitfalls.  In exchange, they are referred from the mono site to 
where providers can be found that offer mono hosting.

Before long, this lower tier of shared hosting providers is likely going 
away, but the problem still remains of complexity of setting up mono with a web 
server.  Cloud services are cheap, getting cheaper, and you can go to AWS, 
Dreamhost, etc. and get an Ubuntu/CentOS/whatever VM, deploy mono, and [do a 
bunch of web server configuration] and you're up and running.  If we can remove 
[do a bunch of web server configuration] with some packages, puppet modules, or 
even simple scripts to configure Apache and Nginx to work with mono, then that 
further takes the burden off service providers or developers to configure all 
of that.  IMHO the closest thing to this is the mono buildpack on heroku: 
https://github.com/friism/heroku-buildpack-mono.  But that's for Heroku, and if 
you want to use just about any other cloud provider, I think you're stuck doing 
all the DevOps work.

Probably what would be best would be some additional packages that can be 
installed to configure the web servers to work with mono properly so that 
shared hosting providers (the LAMP stack people) can install those packages and 
have a shared hosting setup and offer it without a huge undertaking.  That 
would also help all the people that show up on the forums every month or so 
asking how to get ASP.NET up and running.  Would be nice to just say sudo 
apt-get install nginx-mono-fastcgi will install all the dependencies, 
configure fastcgi, create an upstart job to keep it running, and all anyone has 
to deal with is their own application specifics.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono in the mainstream

2015-03-23 Thread Tony Gravagno
After all of these years there are still very few shared hosts who support 
Mono. I'm talking about the typical LAMP provider of web space for small sites, 
with FTP, SSH, and other services for upwards of US$10/month. In addition to 
PHP, these hosts may support Java, Perl, and/or Ruby. They may run over CentOS 
or Ubuntu, Apache or Nginx. They're used to mod_perl and mod_php, but not 
mod_mono, and they may support FastCGI. But they refuse to consider Mono, 
thinking it's either a Microsoft product, that it requires IIS, or that it's an 
experimental curiosity that's still unstable (based on what they read from 
2004).

There are a couple aspects of what support for Mono means. Personally I'd be 
happy with a proxy from PHP to Mono which allows me to accept LAMP requests and 
then use C# for my business logic. Or I'd just like to be able to fire up a 
cron job once in a while that runs my C# code rather scripts. So a host can 
adopt Mono without XSP. But support for XSP would simply be a bonus. And as a 
Xamarin developer I'd really like to be able to write cross-platform code which 
I could deploy over a Linux server, and to build end-to-end mobile solutions 
with Mono/C#. It would be ideal if Mono could be installed as a per-account 
option, so that a server admin doesn't need to install Mono for all users, but 
individual account users could add Mono for use with their own domains.

I'm hoping to find or foster the collaborative development of information 
targeted at the management and technical people at these hosts. Referring them 
here is not effective. http://www.mono-project.com/docs/web/aspnet/ They need 
to understand what's involved in supporting the platform, from installation and 
updates through to security and performance monitoring. And they need to be 
convinced that some rewards could be earned for their efforts. In other words, 
we need to be able to say offer Mono, you'll get new business, and you it 
won't cost you a lot of technical grief. Of course we as a community need do 
our part to drive business to companies that adopt Mono and to minimize the 
technical burden.

The benefit to us as C# developers is to get more exposure, get more FOSS which 
runs in more sites, make C# as popular as PHP for CMS like Drupal or WordPress, 
and to get more paying work for developers who are skilled with the stack. 
These are exactly the reasons why Java, Ruby, and other languages 
(platforms/frameworks) have been proposed and adopted.

Given all of that, frankly I'm rusty on the state of Mono over Linux. The last 
time I installed it some years ago, I got mired in a dependency nightmare and I 
gave up trying to implement it myself. That cannot be the experience that's 
waiting for shared hosts.

So - does any of this exist? What can be done to make it happen? Is this the 
wrong place to start with this inquiry?

Thanks!
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono Socket Server drops clients when it does big operations

2015-03-22 Thread acrym
Mono 3.99 
My socket server runs fine in Windows, but on Linux/Mono it drops a socket.
Whenever the server runs an operation longer than a fraction of a second,
the socket is disconnected, but occasionally the client stays connected. The
client is Silverlight 4 and is run from Windows.

More reproducible is when two clients connect. The first connects fine. The
second connects, but when the server runs an operation, my server
disconnects the first client. When this happens, the first client sends
exactly 0 bytes.

I have my clients in a static list so they won't be GC'd, and timeout is set
high. The only thing I can think of is the client might be pinging the
server, and in that window of time when it handles the message, it's not in
a receive state. But that would make sockets extremely fragile.

Is there any reason - Mono-related or otherwise - that could cause this
behavior?

  static void OnBeginAccept(IAsyncResult ar)
{
try
{
TcpClient _MessageClient =
_MessageListener.EndAcceptTcpClient(ar);
byte[] _ReceiveBuffer = new byte[8197];
System.IO.StreamWriter streamW = new
System.IO.StreamWriter(_MessageClient.GetStream());
ClientDefinition newClient = new ClientDefinition();
newClient.Socket = _MessageClient.Client;
newClient.Socket.ReceiveTimeout = 7000;
newClient.Socket.SendTimeout = 7000;
newClient.username = undefined + clients.Count;
newClient.receiveBuffer = new byte[8197];
clients.Add(newClient);

newClient.Socket.BeginReceive(newClient.receiveBuffer, 0, 8196,
SocketFlags.None, new AsyncCallback(OnReceiveComplete), newClient);
_MessageListener.BeginAcceptTcpClient(new
AsyncCallback(OnBeginAccept), null);
Console.WriteLine(new client accepted);
}
catch (Exception ex) { LogError(ex); }
}


  static void OnReceiveComplete(IAsyncResult ar)
{
ClientDefinition fromClient = null; //Wrapper for Socket
fromClient = (ClientDefinition)ar.AsyncState;
if (fromClient == null) return;

try
{
if (!fromClient.Socket.Connected)
{
Console.WriteLine(fromclient ( + fromClient.username + )
not connected);
CloseClient(fromClient);
return;
}
int receiveLength = 0;
receiveLength = fromClient.Socket.EndReceive(ar);
if (receiveLength == 0)
{
Console.WriteLine(Receivelength == 0);
CloseClient(fromClient);
}


SocketMessage message = null;
message =
Serializer.DeserializeSocketMessage(fromClient.receiveBuffer);
System.Array.Clear(fromClient.receiveBuffer, 0, receiveLength);

/**Here is where I handle the messages. And when doing an
operation that is 'big', a client is closed.*/

fromClient.Socket.BeginReceive(fromClient.receiveBuffer, 0,
8196, SocketFlags.None, new
AsyncCallback(OnReceiveComplete), fromClient);


}
catch (Exception ex)
{
Console.WriteLine(Exception in OnReceiveComplete:  +
ex.Message + ex.StackTrace + obj:  + ex.Source);
CloseClient(fromClient);

}





--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-Socket-Server-drops-clients-when-it-does-big-operations-tp4665670.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono

2015-03-19 Thread Mary Sweet

   
I wondered how can I help to add something interactive to Mono project by using 
mainly C# ..
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


  ___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono not using self closing tags.

2015-03-09 Thread MarxWright
I'm trying to remove the closing tag from my transformed document but it only
creates a newline and full closing tags: 

item Data=XXX Data1=123.24 Num=3
/item

As I have a lot of data I would prefer: item Data=XXX Data1=123.24
Num=3 /

I cannot seem to find the solution anywhere. To annoy me more it works as
desired on Windows but not when running on Wheezy using mono 2.10.8.1. which
makes me think perhaps a Mono component is causing my trouble. 

Has anyone got any ideas? 

This is the code I use: 

XmlWriterSettings xmlSettings = new XmlWriterSettings(); 
xmlSettings.Indent = true; 
xmlSettings.NewLineChars = \n; 
xmlSettings.OmitXmlDeclaration = true; 

XmlReader reader = XmlReader.Create(new StringReader(xml)); 

using (XmlWriter writer = XmlWriter.Create(outputStream, xmlSettings)) 
{ 
 m_SoapXSLT.Transform(reader, writer); 
} 

string outStr = outputStream.ToString(); 

Here is a sample from my XSL document: 

?xml version=1.0 encoding=UTF-8 ? 

xsl:stylesheet version=3.0 
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;  
xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns:fn=http://www.w3.org/2005/xpath-functions;
xmlns:xdt=http://www.w3.org/2005/xpath-datatypes;
xmlns:err=http://www.w3.org/2005/xqt-errors;
exclude-result-prefixes=xs xdt err fn

xsl:output method=xml indent=yes  omit-xml-declaration=yes/

... 
xsl:if test=self::node()[@type='46']
xsl:element name=elementName
xsl:attribute name=NumItems
xsl:value-of
select=count(self::node()/selections/selection)/
/xsl:attribute
xsl:for-each select=self::node()/items/item
xsl:element name=item
xsl:attribute name=Data
xsl:value-of select=@data1/
/xsl:attribute
xsl:attribute name=Data1
xsl:value-of select=@data2/
/xsl:attribute
xsl:attribute name=Num
xsl:value-of select=position()/
/xsl:attribute
/xsl:element
/xsl:for-each
/xsl:element
/xsl:if
... 

Regards, Mike! 



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-not-using-self-closing-tags-tp4665600.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] [Mono-dev] Mono release headsup

2015-02-25 Thread Rodrigo Kumpera
Miguel merged a fix for that. I just cherry picked it to 4.0.



On Tue, Feb 24, 2015 at 12:26 PM, Ariel Rocholl publ...@arocholl.com
wrote:

 Great – hopefully he is still around and can answer. Otherwise which
 option B can work? Can I do a minor modification and re-submit as myself
 fix?

 Or alternatively, at least add 25 and 50 which are IoT common
 baudrates not currently included?



 Best Regards,
 
 Ariel Rocholl



 *From:* Rodrigo Kumpera [mailto:kump...@gmail.com]
 *Sent:* Tuesday, February 24, 2015 16:30
 *To:* Ariel Rocholl
 *Cc:* mono-devel-l...@lists.ximian.com; Mono List
 *Subject:* Re: [Mono-dev] Mono release headsup



 The patch looks ok, but for it to be merge it must be released under the
 MIT license, so the author will have to do it.







 On Tue, Feb 24, 2015 at 4:52 AM, Ariel Rocholl publ...@arocholl.com
 wrote:

 Hi there,



 Could the fix proposed for bug #8207 be considered for the release? This
 was proposed long ago but didn't progress, and recent renewed interest on
 high speed custom baud serial communication is required by all IoT gadgets
 and sort. We are not being able to propose Mono for IoT just because of
 this, and fix seems really easy to propagate.


 Best Regards,
 
 Ariel Rocholl



 On Tue, Feb 24, 2015 at 1:08 AM, Rodrigo Kumpera kump...@gmail.com
 wrote:

 Hello everyone,



 We're branching mono for next release as we speak.



 We'll be able to easily merge community PR until March 6. After that it
 will have to go through our

 internal QA process, which raises the bar a lot and only release blockers
 can get in.



 I'll be handling the intake of community changes for the release so make
 sure I'm aware of any PR targeting it to increase their likelihood of been
 included.



 --

 Rodrigo



 ___
 Mono-devel-list mailing list
 mono-devel-l...@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list





___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono Projects Supporting Raspberry Pi 2 ?

2015-02-24 Thread bgreer5050
Are there any Mono Projects that allow GPIO access and that work on the
Raspberry Pi 2 ?



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-Projects-Supporting-Raspberry-Pi-2-tp4665519.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] [Mono-dev] Mono release headsup

2015-02-24 Thread Rodrigo Kumpera
The patch looks ok, but for it to be merge it must be released under the
MIT license, so the author will have to do it.



On Tue, Feb 24, 2015 at 4:52 AM, Ariel Rocholl publ...@arocholl.com wrote:

 Hi there,

 Could the fix proposed for bug #8207 be considered for the release? This
 was proposed long ago but didn't progress, and recent renewed interest on
 high speed custom baud serial communication is required by all IoT gadgets
 and sort. We are not being able to propose Mono for IoT just because of
 this, and fix seems really easy to propagate.

 Best Regards,
 
 Ariel Rocholl



 On Tue, Feb 24, 2015 at 1:08 AM, Rodrigo Kumpera kump...@gmail.com
 wrote:

 Hello everyone,

 We're branching mono for next release as we speak.

 We'll be able to easily merge community PR until March 6. After that it
 will have to go through our
 internal QA process, which raises the bar a lot and only release blockers
 can get in.

 I'll be handling the intake of community changes for the release so make
 sure I'm aware of any PR targeting it to increase their likelihood of been
 included.

 --
 Rodrigo

 ___
 Mono-devel-list mailing list
 mono-devel-l...@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] [Mono-dev] Mono release headsup

2015-02-24 Thread Rodrigo Kumpera
There's a PR that fixes the same issue using different ioctl. I can't make
a call on which approach is the appropriate one
since I'm not familiar with serial comm.


On Tue, Feb 24, 2015 at 12:26 PM, Ariel Rocholl publ...@arocholl.com
wrote:

 Great – hopefully he is still around and can answer. Otherwise which
 option B can work? Can I do a minor modification and re-submit as myself
 fix?

 Or alternatively, at least add 25 and 50 which are IoT common
 baudrates not currently included?



 Best Regards,
 
 Ariel Rocholl



 *From:* Rodrigo Kumpera [mailto:kump...@gmail.com]
 *Sent:* Tuesday, February 24, 2015 16:30
 *To:* Ariel Rocholl
 *Cc:* mono-devel-l...@lists.ximian.com; Mono List
 *Subject:* Re: [Mono-dev] Mono release headsup



 The patch looks ok, but for it to be merge it must be released under the
 MIT license, so the author will have to do it.







 On Tue, Feb 24, 2015 at 4:52 AM, Ariel Rocholl publ...@arocholl.com
 wrote:

 Hi there,



 Could the fix proposed for bug #8207 be considered for the release? This
 was proposed long ago but didn't progress, and recent renewed interest on
 high speed custom baud serial communication is required by all IoT gadgets
 and sort. We are not being able to propose Mono for IoT just because of
 this, and fix seems really easy to propagate.


 Best Regards,
 
 Ariel Rocholl



 On Tue, Feb 24, 2015 at 1:08 AM, Rodrigo Kumpera kump...@gmail.com
 wrote:

 Hello everyone,



 We're branching mono for next release as we speak.



 We'll be able to easily merge community PR until March 6. After that it
 will have to go through our

 internal QA process, which raises the bar a lot and only release blockers
 can get in.



 I'll be handling the intake of community changes for the release so make
 sure I'm aware of any PR targeting it to increase their likelihood of been
 included.



 --

 Rodrigo



 ___
 Mono-devel-list mailing list
 mono-devel-l...@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list





___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono release headsup

2015-02-23 Thread Rodrigo Kumpera
Hello everyone,

We're branching mono for next release as we speak.

We'll be able to easily merge community PR until March 6. After that it
will have to go through our
internal QA process, which raises the bar a lot and only release blockers
can get in.

I'll be handling the intake of community changes for the release so make
sure I'm aware of any PR targeting it to increase their likelihood of been
included.

--
Rodrigo
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono 3.12 (mod_mono web service, Centos7)

2015-02-19 Thread Aleš Vojáček

Hi all,
is there something new in configurations between mono 2.6.7 and mono 
3.12 for accessing local filesystem.
I have webservice which sending some files from server to client. 
Everything was ok on mono 2.67 but now I'm gettin Exception like :
Could not find a part of the path /tmp//err.log. --- 
System.IO.DirectoryNotFoundException: Could not find a part of the path 
/tmp//err.log.

web service is runnig under Apache+mod_mono.2.0 .
user apache has access to that file (if i will try to cat 
/tmp//err.log, it works).


Is there any configuration which can block webservice access to files in 
other then app directories?



Thank you Ales
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono 3.12 (mod_mono web service, Centos7)

2015-02-19 Thread Aleš Vojáček

SOLVED:
the problem was that on Centos7 httpd has PrivateTmp :-(
Sorry for stupid question.

A./
Dne 19.2.2015 v 16:21 Aleš Vojáček napsal(a):

Hi all,
is there something new in configurations between mono 2.6.7 and mono 
3.12 for accessing local filesystem.
I have webservice which sending some files from server to client. 
Everything was ok on mono 2.67 but now I'm gettin Exception like :
Could not find a part of the path /tmp//err.log. --- 
System.IO.DirectoryNotFoundException: Could not find a part of the 
path /tmp//err.log.

web service is runnig under Apache+mod_mono.2.0 .
user apache has access to that file (if i will try to cat 
/tmp//err.log, it works).


Is there any configuration which can block webservice access to files 
in other then app directories?



Thank you Ales
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono crashes on buttonpress

2015-02-04 Thread Edward Ned Harvey (mono)
 From: mono-list-boun...@lists.ximian.com [mailto:mono-list-
 boun...@lists.ximian.com] On Behalf Of MonoLoG
 
 But, while i have the KeePass-window selected, as soon as i press the
 'windows button' mono crashes.

This is a question for the keepass developers.  Mono doesn't crash.  Mono is 
an implementation of the C# programming language (for all intents and purposes 
in this conversation.)  So if the application crashes, it's due to an error in 
the application.

If there is a problem in mono, the application developer (or anybody, really) 
would need to say The following class or method in mono is expected to perform 
X, but the actual result is Y, this is a bug, submit bug report, etc.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Mono crashes on buttonpress

2015-02-03 Thread MonoLoG
Hi,
I'm using mono to run keepass on archlinux (i3wm) and it works very well.

But, while i have the KeePass-window selected, as soon as i press the
'windows button' mono crashes.
Since i have no clue about how mono works, i can not figure out what the
error-messages really mean.

Crash log:  http://pastebin.com/7y8fHTkN http://pastebin.com/7y8fHTkN  

Does someone know what causes this behavior? What do the error messages
mean?
Mono/KeePass accepts the windows key just fine on different machines. 

kind regards,
MonoLoG



--
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-crashes-on-buttonpress-tp4665402.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


  1   2   3   4   5   6   7   8   9   10   >