471,612 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,612 software developers and data experts.

namespaces, folders, and embedded files

Hello All,
I'm getting into nHibernate for a project at work. I've organized my xml
files into a folder within the project and have chosen to embed them into
the assembly. However, the nHIbernate framework cannot find the xml files
because they are in the "folder". Could someone explain how namespaces and
folders work with the compiler? Or could offer any tips?

Many thanks to all,
Patrick
Feb 17 '06 #1
3 1283
Ok, I found a method called AddResource("resource name").
I need to re-phrase my question. How do you reference a resource that is in
a "folder"?

Many thanks to all,
Patrick

"Patrick" <cparker@noharvesting> wrote in message
news:Oo**************@TK2MSFTNGP14.phx.gbl...
Hello All,
I'm getting into nHibernate for a project at work. I've organized my xml
files into a folder within the project and have chosen to embed them into
the assembly. However, the nHIbernate framework cannot find the xml files
because they are in the "folder". Could someone explain how namespaces and
folders work with the compiler? Or could offer any tips?

Many thanks to all,
Patrick

Feb 17 '06 #2
lets say your projects' namespace is ScaryApp and within the project you have
a folder called ScaryStuff and there you have an icon Scary.ico. So in order
to access that resouce you call it like that:
"ScaryApp.ScaryStuff.Scary.ico". As you can see, you CAN have stuff placed in
folders and access them as embedded resources and all the slashes are
replaced by full stops.

"Patrick" wrote:
Ok, I found a method called AddResource("resource name").
I need to re-phrase my question. How do you reference a resource that is in
a "folder"?

Many thanks to all,
Patrick

"Patrick" <cparker@noharvesting> wrote in message
news:Oo**************@TK2MSFTNGP14.phx.gbl...
Hello All,
I'm getting into nHibernate for a project at work. I've organized my xml
files into a folder within the project and have chosen to embed them into
the assembly. However, the nHIbernate framework cannot find the xml files
because they are in the "folder". Could someone explain how namespaces and
folders work with the compiler? Or could offer any tips?

Many thanks to all,
Patrick


Apr 19 '06 #3
and if you don't know exactly how to access the resources, then this method
gives you all the resources with their addresses:
Assembly.GetExecutingAssembly().GetManifestResourc eNames()

hope this helps

"Patrick" wrote:
Ok, I found a method called AddResource("resource name").
I need to re-phrase my question. How do you reference a resource that is in
a "folder"?

Many thanks to all,
Patrick

"Patrick" <cparker@noharvesting> wrote in message
news:Oo**************@TK2MSFTNGP14.phx.gbl...
Hello All,
I'm getting into nHibernate for a project at work. I've organized my xml
files into a folder within the project and have chosen to embed them into
the assembly. However, the nHIbernate framework cannot find the xml files
because they are in the "folder". Could someone explain how namespaces and
folders work with the compiler? Or could offer any tips?

Many thanks to all,
Patrick


Apr 19 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.