Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I got some Problem in compile DLL with dynamic method #26

Closed
kmlxk opened this issue Apr 29, 2016 · 1 comment
Closed

I got some Problem in compile DLL with dynamic method #26

kmlxk opened this issue Apr 29, 2016 · 1 comment

Comments

@kmlxk
Copy link

kmlxk commented Apr 29, 2016

fastJSON is a great basic library that I use for years in most of my programs.
In order to use dynamic I decide to upgrade from 1.0 to 2.1.5.
But when I compiled, the method ToDynamic is not exists in the DLL.
I found the compile condition net4 seems to working in VS2015 and SharpDeveloper.
So I tried to remove the compile condition line in the following code:

#if net4
        /// <summary>
        /// Create a .net4 dynamic object from the json string
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static dynamic ToDynamic(string json)
        {
            return new DynamicJson(json);
        }
#endif

Then I compiled in vs2015 and got the DLL with ToDynamic().
But SharpDevelop was unable to compile and raised Error CS0246: unabled to find “DynamicJson”.

I think there must be a better way to compile DLL with dynamic.
Can anyone help me , thanks .

@mgholam
Copy link
Owner

mgholam commented Apr 29, 2016

Put a net4 directive in the Release conditional compile option in the project file.

@mgholam mgholam closed this as completed Apr 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants