Azure / azure-functions-dotnet-worker

Azure Functions out-of-process .NET language worker
MIT License
432 stars 184 forks source link

Azure Function not working with Microsoft.Azure.Functions.Worker.Sdk `1.17.3`/`1.17.4` #2609

Open EdwinOtten opened 4 months ago

EdwinOtten commented 4 months ago

Description

Hi, my team is having trouble upgrading Microsoft.Azure.Functions.Worker.Sdk. Our application was running fine until we upgraded from version 1.17.2 to 1.17.4. We also tried 1.17.3 and experienced the same issue there. My colleague already created a discussion about the same issue in #2607.

Problem

Building the app works fine, as well as deploying to Azure using the AzureFunctionApp@2 step. Once deployed, all HTTP-triggered functions return a 404 Not Found (when including valid Authentication headers). We think this is because the Function App fails to "discover" the functions in our application (see screenshots below).

Application Insights logging (which we already had configured using SDK version 2.22.0) does not show any requests or exceptions after deploying the app, same for the Log Stream (because that uses AppInsights as well). Once we deploy again using 1.17.2 the logging is working again I also downloaded a Diagnostic dump via Kudu, but I didn't find any relevant error there.

I will keep digging and update this issue if I find anything. If others are experiencing this, or if you are able to reproduce, please let me know! πŸ˜‡

Screenshots

This shows the difference in the Azure Portal between 1.17.2 and 1.17.3:

Healthy deployment using 1.17.2
Unhealthy deployment using 1.17.3

Steps to reproduce

None of our Azure infrastructure changed, but for the purpose of reproducing the issue, here are the details of our setup.

cjaliaga commented 4 months ago

Hi @EdwinOtten, could you share your function app name with me to see if I find something useful in our logs? Since it's failing to discover your functions I think you can use this option: https://github.com/Azure/azure-functions-host/wiki/Sharing-Your-Function-App-name-privately#option-2

Thanks!

EdwinOtten commented 4 months ago

@cjaliaga thanks for helping out! πŸ˜€ Sure, here it is:

Please note that the Function App is back in a working state because we rolled back to 1.17.2. Let me know if you need it back in a faulty state.

jviau commented 4 months ago

@EdwinOtten - the new SDK versions switch how they publish files to output directory from a manual msbuilk task to participating in the existing CopyFilesToOutputDirectory and CopyFilesToPublishDirectory. I wonder if your project has any msbuild customizations which interfere with this.

Can you compare the publish contents of your app built with the different SDK versions? Particularly interested in the contents of extensions.json, functions.metadata, and the .azurefunctions folder in the publish output directory.

Also, does the function app work locally?

EdwinOtten commented 4 months ago

@jviau I compared the contents of the output directory of both builds. The big difference is that the 1.17.2 build contains a lot of DLLs (of every dependency), both in the root of the output directory AND inside the .azurefunctions directory. I also notice the .azurefunctions/runtime/xxx/native directories don't contain the GRPC DLL (grpc_csharp_ext.x64.dll) with 1.17.3.

extensions.json files are identical:

{
  "extensions": [
    {
      "name": "DurableTask",
      "typeName": "Microsoft.Azure.WebJobs.Extensions.DurableTask.DurableTaskWebJobsStartup, Microsoft.Azure.WebJobs.Extensions.DurableTask, Version=2.0.0.0, Culture=neutral, PublicKeyToken=014045d636e89289",
      "hintPath": "./.azurefunctions/Microsoft.Azure.WebJobs.Extensions.DurableTask.dll"
    },
    {
      "name": "Startup",
      "typeName": "Microsoft.Azure.WebJobs.Extensions.FunctionMetadataLoader.Startup, Microsoft.Azure.WebJobs.Extensions.FunctionMetadataLoader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=551316b6919f366c",
      "hintPath": "./.azurefunctions/Microsoft.Azure.WebJobs.Extensions.FunctionMetadataLoader.dll"
    }
  ]
}

functions.metadata files are identical, containing metadata of 90 functions in our project. An example of one of those:

  {
    "name": "GetUserV1",
    "scriptFile": "REDACTED.Function.dll",
    "entryPoint": "REDACTED.v1.Users.GetUserV1.RunAsync",
    "language": "dotnet-isolated",
    "properties": {
      "IsCodeless": false
    },
    "bindings": [
      {
        "name": "req",
        "direction": "In",
        "type": "httpTrigger",
        "authLevel": "Anonymous",
        "methods": [
          "get"
        ],
        "route": "user",
        "properties": {}
      },
      {
        "name": "$return",
        "type": "http",
        "direction": "Out"
      }
    ]
  }

.azurefunctions/function.deps.json files are identical. Without revealing all our dependencies, the file starts with:

  "runtimeTarget": {
    "name": ".NETCoreApp,Version=v6.0",
jviau commented 4 months ago

@EdwinOtten can you share how you are building & publishing your project?

Also if you can share the contents of your csproj - with sensitive information redacted - that would be helpful.

EdwinOtten commented 4 months ago

@jviau I really appreciate your efforts to investigate this, thanks!

These are the tasks in our Azure Pipeline for building & publishing:

  - task: DotNetCoreCLI@2
    displayName: build solution
    inputs:
      command: build
      projects: |
        **/*.csproj
        !**/*.Tests.csproj
      arguments: >-
        --configuration release

  - task: DotNetCoreCLI@2
    inputs:
      command: publish
      publishWebProjects: false
      projects: |
        **/*.csproj 
        !**/*.Tests.csproj
      arguments: >-
        --configuration Release
        --output publish_output
      zipAfterPublish: false
      modifyOutputPath: false

  - task: ArchiveFiles@2
    displayName: Archive $(System.DefaultWorkingDirectory)/publish_output
    inputs:
      rootFolderOrFile: $(System.DefaultWorkingDirectory)/publish_output
      includeRootFolder: false
      archiveFile: $(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip

  - task: PublishBuildArtifacts@1
    displayName: Publish Artifact drop
    inputs:
      PathtoPublish: $(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip

Here is the redacted .csproj:

Please note that the local.settings.json file doesn't actually exist (it's in the .gitignore).

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>
        <AzureFunctionsVersion>v4</AzureFunctionsVersion>
        <AssemblyName>REDACTED.Api.Function</AssemblyName>
        <RootNamespace>REDACTED.Api.Function</RootNamespace>
        <OutputType>Exe</OutputType>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
        <LangVersion>latest</LangVersion>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="REDACTED.ApplicationCore" Version="2024.7.18.2" />
        <PackageReference Include="REDACTED.Domain" Version="2024.7.18.2" />
        <PackageReference Include="REDACTED.Infrastructure" Version="2024.7.18.2" />
        <PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
        <PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
        <PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
        <PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.22.0" />
        <PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="1.2.0" />
        <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask" Version="1.1.4" />
        <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
        <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.OpenApi" Version="1.5.1" />
        <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.3.1" />
        <PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.2" />
        <PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="7.3.0" />
        <PackageReference Include="Microsoft.FeatureManagement" Version="3.4.0" />
        <PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.0.0" />
    </ItemGroup>
    <ItemGroup>
        <None Update="host.json">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="local.settings.json">
            <CopyToOutputDirectory>Always</CopyToOutputDirectory>
            <CopyToPublishDirectory>Always</CopyToPublishDirectory>
        </None>
        <None Update="example.settings.json">
            <CopyToOutputDirectory>Never</CopyToOutputDirectory>
            <CopyToPublishDirectory>Never</CopyToPublishDirectory>
        </None>
    </ItemGroup>
    <ItemGroup>
        <Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" />
    </ItemGroup>
    <ItemGroup>
        <InternalsVisibleTo Include="$(AssemblyName).Tests" />
    </ItemGroup>
</Project>
jviau commented 4 months ago

Does the app work when you run it locally with 1.17.4 SDK?

EdwinOtten commented 4 months ago

@jviau I ran it locally with version 1.17.4 and hit some HTTP-triggered functions to confirm: yes it works fine locally. Here's the redacted log of the app starting up:

App startup logs ``` Azure Functions Core Tools Core Tools Version: 4.0.5907 Commit hash: N/A +807e89766a92b14fd07b9f0bc2bea1d8777ab209 (64-bit) Function Runtime Version: 4.834.3.22875 [2024-07-19T06:44:17.175Z] Found C:\Users\REDACTED\REDACTED.csproj. Using for user secrets file configuration. [2024-07-19T06:44:17.686Z] Building host: version spec: , startup suppressed: 'False', configuration suppressed: 'False', startup operation id: '1290094f-b329-4159-a011-3bcba72c64ce' [2024-07-19T06:44:17.697Z] Reading host configuration file 'C:\Users\REDACTED\bin\Debug\net8.0\host.json' [2024-07-19T06:44:17.699Z] Host configuration file read: [2024-07-19T06:44:17.700Z] { [2024-07-19T06:44:17.701Z] "version": "2.0", [2024-07-19T06:44:17.702Z] "logging": { [2024-07-19T06:44:17.703Z] "applicationInsights": { [2024-07-19T06:44:17.703Z] "samplingSettings": { [2024-07-19T06:44:17.704Z] "isEnabled": true [2024-07-19T06:44:17.705Z] }, [2024-07-19T06:44:17.706Z] "enableDependencyTracking": true, [2024-07-19T06:44:17.707Z] "enableLiveMetrics": true, [2024-07-19T06:44:17.708Z] "enablePerformanceCountersCollection": true [2024-07-19T06:44:17.711Z] }, [2024-07-19T06:44:17.712Z] "logLevel": { [2024-07-19T06:44:17.713Z] "default": "Information" [2024-07-19T06:44:17.714Z] } [2024-07-19T06:44:17.715Z] } [2024-07-19T06:44:17.716Z] } [2024-07-19T06:44:17.741Z] Extension Bundle not loaded. Loading extensions from C:\Users\REDACTED\bin\Debug\net8.0. BundleConfigured: False, PrecompiledFunctionApp: False, LegacyBundle: False, DotnetIsolatedApp: True, isLogicApp: False [2024-07-19T06:44:17.744Z] Script Startup resetting load context with base path: 'C:\Users\REDACTED\bin\Debug\net8.0\.azurefunctions'. [2024-07-19T06:44:17.755Z] Loading startup extension 'DurableTask' [2024-07-19T06:44:17.824Z] Loaded extension 'DurableTask' (2.0.0.0) [2024-07-19T06:44:17.838Z] Loading startup extension 'Startup' [2024-07-19T06:44:17.840Z] Loaded extension 'Startup' (1.0.0.0) [2024-07-19T06:44:17.862Z] Reading host configuration file 'C:\Users\REDACTED\bin\Debug\net8.0\host.json' [2024-07-19T06:44:17.865Z] Host configuration file read: [2024-07-19T06:44:17.866Z] { [2024-07-19T06:44:17.867Z] "version": "2.0", [2024-07-19T06:44:17.868Z] "logging": { [2024-07-19T06:44:17.869Z] "applicationInsights": { [2024-07-19T06:44:17.871Z] "samplingSettings": { [2024-07-19T06:44:17.872Z] "isEnabled": true [2024-07-19T06:44:17.873Z] }, [2024-07-19T06:44:17.874Z] "enableDependencyTracking": true, [2024-07-19T06:44:17.876Z] "enableLiveMetrics": true, [2024-07-19T06:44:17.877Z] "enablePerformanceCountersCollection": true [2024-07-19T06:44:17.878Z] }, [2024-07-19T06:44:17.881Z] "logLevel": { [2024-07-19T06:44:17.883Z] "default": "Information" [2024-07-19T06:44:17.884Z] } [2024-07-19T06:44:17.885Z] } [2024-07-19T06:44:17.886Z] } [2024-07-19T06:44:18.472Z] Using the default storage provider: AzureStorage. [2024-07-19T06:44:19.153Z] Initializing Warmup Extension. [2024-07-19T06:44:19.167Z] Resolved secret storage provider BlobStorageSecretsRepository [2024-07-19T06:44:19.352Z] Durable extension configuration loaded: {"httpSettings":{"defaultAsyncRequestSleepTimeMilliseconds":30000},"hubName":"TestHubName","storageProvider":{"connectionName":null,"connectionStringName":null,"controlQueueBatchSize":32,"partitionCount":4,"controlQueueBufferThreshold":256,"controlQueueVisibilityTimeout":"00:05:00","workItemQueueVisibilityTimeout":"00:05:00","trackingStoreConnectionName":null,"trackingStoreConnectionStringName":null,"trackingStoreNamePrefix":null,"fetchLargeMessagesAutomatically":true,"maxQueuePollingInterval":"00:00:30","useLegacyPartitionManagement":false,"useTablePartitionManagement":false},"tracing":{"traceInputsAndOutputs":false,"allowVerboseLinuxTelemetry":false,"traceReplayEvents":false,"distributedTracingEnabled":false,"distributedTracingProtocol":"HttpCorrelationProtocol","version":"V1"},"notifications":{"eventGrid":null},"maxConcurrentActivityFunctions":80,"maxConcurrentOrchestratorFunctions":80,"maxConcurrentEntityFunctions":80,"localRpcEndpointEnabled":null,"maxEntityOperationBatchSize":5000,"extendedSessionsEnabled":false,"extendedSessionIdleTimeoutInSeconds":30,"maxOrchestrationActions":100000,"overridableExistingInstanceStates":"NonRunningStates","entityMessageReorderWindowInMinutes":30,"useGracefulShutdown":false,"rollbackEntityOperationsOnExceptions":true,"throwStatusExceptionsOnRaiseEvent":null,"useAppLease":true,"storeInputsInOrchestrationHistory":false,"appLeaseOptions":{"renewInterval":"00:00:25","acquireInterval":"00:05:00","leaseInterval":"00:01:00"}}. HubName: TestHubName. AppName: . SlotName: . ExtensionVersion: 2.13.4. [2024-07-19T06:44:19.442Z] Opened local gRPC endpoint: http://localhost:4001. InstanceId: . Function: . HubName: TestHubName. AppName: . SlotName: . ExtensionVersion: 2.13.4. SequenceNumber: 0. [2024-07-19T06:44:19.501Z] Initializing Host. OperationId: '1290094f-b329-4159-a011-3bcba72c64ce'. [2024-07-19T06:44:19.514Z] Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=1290094f-b329-4159-a011-3bcba72c64ce [2024-07-19T06:44:19.587Z] Loading functions metadata [2024-07-19T06:44:19.591Z] Worker indexing is enabled [2024-07-19T06:44:19.599Z] Fetching metadata for workerRuntime: dotnet-isolated [2024-07-19T06:44:19.601Z] Reading functions metadata (Worker) [2024-07-19T06:44:23.140Z] { [2024-07-19T06:44:23.142Z] "ProcessId": 16844, [2024-07-19T06:44:23.144Z] "RuntimeIdentifier": "win-x64", [2024-07-19T06:44:23.145Z] "WorkerVersion": "1.18.0.0", [2024-07-19T06:44:23.146Z] "ProductVersion": "1.18.0\u002B1e81e6133d75399dc71a808ae9d06db8f4566d99", [2024-07-19T06:44:23.147Z] "FrameworkDescription": ".NET 8.0.6", [2024-07-19T06:44:23.149Z] "OSDescription": "Microsoft Windows 10.0.22000", [2024-07-19T06:44:23.150Z] "OSArchitecture": "X64", [2024-07-19T06:44:23.151Z] "CommandLine": "C:\\Users\\REDACTED\\bin\\Debug\\net8.0\\REDACTED.dll --host 127.0.0.1 --port 52596 --workerId e171f629-43d9-40f0-ba77-8c7da3348606 --requestId 11e9c29b-4115-4e81-9b9f-04bf23e7dd71 --grpcMaxMessageLength 2147483647 --functions-uri http://127.0.0.1:52596/ --functions-worker-id e171f629-43d9-40f0-ba77-8c7da3348606 --functions-request-id 11e9c29b-4115-4e81-9b9f-04bf23e7dd71 --functions-grpc-max-message-length 2147483647" [2024-07-19T06:44:23.153Z] } [2024-07-19T06:44:23.390Z] 89 functions found (Worker) [2024-07-19T06:44:23.414Z] Reading functions metadata (Custom) [2024-07-19T06:44:23.431Z] 1 functions found (Custom) [2024-07-19T06:44:23.444Z] 89 functions loaded [2024-07-19T06:44:23.449Z] Azure Functions .NET Worker (PID: 16844) initialized in debug mode. Waiting for debugger to attach... [2024-07-19T06:44:23.454Z] LoggerFilterOptions [2024-07-19T06:44:23.455Z] { [2024-07-19T06:44:23.456Z] "MinLevel": "None", [2024-07-19T06:44:23.457Z] "Rules": [ [2024-07-19T06:44:23.460Z] { [2024-07-19T06:44:23.461Z] "ProviderName": null, [2024-07-19T06:44:23.462Z] "CategoryName": null, [2024-07-19T06:44:23.464Z] "LogLevel": null, [2024-07-19T06:44:23.465Z] "Filter": "b__0" [2024-07-19T06:44:23.466Z] }, [2024-07-19T06:44:23.468Z] { [2024-07-19T06:44:23.469Z] "ProviderName": null, [2024-07-19T06:44:23.471Z] "CategoryName": null, [2024-07-19T06:44:23.472Z] "LogLevel": "Information", [2024-07-19T06:44:23.475Z] "Filter": null [2024-07-19T06:44:23.476Z] }, [2024-07-19T06:44:23.477Z] { [2024-07-19T06:44:23.478Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider", [2024-07-19T06:44:23.480Z] "CategoryName": null, [2024-07-19T06:44:23.481Z] "LogLevel": "None", [2024-07-19T06:44:23.482Z] "Filter": null [2024-07-19T06:44:23.483Z] }, [2024-07-19T06:44:23.485Z] { [2024-07-19T06:44:23.486Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider", [2024-07-19T06:44:23.487Z] "CategoryName": null, [2024-07-19T06:44:23.488Z] "LogLevel": null, [2024-07-19T06:44:23.492Z] "Filter": "b__0" [2024-07-19T06:44:23.493Z] }, [2024-07-19T06:44:23.495Z] { [2024-07-19T06:44:23.496Z] "ProviderName": "Azure.Functions.Cli.Diagnostics.ColoredConsoleLoggerProvider", [2024-07-19T06:44:23.497Z] "CategoryName": null, [2024-07-19T06:44:23.498Z] "LogLevel": null, [2024-07-19T06:44:23.499Z] "Filter": "b__0" [2024-07-19T06:44:23.501Z] } [2024-07-19T06:44:23.502Z] ] [2024-07-19T06:44:23.503Z] } [2024-07-19T06:44:23.505Z] LoggerFilterOptions [2024-07-19T06:44:23.507Z] { [2024-07-19T06:44:23.509Z] "MinLevel": "None", [2024-07-19T06:44:23.510Z] "Rules": [ [2024-07-19T06:44:23.511Z] { [2024-07-19T06:44:23.512Z] "ProviderName": null, [2024-07-19T06:44:23.513Z] "CategoryName": null, [2024-07-19T06:44:23.515Z] "LogLevel": null, [2024-07-19T06:44:23.516Z] "Filter": "b__0" [2024-07-19T06:44:23.517Z] }, [2024-07-19T06:44:23.518Z] { [2024-07-19T06:44:23.519Z] "ProviderName": null, [2024-07-19T06:44:23.520Z] "CategoryName": null, [2024-07-19T06:44:23.524Z] "LogLevel": "Information", [2024-07-19T06:44:23.525Z] "Filter": null [2024-07-19T06:44:23.526Z] }, [2024-07-19T06:44:23.527Z] { [2024-07-19T06:44:23.529Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider", [2024-07-19T06:44:23.531Z] "CategoryName": null, [2024-07-19T06:44:23.532Z] "LogLevel": "None", [2024-07-19T06:44:23.533Z] "Filter": null [2024-07-19T06:44:23.534Z] }, [2024-07-19T06:44:23.535Z] { [2024-07-19T06:44:23.537Z] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider", [2024-07-19T06:44:23.540Z] "CategoryName": null, [2024-07-19T06:44:23.541Z] "LogLevel": null, [2024-07-19T06:44:23.543Z] "Filter": "b__0" [2024-07-19T06:44:23.544Z] }, [2024-07-19T06:44:23.545Z] { [2024-07-19T06:44:23.547Z] "ProviderName": "Azure.Functions.Cli.Diagnostics.ColoredConsoleLoggerProvider", [2024-07-19T06:44:23.548Z] "CategoryName": null, [2024-07-19T06:44:23.549Z] "LogLevel": null, [2024-07-19T06:44:23.550Z] "Filter": "b__0" [2024-07-19T06:44:23.551Z] } [2024-07-19T06:44:23.552Z] ] [2024-07-19T06:44:23.556Z] } [2024-07-19T06:44:23.558Z] LanguageWorkerOptions [2024-07-19T06:44:23.559Z] { [2024-07-19T06:44:23.560Z] "WorkerConfigs": [ [2024-07-19T06:44:23.561Z] { [2024-07-19T06:44:23.562Z] "Description": { [2024-07-19T06:44:23.564Z] "Language": "dotnet-isolated", [2024-07-19T06:44:23.565Z] "DefaultRuntimeName": null, [2024-07-19T06:44:23.566Z] "DefaultRuntimeVersion": "7.0", [2024-07-19T06:44:23.567Z] "SupportedArchitectures": null, [2024-07-19T06:44:23.568Z] "SupportedOperatingSystems": null, [2024-07-19T06:44:23.571Z] "SupportedRuntimeVersions": null, [2024-07-19T06:44:23.573Z] "SanitizeRuntimeVersionRegex": null, [2024-07-19T06:44:23.574Z] "WorkerIndexing": "true", [2024-07-19T06:44:23.575Z] "Extensions": [ [2024-07-19T06:44:23.576Z] ".dll" [2024-07-19T06:44:23.577Z] ], [2024-07-19T06:44:23.578Z] "UseStdErrorStreamForErrorsOnly": false, [2024-07-19T06:44:23.579Z] "DefaultExecutablePath": "C:\\Program Files\\dotnet\\dotnet.exe", [2024-07-19T06:44:23.581Z] "DefaultWorkerPath": "C:\\Users\\REDACTED\\bin\\Debug\\net8.0\\REDACTED.dll", [2024-07-19T06:44:23.582Z] "WorkerDirectory": "C:\\Users\\REDACTED\\bin\\Debug\\net8.0", [2024-07-19T06:44:23.583Z] "Arguments": [], [2024-07-19T06:44:23.585Z] "WorkerArguments": null [2024-07-19T06:44:23.588Z] }, [2024-07-19T06:44:23.589Z] "Arguments": { [2024-07-19T06:44:23.591Z] "ExecutablePath": "C:\\Program Files\\dotnet\\dotnet.exe", [2024-07-19T06:44:23.592Z] "ExecutableArguments": [], [2024-07-19T06:44:23.593Z] "WorkerPath": "C:\\Users\\REDACTED\\bin\\Debug\\net8.0\\REDACTED.dll", [2024-07-19T06:44:23.595Z] "WorkerArguments": [] [2024-07-19T06:44:23.596Z] }, [2024-07-19T06:44:23.598Z] "CountOptions": { [2024-07-19T06:44:23.599Z] "SetProcessCountToNumberOfCpuCores": false, [2024-07-19T06:44:23.600Z] "ProcessCount": 1, [2024-07-19T06:44:23.604Z] "MaxProcessCount": 10, [2024-07-19T06:44:23.606Z] "ProcessStartupInterval": "00:00:10", [2024-07-19T06:44:23.607Z] "ProcessStartupTimeout": "30.00:00:00", [2024-07-19T06:44:23.609Z] "InitializationTimeout": "30.00:00:00", [2024-07-19T06:44:23.611Z] "EnvironmentReloadTimeout": "00:00:30", [2024-07-19T06:44:23.612Z] "ProcessRestartInterval": "00:00:10", [2024-07-19T06:44:23.614Z] "ProcessShutdownTimeout": "00:00:10" [2024-07-19T06:44:23.615Z] } [2024-07-19T06:44:23.616Z] } [2024-07-19T06:44:23.619Z] ] [2024-07-19T06:44:23.622Z] } [2024-07-19T06:44:23.623Z] ConcurrencyOptions [2024-07-19T06:44:23.625Z] { [2024-07-19T06:44:23.626Z] "DynamicConcurrencyEnabled": false, [2024-07-19T06:44:23.628Z] "MaximumFunctionConcurrency": 500, [2024-07-19T06:44:23.629Z] "CPUThreshold": 0.8, [2024-07-19T06:44:23.631Z] "SnapshotPersistenceEnabled": true [2024-07-19T06:44:23.633Z] } [2024-07-19T06:44:23.637Z] FunctionResultAggregatorOptions [2024-07-19T06:44:23.638Z] { [2024-07-19T06:44:23.640Z] "BatchSize": 1000, [2024-07-19T06:44:23.641Z] "FlushTimeout": "00:00:30", [2024-07-19T06:44:23.642Z] "IsEnabled": true [2024-07-19T06:44:23.644Z] } [2024-07-19T06:44:23.645Z] SingletonOptions [2024-07-19T06:44:23.646Z] { [2024-07-19T06:44:23.648Z] "LockPeriod": "00:00:15", [2024-07-19T06:44:23.649Z] "ListenerLockPeriod": "00:00:15", [2024-07-19T06:44:23.653Z] "LockAcquisitionTimeout": "10675199.02:48:05.4775807", [2024-07-19T06:44:23.654Z] "LockAcquisitionPollingInterval": "00:00:05", [2024-07-19T06:44:23.655Z] "ListenerLockRecoveryPollingInterval": "00:01:00" [2024-07-19T06:44:23.656Z] } [2024-07-19T06:44:23.657Z] ScaleOptions [2024-07-19T06:44:23.658Z] { [2024-07-19T06:44:23.659Z] "ScaleMetricsMaxAge": "00:02:00", [2024-07-19T06:44:23.661Z] "ScaleMetricsSampleInterval": "00:00:10", [2024-07-19T06:44:23.662Z] "MetricsPurgeEnabled": true, [2024-07-19T06:44:23.663Z] "IsTargetScalingEnabled": true, [2024-07-19T06:44:23.664Z] "IsRuntimeScalingEnabled": false [2024-07-19T06:44:23.667Z] } [2024-07-19T06:44:23.670Z] Starting JobHost [2024-07-19T06:44:23.673Z] Starting Host (HostId=REDACTED, InstanceId=5f681db4-d5a5-465a-9de7-e1fce80a770d, Version=4.834.3.22875, ProcessId=19056, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=(null)) [2024-07-19T06:44:23.781Z] Generating 89 job function(s) [2024-07-19T06:44:23.784Z] Worker process started and initialized. [2024-07-19T06:44:23.957Z] Found the following functions: ## REDACTED [2024-07-19T06:44:24.049Z] Host.Functions.GetUserV1 ## REDACTED [2024-07-19T06:44:24.084Z] Host.Functions.UpdateStatus [2024-07-19T06:44:24.086Z] Host.Functions.UpdateVersion [2024-07-19T06:44:24.087Z] [2024-07-19T06:44:24.108Z] HttpOptions [2024-07-19T06:44:24.110Z] { [2024-07-19T06:44:24.111Z] "DynamicThrottlesEnabled": false, [2024-07-19T06:44:24.111Z] Initializing function HTTP routes [2024-07-19T06:44:24.112Z] "EnableChunkedRequestBinding": false, [2024-07-19T06:44:24.115Z] "MaxConcurrentRequests": -1, [2024-07-19T06:44:24.117Z] "MaxOutstandingRequests": -1, [2024-07-19T06:44:24.120Z] "RoutePrefix": "api" [2024-07-19T06:44:24.123Z] } [2024-07-19T06:44:24.189Z] Mapped function route 'api/user' [get] to 'GetUserV1' ## REDACTED [2024-07-19T06:44:24.222Z] [2024-07-19T06:44:24.235Z] Host initialized (547ms) [2024-07-19T06:44:24.242Z] Starting task hub worker. Extension GUID f7358c13-5a70-44d4-ad83-3787f91fb827. InstanceId: . Function: . HubName: TestHubName. AppName: . SlotName: . ExtensionVersion: 2.13.4. SequenceNumber: 1. Functions: [2024-07-19T06:44:24.501Z] testhubname-control-00: CreateLeaseIfNotExistAsync - leaseContainerName: testhubname-leases, leaseType: intent, partitionId: testhubname-control-00 GetUserV1: [GET] http://localhost:7071/api/user PublishBatch: orchestrationTrigger UpdateStatus: activityTrigger UpdateVersion: activityTrigger ## REDACTED For detailed output, run func with --verbose flag. [2024-07-19T06:44:24.750Z] testhubname-control-00: Acquired intent lease for PartitionId 'testhubname-control-00' on startup. [2024-07-19T06:44:24.756Z] testhubname-control-01: Acquired intent lease for PartitionId 'testhubname-control-01' on startup. [2024-07-19T06:44:24.758Z] testhubname-control-02: Acquired intent lease for PartitionId 'testhubname-control-02' on startup. [2024-07-19T06:44:24.759Z] testhubname-control-03: Acquired intent lease for PartitionId 'testhubname-control-03' on startup. [2024-07-19T06:44:24.781Z] Starting background renewal of intent leases with interval: 00:00:10. [2024-07-19T06:44:24.788Z] Starting to check for available intent leases with interval: 00:00:10. [2024-07-19T06:44:24.840Z] testhubname-control-00: Acquired ownership lease for PartitionId 'testhubname-control-00' on startup. [2024-07-19T06:44:24.843Z] testhubname-control-01: Acquired ownership lease for PartitionId 'testhubname-control-01' on startup. [2024-07-19T06:44:24.844Z] testhubname-control-02: Acquired ownership lease for PartitionId 'testhubname-control-02' on startup. [2024-07-19T06:44:24.846Z] testhubname-control-03: Acquired ownership lease for PartitionId 'testhubname-control-03' on startup. [2024-07-19T06:44:24.853Z] testhubname-control-00: Started listening for messages on queue testhubname-control-00. [2024-07-19T06:44:24.853Z] testhubname-control-01: Started listening for messages on queue testhubname-control-01. [2024-07-19T06:44:24.854Z] Starting background renewal of ownership leases with interval: 00:00:10. [2024-07-19T06:44:24.854Z] testhubname-control-02: Started listening for messages on queue testhubname-control-02. [2024-07-19T06:44:24.858Z] Starting to check for available ownership leases with interval: 00:00:05. [2024-07-19T06:44:24.853Z] testhubname-control-03: Started listening for messages on queue testhubname-control-03. [2024-07-19T06:44:24.865Z] testhubname-applease: Starting background renewal of app lease with interval: 00:00:25. [2024-07-19T06:44:24.873Z] testhubname-control-02: No new messages were found - backing off [2024-07-19T06:44:24.873Z] testhubname-control-01: No new messages were found - backing off [2024-07-19T06:44:24.873Z] testhubname-control-00: No new messages were found - backing off [2024-07-19T06:44:24.874Z] testhubname-control-03: No new messages were found - backing off [2024-07-19T06:44:28.487Z] Host lock lease acquired by instance ID '000000000000000000000000C1C85320'. ```
EdwinOtten commented 4 months ago

@jviau just a friendly reminder about this topic. Is there any more info I can provide?

Again, I really appreciate your efforts πŸ˜„

Digiman commented 4 months ago

Also issues here with this library happened during the build of the app in Azure Pipelines.

Sample errors:

[error]src/Synapse.TrackingService.DbMigrator/obj/Release/net8.0/WorkerExtensions/WorkerExtensions.csproj(0,0): Error NU1301: Failed to retrieve information about 'Microsoft.Azure.Functions.Analyzers' from remote source

/home/vsts/work/1/s/src/Synapse.TrackingService.DbMigrator/obj/Release/net8.0/WorkerExtensions/WorkerExtensions.csproj : error NU1301: Failed to retrieve information about 'Microsoft.Azure.Functions.Analyzers' from remote source

[error]src/Synapse.TrackingService.DbMigrator/obj/Release/net8.0/WorkerExtensions/WorkerExtensions.csproj(0,0): Error

/home/vsts/work/1/s/src/Synapse.TrackingService.DbMigrator/obj/Release/net8.0/WorkerExtensions/WorkerExtensions.csproj : error NU1301: Failed to retrieve information about 'Microsoft.Azure.Functions.Analyzers' from remote source

[error]src/Synapse.TrackingService.DbMigrator/obj/Release/net8.0/WorkerExtensions/WorkerExtensions.csproj(0,0): Error NU1301: Failed to retrieve information about 'Microsoft.Extensions.Logging.Configuration' from remote source

/home/vsts/work/1/s/src/Synapse.TrackingService.DbMigrator/obj/Release/net8.0/WorkerExtensions/WorkerExtensions.csproj : error NU1301: Failed to retrieve information about 'Microsoft.Extensions.Logging.Configuration' from remote source

A lot of error with version 1.17.4 of the package Microsoft.Azure.Functions.Worker.Sdk.

So it looks like more global problem with library.

Some time ago i also had an issues with building the app. Currently it on ubuntu linux agents, but before it was windows agents. So all OS affected on this.

jviau commented 4 months ago

@EdwinOtten can you share your function app name? https://github.com/Azure/azure-functions-host/wiki/Sharing-Your-Function-App-name-privately

@Digiman that looks like an issue with build and separate from this. It appears inner-build restore phase is failing due to nuget feed issues.

EdwinOtten commented 4 months ago

@jviau I used option 2, here it is:

Please note that the Function App is back in a working state because we rolled back to 1.17.2. Let me know if you need it back in a faulty state.

jviau commented 4 months ago

@EdwinOtten what time frame was the application in a broken state?

jviau commented 4 months ago

I found this issue in your logs:

Fallback to host indexing as worker denied indexing

Will need to look at why this is occurring.

EdwinOtten commented 4 months ago

That was July 16th. I don't have access to my PC so I'm not 100% sure about the time, but I remember that it was somewhere between 06:00 and 09:00 UTC.

I'm curious what you can discover about the indexer error πŸ™‚

EdwinOtten commented 4 months ago

@Digiman regarding the inner-build restore mentioned by jviau, take a look at 1252. There are some workarounds/instructions described there that might help you.

fhurta commented 3 months ago

I see you have configured local.settings.json as <CopyToPublishDirectory>Always</CopyToPublishDirectory> which seems a little strange to me as it is only used for local run. I don't know whether the file is picked in Azure but perhaps you might try to set it to Never.. (might be unrelated to your issue but it just caught my attention)

BasheerMohammad commented 3 months ago

Does the app work when you run it locally with 1.17.4 SDK?

Hi, the app doesn't build successfully locally with version 1.17.3/1.17.4 (after clearing NuGet cache). Azure DevOps build pipeline fails with a different error. 1.17.2 builds successfully locally and in ADO.

Local error:

Rebuild started at 16:55... Restored C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration.Tests\Int.DynamicsFscm.Orchestration.Tests.csproj (in 415 ms). 1>------ Rebuild All started: Project: Int.DynamicsFscm.Orchestration, Configuration: Debug Any CPU ------ Restored C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration.csproj (in 451 ms). 1>Determining projects to restore... 1>Restored C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj (in 957 ms). 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): warning MSB3026: Could not copy "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Beginning retry 1 in 1000ms. Could not find a part of the path 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): warning MSB3026: Could not copy "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Beginning retry 2 in 1000ms. Could not find a part of the path 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): warning MSB3026: Could not copy "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Beginning retry 3 in 1000ms. Could not find a part of the path 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): warning MSB3026: Could not copy "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Beginning retry 4 in 1000ms. Could not find a part of the path 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): warning MSB3026: Could not copy "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Beginning retry 5 in 1000ms. Could not find a part of the path 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): warning MSB3026: Could not copy "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Beginning retry 6 in 1000ms. Could not find a part of the path 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): warning MSB3026: Could not copy "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Beginning retry 7 in 1000ms. Could not find a part of the path 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): warning MSB3026: Could not copy "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Beginning retry 8 in 1000ms. Could not find a part of the path 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): warning MSB3026: Could not copy "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Beginning retry 9 in 1000ms. Could not find a part of the path 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): warning MSB3026: Could not copy "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Beginning retry 10 in 1000ms. Could not find a part of the path 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): error MSB3027: Could not copy "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Exceeded retry count of 10. Failed. 1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4983,5): error MSB3021: Unable to copy file "C:\Users\mohammadb\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll" to "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll". Could not find a part of the path 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll'. 1>Done building project "WorkerExtensions.csproj" -- FAILED. 2>------ Rebuild All started: Project: Int.DynamicsFscm.Orchestration.Tests, Configuration: Debug Any CPU ------ 2>CSC : error CS0006: Metadata file 'C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\ref\Int.DynamicsFscm.Orchestration.dll' could not be found 2>Done building project "Int.DynamicsFscm.Orchestration.Tests.csproj" -- FAILED. ========== Rebuild All: 0 succeeded, 2 failed, 0 skipped ========== ========== Rebuild completed at 16:55 and took 15.663 seconds ==========

BasheerMohammad commented 3 months ago

Pipeline error:

2024-08-12T12:29:18.7571883Z ##[section]Starting: Build 2024-08-12T12:29:18.7585464Z ============================================================================== 2024-08-12T12:29:18.7585622Z Task : .NET Core 2024-08-12T12:29:18.7585679Z Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command 2024-08-12T12:29:18.7585790Z Version : 2.242.1 2024-08-12T12:29:18.7585843Z Author : Microsoft Corporation 2024-08-12T12:29:18.7585908Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli 2024-08-12T12:29:18.7586038Z ============================================================================== 2024-08-12T12:29:19.4429611Z [command]C:\Windows\system32\chcp.com 65001 2024-08-12T12:29:19.4587463Z Active code page: 65001 2024-08-12T12:29:19.4630980Z Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you're using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version. 2024-08-12T12:29:19.4708973Z [command]C:\hostedtoolcache\windows\dotnet\dotnet.exe build D:\a\1\s\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration.sln "-dl:CentralLogger,\"D:\a\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.242.1\dotnet-build-helpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll\"*ForwardingLogger,\"D:\a\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.242.1\dotnet-build-helpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll\"" --configuration Release --no-restore 2024-08-12T12:29:36.1594396Z Determining projects to restore... 2024-08-12T12:29:36.9168946Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.durabletask/index.json'. 2024-08-12T12:29:36.9211722Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:36.9233932Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'. 2024-08-12T12:29:36.9240865Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:36.9270115Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'. 2024-08-12T12:29:36.9293124Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:36.9306086Z Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'. 2024-08-12T12:29:36.9318980Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:37.9981836Z Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'. 2024-08-12T12:29:37.9993335Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:38.0017386Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.durabletask/index.json'. 2024-08-12T12:29:38.0041645Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:38.0446360Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'. 2024-08-12T12:29:38.0450117Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:38.0490300Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'. 2024-08-12T12:29:38.0501502Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:39.7151289Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.durabletask/index.json'. 2024-08-12T12:29:40.7314014Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:40.7315072Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'. 2024-08-12T12:29:40.7315435Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:40.7316383Z Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'. 2024-08-12T12:29:40.7316800Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:40.7317430Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'. 2024-08-12T12:29:40.7317985Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:40.7327193Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.durabletask/index.json'. 2024-08-12T12:29:40.7327657Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:40.7330307Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'. 2024-08-12T12:29:40.7330735Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:40.7331465Z Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'. 2024-08-12T12:29:40.7332079Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:40.7332980Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'. 2024-08-12T12:29:40.7333330Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:41.2724224Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.durabletask/index.json'. 2024-08-12T12:29:41.2726437Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:41.3651740Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'. 2024-08-12T12:29:41.3653164Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:41.5200146Z Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'. 2024-08-12T12:29:41.5201208Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:41.5793117Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'. 2024-08-12T12:29:41.5794069Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:42.6342128Z ##[error]solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj(0,0): Error NU1301: Failed to retrieve information about 'Microsoft.NET.Sdk.Functions' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'. 2024-08-12T12:29:42.6357493Z D:\a\1\s\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj : error NU1301: Failed to retrieve information about 'Microsoft.NET.Sdk.Functions' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'. 2024-08-12T12:29:42.6365958Z ##[error]solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj(0,0): Error NU1301: Failed to retrieve information about 'Microsoft.NET.Sdk.Functions' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'. 2024-08-12T12:29:42.6367872Z D:\a\1\s\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj : error NU1301: Failed to retrieve information about 'Microsoft.NET.Sdk.Functions' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'. 2024-08-12T12:29:42.6380623Z ##[error]solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj(0,0): Error NU1301: Failed to retrieve information about 'Microsoft.Azure.WebJobs.Extensions.DurableTask' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.durabletask/index.json'. 2024-08-12T12:29:42.6382745Z D:\a\1\s\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj : error NU1301: Failed to retrieve information about 'Microsoft.Azure.WebJobs.Extensions.DurableTask' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.durabletask/index.json'. 2024-08-12T12:29:42.6385992Z ##[error]solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj(0,0): Error NU1301: Failed to retrieve information about 'Microsoft.Azure.WebJobs.Extensions.DurableTask' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.durabletask/index.json'. 2024-08-12T12:29:42.6388180Z D:\a\1\s\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj : error NU1301: Failed to retrieve information about 'Microsoft.Azure.WebJobs.Extensions.DurableTask' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.durabletask/index.json'. 2024-08-12T12:29:42.6392019Z ##[error]C:\hostedtoolcache\windows\dotnet\sdk\8.0.303\NuGet.targets(169,5): Error : Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'. Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:42.6406985Z C:\hostedtoolcache\windows\dotnet\sdk\8.0.303\NuGet.targets(169,5): error : Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'. [D:\a\1\s\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj] 2024-08-12T12:29:42.6408495Z C:\hostedtoolcache\windows\dotnet\sdk\8.0.303\NuGet.targets(169,5): error : Response status code does not indicate success: 401 (Unauthorized). [D:\a\1\s\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj] 2024-08-12T12:29:42.6409310Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.netcore.targets/index.json'. 2024-08-12T12:29:42.6409702Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:42.6887248Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.netcore.targets/index.json'. 2024-08-12T12:29:42.6889960Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:42.7136162Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.functions.analyzers/index.json'. 2024-08-12T12:29:42.7136809Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:42.7261710Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs/index.json'. 2024-08-12T12:29:42.7263831Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:42.7265302Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions/index.json'. 2024-08-12T12:29:42.7266147Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:42.7266802Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.http/index.json'. 2024-08-12T12:29:42.7267158Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:42.7267809Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.script.extensionsmetadatagenerator/index.json'. 2024-08-12T12:29:42.7268328Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:42.7308552Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/system.text.regularexpressions/index.json'. 2024-08-12T12:29:42.7309189Z Response status code does not indicate success: 401 (Unauthorized). 2024-08-12T12:29:42.7353541Z ##[error]solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj(0,0): Error NU1301: Failed to retrieve information about 'Microsoft.Azure.WebJobs.Extensions.ServiceBus' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'. 2024-08-12T12:29:42.7356238Z D:\a\1\s\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj : error NU1301: Failed to retrieve information about 'Microsoft.Azure.WebJobs.Extensions.ServiceBus' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'. 2024-08-12T12:29:42.7359451Z ##[error]solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj(0,0): Error NU1301: Failed to retrieve information about 'Microsoft.Azure.WebJobs.Extensions.ServiceBus' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'. 2024-08-12T12:29:42.7361281Z D:\a\1\s\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Release\net8.0\win-x64\WorkerExtensions\WorkerExtensions.csproj : error NU1301: Failed to retrieve information about 'Microsoft.Azure.WebJobs.Extensions.ServiceBus' from remote source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'. 2024-08-12T12:29:42.7362204Z Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/<redacted>/<redacted>/_packaging/<redacted>/nuget/v3/flat2/system.net.http/index.json'. 2024-08-12T12:29:42.7362554Z Response status code does not indicate success: 401 (Unauthorized).

EdwinOtten commented 3 months ago

@BasheerMohammad the errors in your pipeline indicate you are using Azure DevOps Artifacts, but the pipeline fails to authenticate when consuming the artifact feed (401 response). Can you check if this problem goes away when downgrading back to 1.17.2? If it doesn't, then it is unrelated to this issue and you should create a separate GitHub issue. This guide might help too.

Regarding the errors in your local build output: The path where the build process is copying that DLL to seems to be too long. Windows has a maximum path length of 260 characters, and "C:\Users\mohammadb\Source\Repos\Sandbox\oscar_int-dynamics-fscm\solutions\Int.DynamicsFscm.Orchestration\Int.DynamicsFscm.Orchestration\obj\Debug\net8.0\win-x64\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll is 265 characters. Try shortening the path by moving your project to a directory with a shorter path.

BasheerMohammad commented 3 months ago

@EdwinOtten The pipeline error disappears after downgrading to version 1.17.2. I believe it is related to the restore step being unable to load specific versions of dependent packages when using version 1.17.4. These packages are then not found by the build step, resulting in generic errors.

The response status code indicates failure: 401 (Unauthorized). Error NU1301: Failed to retrieve information about '....****' from the remote source.

I'll investigate further into the local issue related to the path length. Surprisingly, this issue also disappears after downgrading to version 1.17.2.

devlead commented 2 months ago

I'm seeing the same thing after updating to 1.17.4 getting errors like

Could not copy "HOMEPATH\.nuget\packages\system.security.cryptography.protecteddata\4.7.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll"
Could not find a part of the path PROJECTPATH\obj\Debug\net8.0\WorkerExtensions\buildout\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll

Reverting to 1.17.2 makes Visual Studio happy, dotnet build doesn't complain though and CI works.

EdwinOtten commented 2 months ago

@fhurta I changed it to Never for the local.settings.json but, as I expected, it did not make a difference.

I think #2656 is similar to my issue.

@jviau any suggestions I could try, or should I just hold tight and wait for a fix?

kaskeloten commented 2 months ago

Same issue with 1.18.0, been using 1.17.2 on all my functions for quite a while now.

hovtoros-vb commented 1 month ago

We face the same problem with 1.18.0 and it works with 1.17.2.

martin-dreyer-teck commented 1 month ago

Just adding some info.

I'm also getting the 404 Not Found, after deployment via pipeline, as originally described by @EdwinOtten. Although my function app (pre-deployed via IaC) was originally set to .NET 8 isolated, after the Azure DevOps pipeline runs that gets reverted to .NET 6 in-process. If I force that back to .NET isolated the functions are then found. But it breaks again when I next deploy.

The closest clue I have indicating when that reversion will happen is the runtimeTarget in function.deps.json. When the build sets that to v6.0 the deployment breaks my function app as above. When it is rather set to v8.0, all is good. I'm presently failing to consistently get it to output v8 in the build, regardless of SDK version and even when passing "-f net8.0" argument . Busy trying to figure out what is causing the set of v6.

Bottom line, I cannot reliably deploy a function in .NET 8 isolated mode.

UPDATE

This reversion to net6 was caused by something else. In my IaC I failed to set the 8.0 isolated mode in my staging slot, so when my slot swap was done, the v6 staging slot was being swapped over the v8 function app..

Aaron-Kirby commented 3 weeks ago

I had a similar issue when upgrading the Microsoft.Azure.Functions.Worker.Sdk version. It took 2 things to fix the issues.

  1. Add "- task: NuGetAuthenticate@1" in YAML pipeline build before the DotNetCoreCLI@2 task (NuGet Restore). I was getting: error NU1301: Unable to load the service index for source ...
  2. Added the code below into our ARM template under Microsoft.Web/sites > properties > siteConfig > appSettings. Make sure you add it to all slots.

{ "name": "FUNCTIONS_WORKER_RUNTIME", "value": "dotnet-isolated" }

Note that it depreciated my .NET framework to v6.0. You can add "netFrameworkVersion": "v8.0" to your ARM template under Microsoft.Web/sites > properties > siteConfig. However, mine worked without needing to.