Azure / Azure/autorest.powershell

Error CS0579 Duplicate Attributes when Building Module from PowerShell Generator

Open
#861 1 comment 0 reactions 0 assignees View on GitHub
feature-request P1
Dominant language
C#
Stars
123
Forks
99
PR merge metrics
No merged PRs in 30d

Description

With https://resources.static.liongard.com/api-docs/Liongard_API_V1_swagger.yml (`openapi: 3.0.3`)

```powershell
autorest --powershell --input-file:Liongard_API_V1_swagger.yml --output-folder:PSLiongard
cd .\PSLiongard
ren obj obj.old
.\build-module.ps1 -Test
```

Results in:
```
Creating isolated process...
Cleaning build folders...
Compiling module...
D:\Module-Dev\Liongard\AutoRest\PSLiongard\obj\Debug\.NETStandard,Version=v2.0.AssemblyAttributes.cs(4,12): error CS0579: Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute [D:\Module-Dev\Liongard\AutoRest\PSLiongard\LiongardV1Endpoints.csproj]
D:\Module-Dev\Liongard\AutoRest\PSLiongard\obj\Debug\LiongardV1Endpoints.AssemblyInfo.cs(14,12): error CS0579: Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute [D:\Module-Dev\Liongard\AutoRest\PSLiongard\LiongardV1Endpoints.csproj]
D:\Module-Dev\Liongard\AutoRest\PSLiongard\obj\Debug\LiongardV1Endpoints.AssemblyInfo.cs(15,12): error CS0579: Duplicate 'System.Reflection.AssemblyConfigurationAttribute' attribute [D:\Module-Dev\Liongard\AutoRest\PSLiongard\LiongardV1Endpoints.csproj]
D:\Module-Dev\Liongard\AutoRest\PSLiongard\obj\Debug\LiongardV1Endpoints.AssemblyInfo.cs(16,12): error CS0579: Duplicate 'System.Reflection.AssemblyFileVersionAttribute' attribute [D:\Module-Dev\Liongard\AutoRest\PSLiongard\LiongardV1Endpoints.csproj]
D:\Module-Dev\Liongard\AutoRest\PSLiongard\obj\Debug\LiongardV1Endpoints.AssemblyInfo.cs(17,12): error CS0579: Duplicate 'System.Reflection.AssemblyInformationalVersionAttribute' attribute [D:\Module-Dev\Liongard\AutoRest\PSLiongard\LiongardV1Endpoints.csproj]
D:\Module-Dev\Liongard\AutoRest\PSLiongard\obj\Debug\LiongardV1Endpoints.AssemblyInfo.cs(18,12): error CS0579: Duplicate 'System.Reflection.AssemblyProductAttribute' attribute [D:\Module-Dev\Liongard\AutoRest\PSLiongard\LiongardV1Endpoints.csproj]
D:\Module-Dev\Liongard\AutoRest\PSLiongard\obj\Debug\LiongardV1Endpoints.AssemblyInfo.cs(19,12): error CS0579: Duplicate 'System.Reflection.AssemblyTitleAttribute' attribute [D:\Module-Dev\Liongard\AutoRest\PSLiongard\LiongardV1Endpoints.csproj]
D:\Module-Dev\Liongard\AutoRest\PSLiongard\obj\Debug\LiongardV1Endpoints.AssemblyInfo.cs(20,12): error CS0579: Duplicate 'System.Reflection.AssemblyVersionAttribute' attribute [D:\Module-Dev\Liongard\AutoRest\PSLiongard\LiongardV1Endpoints.csproj]
Write-Error: D:\Module-Dev\Liongard\AutoRest\PSLiongard\build-module.ps1:76
Line |
76 | Write-Error 'Compilation failed.'
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Compilation failed.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.