Problem adding a reference via Register directive

Joined
Sep 16, 2008
Messages
2
Reaction score
0
I need to modify an .aspx page to include a custom toolbar. The toolbar was created as a User Control, compiled as MyCompany.Tool.dll (strongly named) and added to the GAC. I have referenced it in the .aspx page as follows:

<%@ Register Tagprefix="mycompany" Namespace="Tools" Assembly="MyCompany.Tools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60642d8f43fa6635" %>
<%@ Import Namespace="Tools" %>

In the aspx page, it is called as follows:
<mycompany:HeaderControl ID="CreateHeader" runat="server" />

The following is automatically generated in the .aspx.designer.cs page:
protected global::Tools.HeaderControl CreateHeader;

I've added the following to the web.config file in the project:
<compilation debug="true">
<assemblies>
<add assembly="MyCompany.Tools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60642d8f43fa6635"/>
</assemblies>
</compilation>

<pages>
<namespaces>
<add namespace="Tools" />
</namespaces>
<controls>
<add tagPrefix="mycompany" namespace="MyCompany.Tools" assembly="Tools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60642d8f43fa6635"/>
</controls>
</pages>

When I compile, I get the following error:
The type of namespace name 'Tools' could not be found in the global namespace (are you missing an assembly reference?)

I can't figure out what I'm missing. All my searching has led to instructions indicating this is how it should be done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top