代码之家  ›  专栏  ›  技术社区  ›  Prince Ashitaka

找不到任何适合指定区域性或非特定区域性的资源。-资源文件共享问题

  •  1
  • Prince Ashitaka  · 技术社区  · 14 年前

    我有一个普通的班级图书馆。最近,我本地化了这个类库。

    我还有另一个Silverlight类库,它基本上是一个 链接文件项目

    <Link>Reports\Reports.cs</Link>
    

    在这一点上,我包含了相同的resx文件作为链接引用,因为我做了其他文件。在运行时,它抛出以下异常。

    Could not find any resources appropriate for the specified culture or the neutral culture.  
    Make sure "BCL.Resources.BCLNamespace.resources" was correctly embedded
     or linked into assembly "SilverlightBCL" at compile time, or that all the 
     satellite assemblies required are loadable and fully signed.
    
    2 回复  |  直到 14 年前
        1
  •  1
  •   Prince Ashitaka    14 年前

    保持Assembly2(SilverlightBCL)中的默认命名空间与Assembly1(BCL)相同可以修复此问题。 谢谢大家:)

        2
  •  1
  •   Teck Phoon    11 年前

    在[文件名]中。设计师.cs,它可以是以下内容之一:

    • 命名空间

      namespace Company.Dept.MyApp.Resource {
          // Your code here.
      }
      
    • 资源经理

      new global::System.Resources.ResourceManager(
          "Company.Dept.MyApp.Resource.Templates", 
          typeof(Templates).Assembly);