我希望使用 VS Code 和 .net Core 3.1.102 创建 WPF 应用程序 我的图像有问题,我看不到它..
<Grid>
<Image Source="system-tray.jpg"/>
</Grid>
https://stackoverflow.com/users/2987285/jaykebird 已针对 Visual Studio 解决了此问题 他的解决方案是“确保 Visual Studio 中图像文件的构建操作设置为“资源”。 但是如何使用 VS Code 将构建操作设置为“资源”?
最佳答案
在csproj文件中,添加
<ItemGroup>
<Resource Include="system-tray.jpg" />
</ItemGroup>
关于c# - WPF - 如何使用 VS Code 将构建操作设置为 'Resource"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60517512/