Skip to content

Commit

Permalink
Remove GeneratedCode Attribute
Browse files Browse the repository at this point in the history
It causes

```
__Microsoft.Android.Resource.Designer.cs(15,3,15,16): error CS0579: Duplicate 'GeneratedCode' attribute
```
  • Loading branch information
dellis1972 committed Oct 9, 2024
1 parent 34e9137 commit b48b3aa
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ namespace %NAMESPACE% {
/// Android Resource Designer class.
/// Exposes the Android Resource designer assembly into the project Namespace.
/// </summary>
[GeneratedCode(""%TOOL%"", ""%VERSION%"")]
%MODIFIER% partial class Resource : %BASECLASS% {
}
#pragma warning restore IDE0002
Expand All @@ -42,7 +41,6 @@ namespace %NAMESPACE% {
//------------------------------------------------------------------------------
namespace %NAMESPACE%
[<type:System.CodeDom.Compiler.GeneratedCode(""%TOOL%"", ""%VERSION%"")>]
type %MODIFIER% Resource = %BASECLASS%
";

Expand All @@ -63,15 +61,11 @@ public override bool RunTask ()
if (isCSharp) {
template = CSharpTemplate.Replace ("%NAMESPACE%", Namespace)
.Replace ("%BASECLASS%", baseClass)
.Replace ("%VERSION%", version.ToString ())
.Replace ("%MODIFIER%", Modifier.ToLower ())
.Replace ("%TOOL%", nameof (GenerateResourceDesignerIntermediateClass));
.Replace ("%MODIFIER%", Modifier.ToLower ());
} else if (isFSharp) {
template = FSharpTemplate.Replace ("%NAMESPACE%", Namespace)
.Replace ("%BASECLASS%", baseClass)
.Replace ("%VERSION%", version.ToString ())
.Replace ("%MODIFIER%", Modifier.ToLower ())
.Replace ("%TOOL%", nameof (GenerateResourceDesignerIntermediateClass));
.Replace ("%MODIFIER%", Modifier.ToLower ());
}

Files.CopyIfStringChanged (template, OutputFile.ItemSpec);
Expand Down

0 comments on commit b48b3aa

Please sign in to comment.