Web Develop Wolf
Web Develop Wolf

Reputation: 6316

Resource File not recognised by Intellisence

I have three resource files in a Resource folder which are Account, Home and Novel. When coding the only resource file I can find with:

Resources.

Is the Home file. I have all three set to public and as far as I can see there's no difference between the three.

Home Designer File:

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Resources.Home {
    using System;


    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    public class Home {

        private static global::System.Resources.ResourceManager resourceMan;

        private static global::System.Globalization.CultureInfo resourceCulture;

        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Home() {
        }

        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        public static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TheNovelMachine.Resource.Home", typeof(Home).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }

        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        public static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to &lt;h1&gt;Your &lt;span&gt;Story&lt;/span&gt; Starts &lt;span&gt;Here&lt;/span&gt;...&lt;/h1&gt;.
        /// </summary>
        public static string Heading {
            get {
                return ResourceManager.GetString("Heading", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec blandit purus varius est ornare vehicula. Sed eget hendrerit justo, nec pulvinar quam. Etiam eget tellus nunc. Nullam fermentum nunc enim, at placerat eros convallis eget. Aenean sed elit non nisl tempor molestie. Fusce porta est ut sem faucibus tincidunt. Ut facilisis dapibus lacus, sed mattis justo accumsan et.&lt;/p&gt;
        ///
        ///    &lt;p&gt;Sed ut lobortis sapien. Morbi sit amet nulla non leo pharetra aliquam. Cras vel laoreet orci, ac imperdiet quam. Pell [rest of string was truncated]&quot;;.
        /// </summary>
        public static string Intro {
            get {
                return ResourceManager.GetString("Intro", resourceCulture);
            }
        }
    }
}

Novel Designer File:

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace TheNovelMachine.Resource {
    using System;


    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    public class Novel {

        private static global::System.Resources.ResourceManager resourceMan;

        private static global::System.Globalization.CultureInfo resourceCulture;

        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Novel() {
        }

        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        public static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TheNovelMachine.Resource.Novel", typeof(Novel).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }

        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        public static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to We want to know what it&apos;s all about!.
        /// </summary>
        public static string AbstractRequired {
            get {
                return ResourceManager.GetString("AbstractRequired", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Action and Adventure.
        /// </summary>
        public static string GenreAction {
            get {
                return ResourceManager.GetString("GenreAction", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Children&apos;s.
        /// </summary>
        public static string GenreChildren {
            get {
                return ResourceManager.GetString("GenreChildren", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Drama.
        /// </summary>
        public static string GenreDrama {
            get {
                return ResourceManager.GetString("GenreDrama", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Fantasy.
        /// </summary>
        public static string GenreFantasy {
            get {
                return ResourceManager.GetString("GenreFantasy", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Historical.
        /// </summary>
        public static string GenreHistory {
            get {
                return ResourceManager.GetString("GenreHistory", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Horror.
        /// </summary>
        public static string GenreHorror {
            get {
                return ResourceManager.GetString("GenreHorror", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Mystery.
        /// </summary>
        public static string GenreMystery {
            get {
                return ResourceManager.GetString("GenreMystery", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Choose a Genre, so your novel knows where to live!.
        /// </summary>
        public static string GenreRequired {
            get {
                return ResourceManager.GetString("GenreRequired", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Romance.
        /// </summary>
        public static string GenreRomance {
            get {
                return ResourceManager.GetString("GenreRomance", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Satire.
        /// </summary>
        public static string GenreSatire {
            get {
                return ResourceManager.GetString("GenreSatire", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Sci-Fi.
        /// </summary>
        public static string GenreScifi {
            get {
                return ResourceManager.GetString("GenreScifi", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Your novel needs a name!.
        /// </summary>
        public static string TitleRequired {
            get {
                return ResourceManager.GetString("TitleRequired", resourceCulture);
            }
        }
    }
}

Upvotes: 1

Views: 708

Answers (1)

Ben Rubin
Ben Rubin

Reputation: 7341

They are in different namespaces. Add using TheNovelMachine; to the top of the C# file where you're trying to use those resources, or type Resource somewhere in your code, then right click on it, and at the top of the context menu, you should have an option that says Resolve. Highlight that and it'll give you the option to add using TheNovelMachine;

Alternatively, put your Resource file in your Resources namespace.

Upvotes: 1

Related Questions