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 for Bug 10494 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
"I can't see the docs on what functions are available within the 'add code template' ui. For example the 'ctor' template uses a function 'GetCurrentClassName' to find the current class. I'd like to get the current namespace, but my searching for this method name or general help hasn't turned up anything yet."
hm, this is more or less an internal hack - not really comprehensive (or working in all cases).
We need to do a clean design to the snippet system - maybe exposing some nrefactory functions there or even allowing template definitions in C# AST syntax. (We hadn't the tools at the time the code template system was written)
Atm I wouldn't recommend using any functions for now and just sticking to text templates.
Yes that would be good. Even implementing something like Razor support would be pretty powerful for generating flexible pieces of code.
Thanks so much for taking the time to submit this report! I can confirm using the latest Visual Studio 2017 for Mac Preview version 7.1 I am able to reproduce this issue. Marking this report as CONFIRMED.