//Add this to your csproj file <EmbeddedResourceUseDependentUponConvention>true</EmbeddedResourceUseDependentUponConvention>