I have some scripts stored in files that I've marked as Embedded Resource. I nest each of these files under their associated
The only thing I've found that worked is to manually edit the
.csproj file and add a
LogicalName tag, which allows you to override the resource name.
<EmbeddedResource Include="Path\To\NestedFile.ext"> <LogicalName>NestedFile.ext</LogicalName> <DependentUpon>ParentFile.cs</DependentUpon> </EmbeddedResource>
Unfortunately, there is no IDE support for this, and the FileNesting extension I'm using doesn't support writing this tag either.
It's too cumbersome to have to do this for every file, so instead of relying on the file extension, I will have to add an identifier inside my script files that identifies them as scripts.
Ultimately I realized that since in my case I'm validating script files from unit tests, I can simply scan the file system instead of the resource manifest and avoid this problem altogether.