i have a few resource files (.resx) in a dll.
this dll is re开发者_如何学运维ferenced from my website, and compiling creates a 'admin.UserControlResource.dll' dll in my \bin\language folder from my 'UserControlResource.de.resx'
now i have some new resource files (the .resx text file), and i want to compile them into new dll's, outside my project, so i will able to just copy those dll's to my production server.
i tried resgen.exe, but that won't allow me to specify the .dll extension for the generated file.
i tried another extension and rename it to .dll, but that didn't work.
this is what i tried:
resgen UserControlResource.de.resx
al.exe /t:lib /culture:de /embed:"UserControlResource.de.resources" /out:"Dwight.UserControl.resources.dll"
i've seen (in examples) al.exe been executed with and without /t:lib, but both don't work.
what do i mean with 'dont work'?
resgen creates a .resources file
al.exe creates a dll and shows no warnings
but when i copy the dll to the server the default english resources are used, and not the german (de) ones.
Sounds like you want to create satellite assemblies and deploy those satellite assemblies. Theres a good explanation of the process and what you need to consider on MSDN: http://msdn.microsoft.com/en-us/library/sb6a8618%28v=vs.80%29.aspx
Hope that helps :)
I found a sequence of resgen.exe and al.exe commands that worked for me:
Resgen.exe:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\ResGen.exe" Strings.resx
Output:
Read in 10 resources from "Strings.resx"
Writing resource file... Done.
Al.exe:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\al.exe" /t:lib /embed:Strings.resources /culture:en /out:Strings.dll
Output:
Microsoft (R) Assembly Linker Version 12.0.20806.33440
Copyright (C) Microsoft Corporation. All rights reserved.
The output of this is a dll that can be included into the released version without using Visual Studio.
精彩评论