From 69515867e697532cc5e28a1848e53715b2e5c30e Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 7 Oct 2022 20:53:16 +0200 Subject: [PATCH] Move [SkipLocalsInit] logic to .targets file --- .../Properties/AssemblyInfo.cs | 3 -- .../Properties/AssemblyInfo.cs | 2 - .../Properties/AssemblyInfo.cs | 3 -- .../Properties/AssemblyInfo.cs | 5 +-- .../Properties/AssemblyInfo.cs | 2 - .../Properties/AssemblyInfo.cs | 5 +-- .../Properties/AssemblyInfo.cs | 3 -- .../Properties/AssemblyInfo.cs | 5 +-- .../Properties/AssemblyInfo.cs | 3 -- src/ComputeSharp/Properties/AssemblyInfo.cs | 2 - src/Directory.Build.targets | 40 +++++++++++++++++++ 11 files changed, 43 insertions(+), 30 deletions(-) delete mode 100644 src/ComputeSharp.Core.SourceGenerators/Properties/AssemblyInfo.cs delete mode 100644 src/ComputeSharp.D2D1.SourceGenerators/Properties/AssemblyInfo.cs delete mode 100644 src/ComputeSharp.SourceGenerators/Properties/AssemblyInfo.cs delete mode 100644 src/ComputeSharp.WinUI/Properties/AssemblyInfo.cs create mode 100644 src/Directory.Build.targets diff --git a/src/ComputeSharp.Core.SourceGenerators/Properties/AssemblyInfo.cs b/src/ComputeSharp.Core.SourceGenerators/Properties/AssemblyInfo.cs deleted file mode 100644 index 196f23c5..00000000 --- a/src/ComputeSharp.Core.SourceGenerators/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[module: SkipLocalsInit] \ No newline at end of file diff --git a/src/ComputeSharp.Core/Properties/AssemblyInfo.cs b/src/ComputeSharp.Core/Properties/AssemblyInfo.cs index a5893c97..3450cfcf 100644 --- a/src/ComputeSharp.Core/Properties/AssemblyInfo.cs +++ b/src/ComputeSharp.Core/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Runtime.CompilerServices; -[module: SkipLocalsInit] - [assembly: InternalsVisibleTo("ComputeSharp")] [assembly: InternalsVisibleTo("ComputeSharp.Dynamic")] [assembly: InternalsVisibleTo("ComputeSharp.Pix")] diff --git a/src/ComputeSharp.D2D1.SourceGenerators/Properties/AssemblyInfo.cs b/src/ComputeSharp.D2D1.SourceGenerators/Properties/AssemblyInfo.cs deleted file mode 100644 index 196f23c5..00000000 --- a/src/ComputeSharp.D2D1.SourceGenerators/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[module: SkipLocalsInit] \ No newline at end of file diff --git a/src/ComputeSharp.D2D1/Properties/AssemblyInfo.cs b/src/ComputeSharp.D2D1/Properties/AssemblyInfo.cs index d622c74a..7de3359e 100644 --- a/src/ComputeSharp.D2D1/Properties/AssemblyInfo.cs +++ b/src/ComputeSharp.D2D1/Properties/AssemblyInfo.cs @@ -1,6 +1,3 @@ -using System.Runtime.CompilerServices; -using System.Runtime.Versioning; - -[module: SkipLocalsInit] +using System.Runtime.Versioning; [assembly: SupportedOSPlatform("windows6.1")] \ No newline at end of file diff --git a/src/ComputeSharp.Dynamic/Properties/AssemblyInfo.cs b/src/ComputeSharp.Dynamic/Properties/AssemblyInfo.cs index 36c2fdf1..99d84570 100644 --- a/src/ComputeSharp.Dynamic/Properties/AssemblyInfo.cs +++ b/src/ComputeSharp.Dynamic/Properties/AssemblyInfo.cs @@ -1,8 +1,6 @@ using System.Runtime.CompilerServices; using System.Runtime.Versioning; -[module: SkipLocalsInit] - [assembly: SupportedOSPlatform("windows6.2")] [assembly: InternalsVisibleTo("ComputeSharp.Tests.Internals")] \ No newline at end of file diff --git a/src/ComputeSharp.Pix/Properties/AssemblyInfo.cs b/src/ComputeSharp.Pix/Properties/AssemblyInfo.cs index b0b6f87c..2acf37cd 100644 --- a/src/ComputeSharp.Pix/Properties/AssemblyInfo.cs +++ b/src/ComputeSharp.Pix/Properties/AssemblyInfo.cs @@ -1,6 +1,3 @@ -using System.Runtime.CompilerServices; -using System.Runtime.Versioning; - -[module: SkipLocalsInit] +using System.Runtime.Versioning; [assembly: SupportedOSPlatform("windows6.2")] \ No newline at end of file diff --git a/src/ComputeSharp.SourceGenerators/Properties/AssemblyInfo.cs b/src/ComputeSharp.SourceGenerators/Properties/AssemblyInfo.cs deleted file mode 100644 index 196f23c5..00000000 --- a/src/ComputeSharp.SourceGenerators/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[module: SkipLocalsInit] \ No newline at end of file diff --git a/src/ComputeSharp.Uwp/Properties/AssemblyInfo.cs b/src/ComputeSharp.Uwp/Properties/AssemblyInfo.cs index eecfefd0..f03c1078 100644 --- a/src/ComputeSharp.Uwp/Properties/AssemblyInfo.cs +++ b/src/ComputeSharp.Uwp/Properties/AssemblyInfo.cs @@ -1,6 +1,3 @@ -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[module: SkipLocalsInit] +using System.Runtime.InteropServices; [assembly: ComVisible(false)] \ No newline at end of file diff --git a/src/ComputeSharp.WinUI/Properties/AssemblyInfo.cs b/src/ComputeSharp.WinUI/Properties/AssemblyInfo.cs deleted file mode 100644 index 196f23c5..00000000 --- a/src/ComputeSharp.WinUI/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[module: SkipLocalsInit] \ No newline at end of file diff --git a/src/ComputeSharp/Properties/AssemblyInfo.cs b/src/ComputeSharp/Properties/AssemblyInfo.cs index 31f57316..9b6922a1 100644 --- a/src/ComputeSharp/Properties/AssemblyInfo.cs +++ b/src/ComputeSharp/Properties/AssemblyInfo.cs @@ -1,8 +1,6 @@ using System.Runtime.CompilerServices; using System.Runtime.Versioning; -[module: SkipLocalsInit] - [assembly: SupportedOSPlatform("windows6.2")] [assembly: InternalsVisibleTo("ComputeSharp.Dynamic")] diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 00000000..cc2f5c6c --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,40 @@ + + + + + + + $(IntermediateOutputPath)$(MSBuildProjectName).SkipLocalsInit.g.cs + + +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +[module: System.Runtime.CompilerServices.SkipLocalsInitAttribute]]]> + + + + + + + + + + + + + + \ No newline at end of file