'Visual Studio 2022 Build Fail: "ResolveManifestFiles", CultureNotFoundException
I just tried building my old project in vs2019 to newer vs2022 but getting following error and unable to build it.
Can somebody suggest what can be done to resolve the issue?
Severity Code Description Project File Line Suppression State
Error The "ResolveManifestFiles" task failed unexpectedly.
System.Globalization.CultureNotFoundException: Culture is not supported.
Parameter name: name
v4.0_12.0.0.0_de_89845dcd8080cc91 is an invalid culture identifier.
at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
at Microsoft.Build.Tasks.ResolveManifestFiles.GetItemCulture(ITaskItem item)
at Microsoft.Build.Tasks.ResolveManifestFiles.GetOutputAssemblies(List`1 publishInfos, List`1 assemblyList)
at Microsoft.Build.Tasks.ResolveManifestFiles.GetOutputAssembliesAndSatellites(List`1 assemblyPublishInfos, List`1 satellitePublishInfos)
at Microsoft.Build.Tasks.ResolveManifestFiles.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() Kings ERP
Solution 1:[1]
Not sure why, but if you remove "Enable ClickOnce security settings" it'll work.
Regards
Solution 2:[2]
I did some research and finally I found the problematic code in my solution.
I have 198 Projects in my solution, in 197 of them is the line [assembly: AssemblyCulture("")] disabled: //[assembly: AssemblyCulture("")] or the line does not exist at all inside the Assembly.cs.
But in one of my (base) projects I found this: [assembly: AssemblyCulture("en-US")]
After I changed it to: //[assembly: AssemblyCulture("en-US")] everything works fine.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mario Alcaraz |
| Solution 2 | Frank |
