01-14-2008 02:27 PM
by mhopkins on 12-11-2007 10:36 AM
I have created my first AcT! plug in. It works great and was very easy to pull off.
But I am having trouble debugging it.
The plugin works fine on my machine and another one in the office but on two other ones it cause act to show an error when loading starting and of course it does not load the plugin. One is PX one is Vista.
I need to find some error logging so I can trouble shoot.
I am using the code in the plug in template to log to some place I just don't know where.
catch (Exception ex)
if (trace Switch.Trace Error)
Act.Shared.Diagnostics.Trace.WriteLine(ex, trace Switch.Category, Trace Level.Error);
I tried using the LogViewer app in the ACT directory but it did not show anything useful.
I even added this to see if it was writing to the same place I was looking.traceSwitch = new Act.Shared.Diagnostics.TraceSwitch(Assembly.GetExecutingAssembly());
if (traceSwitch.Trace Info)
Am I looking for error logging in the wrong place? I could not find the Diagnostics classes in the docs so I am clueless.
01-14-2008 02:28 PM
by mhopkins on 12-11-2007 10:18 PM
I have found out why the plugin works on some machines and not others.
The logging did log this on one of the machines that the plugin never loaded:
Informative Exception: Could not load file or assembly 'Act.Shared.Diagnostics, Version=10.1.199.0, Culture=neutral, PublicKeyToken=ebf6b2ff4d0a08aa' or one of its dependencies. The system cannot find the file specified.System.IO.FileNotFoundException: Could not load file or assembly 'Act.Shared.Diagnostics, Version=10.1.199.0, Culture=neutral, PublicKeyToken=ebf6b2ff4d0a08aa' or one of its dependencies. The system cannot find the file specified.
File name: 'Act.Shared.Diagnostics, Version=10.1.199.0, Culture=neutral, PublicKeyToken=ebf6b2ff4d0a08aa'
I see Act.Shared.Diagnostice in the c:\windows\assembly. why would ACT! not find it?
01-14-2008 02:28 PM
Looks like the version that failed to load is ACT! 10.0.1 - could it be that the machines where the error occurs don't have 10.0.1 installed, and have older versions of ACT!? As a best practice, you usually want to build your plugin against the oldest version of ACT! you want to support, such that you have backwards compatibility.
01-14-2008 02:29 PM
by mhopkins on 12-12-2007 12:33 AM
Xavier you are correct.
My dev machine has version 10.1.199 of the frame work as does the other machine in the office that the plug-in works on. But the problem machines have version 10.0.237. I did not see that coming.
I tried to use the ACT updater to update the problem machine but it just says that it is the current version.
I am guessing that I will need to un-install ACT! on my Dev machine and reinstall with the same cd every one else used.
Thanks For the help
01-14-2008 02:31 PM
You can just copy the appropriate version DLLs from your CD into a local folder. then in Visual Studio, you can specifically point to that folder in your "references" section (Right click on the DLL and choose the folder explicitly).
After compiling your plug-in, it should use the DLLs in the separate folder (note if you run the plug-in, the policy files kick in and it will actually load the INSTALLED version of the DLL not the folder ones).
You can use ILDASM to open your plug-in and make sure it references the correct version of the DLLs.
Suggest you use the oldest DLLs that you want to support as the policy files will automatically re-direct to new versions of ACT!
01-14-2008 02:32 PM
by Carlton Jones on 12-13-2007 8:52 AM
If you still wish to update your 'problem' machine the download can be found here:
It will require you to log-on but if you don't have a profile they are painless to setup.
Hope this helps,
ACT! SDK Support