wpf localization - locbaml - file is being used by another process

0

I have been looking hours for a solution, but I donĀ“t find it. I want to generate a satellite assembly with following command.

locbaml.exe /generate de/App.UI.resources.dll /trans:MeineRess_de.csv /out:de /cul:de

After executing I get following error:

The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)

Can anybody help me, Thx

wpf
localization
locbaml
asked on Stack Overflow May 15, 2017 by Dev Knight • edited May 15, 2017 by Parag

2 Answers

0

Output to a separate folder try for example c:\ this would work

locbaml.exe /generate de/App.UI.resources.dll /trans:MeineRess_de.csv /out:c:\ /cul:de

answered on Stack Overflow Feb 23, 2018 by Geniuslead • edited Feb 23, 2018 by sissy
0

For posterity: The file name without any command line flag is the original input assembly. So you're reading in de/App.UI.resources.dll and then /out:de is trying to write to the same file in the same folder. Probably you want to change de/App.UI.resources.dll to [UiCulture]/App.UI.resources.dll where [UiCulture] is the <UICulture> from your project file, which should match the NeutralResourcesLanguage attribute in your assembly (AssemblyInfo.cs normally).

Perhaps you legitimately want to overwrite the original DLL (though I don't think that makes sense), but this will not be possible as-is because locbaml will load the assembly from file, which holds the file handle open until the application exits. (Technically until the AppDomain is destroyed.)

answered on Stack Overflow Jul 14, 2018 by IceGlasses

User contributions licensed under CC BY-SA 3.0