NET3.5 Target

Apr 27, 2014 at 6:55 PM
I write a project which use some components (some hardware support ) which can be used only with NET3.5.

I wrote test project with needed functions using CUDAFy.NET, and it works fine, but it must be not alone project, but the functions in main project. So when I add CUDAFy.NET to reference of main project it makes many warnings and errors about target incompatibility.

How can i add CUDAFy.NET to project targeted to NET3.5?

I've try to compile last sources changing target to NET3.5. It says about BigInteger unexpected.
I see the sources, it check it's use by NET35 MACRO, I wrote to project properties to define this while compiling. It say about absence of .is64bitOperatingSystem in Environmrnt, so i change code of Utilities.cs ProgramFiles Function to that:
#if NET35
        [DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool IsWow64Process([In] IntPtr hProcess, [Out] out bool lpSystemInfo);

        public static bool Is64Bit()
            bool retVal;
            IsWow64Process(Process.GetCurrentProcess().Handle, out retVal);
            return retVal;

        public static string ProgramFiles()
#if !NET35
            string s = Environment.Is64BitOperatingSystem ? 
                Environment.GetEnvironmentVariable("ProgramW6432") : 
           string s = Is64Bit() ?
                Environment.GetEnvironmentVariable("ProgramW6432") :
            if (s == null)
                s = Environment.GetEnvironmentVariable("ProgramFiles"); // fall-back for old x64 OS such as vista x64
            return s;
but compiler starts to say many error about Tuple. (System.Tuple and Cudafy.Tuple) so as i think this is not a good variant to compile Cudafy targeted to NET3.5 by myself
Please help with including Cudafy.NET to project targeted to NET3.5
May 7, 2014 at 8:15 AM
CUDAfy targets .NET 4.0. To target 3.5 you will need to build the sources yourself and use the conditional compilation symbol NET35 in the relevant projects. Please note that unless you have a tool like .NET Reactor to combine the DLLs you will need to link to the various individual DLLs and not Cudafy.NET.dll.