We are trying to get our C# application to compile and run with both
- Visual Studio 10 (with the Microsoft compiler), on Windows, and
- MonoDevelop with gmcs, on Linux
However, sections like this in the .csproj
files (for Visual Studio):
<Compile Include="Foo\Bar.cs" />
<EmbeddedResource Include="Foo\Bar.resx">
<DependentUpon>Bar.cs</DependentUpon>
</EmbeddedResource>
must be changed as follows before they will work with MonoDevelop/gmcs (if not, at runtime, resources.GetObject() will throw a MissingManifestResourceException):
<Compile Include="Foo\Bar.cs" />
<EmbeddedResource Include="Foo\Bar.resx">
<DependentUpon>Foo\Bar.cs</DependentUpon>
</EmbeddedResource>
How to rewrite this into a form they will both accept?
(Short of deleting the DependentUpon
element, of course.)