Azure / Azure/azure-functions-host

Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator >= 1.0.2 + e.g. Microsoft.Win32.Registry = warning

Open
#5,545 5 comments 1 reaction 0 assignees View on GitHub
enhancement supportability supportability: error-message-improvement
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

#### Investigative information

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.

#### Repro steps

Create console app project with such **csproj** and try to build it.

```xml


Exe
netcoreapp2.2




```

#### Expected behavior

No warning.

#### Actual behavior

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'.```

#### Known workarounds

Downgrading a package to at least 1.0.1

#### Related information

One might argue that this behavior is appropriate. Maybe. I'm not familiar with these packages' content.

**But** having

- _Microsoft.NET.Sdk.Functions > 1.0.24_ depending on _Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator > 1.0.1_
- _System.Data.SqlClient = 4.8.0_ depending on _Microsoft.Win32.Registry_

causes my pipelines to fail because I treat warnings as errors and [I cannot really accept this](https://github.com/Azure/azure-functions-host/issues/5119#issuecomment-553668590). Issue on the Azure Function SDK side is hanging as opened since [March 2019](https://github.com/Azure/azure-functions-vs-build-sdk/issues/287).

Thank you for your reply.

Contributor guide

Open the contributing guide

Research direction

Reproduce the warning by building the console project with the shown csproj and package versions. Then inspect Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets at line 33 and the package interaction involving Microsoft.Win32.Registry. Done means the project builds without this warning while retaining the affected package versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.