0

I'm trying to use MAT with a package I'm building (in C#). I can enable MAT when my package targets only one framework (for exemple .NET core 3.1)

<PropertyGroup>
  <TargetFramework>netcoreapp3.1</TargetFramework>
  <NeutralLanguage>fr</NeutralLanguage>
</PropertyGroup>

but if I choose to target multi framework, the option is disabled

<PropertyGroup>
  <TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
  <NeutralLanguage>fr</NeutralLanguage>
</PropertyGroup>

(note the 's' at the end of framework)

Did I miss something?

1 Answers1

0

I did an experiment and I found that you have to have a single <TargetFramework> setting only:

  • to enable MAT for the project
  • to add new language

As soon as you have the language-specific .resx and .xlf files you can restore the multi-targeting by setting <TargetFrameworks> node.

I successfully

  • added new string resources and their translations
  • built/ran the solution

when multi-targeting was on.

Gabor
  • 3,021
  • 1
  • 11
  • 20