SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question arises as a result of this question, but I thought I would split it out into its own.

Anything using SPUtility.GetGenericSetupPath() is returning null, e.g.


both return null. If I make those calls in a little console app and debug it in VS2008, it appears to execute fine with no exceptions (albeit with null returned from the method.) However I notice a message in the output window:

A first chance exception of type 'System.DllNotFoundException' occurred in Microsoft.SharePoint.dll

So if I get Visual Studio to break on all exceptions, even handled ones, the exception is as follows:

System.DllNotFoundException: Unable to load DLL 'onetnative.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I've checked and onetnative.dll does exist in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN.

share|improve this question

I would try copying the onetnative.dll to the same place as your console app and see if it makes a difference

share|improve this answer
up vote 0 down vote accepted

As far as I can trace it back, this was caused by an installation of the wrong version of Microsoft J#.

J# is a pre-requisite of the Citrix Web Interface for SharePoint webparts. I installed the 32bit version mistakenly, then uninstalled and installed the 64bit version. I have a hunch (based on a good bit of testing, but not 100% verified) that this caused .NET/CLR applications to start looking in the 32bit node of the registry rather than 64bit.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.