0
我有一個名爲Resources1.resx的resx文件,這個文件是類庫Test.WebControls中的位置,這是我如何試圖從使用vb.net的resx文件中獲取值。使用asp.net resx文件
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports API.HTML.Controls
Imports API
Public Class BaseCallbackPageControl
Inherits Controls.BasePageControls
Private _ResourceManager As Resources.ResourceManager
Public Function GetResource(ByVal key As String) As String
If Me._ResourceManager Is Nothing Then
Me._ResourceManager = New Resources.ResourceManager("Resource1.resx", Reflection.Assembly.GetExecutingAssembly)
End If
Return Me._ResourceManager.GetString(key)
End Function
End Class
但我不斷收到錯誤「找不到適合指定區域性或中性文化的任何資源。確保‘Resource1.resx.resources’正確嵌入或鏈接到程序集‘Test.WebControls’在編譯時,或者所有需要的衛星組件都可以加載並完全簽名。「
resx文件也作爲資源嵌入。
我在做什麼錯?