From: guowei.wang Date: Mon, 11 Apr 2022 03:43:00 +0000 (+0800) Subject: [NUI][XamlBuild] Fix build error when calling ExitXaml() if XamlOptimization set... X-Git-Tag: accepted/tizen/6.5/unified/20220413.133400~1^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6b1f8e9230f96ba3180fab48d064f0f0fda2f5f;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI][XamlBuild] Fix build error when calling ExitXaml() if XamlOptimization set as 0. --- diff --git a/src/Tizen.NUI.XamlBuild/src/public/XamlBuild/XamlGenerator.cs b/src/Tizen.NUI.XamlBuild/src/public/XamlBuild/XamlGenerator.cs index e5d86c8..beba5aa 100755 --- a/src/Tizen.NUI.XamlBuild/src/public/XamlBuild/XamlGenerator.cs +++ b/src/Tizen.NUI.XamlBuild/src/public/XamlBuild/XamlGenerator.cs @@ -368,7 +368,15 @@ namespace Tizen.NUI.Xaml.Build.Tasks initcomp.Statements.Add(new CodeMethodInvokeExpression( new CodeTypeReferenceExpression(new CodeTypeReference($"global::{typeof(Extensions).FullName}")), "LoadFromXaml", new CodeThisReferenceExpression(), new CodeTypeOfExpression(declType.Name))); - } + + var exitXamlComp = new CodeMemberMethod() + { + Name = "ExitXaml", + CustomAttributes = { GeneratedCodeAttrDecl }, + Attributes = MemberAttributes.Assembly | MemberAttributes.Final + }; + declType.Members.Add(exitXamlComp); + } else { var loadExaml_invoke = new CodeMethodInvokeExpression(