本文介绍了嵌入式资源名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在嵌入式resorce名称C#默认行为是这样的

In c# default behaviour of embedded resorce name is like this

<default namespace.><extended namespace.><filename>

在不改变项目的defaultName中的空间,我可以控制的嵌入式资源的名称?

Without changing the defaultname space of project can i control the name of embedded resource?

推荐答案

要做到这一点的方法是相当简单的,但你必须编辑Visual Studio项目在文本编辑器(的csproj或vbproj)文件。请参见这个MSDN博客帖子

The way to do this is quite simple, but you will have to edit the Visual Studio Project (csproj or vbproj) file in a text editor. See this msdn blog post.

下面是相关的XML片断:

Here is the relevant xml snippet:

<ItemGroup>
  <EmbeddedResource Include="bar.resx">
      <LogicalName>notfoo.bar.resources</LogicalName>
  </EmbeddedResource>
</ItemGroup>

这篇关于嵌入式资源名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-27 12:27
查看更多