I'm working on a hack to the DotNetNuke Events module. I've got the source set up and it built A-OK without modifications. However, when I change the EventMonth.ascx file, Visual Studio updates the .designer.vb file associated with it... and declares two objects with the wrong type! It looks like this:
Protected WithEvents EventIcons As Global.System.Web.UI.UserControl
And should look like this:
Protected WithEvents EventIcons As Global.DotNetNuke.Modules.Events.EventIcons
Obviously, this is not going to work... the compiler (rightly) throws an error where EventIcons is used in the code. What causes this? I could easily fix it manually, but then of course it will just break again later. I don't think it is the fact that the control's ID is the same as the class name, because the same thing happens with another instance of the same control, but with a different name.
Update: OK... I believe this is happening because the referenced user control cannot be found at design-time. But it obviously works at run-time:
<%@ Register TagPrefix="evt" TagName="Icons" Src="~/DesktopModules/Events/EventIcons.ascx" %>
This makes logical sense... but I guess the question then becomes "what does ~ resolve to at design-time?" I guess I can change this to simply "EventIcons.ascx" and it will generate code OK. But will it work at runtime? :|