16

When I try to enable the Mulitlingual app toolkit on a C# project, I get an error such as the following and nothing more happens:

Project 'project name' was not enabled - the project's source culture could not be determined.

What's wrong?

juFo
  • 17,849
  • 10
  • 105
  • 142
PMF
  • 14,535
  • 3
  • 23
  • 49

4 Answers4

24

Add a line like this to your assemblyinfo.cs file:

[assembly: NeutralResourcesLanguage("en")] 

The indicated language is the one that the application currently uses (i.e usually hardcoded texts, before translation)

PMF
  • 14,535
  • 3
  • 23
  • 49
16

For a .Net Standard project, edit the csproj file to add:

<PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
François
  • 3,164
  • 25
  • 58
15

In Visual Studio 2017 => Projects=>Properties=>Package=>Assembly nutral language=>English(...)=>Save Then Select Project in Solution Explorer=>Tools=>Multilingual App Toolkit =>Enable Selection enter image description here

Update: VS2019

VS2019 has a lot of changes in UI, so to find Assembly Neutral Language Option you can try below solution.

Right Click on Project => Got To Properties => Search button "Assembly Information" => Neutral Language => Select English => Save. And then rest of the process is same Select Project => Tools=> Multilingual App=> Enable Selection enter image description here

Shrikant Dandile
  • 376
  • 3
  • 12
6

Another method:

  • Open project properties
  • Select Application
  • Click the ASSEMBLY INFOMATION button
  • At the bottom, select a NEUTRAL LANGUAGE

Also in the OUTPUT panel in the SHOW OUTPUT FROM: dropdown, select MULTILINGUAL APP TOOLKIT.

Make sure you have at least one resource file!

David S
  • 133
  • 2
  • 8