Embedded resource file naming

  • Thread starter Thread starter richlm
  • Start date Start date
R

richlm

If I embed a resource with filename "test_cs.xslt" in my c# project,
Assembly.GetExecutingAssembly.GetManifestResourceNames works as expected.

If I change the filename to "test.cs.xslt" I get 0 items.

Is there a good reason for this behaviour or is it a bug?
 
in my opinion it depends on how vs embeds the resources.
take a look at your exe with ildasm.
first compile with test_cs.xslt and watch it.
then with test.cs.xslt.
with _ i think the resource is embedded as a local resource.

test_cs should be embedded as projectname.test_cs.resources
test.cs should be embedded as projectname.test.cs.resources

for vs these are two different "namespaces"

hope this helps. not sure, but i think so

greetings
 
Back
Top