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

[Question]: How to restore missing dependencies ? #4572

Closed
1 of 4 tasks
g3rzi opened this issue Dec 13, 2023 · 7 comments
Closed
1 of 4 tasks

[Question]: How to restore missing dependencies ? #4572

g3rzi opened this issue Dec 13, 2023 · 7 comments

Comments

@g3rzi
Copy link

g3rzi commented Dec 13, 2023

Describe your question

I am able to make changes in the agent and build through the script dev.cmd but when I open the solution with Visual Studio 2017 it shows me that all the dependencies are missing although they are not:
image

It makes debugging harder because I can see some of the object properties. For example, in the RunAsync function in the JobRunner class of Agent.Worker I wanted to see the properties of the Pipelines.AgentJobRequestMessage object which is part of the dependency Microsoft.TeamFoundation.DistributedTask.WebApi.dll but the solution can't find it.

Is there a simple way to restore them? I tried with dotnet restore without success.

Versions

latest, this is a general question, it happens in every solution I tried.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

Azure DevOps Server (Please specify exact version in the textbox below)

Operation system

No response

Version controll system

No response

Azure DevOps Server Version (if applicable)

No response

@DmitriiBobreshev
Copy link
Contributor

Hi @g3rzi, the Microsoft.TeamFoundation.DistributedTask.WebApi.dll is a part of the vss-api-netcore package.
You can restore the package by adding https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/nugetvssprivate/nuget/v3/index.json as a package source in your NuGet setup.

@kirill-ivlev
Copy link
Contributor

HI @g3rzi!
Please let us know if you still facing this issue, otherwise we planning to close this issue soon.

@g3rzi
Copy link
Author

g3rzi commented Jan 1, 2024

Thanks,

I edited the NuGet.Config to be like that (based on the URL @DmitriiBobreshev wrote):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <!--To inherit the global NuGet package sources remove the <clear/> line below -->
    <clear />
    <add key="restsdk" value="https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/nugetvssprivate/nuget/v3/index.json"/>
	<add key="AzureDevOps" value="https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/nugetvssprivate/nuget/v3/index.json" />
  </packageSources>
</configuration>

But after restart of Visual Studio, it still doesn't show a reference to Pipelines.AgentJobRequestMessage.

The problem is much larger than that, all the dependencies appear to be missing:
image

Did you try to download the repository from scratch?

@kirill-ivlev
Copy link
Contributor

Hi @g3rzi, could you please confirm that you can build agent using .\src\dev.cmd build layout command?

@g3rzi
Copy link
Author

g3rzi commented Jan 3, 2024

Yes, it works.
After I run:

PS D:\azure-pipelines-agent-3.225.2\src> .\dev.cmd layout
<REDACTED>
PS D:\azure-pipelines-agent-3.225.2\src> .\dev.cmd build
...
  Build succeeded.
      0 Warning(s)
      0 Error(s)

  Time Elapsed 00:00:00.29
/d/azure-pipelines-agent-3.225.2/src
...

@StingyJack
Copy link

@kirill-ivlev - please confirm that VS 2017 is the version of VS that should be used for this.

@kirill-ivlev
Copy link
Contributor

@StingyJack not really, I'm using VS 2022 with no issues.
But, before building from MSVS you need to build using dev scripts to restore these dependencies.

Closing this one, since issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants