-
Notifications
You must be signed in to change notification settings - Fork 66
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
'Metadata generation failed' when updating Microsoft.NET.Sdk.Functions to 4.1.3 #592
Comments
Just to confirm, If you downgrade to 4.1.2 version of |
Hello kshyju, |
@JasonAndersen7 I could not repro this issue. Would you be able to share a minimal repro? A GitHub repo will be great. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
HI Kshyju, |
@kshyju Can you check the above comments. |
I encountered a similar issue that brought me here. |
I am trying to update an Azure Function project from .NET Core 3.1 to .NET 6. When updating the Microsoft.NET.Sdk.Functions from 3.0.11 to 4.1.3 or later, I can no longer build the project. Instead, I get the following errors in the Error List:
Similar to #585
This problem seems to be introduced by #547.
Error System.ArgumentException: Object of type 'Mono.Cecil.TypeReference' cannot be converted to type 'System.Type'.
at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
at System.Reflection.MethodBase.CheckArguments(StackAllocedArguments& stackArgs, ReadOnlySpan
1 parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at MakeFunctionJson.TypeUtility.ToReflection(CustomAttribute customAttribute) in /_/src/Microsoft.NET.Sdk.Functions.Generator/TypeUtility.cs:line 106 at MakeFunctionJson.TypeUtility.GetResolvedAttribute(ParameterDefinition parameter, CustomAttribute customAttribute) in /_/src/Microsoft.NET.Sdk.Functions.Generator/TypeUtility.cs:line 67 at MakeFunctionJson.ParameterInfoExtensions.<>c__DisplayClass1_0.<ToFunctionJsonBindings>b__1(CustomAttribute a) in /_/src/Microsoft.NET.Sdk.Functions.Generator/ParameterInfoExtensions.cs:line 32 at System.Linq.Utilities.<>c__DisplayClass2_0
3.b__0(TSource x)at System.Linq.Utilities.<>c__DisplayClass2_0
3.<CombineSelectors>b__0(TSource x) at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.ToList()at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source) at MakeFunctionJson.ParameterInfoExtensions.ToFunctionJsonBindings(ParameterDefinition parameterInfo) in /_/src/Microsoft.NET.Sdk.Functions.Generator/ParameterInfoExtensions.cs:line 29 at MakeFunctionJson.MethodInfoExtensions.<>c.<ToFunctionJson>b__6_0(ParameterDefinition p) in /_/src/Microsoft.NET.Sdk.Functions.Generator/MethodInfoExtensions.cs:line 66 at System.Linq.Enumerable.SelectIListIterator
2.MoveNext()at System.Linq.Enumerable.SelectManySingleSelectorIterator
2.MoveNext() at System.Collections.Generic.LargeArrayBuilder
1.AddRange(IEnumerable1 items) at System.Collections.Generic.SparseArrayBuilder
1.ReserveOrAdd(IEnumerable1 items) at System.Linq.Enumerable.Concat2Iterator
1.ToArray()at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source) at MakeFunctionJson.MethodInfoExtensions.ToFunctionJson(MethodDefinition method, String assemblyPath) in /_/src/Microsoft.NET.Sdk.Functions.Generator/MethodInfoExtensions.cs:line 65 at MakeFunctionJson.FunctionJsonConverter.GenerateFunctions(IEnumerable
1 types)+MoveNext() in //src/Microsoft.NET.Sdk.Functions.Generator/FunctionJsonConverter.cs:line 140at System.Collections.Generic.List
1..ctor(IEnumerable
1 collection)at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at MakeFunctionJson.FunctionJsonConverter.TryGenerateFunctionJsons() in //src/Microsoft.NET.Sdk.Functions.Generator/FunctionJsonConverter.cs:line 194
at MakeFunctionJson.FunctionJsonConverter.TryRun() in /_/src/Microsoft.NET.Sdk.Functions.Generator/FunctionJsonConverter.cs:line 87
File : Microsoft.NET.Sdk.Functions.Build.targets
The text was updated successfully, but these errors were encountered: