Problem with ApplicationRegistry namespace

Jul 18, 2008 at 7:32 AM
Hi all,

I've created usercontrol that fetches data from bdc application. I'm using following namespaces:

using Microsoft.Office.Server.ApplicationRegistry.MetadataModel;
using Microsoft.Office.Server.ApplicationRegistry.Runtime;
using Microsoft.Office.Server.ApplicationRegistry.SystemSpecific;
using Microsoft.Office.Server.ApplicationRegistry.Infrastructure;

It works fine when I'm using usercontrol in separate webapp, but when I using it with smart part in sharepoint server I get error:

SmartPart 
 
Error: unable to load ~\/UserControls\CustomerWUC.ascx
Details: c:\Inetpub\wwwroot\wss\VirtualDirectories\80\UserControls\CustomerWUC.ascx.cs(11): error CS0234: The type or namespace name 'ApplicationRegistry' does not exist in the namespace 'Microsoft.Office.Server' (are you missing an assembly reference?)

I've added
<%@ Assembly Name="Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
to ascx file.

If a open Microsoft.Office.Server.dll with Reflector, I cannot locate ApplicationRegistry namespace either, but it works fine with separete web.app.

Anyone who could tell me what I'm doing wrong? Thanks!

Jul 18, 2008 at 7:59 AM
Founded my problem. Wrong assembly...  the real one was applicationregistry was Microsoft.SharePoint.Portal. Confusing naming :)