Convert from Multilingual App Toolkit v3.0 to v4.0 and Fix Error “The Multilingual App Toolkit v4.0 is not compatible with previous versions of the toolkit”

Reason

I used Multilingual App Toolkit 3.0 for my Xamarin application in Visual Studio 2013 in Windows 8.1. Then I moved to a new machine with windows 10 and I installed Visual Studio 2015. Then I opened that Xamarin project in VS 2015 and when I was building the project it gave me an error.

mla error 1

Image 1 : Error

Error

The imported project “C:\Program Files (x86)\MSBuild\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.ResxResources.targets” was not found.

Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Mobility_App.Android

F:\ProjectsBuddhima\mobile\Mobility\Mobility App\Mobility_App.csproj

Reason

Then I searched solutions for the error and according to the error, my new machine has not installed Multilingual App Toolkit.

Solution and Next steps

So I installed Multilingual App Toolkit v.4.0 which is compatible with Visual Studio 2015.

You can download from

https://visualstudiogallery.msdn.microsoft.com/6dab9154-a7e1-46e4-bbfa-18b5e81df520

mla error 2

Image 2 : Download Multilingual App Toolkit v4.0

Then the installer will download to your machine and you have to install it manually.

After I installed Multilingual App toolkit 4.0 I built the project again and I got another error.

Multilingual App Toolkit v4.0 upgrade blocked

The Multilingual App Toolkit v4.0 is not compatible with previous versions of the toolkit

mla error 7

Image 3 : Multilingual app Toolkit is blocked

According to above error message, I browsed the link in the http://aka.ms/mat4faq

According to their technical references I will describe steps to convert from v3 to v4.

  1. First take a backup of existing project.
  2. Then we have to open the project which has Multilingual App toolkit v3.
  3. Then we have to disable app toolkit for projects. Go to tools and click “Disable Multilingual App Toolkit”.

    1 disable MLA tool kit

    Image 4 : Disable MLA Toolkit

  4. Then Copy current .xlf files to another location as a backup and delete all .xlf files in the project.

    2 remove xlf files

    Image 5 : Remove current XLF files

  5. Then rebuild the project.

 

Sometimes these steps are not enough to fully disable toe Multilingual App toolkit. So we have to disable it using config file manually.

Here are steps to remove them manually.

1.Right click the config file in the project and open it.
2.Search the label “MultilingualAppToolkit” in the config file.

12 multi languala app label

Image 6 : Delete property group from config file

3.Then delete above <PropertyGroup> which contains <MultilingualAppToolkitVirsion> tag.
4.Then we have to search again “MultilingualAppToolkit” label. And you will see <import> element.

13 delete multi languala import label

Image 7 : Delete <import> tag which contains MLA label

And also we have to delete the <Import> tag which contains “MultilingualAppToolkit”.

 

5.Then rebuild the project.

Now we have removed configurations of Multilingual App Toolkit from our project and we are ready to add v4.0 configurations.

Then we have to enable Multilingual App Toolkit from Toolbox.

1 Enable mltk

Image 8 : Enable MLA Toolkit

When we enable the Multilingual App Toolkit v4.0, we are ready to recycle Transitions from v3.0 project’s .xlf files.

Below I have added steps for that.

1.  Please check that the Multilingual App Toolkit v4.0 is enabled.

2. Then click on the project and select Multilingual App Toolkit=> Add transition languages

3 add multilangual languages

Image 9 : Multilingual App Toolkit ->  Add Transition languages

3. We can see language list in a window like below. Select languages that previously we have added to the project.

4 select languages

Image 10 : Select Languages

When click “OK”. New xlf files will be added to our project in a folder called “MultilingualResources”.  Below image shows it.

5 added xlf files

Image 11 : Added XLF files for selected languages

4. Then click on “MultilingualAppResources” folder and click .. Multilingual App Toolkit=> Import / recycling translations

6 import recycling transactions

Image 12 : Multilingual App Toolkit -> Import/Recycle Transitions

Then you will see below window.

7 import recycling transactions

Image 13 : Import Transition window

5. Click “Add button” and then select v3 xlf files from the location that we have copied from previous project.

8 select old v3 files

Image 14 : Select and Add  XML files in v3 project.

6. Then Select xlf files that we copied from the temporary location and Click “Open”. Then selected xlf files will be added to import resources form.

9 seletec xlf v3 files

Image 15 : Added XLF files

7. And an Important thing is we have to check the “Enable resource recycling” check box. And then click the import button.

10 enable recycling and import

Image 16 : Enable resource recycling and Import

8. Then rebuild the project.

11 success

Image 17 : Successfully Built project

Then we can see those .xlf files has been added to project and the project has built successfully.

Thank you !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s