locked
Can't get Microsoft.Search.Interop to work for me

    Question

  • With Win7 x64, VS2008 Pro, all fully patched.  Latest Win7 SDK samples. Trying to get the DSearch sample to work. Downloaded the Windows Search3x SDK to get Microsoft.Search.Interop.dll. Added to FW 3.5 GAC. VS did not find the referenced assembly in the GAC.

    Removed the reference to Microsoft.Search.Interop.dll and added a reference to the original Microsoft.Search.Interop.dll from the Search3x download.

    On building the DSearch sample, received the following error:

    "%MSSdk%\Bin\tlbimp.exe" "%MSSdk%\Lib\SearchAPI.tlb" /namespace:Microsoft.Search.Interop /out:Microsoft.Search.Interop.dll /silent

    The system cannot find the path specified.

    C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(895,9): error MSB3073: The command ""%MSSdk%\Bin\tlbimp.exe" "%MSSdk%\Lib\SearchAPI.tlb" /namespace:Microsoft.Search.Interop /out:Microsoft.Search.Interop.dll /silent" exited with code 3.

    Done building project "DSearch.csproj" -- FAILED.

    As far as I can tell, everyone else just adds the ref and all is OK.

    What am I doing wrong???

    Tuesday, May 11, 2010 5:32 AM

All replies

  • Hi HardWay,

    The sample refers a DLL which is created dynamically from a type library. Unfortunately, the macro %MSdk% is not defined in the sample shipped with the Win7 SDK. Open the properties of the DSearch-project and change the "Pre-build event command line" in the "Build Events" section to

    set MSSdk=c:\Program Files\Microsoft SDKs\Windows\v7.1
    
    "%MSSdk%\Bin\tlbimp.exe" "%MSSdk%\Lib\SearchAPI.tlb" /namespace:Microsoft.Search.Interop /out:Microsoft.Search.Interop.dll /silent

    I hope this helps?

    Best regards,
    Chris

    Friday, June 11, 2010 5:58 AM