please before digging your code did you verify that the environment is correctly configured?
Are you able to correctly run one of the internal demos?
Are you able to correctly run the .NET version of the PortfolioDemo?