if you don't have a DLL it might be worth creating a new Web Application project in VS, adding just your code (ascx and code-behind) for the file and see what happens when you build it. Chances are good that you will get the error, as this is exactly what the web site is doing.
Another reason for this behaviour would be that the control was build with the wrong .Net version, or better that you are running your Umbraco installation on a different .Net version than were the usercontrol was supposed to be running with. Might be worth investigating into.
Maybe you are missing an assembly reference aka a foreign dll that the code relies on and you haven't copied over? E.g. if you are using an object of type 'Address' but it's defined in the dll you are missing the compiler wouldn't know what 'Address' is and might therefore tell you that a type is missing. All speculation though as it would probably stumble over the missing assembly for the assembly reference first.
aspx user control error
Hi - I keep getting an error with a new aspx user control I have had made:
System.Web.HttpCompileException: c:\HostingSpaces\domain\jjjj.com\wwwroot\usercontrols\OnlineApplicationForm.ascx(41): error CS1031: Type expected at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at umbraco.developer.assemblyBrowser.Page_Load(Object sender, EventArgs e)
The error CS1031 says that my syntax is incorrect - but I have seen this working on another install of umbraco.
It was a different template setup on the other install... could that be a problem?
Did you upload your DLL?
There is no DLL for this usercontrol.
I am checking all other paths though to see if something else is missing
Hi Tye,
if you don't have a DLL it might be worth creating a new Web Application project in VS, adding just your code (ascx and code-behind) for the file and see what happens when you build it. Chances are good that you will get the error, as this is exactly what the web site is doing.
Another reason for this behaviour would be that the control was build with the wrong .Net version, or better that you are running your Umbraco installation on a different .Net version than were the usercontrol was supposed to be running with. Might be worth investigating into.
Maybe you are missing an assembly reference aka a foreign dll that the code relies on and you haven't copied over? E.g. if you are using an object of type 'Address' but it's defined in the dll you are missing the compiler wouldn't know what 'Address' is and might therefore tell you that a type is missing. All speculation though as it would probably stumble over the missing assembly for the assembly reference first.
Hope that helps somehow,
Sascha
Another reason for this behaviour would be that the control was build with the wrong .Net version
Spot on Sascha - that was the problem :(
Thanks
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.