As in title, having _Microsoft.Win32.Registry_ and _Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator_ in version higher than 1.0.1 in the same project causes warning.
Create console app project with such csproj and try to build it.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.0.2" />
</ItemGroup>
</Project>
No warning.
Following warning:
Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33, 5): Could not evaluate 'Microsoft.Win32.Registry.dll' for extension metadata. Exception message: Could not load file or assembly 'Microsoft.Win32.Registry, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Downgrading a package to at least 1.0.1
One might argue that this behavior is appropriate. Maybe. I'm not familiar with these packages' content.
But having
causes my pipelines to fail because I treat warnings as errors and I cannot really accept this. Issue on the Azure Function SDK side is hanging as opened since March 2019.
Thank you for your reply.
Thanks for reporting this issue, @Glaeqen. This warning is intended to be informational, so this statement should be logging a message, not a warning.
This warning doesn't appear when using the 3.x runtime and v1.1.3 of Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator, if you're able to migrate. Example .csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.3" />
</ItemGroup>
</Project>
Thank you for your time. It seems that project migration to .NET Core 3.1 is my best bet then. Nevertheless, I consider removal of this warning as an worthwhile improvement that I hope will happen soon.
How do you suppress this warning? Our build environment treats all warnings as errors, so this is a bit of a pain point.
@William-Froelich We have moved to .NET Core 3.1 months ago. Sorry.
Yeah, we're working on that too but our function apps are stuck on 2.2 from another issue with the azure functions library.
Most helpful comment
Thank you for your time. It seems that project migration to .NET Core 3.1 is my best bet then. Nevertheless, I consider removal of this warning as an worthwhile improvement that I hope will happen soon.