默认情况下,JetBrains Rider无法加载Properties\DesignTimeResources.xaml设计时的资源,可以在.csproj项目文件中加入如下配置:

1
2
3
4
5
6
7
<ItemGroup>
<ApplicationDefinition Include="Properties\DesignTimeResources.xaml" Condition="'$(JetBrainsDesignTimeBuild)' == 'true'">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<ContainsDesignTimeResources>true</ContainsDesignTimeResources>
</ApplicationDefinition>
</ItemGroup>