System.TypeLoadException: Could not resolve type 'Microsoft.Azure.WebJobs.Script.Grpc.Messages.FunctionRpc' in assembly 'Microsoft.Azure.WebJobs.Script.Grpc, Version=4.49.0.0, Culture=neutral, PublicKeyToken=null'
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.6.0" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
Azure Functions Core Tools
Core Tools Version: 4.6.0+8b616562b6d244870ef3ba385f6e8481423f419e (64-bit)
Function Runtime Version: 4.849.100.26208
[2026-08-07T15:03:25.782Z] Found C:\Users\tvandemerwe\Documents\Repositories\testfunc\testfunc.csproj. Using for user secrets file configuration.
[2026-08-07T15:03:28.085Z] Error starting Rpc Initialization Service. Handling error and continuing.
[2026-08-07T15:03:28.085Z] Microsoft.Azure.WebJobs.Script.HostInitializationException: Failed to start Rpc Server. Check if your app is hitting connection limits.
[2026-08-07T15:03:28.086Z] ---> System.TypeLoadException: Could not resolve type 'Microsoft.Azure.WebJobs.Script.Grpc.Messages.FunctionRpc' in assembly 'Microsoft.Azure.WebJobs.Script.Grpc, Version=4.49.0.0, Culture=neutral, PublicKeyToken=null'.
[2026-08-07T15:03:28.087Z] at System.Reflection.TypeNameParser.GetTypeFromDefaultAssemblies(String typeName, ReadOnlySpan`1 nestedTypeNames)
[2026-08-07T15:03:28.087Z] at System.Reflection.TypeNameParser.GetType(String typeName, ReadOnlySpan`1 nestedTypeNames, String assemblyNameIfAny)
[2026-08-07T15:03:28.088Z] at System.Reflection.TypeNameParser.GetTypeHelper(Char* pTypeName, RuntimeAssembly requestingAssembly, Boolean throwOnError, Boolean requireAssemblyQualifiedName)
[2026-08-07T15:03:28.088Z] at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
[2026-08-07T15:03:28.089Z] at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
[2026-08-07T15:03:28.090Z] at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
[2026-08-07T15:03:28.090Z] at System.Attribute.GetCustomAttributes(MemberInfo element, Type attributeType, Boolean inherit)
[2026-08-07T15:03:28.091Z] at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
[2026-08-07T15:03:28.091Z] at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](MemberInfo element)
[2026-08-07T15:03:28.092Z] at Grpc.Shared.Server.BindMethodFinder.GetBindMethodUsingAttribute(Type serviceType)
[2026-08-07T15:03:28.092Z] at Grpc.Shared.Server.BindMethodFinder.GetBindMethod(Type serviceType)
[2026-08-07T15:03:28.093Z] at Grpc.AspNetCore.Server.Model.Internal.BinderServiceMethodProvider`1.OnServiceMethodDiscovery(ServiceMethodProviderContext`1 context)
[2026-08-07T15:03:28.093Z] at Grpc.AspNetCore.Server.Model.Internal.ServiceRouteBuilder`1.Build(IEndpointRouteBuilder endpointRouteBuilder)
[2026-08-07T15:03:28.094Z] at Microsoft.AspNetCore.Builder.GrpcEndpointRouteBuilderExtensions.MapGrpcService[TService](IEndpointRouteBuilder builder)
[2026-08-07T15:03:28.095Z] at Microsoft.Azure.WebJobs.Script.Grpc.Startup.<>c.<Configure>b__2_0(IEndpointRouteBuilder endpoints) in /_/src/WebJobs.Script.Grpc/Server/Startup.cs:line 41
[2026-08-07T15:03:28.095Z] at Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints(IApplicationBuilder builder, Action`1 configure)
[2026-08-07T15:03:28.096Z] at Microsoft.Azure.WebJobs.Script.Grpc.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in /_/src/WebJobs.Script.Grpc/Server/Startup.cs:line 39
[2026-08-07T15:03:28.097Z] at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
[2026-08-07T15:03:28.097Z] at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
[2026-08-07T15:03:28.098Z] at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[2026-08-07T15:03:28.099Z] at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
[2026-08-07T15:03:28.099Z] at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
[2026-08-07T15:03:28.100Z] at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
[2026-08-07T15:03:28.100Z] at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
[2026-08-07T15:03:28.101Z] at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
[2026-08-07T15:03:28.102Z] at Microsoft.Azure.WebJobs.Script.Grpc.AspNetCoreGrpcServer.StartAsync() in /_/src/WebJobs.Script.Grpc/Server/AspNetCoreGrpcServer.cs:line 44
[2026-08-07T15:03:28.102Z] at Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcInitializationService.InitializeRpcServerAsync() in /_/src/WebJobs.Script/Workers/Rpc/RpcInitializationService.cs:line 101
[2026-08-07T15:03:28.103Z] --- End of inner exception stack trace ---
[2026-08-07T15:03:28.104Z] at Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcInitializationService.InitializeRpcServerAsync() in /_/src/WebJobs.Script/Workers/Rpc/RpcInitializationService.cs:line 106
[2026-08-07T15:03:28.104Z] at Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcInitializationService.StartAsync(CancellationToken cancellationToken) in /_/src/WebJobs.Script/Workers/Rpc/RpcInitializationService.cs:line 53
Could not find any related issues and I am not sure how the DLL resolving would happen.
Running "func start"on a fresh "func init" results in a
csproj
local.settings.json
{ "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "UseDevelopmentStorage=true", "FUNCTIONS_INPROC_NET8_ENABLED": "1", "FUNCTIONS_WORKER_RUNTIME": "dotnet" } }Azure Functions Core Tools version is: 4.12.1
Running
func start --debugproduces the following outputCould not find any related issues and I am not sure how the DLL resolving would happen.