Can't use LocBaml with WPF .NetCore 3.1 project in Visual Studio 2019
Hi,
I have a very simple WPF project (.Net Core 3.1) that I'm trying to localize.
I downloaded the locbaml tool project as part of the wpf samples and I built it in Visual Studio 2019 - Release mode. This built OK.
I've run "MSBuild" to add the UID's (msbuild /t:updateid WPFLocalizationWithXAML.csproj) to my project. This worked ok and added the UID's.
My problem is that I can't parse "WPFLocalizationWithXAML.resources.dll" with "LocBaml.exe". I've copied "LocBaml.exe" (as built above) and "WPFLocalizationWithXAML.exe" into the "\en-us" folder so that they sit with "WPFLocalizationWithXAML.resources.dll". I then ran the following command (locbaml /parse WPFLocalizationWithXAML.resources.dll /out:trans.csv) but this always results in the following error and a trans.cvs file wth garbage in it:
"Microsoft (R) Baml Localization Utility 1.0.0.0
Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified"
My development env is as follows:
- Windows 10 pro (64 bit) OS
- Visual Studio 2019 Version 16.5.1.
- DotNet SDK 3.1.201
I downloaded the SDK from here. It says "DotNet SDK 3.1.201" is the correct SDK for Visual Studio 2019 V16.5.
Any idea whats causing this?
Thanks in advance.
H