diff options
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 +} |