foish
(foish)
January 4, 2025, 3:45am
1
In c# gh degree development, please tell me how to solve the problem that adding icons in explorer will fail with the new version of vs 2022preview.
1 Like
@foish Hi, there was a post from @archimax in another thread on this topic. You can change the Resources Explorer to the legacy method. I found that you also have to install System.Resources.Extensions NuGet package using the NuGet Package Manager.
I also had a problem adding icons in the latest versions of Visual Studio. When I double-click the .resx file VS opens the new interface of the Resource Explorer. And all the images added through this new interface have the wrong path to the Resource folder.
The workaround is to open the .resx file with the legacy Resource Editor: right-click - Open with... - Managed Resources Editor. Images added with the legacy one have the right path.
[image]
Below is the thread that goes over this topic.
Your issue is likely because of the Project type, not directly related to your version of Visual Studio.
The new project types introduced for .Net Core projects moved away from the traditional Resources file.
You can probably manually edit the .csproj file to enable compilation of the resx file, try adding this to your project file:
<ItemGroup>
<Compile Include="Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</…
1 Like