xamarin-macios/msbuild/Xamarin.Localization.MSBuild
Rolf Bjarne Kvinge 6ced972a68
[msbuild] Add a GetMinimumOSVersion target that reads the app manifest and outputs the MinimumOSVersion. (#8858)
This makes it possible for several other tasks to take the MinimumOSVersion as
direct input, instead of the app manifest's path. Previously the app manifest
(Info.plist) was loaded and parsed in each task, slightly differently in each
place, and in addition there are differences between macOS and other
platforms, which made it even worse. This code refactoring also made it
possible to remove an error code which wasn't necessary anymore.

This task also computes the default MinimumOSVersion if none is specified in
the app manifest.

There is one breaking change: a library project could previously specify an
inexistent Info.plist, and it would build fine. This will now result in a
"Error loading 'Info.plist': File not found" error. This is trivial to fix:
just remove the Info.plist from the project file (or an alternative solution
could be to condition the inclusion of the Info.plist in the project file on
the existence of the Info.plist).

New commits in xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@a1bc6f3 [Xamarin.MacDev] Split IAppleSdkVersion.TryParse in two methods. (#73)

Diff: 45c5a680e2..a1bc6f39b3
2020-06-16 17:40:04 +02:00
..
xlf [msbuild] Add a GetMinimumOSVersion target that reads the app manifest and outputs the MinimumOSVersion. (#8858) 2020-06-16 17:40:04 +02:00
MSBStrings.Designer.cs [msbuild] Add a GetMinimumOSVersion target that reads the app manifest and outputs the MinimumOSVersion. (#8858) 2020-06-16 17:40:04 +02:00
MSBStrings.resx [msbuild] Add a GetMinimumOSVersion target that reads the app manifest and outputs the MinimumOSVersion. (#8858) 2020-06-16 17:40:04 +02:00
README.md [msbuild] missing localization comments - part 3 (#8721) 2020-06-02 13:57:11 -05:00
Xamarin.Localization.MSBuild.csproj [msbuild] Remove the net461 version of the msbuild task assemblies. (#8419) 2020-04-20 09:59:22 +02:00

README.md

MSBuild Localization

Messages for new MSBuild error codes live in MSBStrings.resx.

If changes are made to MBStrings.resx, you will hit:

XliffTasks.targets(91,5): error : 'xlf\MSBStrings.cs.xlf' is out-of-date with 'MSBStrings.resx'.
Run `msbuild /t:UpdateXlf` to update .xlf files or set UpdateXlfOnBuild=true to update them on every build,
but note that it is strongly discouraged to set UpdateXlfOnBuild=true in official/CI build environments
as they should not modify source code during the build.

To regenerate the .xlf files run:

$ msbuild msbuild/Xamarin.Localization.MSBuild/Xamarin.Localization.MSBuild.csproj -restore -t:UpdateXlf

For mtouch, Errors.resx contains the localizable strings. Use these commands instead to update .xlf files:

$ nuget restore tools
$ msbuild tools/mtouch/mtouch.csproj -t:UpdateXlf

For generator, src/Resources.resx, contains the localizable strings. To update the .xlf files:

$ nuget restore src
$ msbuild src/generator.csproj -t:UpdateXlf

NOTE: nuget restore can be used instead of the MSBuild -restore switch for projects using packages.config

See dotnet/xliff-tasks or Xamarin.Android's documentation for details.