diff --git a/src/IgnoresAccessChecksToGenerator.Tasks/IgnoresAccessChecksToGenerator.Tasks.csproj b/src/IgnoresAccessChecksToGenerator.Tasks/IgnoresAccessChecksToGenerator.Tasks.csproj index 52637d8..26aec9c 100644 --- a/src/IgnoresAccessChecksToGenerator.Tasks/IgnoresAccessChecksToGenerator.Tasks.csproj +++ b/src/IgnoresAccessChecksToGenerator.Tasks/IgnoresAccessChecksToGenerator.Tasks.csproj @@ -2,8 +2,9 @@ netstandard2.0;net462 + latest IgnoresAccessChecksToGenerator - 0.7.0 + 0.7.1 true Eli Arbel https://github.com/aelij/IgnoresAccessChecksToGenerator diff --git a/src/IgnoresAccessChecksToGenerator.Tasks/PublicizeInternals.cs b/src/IgnoresAccessChecksToGenerator.Tasks/PublicizeInternals.cs index 89fdcbc..c553c96 100644 --- a/src/IgnoresAccessChecksToGenerator.Tasks/PublicizeInternals.cs +++ b/src/IgnoresAccessChecksToGenerator.Tasks/PublicizeInternals.cs @@ -75,7 +75,17 @@ private void GenerateAttributes(string path, IEnumerable assemblyNames) var attributes = string.Join(Environment.NewLine, assemblyNames.Select(a => $@"[assembly: System.Runtime.CompilerServices.IgnoresAccessChecksTo(""{a}"")]")); - var content = attributes + @" + var content = $$""" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +{{attributes}} namespace System.Runtime.CompilerServices { @@ -86,7 +96,8 @@ public IgnoresAccessChecksToAttribute(string assemblyName) { } } -}"; +} +"""; File.WriteAllText(GeneratedCodeFilePath, content, System.Text.Encoding.UTF8); Log.LogMessageFromText("Generated IgnoresAccessChecksTo attributes", MessageImportance.Low); diff --git a/test/IgnoresAccessChecksToGenerator.Test/IgnoresAccessChecksToGenerator.Test.csproj b/test/IgnoresAccessChecksToGenerator.Test/IgnoresAccessChecksToGenerator.Test.csproj index 26ccf29..d9b1db8 100644 --- a/test/IgnoresAccessChecksToGenerator.Test/IgnoresAccessChecksToGenerator.Test.csproj +++ b/test/IgnoresAccessChecksToGenerator.Test/IgnoresAccessChecksToGenerator.Test.csproj @@ -13,7 +13,7 @@ - +