Skip to content
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

Unhandled exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.Build, Version=15.1.0.0 #11455

Closed
1 task done
SeanFeldman opened this issue Jan 31, 2025 · 4 comments
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet L: python T: bug 🐞 Something isn't working

Comments

@SeanFeldman
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

NuGet

Package manager version

No response

Language version

C#

Manifest location and content before the Dependabot update

dependabot.log.txt

dependabot.yml content

No response

Updated dependency

n/a

What you expected to see, versus what you actually saw

Shoed not throw exceptions

Native package manager behavior

No response

Images of the diff or a link to the PR, issue, or logs

dependabot.log.txt

Smallest manifest that reproduces the issue

.github\dependabot.yml

version: 2

registries:
  # Azure DevOps private feed
  my-feed:
    type: nuget-feed
    key: "dotnet"
    url: "https://pkgs.dev.azure.com/My/_packaging/MyNuget/nuget/v3/index.json"
    token: PAT:${{ PAT }}

updates:
  - package-ecosystem: "nuget"
    target-branch: master
    directory: /
    registries: 
      - my-feed
    commit-message:
      prefix: "deps"
    schedule:
      interval: weekly
      day: sunday      
    open-pull-requests-limit: 1000
    groups:
      My:
        patterns:
          - 'My.*'
      Microsoft:
        patterns:
          - 'Microsoft.*'
          - 'Azure.*'
      TestLibraries:
        patterns:
          - 'Moq*'
          - 'FakeItEasy*'
          - 'FluentAssertions*'
          - 'xunit*'
          - 'coverlet*'
          - 'Verify*'
          - 'Microsoft.NET.Test.Sdk*'
      ThirdParty:
        patterns:
          - '.*'
    ignore:
      - dependency-name: 'FluentAssertions*'
        versions: [ '>=8.0.0' ]
        update-types: [ 'version-update:semver-major' ]

AzDO pipeline yaml

schedules:
  - cron: "0 0 */7 * *"
    displayName: 'Run Dependabot (once a week)'  
    always: true 
    branches:
      include:
        - master
    batch: true

trigger: none # Disable CI trigger

variables:
  - group: Dependabot

jobs:
  - job: Default
    timeoutInMinutes: 60
    
    pool:
      vmImage: 'ubuntu-latest'
    
    steps:
      - task: NuGetAuthenticate@1
        displayName: "Authenticate to NuGet feed"

      - task: dependabot@2
        displayName: 'Run Dependabot'
        inputs:
          useConfigFile: true
          useUpdateScriptvNext: true
          azureDevOpsAccessToken: $(System.AccessToken)
        env:
          PAT: $(System.AccessToken)
@SeanFeldman SeanFeldman added the T: bug 🐞 Something isn't working label Jan 31, 2025
@github-actions github-actions bot added L: dotnet:nuget NuGet packages via nuget or dotnet L: python labels Jan 31, 2025
@SeanFeldman
Copy link
Author

Closing as "resolved".
The workaround was to use an experiment:

      - task: dependabot@2
        displayName: 'Run Dependabot'
        inputs:
          useConfigFile: true
          useUpdateScriptvNext: true
          azureDevOpsAccessToken: $(System.AccessToken)
          experiments: nuget-install-dotnet-sdks=true

@StephanBis
Copy link

We are also experiencing this issue. However the experiment workaround provided does not solve the issue for us. Are you sure you didn't change anything else?

Small sidenote: both useConfigFile: true and useUpdateScriptvNext: true do not exist on dependabot@2.

@rhyskoedijk
Copy link

rhyskoedijk commented Feb 5, 2025

@StephanBis those two config options are only applicable if using dependabot@1, they were removed in depdnabot@2 and are not required anymore. I assume they are in @SeanFeldman pipeline as a hangover from upgrading from 1 to 2.

I've made a note to investigate this when I get a chance as it could be an issue specifically with tinglesoftware/dependabot-azure-devops, not dependabot-core.

@SeanFeldman
Copy link
Author

I assume they are in @SeanFeldman pipeline as a hangover from upgrading from 1 to 2.

Indeed 🙂

I've made a note to investigate this when I get a chance as it could be an issue specifically with tinglesoftware/dependabot-azure-devops, not dependabot-core.

Do you have a link to cross-link to this issue? And, if that's indeed not dependabot-core issue, I'd close this one not to confuse anyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet L: python T: bug 🐞 Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants