Saturday, September 17, 2011

How to debug InstallerClass

 

In the Setup project of VS.NET, you can write a InstallerClass and attach that to the Custom Action of the Setup project to do some custom steps like checking certain services, copying special files etc.

To debug this InstallerClass, just insert below line of code at the location you wish to set the break point.

System.Diagnostics.Debugger.Break();

When running your installer, Windows Installer will understand that’s a user defined breakpoint and let you chose to debug the program. See screen shots below.

After that, you can just press F10 to step through your code.

image

image

How to check the physical path of Enterprise Manager for WCF AgilePoint Server

 

1. In AgilePoint Server Manager, check what is the web site associate with Enterprise Manager. In this case, the web site is call AgilePoint. Take note of the value of virtual directory. In this case, it is EM4.

 clip_image001

2. Go to IIS Manager, right click on ‘AgilePoint’ site > Manage Web Site > Advance Setting, check the value for Physical Path. In this case, it is C:\Program Files\AgilePoint. So, the physical path for Enterprise Manager virtual directory is C:\Program Files\AgilePoint\EM4

clip_image002

Wednesday, August 3, 2011

How to replace a file in MSI

Use msi2xml. For example, the file you want to replace is Test.dll and your MSI is TestMSI.MSI.

  1. This command extracts the MSI files:

    • msi2xml -c OutputDir TestMSI.MSI
  2. Open OutputDir and modify the file.

    • The extracted file names are some random numbers with no file extension, e.g. _132667984196873216. To identify the file you want to replace, open the TestMSI.xml generated by above command, then search for Test.dll and find the matching random number file name.

    • You may replace the file using the same random number file name. Modify the file size in TestMSI.xml too.

  3. To pack the files back to MSI:

    • xml2msi.exe -m TestMSI.xml

You need the -m to ignore the 'MD5 checksum test' that fails when an MSIs file(s) are modified.

From my observation, the file size of MSI reduces after running xml2msi, but all the contents are correct.

Friday, July 29, 2011

SharePoint Integration Upgrade

 

There are customers come to me that they are not able to upgrade their AgilePoint Integration for SharePoint.

On their Add\Remove Program, they have the entry for AgilePoint Integration for SharePoint with v5.0. But when they run the v5.0 Service Pack 1 (v5.0 SP1) or v5.0 Service Pack 2 (v5.0 SP2), the upgrade installer gives below error:

“Please install or upgrade to AgilePoint v5.0 before installing this upgrade.”

image

This is because, the customer first run the SharePoint Integration installer (the MSI file), which will add the entry to the Add\Remove Program. This gives an illusion that it seems SharePoint Integration has been installed correctly. After this, if the customer does not use the SharePointV2IntegrationSetup.exe to deploy the SharePoint solution files (.wsp files), but instead the customer choses to manually deploy the SharePoint solution files (.wsp) using standard SharePoint stsadm tool, then the upgrade installer of v5.0 SP1 or v5.0 SP2 will not be able to detect that the SharePoint Integration has been installed.

To solve this, I recommend the customer to use same approach when SharePoint Integration was first deployed, i.e. use the stsadm tool. The details of using the stsadm tool can be found at the AgilePoint Install Guide, but here is a quick look:

To upgrade the SharePoint machine manually, right-click and extract the installer file to obtain the solution files (.wsp) files at Net20\SharePointv2\. Now upgrade the 4 solution files (Ascentn.SharePoint.SettingsList.wsp, Ascentn.SharePoint.WebParts.wsp, Ascentn.SharePoint.WFIntegration.wsp, Ascentn.SharePoint.ListForm.wsp) individually using the command line example below:

stsadm -o upgradesolution -name

     Ascentn.SharePoint.SettingsList.wsp -filename

     Ascentn.SharePoint.SettingsList.wsp –immediate -allowgacdeployment

After upgrading the solution files, run this command:

stsadm -o copyappbincontent

 

This situation can easily happened when the person first installed the SharePoint Integration left the company and did not left any documentation about what he had done. I strongly recommend you to keep the documentation and records for each upgrade you have performed, so that you can pass on the info to the person who will be doing the next upgrade.

Tuesday, July 26, 2011

API and Event available in AgilePoint Express Edition

 

There are API and Event available in AgilePoint Express Edition.

It is about human task. In the real scenario/real world, when the task is assigned to someone, it does not mean assignee will start to work on the assignment immediately. AgilePoint captures the date assigned and date completed, but it does not keep the timestamp that assignee actually starts to work on the task.

API

In this enhancement, AgilePoint provides a new API ActivateWorkItem(workItemID, bool activate, string clientData) so, application can make web service call of this function to mark user starts working on the work. In some case, it could be captured when user open the form or other ways, for example, a button on the form because user might want to check the form first and then decide to start working immediately. If user regret, application can call same web service call and activate=false, which will deactivate the work item. Behind scene, when work item gets activated, the table WF_MANUAL_WORKITEMS.ACTIVATED_DATE will be set for activation, otherwise it will be reset if it is deactivated. Beside web service API, service API is also available.

EVENT for AgileWork and AgileExtender

ActivateWorkItem call would fire an event of ‘ActivateWorkItem’, currently AgileWork and AgileExtender is able to capture the event and take certain action.

Friday, July 22, 2011

Hiding AgilePoint Setting List Feature in MySite

 

AgilePoint Setting List is used to stored all the configuration info for AgilePoint Integration for SharePoint. The access to this list shall be limited to SharePoint Administrators only.

There is a case where some end users accidentally activate this feature at their personal site, i.e. Mysite. This adds additional AgilePointSettingUrl entry in the SharePoint web.config, which messes up the configuration for SharePoint Integration.

Here is how you can hide AgilePoint Setting List Feature in MySite, so that the users do not accidently activate or deactivate it. You can add an extra attribute Hidden="TRUE" in the feature.xml file of AgilePoint Settings List Feature to hide the feature from your end users.

The default location of the feature.xml is:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES\AgilePointSettingsListFeature\feature.xml

 

Here is the sample content of the feature.xml. Add the Hidden="TRUE" at the Feature node.

<?xml version="1.0" encoding="utf-8" ?>

<Feature  Id="A379136F-8742-4f0c-9D5A-9310A4D2B80C"

                                  Title="$Resources:Feature_Title"

                                  Description="$Resources:Feature_Description"

                                  ImageUrl="AgilePoint\AgilePoint_Feature_logo.jpg"

                                  Version="12.0.0.0"

                                  Scope="Site"

                                  ReceiverAssembly="Ascentn.SharePoint.SettingsList, Version=1.0.0.0, Culture=neutral,

PublicKeyToken=f1099b605f3ea558"

                                  ReceiverClass="Ascentn.SharePoint.SettingsList.AgilePointSettingsFeatureReceiver"

                                  xmlns="http://schemas.microsoft.com/sharepoint/"

                  Hidden="TRUE">

                <ElementManifests>

                                <ElementManifest Location="ListTemplates\AgilePointSettingsElements.xml" />

                </ElementManifests>

</Feature>

Hyper-V Errors

The issue:

This happened after converting a vhd from Virtual Server 2005 to Hyper-V.

Projects in Visual Studio.NET 2008 can be built. No error message. The devenv.exe process occupied almost 100% of the CPU and keep running forever.

The attamp to repair Visual Studio 2008 does not help, but instead below error is shown.

“The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2908.”

clip_image001

Here is another error encountered.

“The procedure entry point CorGetSvc could not be located in the dynamic link library mscoree.dll”

clip_image002

The solution:

Go to Add/Remove Program, repair .NET Framework 3.5 SP1.