microsoft / Multilingual-App-Toolkit

This repo contains samples that demonstrate the localization workflow for users of the Multilingual Application Toolkit Visual Studio extension and editor. You can also use GitHub Issues to submit feedback, report bugs, or ask questions.
MIT License
24 stars 4 forks source link

MAT broken in VS2022 17.7.3? #24

Open wstaelens opened 10 months ago

wstaelens commented 10 months ago

I've recently updated Visual Studio 2022 to 17.7.3.

.net 7.0 library doesn't seem to build/update my .resx files anymore.

output gives me:

1>  Attempting to identify Foo.Site.Resources project type based on project file... 
1>  Attempting to identify Foo.Site.Resources project type based on resource file type... 
1>  Project Type for Foo.Site.Resources is AnonResx 
1>  Project Type for Miscellaneous Files is Unknown. For assistance in resolving these please visit aka.ms/matTypeHelp 

I tried to disable and enable MAT on the project but doesn't seem to work.

double clicking on xlf file opens the file but VS gives also this: image

(P.S.: aka.ms/matTypeHelp doesn't work and redirects to https://www.bing.com/?ref=aka&shorturl=matTypeHelp )

wstaelens commented 10 months ago

figured out if you convert a project from .net framework to .net using that microsoft tool, it create projects with proxies and my project with resources got created under a new project name (--> new namespace) but parts of the project file and xlf file pointed to the proxy project having old and new namespaces mixed.

If your new project uses a different project name as base (and thus also a different namespace) that namespaces doesn't get updated in the .xlf file, resulting in translations that do not update from the .xlf to .resx files.

You have to (1) disable MAT, (2) set neutral culture again, (3) manually open the xlf project and update Foo.Bar.Project to Foo.New.Project, (4) enable MAT again to get it working. The first time you will be asked in a dialog to select the project source language also where you have to select the same as your assembly neutral language.

That 0x8000FFFF is possibly related to this.

What a mess :-) but fixed

wstaelens commented 10 months ago

when double clicking an .xlf file in VS2022 Pro 17.7.3

image