Error adding localised resources to an Umbraco 4 .net Web User Control
Hi,
I'm new to Umbraco, and am creating a custom .NET control to use in my site. I am using Umbraco version 4 (umbraco v 4.0.2.1 (Assembly version: 1.0.3441.17657))
I am going through the "Using .NET user controls" video, and hit a couple of bumps. First, I had to add <form runat="server"></form> tags to my master pages, which isn't done in the video (I assume because the video is for v3). The second is the localised text part of the video.
I have added the App_GlobalResources folder, and added a resource file with some default text, as is done in the video. However, after recompiling and deploying to Umbraco, I get this error:
---
Could not load file or assembly 'App_GlobalResources' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'App_GlobalResources' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 40: get {
Line 41: if (object.ReferenceEquals(resourceMan, null)) {
Line 42: global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Resources.UmbracoHelloWorld", global::System.Reflection.Assembly.Load("App_GlobalResources"));
Line 43: resourceMan = temp;
Line 44: }
---
Does anyone know what is happening?
Regards,
Shane
Error adding localised resources to an Umbraco 4 .net Web User Control
Hi, I'm new to Umbraco, and am creating a custom .NET control to use in my site. I am using Umbraco version 4 (umbraco v 4.0.2.1 (Assembly version: 1.0.3441.17657)) I am going through the "Using .NET user controls" video, and hit a couple of bumps. First, I had to add <form runat="server"></form> tags to my master pages, which isn't done in the video (I assume because the video is for v3). The second is the localised text part of the video. I have added the App_GlobalResources folder, and added a resource file with some default text, as is done in the video. However, after recompiling and deploying to Umbraco, I get this error: --- Could not load file or assembly 'App_GlobalResources' or one of its dependencies. The system cannot find the file specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'App_GlobalResources' or one of its dependencies. The system cannot find the file specified. Source Error: Line 40: get { Line 41: if (object.ReferenceEquals(resourceMan, null)) { Line 42: global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Resources.UmbracoHelloWorld", global::System.Reflection.Assembly.Load("App_GlobalResources")); Line 43: resourceMan = temp; Line 44: } --- Does anyone know what is happening? Regards, Shane
Hello Shane,
I'm in the same way of implement resource files to custom controls. Have you found a solution to your problem?
I'm having the same problem right now. I wonder where I'd import it. (app_GlobalResources)
is working on a reply...