我创建了一个 Silverlight 业务应用程序并希望使用 App_GlobalResources。
这些资源位于同一个项目 (TestApp.Web) 中。试图通过 System.Resources 使用一些资源。在一个类中不起作用,因为没有列出类。
我只看到 RegistrationDataResources 和 ValidationErrorResources。
也许你有一个想法?
编辑:使用 Resources.te23。出现错误。“Type or Namspace te23 is not available in TestApp.Web.Resources”(翻译成英文)
“te23”资源的内容(我删除了评论)。
namespace Resources {
using System;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "10.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class te23 {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal te23() {
}
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Resources.te23", global::System.Reflection.Assembly.Load("App_GlobalResources"));
resourceMan = temp;
}
return resourceMan;
}
}
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
internal static string test {
get {
return ResourceManager.GetString("test", resourceCulture);
}
}
}
}