我在網絡上發現了一個.NET 4.0的免費程序,但必須複製代碼才能編譯VS2008。我正在考慮文化在.NET版本中的處理方式。 我得到這個錯誤:.NET 4.0到3.0找不到適用於指定文化或中性文化的任何資源
System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "A.B.C.Resources.ExceptionMessage.resources" was correctly embedded or linked into assembly "A.B.C.csproj" at compile time, or that all the satellite assemblies required are loadable and fully signed.
這是一個C#.dll文件(類庫),而我從一個控制檯程序調用它。 它有一個強鍵文件分配給它。
它炸燬任何聲明如下:
return ResourceManager.GetString("XYZ");
它看起來像所有的資源都是英文的,這就是我唯一需要的語言。 我只是在尋找如何避免異常。
您是否也複製了原始項目的資源? – svick 2012-02-13 15:54:40
這聽起來像項目解決方案不完整。這與.NET 4.0/3.0無關,因爲你的結論是錯誤的,ResourceManager類沒有改變。即使它確實......它仍然會得到支持。 – 2012-02-13 15:58:20
是的,我複製了資源文件,並剛剛同步了AssemblyInfo.cs文件。關於什麼可能不完整的提示? – NealWalters 2012-02-13 17:01:28