Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Here is what i have been struggling with.

I am replacing the OOTB SharePoint 2010 People Picker Control with a custom People Picker.

There are 2 projects in my Solution. One that adds an application page and another that actually replaces People Picker.

Everything compiles without an error. Also, i use the Solution1 reference in Solution2 as i have some common classes that im re-using from Sol1 in Sol2. The Error occurs even if i do not use a reference of Sol1 in Sol2.

When i deploy it in Debug mode through VS2010. I am ble to see the Custom Application Page(Uses SPPersisted Objects to store Custom Properties to Property Bag) and it works great.

But when i open the people picker from the site, it throws 'An error occurred during the compilation of the requested file, or one of its dependencies. The type or namespace name 'Custom_People_Picker_Control' could not be found in the global namespace (are you missing an assembly reference?).

I was expecting that it would hit my one of debug points in the People Picker Control Logic i have, but it doesn't and simply throws the error above.

I have cheked it in GAC and both the dlls are deployed and version number also matches. Both solutions are compiled against .Net 3.5.

I couldnt figure out what might be missing. Any help will be greatly appreciated.

share|improve this question

2 Answers 2

Here is what i did in my FeatureEventReceiver + FeatureActivated Event

            string Asm_modificationName = string.Format(@"add[@assembly='{0}']", Assembly.GetExecutingAssembly().FullName);
            SPWebConfigModification Asm_modification = new SPWebConfigModification(Asm_modificationName, "configuration/system.web/compilation/assemblies");
            Asm_modification.Path = "configuration/system.web/compilation/assemblies";
            Asm_modification.Value = string.Format(@"<add assembly=""{0}"" />", Assembly.GetExecutingAssembly().FullName); ;
            Asm_modification.Owner = ownerID;
            Asm_modification.Sequence = 0;
            Asm_modification.Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode;
            webApp.WebConfigModifications.Add(Asm_modification);
share|improve this answer

Did you remember to include a import statement in your page?

<%@ Import Namespace="Solution2.Custom_People_Picker_Control" %>
share|improve this answer
    
Thanks for the reply, but do i need to add a import statement ? I was adding a tag mapping in web.config as below : <add tagType='Microsoft.SharePoint.WebControls.PeopleEditor' mappedTagType='Custom_People_Picker_Control.CustomPeoplePicker," + Assembly.GetExecutingAssembly().FullName + "'/>" –  Navin Kanus Jan 16 '13 at 15:22
    
After some searching i realized that i missed a simple step, i forgot to add a reference to my assembly in web.config for the web it is deployed to. –  Navin Kanus Jan 24 '13 at 16:10

Your Answer

 
discard

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.