Skip to content

Functions v2: ExtensionsMetadataGenerator fails for new Microsoft.Win32.Registry #5119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ngg opened this issue Oct 20, 2019 · 1 comment
Closed
Assignees

Comments

@ngg
Copy link

ngg commented Oct 20, 2019

When I run dotnet build, ExtensionsMetadataGenerator throws an exception (which results in a warning) if Microsoft.Win32.Registry 4.6.0 is used.
I'm not sure if this warning is important, or can be safely ignored.
I tried different framework versions: .NET Core 2.1, .NET Core 2.2;
different Microsoft.NET.Sdk.Functions package versions: 1.0.23, ..., 1.0.29, 1.0.30-beta1, 1.0.30-beta2;
and different Microsoft.Win32.Registry package versions: 4.5.0, 4.6.0

The framework version doesn't seem to matter, it fails the same way for 2.1 and 2.2.
Microsoft.Win32.Registry 4.5.0 works for every Functions version I tried,
and the new 4.6.0 version fails if the Functions package version >= 1.0.25.
It works with 1.0.24.
Based on this, I think this is a similar issue to #4055 which also started to fail from 1.0.25.

Minimal repro case:
test.csproj:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>netcoreapp2.1</TargetFrameworks>
    <AzureFunctionsVersion>v2</AzureFunctionsVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Win32.Registry" Version="4.6.0" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.29" />
  </ItemGroup>
</Project>

I get the following warning:

/home/ngg/.nuget/packages/microsoft.azure.webjobs.script.extensionsmetadatagenerator/1.1.2/build/Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets(33,5): warning :     Could not evaluate 'Microsoft.Win32.Registry.dll' for extension metadata. Exception message: Could not load file or assembly 'Microsoft.Win32.Registry, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. [/tmp/test/test.csproj]
@ngg ngg changed the title .NET Core 2.1/2.2; Functions v2: ExtensionsMetadataGenerator fails for new Microsoft.Win32.Registry Functions v2: ExtensionsMetadataGenerator fails for new Microsoft.Win32.Registry Oct 20, 2019
@gzuber
Copy link
Member

gzuber commented Nov 14, 2019

@ngg Sorry for the delayed response but this warning can be safely ignored in this case. The ExtensionsMetadataGenerator is just checking to see if the Registry dll is a Functions extension by attempting to load it (it's not, so not a problem). This would only be an issue if you get this warning for a Functions extension dll.

I'll go ahead and close this issue but let me know if you have any more questions

@gzuber gzuber closed this as completed Nov 14, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants