There are 'duplicate attribute' errors for .AssemblyInfo.cs file after deployment
OS: Windows Node.js: V10.15.0 Build Version: 20190402.1 Azure Functions Core Tools: V2.4.498
Repro Steps:
- Create a C# project.
- Create a new function with 'HTTP trigger' template and 'Function' level.
- Deploy this C# project to Azure Function app.
- Wait for 1 minute and click 'PROBLEMS' panel to check the logs.
Expect: There is no error in 'PROBLEMS' panel.
Actual:
There are 'duplicate attribute' errors for .AssemblyInfo.cs file.

More Info:
- This issue don't reproduce for JavaScript/TypeScript and Python project.
- This issue also reproduces on Azure Function extension previous release build 0.16.0.
This happens because there is an AssemblyInfo file in both the "Debug" and "Release" folder. Once https://github.com/OmniSharp/omnisharp-vscode/issues/1694 is fixed, we should be able to leverage the files.exclude setting to hide the "obj" folder and any of its errors
Filed a new issue on omnisharp: https://github.com/OmniSharp/omnisharp-vscode/issues/3050
Solution:
Before debugging, add the following lines to each of the *.csproj files within the <PropertyGroup> section:
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>

How is this still an issue two and a half years later? This is a bug that pretty much anyone using Microsoft's flagship programming language running on their flagship serverless technology will encounter.
Hi @MikePennington
I understand your frustration, but unfortunately this is stemming from the OmniSharp extension.
We're tracking both of those issues, but unless we edit user's .csproj files manually to include the changes mentioned here: https://github.com/microsoft/vscode-azurefunctions/issues/1154#issuecomment-794286543, there is not much the Azure Functions extension team can do about it.