没有将项目的资源dll复制到构建目录 [英] A project's resource dll is not being copied to build directory

查看:49
本文介绍了没有将项目的资源dll复制到构建目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含许多项目的解决方案.

I have a solution which includes many projects.

其中一个项目(我们称其为Wilson)在构建时会创建2个DLL:wilson.dll和fr/wilson.resources.dll.我可以在myStuff/Wilson/bin/Debug/中找到这两个文件.

One of these projects, let's call it Wilson, creates 2 DLLs when built: wilson.dll and fr/wilson.resources.dll. I can find both these files in myStuff/Wilson/bin/Debug/.

当我在myStuff/mySolution/中构建解决方案时,wilson.dll将复制到myStuff/mySolution/App_Data/Dependencies.

When I build my solution in myStuff/mySolution/, wilson.dll gets copied to myStuff/mySolution/App_Data/Dependencies.

但是,不会复制wilson.resources.dll.因此,项目中的任何资源字符串都不会翻译.

However, wilson.resources.dll doesn't get copied over. Because of this, any resource strings from the project are not translated.

如果我将Wilson的wilson.resources.dll手动从Wilson的bin/Debug/fr/目录复制到解决方案的App_Data/Dependencies/fr/目录中,则一切正常.

If I manually copy wilson.resources.dll from Wilson's bin/Debug/fr/ directory into my solution's App_Data/Dependencies/fr/ directory, everything works.

如何使Visual Studio使用wilson.dll通过fr/wilson.resources.dll复制?

How can I get Visual Studio to copy over fr/wilson.resources.dll with wilson.dll ?

更多信息:

我打开了mySolution,在解决方案资源管理器下,我可以找到Wilson项目和Alpha项目.

I have mySolution open, under Solution Explorer I can find the Wilson project, and also the Alpha project.

在Wilson项目下,Resources.fr.resx文件设置为复制到输出目录:始终复制".

Under the Wilson project, the Resources.fr.resx file is set to "Copy to Output Directory : Copy always".

在Alpha项目的引用"下,对Wilson的引用被设置为"Copy Local:True".

Under the Alpha project, under References, the reference to Wilson is set to "Copy Local: True".

它仍然无法正常工作.

推荐答案

查看文件属性(在解决方案资源管理器中,选择项目References"文件夹中的文件,然后按F4键,或右键单击以显示它们).单击复制本地",然后将其设置为true.

Look at the file properties (select file on solution explorer, project References folder, and press F4, or right click on it to show them). Fin "Copy Local" and set it to true.

如果不包含任何引用,则要设置的属性将为复制到输出目录".

If it's nos included as a reference, the property to set will be "Copy to output directory".

这篇关于没有将项目的资源dll复制到构建目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆