[XamlBuild] Fix issue of project which hasn't debug symbol
authorFang Xiaohui <xiaohui.fang@samsung.com>
Tue, 15 Mar 2022 01:39:15 +0000 (09:39 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 15 Mar 2022 04:29:25 +0000 (13:29 +0900)
pkg/Tizen.NET.API10/xamlbuild/Tizen.NUI.XamlBuild.dll
pkg/Tizen.NET.API10/xamlbuild/Tizen.NUI.XamlBuild.targets
src/Tizen.NUI.XamlBuild/src/public/XamlBuild/XamlCTask.cs
src/Tizen.NUI.XamlBuild/src/public/XamlBuild/XamlTask.cs

index 2e7d51f..bbe5db2 100644 (file)
Binary files a/pkg/Tizen.NET.API10/xamlbuild/Tizen.NUI.XamlBuild.dll and b/pkg/Tizen.NET.API10/xamlbuild/Tizen.NUI.XamlBuild.dll differ
index 4091eef..c9ba6b7 100755 (executable)
@@ -48,6 +48,7 @@
                        OptimizeIL = "true"
                        DebugSymbols = "$(DebugSymbols)"
                        DebugType = "$(DebugType)"
+                       NeedDebug = "$(NeedDebug)"
                        UseInjection = "$(NeedInjection)"
                        KeepXamlResources = "$(XFKeepXamlResources)" />
                <Touch Files="$(IntermediateOutputPath)XamlC.stamp" AlwaysCreate="True" />
index 82ef08b..b112b62 100755 (executable)
@@ -203,13 +203,11 @@ namespace Tizen.NUI.Xaml.Build.Tasks
             else
                 LoggingHelper.LogMessage(Low, $"{new string(' ', 2)}Ignoring dependency and reference paths due to an unsupported resolver");
 
-            var debug = DebugSymbols || (!string.IsNullOrEmpty(DebugType) && DebugType.ToLowerInvariant() != "none");
-
             var readerParameters = new ReaderParameters
             {
                 AssemblyResolver = resolver,
                 ReadWrite = !ReadOnly,
-                ReadSymbols = debug,
+                ReadSymbols = NeedDebug,
             };
 
             using (var assemblyDefinition = AssemblyDefinition.ReadAssembly(System.IO.Path.GetFullPath(Assembly), readerParameters))
@@ -358,7 +356,7 @@ namespace Tizen.NUI.Xaml.Build.Tasks
                 {
                     assemblyDefinition.Write(new WriterParameters
                     {
-                        WriteSymbols = debug,
+                        WriteSymbols = NeedDebug,
                     });
                     LoggingHelper.LogMessage(Low, $"{new string(' ', 2)}done.");
                 }
index dce3b49..dcb2dc5 100755 (executable)
@@ -54,6 +54,7 @@ namespace Tizen.NUI.Xaml.Build.Tasks
         public bool DebugSymbols { get; set; }
         public string DebugType { get; set; }
         public string XamlFilePath { get; set; }
+        public bool NeedDebug { get; set; } = false;
 
         protected TaskLoggingHelper LoggingHelper { get; }