diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2016-11-16 20:51:53 +0100 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2016-11-16 11:51:53 -0800 |
commit | d97dfe91b28a30e9a350155262b1149eed8d462f (patch) | |
tree | 0dd0a9cab6461d9207410c0d84e7cd8dca796af1 /Xamarin.Forms.Build.Tasks/XamlCTask.cs | |
parent | bc7755ca56e3958318434263d74611c249a59aff (diff) | |
download | xamarin-forms-d97dfe91b28a30e9a350155262b1149eed8d462f.tar.gz xamarin-forms-d97dfe91b28a30e9a350155262b1149eed8d462f.tar.bz2 xamarin-forms-d97dfe91b28a30e9a350155262b1149eed8d462f.zip |
[XamlC] use correct filePath for XamlC error reporting (#513)
* [XamlG] decorate partial classes with [XamlFile] attribute
* [XamlC] use correct filePath for XamlC error reporting
* [docs] update docs
Diffstat (limited to 'Xamarin.Forms.Build.Tasks/XamlCTask.cs')
-rw-r--r-- | Xamarin.Forms.Build.Tasks/XamlCTask.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Xamarin.Forms.Build.Tasks/XamlCTask.cs b/Xamarin.Forms.Build.Tasks/XamlCTask.cs index 689a6a59..d8b80233 100644 --- a/Xamarin.Forms.Build.Tasks/XamlCTask.cs +++ b/Xamarin.Forms.Build.Tasks/XamlCTask.cs @@ -141,6 +141,11 @@ namespace Xamarin.Forms.Build.Tasks } Logger.LogLine(2, ""); + CustomAttribute xamlFilePathAttr; + var xamlFilePath = typeDef.HasCustomAttributes && (xamlFilePathAttr = typeDef.CustomAttributes.FirstOrDefault(ca => ca.AttributeType.FullName == "Xamarin.Forms.Xaml.XamlFilePathAttribute")) != null ? + (string)xamlFilePathAttr.ConstructorArguments [0].Value : + resource.Name; + var initCompRuntime = typeDef.Methods.FirstOrDefault(md => md.Name == "__InitComponentRuntime"); if (initCompRuntime != null) Logger.LogLine(2, " __InitComponentRuntime already exists... not duplicating"); @@ -167,7 +172,7 @@ namespace Xamarin.Forms.Build.Tasks success = false; Logger.LogLine(2, "failed."); thrownExceptions?.Add(e); - Logger.LogException(null, null, null, resource.Name, e); + Logger.LogException(null, null, null, xamlFilePath, e); Logger.LogLine(4, e.StackTrace); continue; } @@ -307,4 +312,4 @@ namespace Xamarin.Forms.Build.Tasks } } } -}
\ No newline at end of file +} |