Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Problem referencing embedded resource

Problem referencing embedded resource

Scheduled Pinned Locked Moved .NET (Core and Framework)
databasehardwarehelpquestionlearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dBrong
    wrote on last edited by
    #1

    How does one get the assembly's Namespace Name? I embedded some SQL scripts in an assembly. The assembly name is "AAI_TK1", it is in the "ArchiveXpress20" namespace. Dim asm As System.Reflection.[Assembly] = System.Reflection.[Assembly].GetExecutingAssembly() --> this returns "AAI_TK1" ----> asm.GetName().Name However the Resource names are prefixed with the namespace --> "ArchiveXpress20.Script1.SQL" ----> GetManifestResourceNames() I didn't want to hardcode the namespace. How can you get your namespace?

    L 1 Reply Last reply
    0
    • D dBrong

      How does one get the assembly's Namespace Name? I embedded some SQL scripts in an assembly. The assembly name is "AAI_TK1", it is in the "ArchiveXpress20" namespace. Dim asm As System.Reflection.[Assembly] = System.Reflection.[Assembly].GetExecutingAssembly() --> this returns "AAI_TK1" ----> asm.GetName().Name However the Resource names are prefixed with the namespace --> "ArchiveXpress20.Script1.SQL" ----> GetManifestResourceNames() I didn't want to hardcode the namespace. How can you get your namespace?

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, I recently had the same problem. My solution so far is creating an object OBJ of a type defined in the same namespace, and then use OBJ.GetType().NameSpace I too would prefer a simpler solution... :) -- modified at 17:10 Thursday 7th December, 2006

      Luc Pattyn

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups