Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
It will be nice to have text templates working in Xamarin Forms, I tried modifying shproj file manually to include Text template, but it is of no use. It doesn't seem to work.
I tried to add following markup,
But it does not generate any code, it displays text template correct in shared project.
Current workaround is adding text template in all project, ios, droid. And generate two files, each for each platform. This is fine as of now as same text template is shared between projects by linking the item, but it is not very helpful.
This is a limitation in Visual Studio Shared Projects feature.
The underlying issue is that shared projects don't have a concept of a Custom Tool like regular projects.
You could simulate something like this by running the text transformations during build, using something like https://www.nuget.org/packages/Clarius.TransformOnBuild/
Not sure if that tool works with shared projects at the moment, but it's open source (at https://github.com/clariuslabs/TransformOnBuild) and PRs are merged pretty quickly by the current maintainer.