为什么我会得到App_GlobalResources文件组件产生的? (错误= CS0433) [英] Why am I getting App_GlobalResources assembly generated? (Error = CS0433)

查看:404
本文介绍了为什么我会得到App_GlobalResources文件组件产生的? (错误= CS0433)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个ASP.NET MVC2项目,为此我如下配置本地化...



我有一个单独的资源集,包括我所有的RESX文件。每个RESX文件中的设置...

I'm working on a ASP.NET MVC2 project, for which I have configured the localisation as follows ...


I have a separate Resources assembly, containing all my resx files. The settings for each resx file are...


Build Action             = Embedded Resource
Copy to Output Directory = Do not copy
Custom Tool              = PublicResXFileCodeGenerator
Custom Tool Namespace    = Resources

我有一个工具,其中出口字符串从数据库到文件RESX并调用resgen.exe工具来重新创建designer.cs文件。

I have a tool which exports the strings from a database into the resx files and calls the resgen.exe tool to recreate the designer.cs file.

这一切伟大的工作,甚至当我改变了我的浏览器的语言设置和刷新页面。它会选择正确的字符串。

This all worked great, even when I changed the language settings of my browser and refreshed the page. It would pick up the correct strings.

这是一个临时的工作文件夹(我用颠覆)。现在我已经搬到了我的正常工作文件夹和我得到一个相当奇怪的错误。

That was in a temporary working folder (I use subversion). I've now moved to working in my normal folder and am getting a rather odd error.

编译器错误信息:CS0433:本
  类型'Resources.XXXX存在
  都
  C:\\ WINDOWS \\ Microsoft.NET \\ Framework64 \\ v4.0.30319 \\临时
  ASP.NET
  文件\\ ROOT \\ 6c657d01 \\ aaca70ae \\装配\\ DL3 \\ a36dac65 \\ 78c87110_3724cb01 \\ Resources.DLL
  和
  C:\\ WINDOWS \\ Microsoft.NET \\ Framework64 \\ v4.0.30319 \\临时
  ASP.NET
  文件\\ ROOT \\ 6c657d01 \\ aaca70ae \\ App_GlobalResources.g6fehiio.dll

Compiler Error Message: CS0433: The type 'Resources.XXXX' exists in both 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\6c657d01\aaca70ae\assembly\dl3\a36dac65\78c87110_3724cb01\Resources.DLL' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\6c657d01\aaca70ae\App_GlobalResources.g6fehiio.dll'

我已删除了我所有的临时文件,asp.net,重新运行Web应用程序,它再生上述组件两者。真正奇怪的是之前,我搬到了我平时的工作文件夹,这一切工作。

I have deleted all of my temporary asp.net files, re-run the web app and it regenerates both of the above mentioned assemblies. The really odd thing is that this all worked before I moved to my usual working folder.

那么,谁能告诉我什么是生成此App_GlobalResources文件汇编,我不需要或不想要的,因为我所有的资源都包含在汇编我创建了资源。

So, can anyone tell me what is generating this App_GlobalResources assembly, which I don't need or want, because all my resources are contained in the Resources assembly I've created.

PS - 我Resources.dll去的原因是得到解决,我用我的数据库提取工具生成的资源有问题。 (见<一href=\"http://stackoverflow.com/questions/3230585/run-custom-tool-for-resx-files-in-mvc2-project-from-an-external-application-sc\">here)

PS - The reason I went with Resources.dll was to get around a problem I was having with generating the resources using my database extract tool. (see here)

PPS - 我使用VS2010

PPS - I am using VS2010

推荐答案

DOH!

我想,当我打开我的正常工作文件夹的分支,这是中,我有一个App_GlobalResources文件文件夹中的一些文件。

I think when I switched my "usual working folder" to the branch this was in, I had some files in a "App_GlobalResources" folder.

我只是试图创造VS2010一个新的文件夹App_GlobalResources文件,它告诉我已经有一个人也没有,但它不是在Solution Explorer。

I just tried to create a new App_GlobalResources folder in VS2010 and it told me there was already one there, but it wasn't in the solution explorer.

我看着在Windows资源管理器的次数,只是没有看到该文件夹​​。

I looked in windows explorer a number of times and just didn't see that folder.

总之,问题就解决了​​!

Anyway, problem solved!

道德:不信任的解决方案资源管理器或开关SVN删除不要在工作拷贝属于文件:(

moral: don't trust solution explorer or svn switch to delete files that don't belong in the working copy :'(

这篇关于为什么我会得到App_GlobalResources文件组件产生的? (错误= CS0433)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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