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. C#
  4. node EmbeddedResource in *.csproj file?

node EmbeddedResource in *.csproj file?

Scheduled Pinned Locked Moved C#
question
5 Posts 2 Posters 2 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.
  • M Offline
    M Offline
    Morven Huang
    wrote on last edited by
    #1

    Hi all, i looked into several .csproj files today, and i found that node 'EmbeddedResource' are different from each other,i'm curious to know what results in this? anyone have any idea regarding this? (1) <EmbeddedResource Include="Form1.resx"> <DependentUpon>Form1.cs</DependentUpon> </EmbeddedResource> (2) <EmbeddedResource Include="FormAbout.resx"> <SubType>Designer</SubType> <DependentUpon>FormAbout.cs</DependentUpon> </EmbeddedResource> (3) <EmbeddedResource Include="CommonText.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>CommonText.Designer.cs</LastGenOutput> </EmbeddedResource>

    L 1 Reply Last reply
    0
    • M Morven Huang

      Hi all, i looked into several .csproj files today, and i found that node 'EmbeddedResource' are different from each other,i'm curious to know what results in this? anyone have any idea regarding this? (1) <EmbeddedResource Include="Form1.resx"> <DependentUpon>Form1.cs</DependentUpon> </EmbeddedResource> (2) <EmbeddedResource Include="FormAbout.resx"> <SubType>Designer</SubType> <DependentUpon>FormAbout.cs</DependentUpon> </EmbeddedResource> (3) <EmbeddedResource Include="CommonText.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>CommonText.Designer.cs</LastGenOutput> </EmbeddedResource>

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Visual studio uses this information to pass appropriate parameters to the C# compiler to embed these resources during compilation. Whenever you add any embeddable resource to a form (image, etc.), it is serialized and stored in the corresponding .resx file (Form1.resx for Form1.cs).

      M 1 Reply Last reply
      0
      • L Lost User

        Visual studio uses this information to pass appropriate parameters to the C# compiler to embed these resources during compilation. Whenever you add any embeddable resource to a form (image, etc.), it is serialized and stored in the corresponding .resx file (Form1.resx for Form1.cs).

        M Offline
        M Offline
        Morven Huang
        wrote on last edited by
        #3

        Yes, but i mean why they are different? for instance,some have sub-node 'DependentUpon', some don't. Are there any hidden law here?

        L 1 Reply Last reply
        0
        • M Morven Huang

          Yes, but i mean why they are different? for instance,some have sub-node 'DependentUpon', some don't. Are there any hidden law here?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          The 'DependentUpon' node is used by the Project Explorer to resolve the tree node under which this file should be grouped. It does not apply to common resource files that are not part of any Form. (That is why there is no DependentUpon node for CommonText.resx) And there are other nodes that are only applicable to the specific resource files.

          M 1 Reply Last reply
          0
          • L Lost User

            The 'DependentUpon' node is used by the Project Explorer to resolve the tree node under which this file should be grouped. It does not apply to common resource files that are not part of any Form. (That is why there is no DependentUpon node for CommonText.resx) And there are other nodes that are only applicable to the specific resource files.

            M Offline
            M Offline
            Morven Huang
            wrote on last edited by
            #5

            Thank you,Shameel. this answer is what i need.

            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