This project is read-only.

.net 2.0

May 24, 2009 at 3:02 PM

Is it possible to compile and use DJ for .net 2.0?

May 24, 2009 at 5:39 PM

I am not sure ,but you can try and let me know if it can or not. because in the DJ release version is to much classes to remember which namespace i if you get the result and let me know mybe i can make it work in 2.0 well as you wish.Thx

May 24, 2009 at 11:52 PM

I tried to compile it, targeting 2.0

I got some errors because of System.Linq and System.Web.Script.Serialization.

I removed all these namespaces, and I think that System.Linq is not a problem, but after removing System.Web.Script.Serialization I got some errors in some classes on ScriptBuilder.cs

Is it possible to fix this so it can work in 2.0?

I'm quite new to .net, so sorry if I cant be more helpful.

May 26, 2009 at 6:17 PM
Edited May 26, 2009 at 6:18 PM

First i think DJ can be run in 2.0.But you must modifity many lines of code.

I checked my code i using Linq more than one place. if you remove the System.Linq ScriptBuilder couldnot be work.But you can try to modifity this code that you can find in ScriptBuilder.RegisterJQueryControl

1. GoTo

var properties = from PropertyInfo p in controlType.GetProperties(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public)
                          where (Attribute.GetCustomAttribute(p, typeof(JQueryOptionAttribute), true) != null)
                          select p;

you can modifity it using "for" or "foreach"

2. Remove System.Web.Script.Serialization and remove this code in RegisterJQueryControl method

                            case JQueryOptionTypes.JSONObject:
                                if (pi.PropertyType == typeof(string))
                                    value += pValue;
                                    value += (new JavaScriptSerializer()).Serialize(pValue);


In the new version of DJ i will check whether it can run on .NET Framework 2.0.

Thx  and Good Luck!