Can this run on .Net 3.5?

Jun 26, 2012 at 12:01 PM

Can this run on .Net 3.5?

Coordinator
Jun 26, 2012 at 12:31 PM
Edited Jun 26, 2012 at 12:37 PM

U need to recompile the source code under 3.5 framework.

But couple of things should be changed:

  1. `Add reference to System.ServiceModel.Web.dll - for DataContractJsonSerializer class;
  2. Change ConcurrentDictionary to simple Dictionary - if u don't need multithreading;
  3. In the WebhooksListener class change "cts.IsCancellationRequested" to "cts.Token.IsCancellationRequested" or just remove Webhooks.fs

It should work :)

Jun 26, 2012 at 12:50 PM

Thanks for the help,

What can I do if I do need multithreading? 

Coordinator
Jun 26, 2012 at 1:13 PM

Oh, you can implement your own safe dictionary. See for example, http://devplanet.com/blogs/brianr/archive/2008/09/26/thread-safe-dictionary-in-net.aspx

Oct 30, 2012 at 8:22 AM

Hey mate, I compiled using 3.5, changed the code like you mentioned above, but still got error in Common.fs:

"constructor or member 'AddOrUpdate' is not defined"

I think it's the result of changing ConcurrentDictionary to Dictionary.

Can you help to fix this? I don't speak F# :) Thanks

Coordinator
Oct 30, 2012 at 8:27 AM
Edited Oct 30, 2012 at 8:34 AM
Hi,
1) Change ConcurrentDictionary to Dictionary
2) Replace AddOrUpdate(k, v, func) to just Add(k, v) method;

It should work :)
Oct 30, 2012 at 8:45 AM

ok, changed AddOrUpdate to Add, and got this:

line 138 throws "This expression was expected to have type string but here has type unit"

line 158 throws "This expression was expected to have type typdef but here has type unit"

Coordinator
Oct 30, 2012 at 9:15 AM

Change these 2 lines:

1. enums.AddOrUpdate(x, v, self<Enum, string>)  to enums.Add(x, v); v

2. cache.AddOrUpdate(id, dlg, self<nativeint, typdef>) to cache.Add(id, dlg); dlg

Oct 30, 2012 at 2:10 PM

Where are we supposed to be changing these 3 things?

Oct 30, 2012 at 2:34 PM

Never Mind.

I figured it out.

 

In case any other newbies were interested.

 

You need to download the Source files here and Open the project in Visual Studio.

Change the Framework to 3.5 and Build it again and then use the new DLL file.

 

Another thing, Denisk1981, I found another line to correct

Line 91 of common.fs threw an error as well.

I commented it out and the project successfully built.

 

Thanks

Yoni

 

Jan 17, 2013 at 9:12 AM

Hi, could you give me the source code for 3.5 framework? :-)

Thanks.

Giulio

Coordinator
Jan 17, 2013 at 9:19 AM

You can find it here.

http://mcapinet.codeplex.com/SourceControl/changeset/view/23526 (Or check the history for earlier versions)

Jan 17, 2013 at 10:26 AM

Thanks. Can you tell me the last version 3.5 framework based?

Thanks again.

Giulio

Coordinator
Jan 17, 2013 at 10:49 AM
Oh, just download the latest (I uploaded it yesterday) and take the following steps:

  1. Change framework to 3.5;
  2. Add reference to System.ServiceModel.Web.dll - for DataContractJsonSerializer class;
  3. Change ConcurrentDictionary to simple Dictionary - if u don't need multithreading. In Common.fs change these lines:
    - remove open System.Collections.Concurrent
    -
    enums.GetOrAdd(x, v) to enums.GetAdd(x, v)
    -
    cache.GetOrAdd(id, dlg) to cache.Add(id, dlg)
  4. In the WebhooksListener class change "cts.IsCancellationRequested" to "cts.Token.IsCancellationRequested" or just remove Webhooks.fs
5 minutes and you're done!
Good luck



On Thu, Jan 17, 2013 at 12:26 PM, giulioferri <notifications@codeplex.com> wrote:
ast version 3.5




--
Denis K
Jan 17, 2013 at 11:00 AM

Thanks! But my installation of VS2010 doesn't include F# support  :-((((( I Cant't modify and recompile...

Don't you have a 3.5 version dll ready?

Thanks anyway!

Giulio

Coordinator
Jan 17, 2013 at 12:23 PM
Ok. Wait. I'll send it to you

On Thu, Jan 17, 2013 at 1:00 PM, giulioferri <notifications@codeplex.com> wrote:

From: giulioferri

Thanks! But my installation of VS2010 doesn't include F# support :-((((( I Cant't modify and recompile...

Don't you have a 3.5 version dll ready?

Thanks anyway!

Giulio

Read the full discussion online.

To add a post to this discussion, reply to this email (mcapinet@discussions.codeplex.com)

To start a new discussion for this project, email mcapinet@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Denis K
Jan 17, 2013 at 12:27 PM

Great! Thanks!!!

:-)

Giulio