Community
Showing results for 
Search instead for 
Do you mean 
Reply

ACT.Framework Error

New Member
Posts: 6
Country: USA

ACT.Framework Error

hello there,

 

SDK is new to me. my colleague and I added ACT.Framework reference to our program. We tried to add ACT.Framework reference just to test how these dll work. We were trying to load a form but we ran the code we encountered the error, "The type or namespace name 'ACT' could not be found (are you missing a using directive or an assembly reference?)". What does it mean? are we missing any libraries? We already have the files from ACT_Premium_2011\ACTWG\GlobalAssemblyCache of the ACT installer. What else are we missing? Do we still need to download something? Is there a sort of installer for us to be able to code plug-ins for ACT? 

 

Please advise, thanks in advance

Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: ACT.Framework Error

Hi,

 

I'm most probably not understanding properly here so apologies! 

If you've got a ref to Act.Framework also add a ref to Act.Shared.Collections in your project. You should be able to simply start using the framework by including a using statement at the top of your cs file (if your doing it in C#)?

e.g.

using Act.Framework;

using Act.Framework.Database;

using Act.Framework.Contacts;

 

etc

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Employee
Posts: 1,163
Country: USA

Re: ACT.Framework Error

Based on the error message I believe Vivek is correct, your simply missing the using statements for the assemblies you referenced.

Matthew Wood
Act! SDK Support
Community Moderator
New Member
Posts: 6
Country: USA

Re: ACT.Framework Error

Hello,

 

Thanks for responding to my post. I'm sorry for not being so clear.

 

I have hear my sample codes for your reference:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Act.Framework;

namespace WindowsFormsApplication1
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            ActFramework ACTFM = new ActFramework();
            ACTFM.LogOn("N:\\TSA\\Zilin\\ACTTest\\TSATest.pad", "tan zilin", "");
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}

 

I use Visual Studio 4.0, dotnet framework 4.0, for ACT! 2011 SDK. I have installed the program to a 32-bit computer. When I build the solution, I get the error "The type or namespace 'Framework' does not exist in the namespace 'Act' (are you missing an assembly reference?)"

 

Please advise how to fix the issue.

 

Thanks,

 

Raquel

Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: ACT.Framework Error

Hi Raquel,

 

ACT! is a .NET 3.5 product. You'll need to convert your project into .NET 3.5 Framework project. Also ensure that if you are coding on a 64bit machine that you compile for a x86 CPU not "any".

 

HTH

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
New Member
Posts: 6
Country: USA

Re: ACT.Framework Error

Hi Vivek,

 

Thanks for your response. When you say, "You'll need to convert your project into .NET 3.5 Framework Project." Does this mean that if I have different versions of .NET (say 2.0, 3.0, 3.5 and 4.0) in my computer, I need to uninstall everything but not the .NET 3.5?

 

Also, what do you mean by "Also ensure that if you are coding on a 64-bit machine that you compile for x86 CPU not "any""? Sorry am not really an IT expert expecially when it comes to hardware-related items.

 

Thanks in advance.

 

Raquel

 

 

Employee
Posts: 1,163
Country: USA

Re: ACT.Framework Error

No, you don't need to remove anything. You can simply right click on your project file, should be right under the solution. In the properties windows on the application tab you can select the target framework. 

 

As for the processor that's being targeted, at the top of visual studio, next to the debug/release drop down is another drop down where you can select your target processor. On 64bit systems you can choose x86 or x64, you want to select the former.

Matthew Wood
Act! SDK Support
Community Moderator
Nickel Contributor
Posts: 175
Country: USA

Re: ACT.Framework Error

Just to build off of what was previously stated in case others run into this; those options aren't shown by default in VB Express 2010. However, x86 is the default target for this edition (not sure about C#/C++ editions).

 

You can show them by following the below steps (grabbed from Here)

Tools > Settings > Expert Settings

then,

Tools > Options > Project and Solutions > General > Show advanced build configuration-Checked.

Finally, Build > Configuration Manager.

 

HTH

New Member
Posts: 6
Country: USA

Re: ACT.Framework Error

Nickel Contributor
Posts: 175
Country: USA

Re: ACT.Framework Error

Raquel,

 

Based on what you said, you have a bad reference in your project. You'll need to remove it. This page shows how you can add/remove references. I will note that is for Visual Studio 2010 (but the process is basically the same back to VS2003).

 

If you keep having problems, after removing the reference, I'm going to suggest that you start a new project and set it up to the proper framework target (.NET 3.5, x86 CPU) before you add any of your code. Make sure it builds properly before you start, presumably, copying and pasting code. It just sounds like the configuration of the project got messed up somehow when you switched the target framework.