xamarin-macios/msbuild/Xamarin.Localization.MSBuild
Sebastien Pouliot 3bd14c3eef
[msbuild] Add support for `.xcframework` (#10046)
This is done early so we can resolve the inner framework, inside the
xcframework, and let the existing framework support do most of the
work.

The resolving code has unit tests. Custom projects for "NoEmbedding"
exists for all supported platforms and executed by xharness.

A sample `xcframework` with tests projects is also available 
[here](https://github.com/spouliot/xcframework).

The xcframework test case is based on Rolf's earlier/partial implementation.
https://github.com/rolfbjarne/xamarin-macios/commit/xcframework

Things to note:

Do not rename a framework (like XTest) to use it in an xcframework
(like XCTest). That will fail at codesign but won't give anything
useful. You might think signing the framework (instead of the inner
binary) would solve it. It does, as it codesign, but then the app
crash at startup. At some point you realize some symbols are still
using XTest (not XCTest) and then you can delete several other weird
workarounds (like for `ld`) because all of it was cause by this
never identified rename.

dSYM support (and tests) to be done in a separate PR.
2020-11-30 13:44:03 -05:00
..
xlf [msbuild] Add support for `.xcframework` (#10046) 2020-11-30 13:44:03 -05:00
MSBStrings.Designer.cs [msbuild] Add support for `.xcframework` (#10046) 2020-11-30 13:44:03 -05:00
MSBStrings.resx [msbuild] Add support for `.xcframework` (#10046) 2020-11-30 13:44:03 -05: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.