Open bjarnef opened 10 years ago
The MailChimp.NET library has a NuGet package dependency on ServiceStack.Text -- it should get installed automatically when you install MailChimp.NET through NuGet.
If you look at the NuGet page, you can see that NuGet successfully detects the dependency on ServiceStack.Text. If you install using the package manager console, you should get output that describes the install process -- did it fail to download ServiceStack.Text at that time?
I didn't notice if ServiceStack.Text was installed first time... the NuGet package was succesfully installed, but the ServiceStack.Text assembly was missing.. and wasn't build with my project, when only including reference to MailChimp.dll ... at first I didn't notice ServiceStack.Text was missing, perhaps because I had the project and Umbraco both in Visual Studio, but when I moved the compiled dll and usercontrol to another website in WebMatrix I got the error..
Should the developers include using ServiceStack.Text too? It doens't seem to be enough with:
using MailChimp;
using MailChimp.Helper;
using MailChimp.Lists;
I also have to include ServiceStack.Text is my project to build the ServiceStack.Text.dll.
I tried to install the NuGet package in a clean install:
PM> Install-Package MailChimp.NET
Attempting to resolve dependency 'ServiceStack.Text (= 3.9.71)'.
Installing 'ServiceStack.Text 3.9.71'.
Successfully installed 'ServiceStack.Text 3.9.71'.
Installing 'MailChimp.NET 1.1.34.0'.
Successfully installed 'MailChimp.NET 1.1.34.0'.
Adding 'ServiceStack.Text 3.9.71' to TestMailChimpNET.
Successfully added 'ServiceStack.Text 3.9.71' to TestMailChimpNET.
Adding 'MailChimp.NET 1.1.34.0' to TestMailChimpNET.
Successfully added 'MailChimp.NET 1.1.34.0' to TestMailChimpNET.
when I build the project these assemblies are generated: MailChimp.dll, ServiceStack.Text.dll and TestMailChimpNET.dll (my project assembly)
It would be better if the MailChimp.Net nuget would depend on a minimum version of service stack.
Mailchimp.net uses is the latest free 3.x version. Newer versions are not free anymore.
Is it an option to move away from ServiceStack and move to the json.net of newton-king http://james.newtonking.com/json
It's not only the json part that's being used, also the REST features from ServiceStack.
Thank you mdissel! that is a valid point. I started a fork to see how much work it would be to move away from servicestack https://github.com/jphellemons/MailChimp.NET it is not compiling yet, because of the jsconfig work in the mergevar method
Please see #176 for an attempt to drop ServiceStack dependency
I am using Umbraco /base and have installed MailChimp.NET 1.1.34 from NuGet. But when I call the url (which would be like this: http://www.mydomain.com/base/MailchimpNewsletter/SubscribeMail/{email}.aspx through a clean Umbraco install it returns something like this:
Maybe it's something related or simular to this issue: https://github.com/danesparza/MailChimp.NET/issues/48
but if I then include using ServiceStack.Text; and rebuild the project, copy the compiled assembly + the compiled ServiceStack.Text.dll to my Umbraco installation, then it just fine return the exspected json like this:
where xxxxxxxxxxxx of course is the right id's ... or if the email already exists in the list:
as I get an exception when calling the Subscribe method when email already exists in the list https://github.com/danesparza/MailChimp.NET/issues/99, I just create a new instanse of EmalParameter and set the email + adding a bool with value true.
Is the issue with ServiceStack.Text an issue with the NuGet package? It shouldn't be necessary to include that reference?