从视觉工作室外部编译我的 resx 文件
我在 dll 中有一些资源文件 (.resx)。
这个dll是从我的网站引用的,编译会在我的“UserControlResource.de.resx”的\bin\language文件夹中创建一个“admin.UserControlResource.dll”dll,
现在我有一些新的资源文件(.resx文本文件) ,我想将它们编译成新的 dll,在我的项目之外,这样我就能够将这些 dll 复制到我的生产服务器。
我尝试了 resgen.exe,但这不允许我为生成的文件指定 .dll 扩展名。
我尝试了另一个扩展名并将其重命名为 .dll,但这不起作用。
这就是我尝试过的:
resgen UserControlResource.de.resx
al.exe /t:lib /culture:de /embed:"UserControlResource.de.resources" /out:"Dwight.UserControl.resources.dll"
我已经看到(在示例中)al.exe 在使用和不使用 /t:lib 的情况下执行,但两者都不起作用。
“不起作用”是什么意思?
resgen 创建一个 .resources 文件
al.exe 创建一个 dll 并且不显示任何警告,
但是当我将 dll 复制到服务器时,将使用默认的英语资源,而不是德语(de)资源。
i have a few resource files (.resx) in a dll.
this dll is referenced 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来您想要创建附属程序集并部署这些附属程序集。 MSDN 上对该过程以及需要考虑的内容有很好的解释:
http://msdn.microsoft.com/en -us/library/sb6a8618%28v=vs.80%29.aspx
希望有帮助:)
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 :)
我发现了一系列对我有用的 resgen.exe 和 al.exe 命令:
Resgen.exe:
输出:
Al.exe:
输出:
此输出是一个 dll,可以将其包含到发布版本中,而无需使用 Visual Studio。
I found a sequence of resgen.exe and al.exe commands that worked for me:
Resgen.exe:
Output:
Al.exe:
Output:
The output of this is a dll that can be included into the released version without using Visual Studio.