node EmbeddedResource in *.csproj file?
-
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>
-
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>
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).
-
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).
Yes, but i mean why they are different? for instance,some have sub-node 'DependentUpon', some don't. Are there any hidden law here?
-
Yes, but i mean why they are different? for instance,some have sub-node 'DependentUpon', some don't. Are there any hidden law here?
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.
-
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.
Thank you,Shameel. this answer is what i need.