Azure DevOps, Restore NuGet packages for “Visual Studio Build” when using a website.sln?
I can't seem to find the correct settings for my devops build pipeline to enable it to restore NuGet packages so that the build process will locate them.
The first issue which I have over come is that the default settings pointed the restore at my sln file which caused it to print out:
Nothing to do. None of the projects in this solution specify any packages for NuGet to restore.
It's a 2017 website sln file and doesn't contain information about NuGet and there is no .csproj which other answers have suggested. I got round the issue by pointing it at the packages.config file. Now the restore process does locate the packages which are needed but it doesn't seem to be putting them where the "Visual Studio Build" build process can find them.
Error CS0246: The type or namespace name 'Nest' could not be found (are you missing a using directive or an assembly reference?)
I have looked in the build process section but couldn't find anything useful as the only reference is marked with:
This option is deprecated. To restore NuGet packages, add a NuGet Tool
Installer
Which is what i'm already attempting to do. I have tried moving the Destination directory of the NuGet restore to Bin and other places but it didn't make a difference.
Is there a step which i'm missing to move the files after they have been restored? or a parameter I need to pass when it's building to tell it where the package files are?
Any help or ideas would be great thanks.
nuget azure-devops nuget-package-restore
add a comment |
I can't seem to find the correct settings for my devops build pipeline to enable it to restore NuGet packages so that the build process will locate them.
The first issue which I have over come is that the default settings pointed the restore at my sln file which caused it to print out:
Nothing to do. None of the projects in this solution specify any packages for NuGet to restore.
It's a 2017 website sln file and doesn't contain information about NuGet and there is no .csproj which other answers have suggested. I got round the issue by pointing it at the packages.config file. Now the restore process does locate the packages which are needed but it doesn't seem to be putting them where the "Visual Studio Build" build process can find them.
Error CS0246: The type or namespace name 'Nest' could not be found (are you missing a using directive or an assembly reference?)
I have looked in the build process section but couldn't find anything useful as the only reference is marked with:
This option is deprecated. To restore NuGet packages, add a NuGet Tool
Installer
Which is what i'm already attempting to do. I have tried moving the Destination directory of the NuGet restore to Bin and other places but it didn't make a difference.
Is there a step which i'm missing to move the files after they have been restored? or a parameter I need to pass when it's building to tell it where the package files are?
Any help or ideas would be great thanks.
nuget azure-devops nuget-package-restore
add a comment |
I can't seem to find the correct settings for my devops build pipeline to enable it to restore NuGet packages so that the build process will locate them.
The first issue which I have over come is that the default settings pointed the restore at my sln file which caused it to print out:
Nothing to do. None of the projects in this solution specify any packages for NuGet to restore.
It's a 2017 website sln file and doesn't contain information about NuGet and there is no .csproj which other answers have suggested. I got round the issue by pointing it at the packages.config file. Now the restore process does locate the packages which are needed but it doesn't seem to be putting them where the "Visual Studio Build" build process can find them.
Error CS0246: The type or namespace name 'Nest' could not be found (are you missing a using directive or an assembly reference?)
I have looked in the build process section but couldn't find anything useful as the only reference is marked with:
This option is deprecated. To restore NuGet packages, add a NuGet Tool
Installer
Which is what i'm already attempting to do. I have tried moving the Destination directory of the NuGet restore to Bin and other places but it didn't make a difference.
Is there a step which i'm missing to move the files after they have been restored? or a parameter I need to pass when it's building to tell it where the package files are?
Any help or ideas would be great thanks.
nuget azure-devops nuget-package-restore
I can't seem to find the correct settings for my devops build pipeline to enable it to restore NuGet packages so that the build process will locate them.
The first issue which I have over come is that the default settings pointed the restore at my sln file which caused it to print out:
Nothing to do. None of the projects in this solution specify any packages for NuGet to restore.
It's a 2017 website sln file and doesn't contain information about NuGet and there is no .csproj which other answers have suggested. I got round the issue by pointing it at the packages.config file. Now the restore process does locate the packages which are needed but it doesn't seem to be putting them where the "Visual Studio Build" build process can find them.
Error CS0246: The type or namespace name 'Nest' could not be found (are you missing a using directive or an assembly reference?)
I have looked in the build process section but couldn't find anything useful as the only reference is marked with:
This option is deprecated. To restore NuGet packages, add a NuGet Tool
Installer
Which is what i'm already attempting to do. I have tried moving the Destination directory of the NuGet restore to Bin and other places but it didn't make a difference.
Is there a step which i'm missing to move the files after they have been restored? or a parameter I need to pass when it's building to tell it where the package files are?
Any help or ideas would be great thanks.
nuget azure-devops nuget-package-restore
nuget azure-devops nuget-package-restore
asked Nov 20 '18 at 19:46
Ben CloseBen Close
124311
124311
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Azure DevOps, Restore NuGet packages for “Visual Studio Build” when using a website.sln?
You should use the NuGet Installer task during your build pipeline.
The option Restore NuGet Packages is deprecated:
This option is deprecated. To restore NuGet packages, add a NuGet
Installer step before the build
So to resolve this issue, please try to use NuGet Installer task, go to Package tab, add nuget restore task.
You can specify the packages.config or the .sln file to restore packages, when you specify the packages.config, you also need provide the Destination directory, the default value is /packages:
Hope this helps.
Hi Leo thanks for answering, unfortunately I don't think you read the question fully as your answer is describing my current set up. I can't use the .sln as it doesn't know anything about packages (should it?) so i am using the packages.config file. The issue is after this point as as the build solution isn't finding the package files. How do I tell it to look in the /packages folder and moved the into the Bin folder for the website build?
– Ben Close
Nov 21 '18 at 10:13
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53400474%2fazure-devops-restore-nuget-packages-for-visual-studio-build-when-using-a-webs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Azure DevOps, Restore NuGet packages for “Visual Studio Build” when using a website.sln?
You should use the NuGet Installer task during your build pipeline.
The option Restore NuGet Packages is deprecated:
This option is deprecated. To restore NuGet packages, add a NuGet
Installer step before the build
So to resolve this issue, please try to use NuGet Installer task, go to Package tab, add nuget restore task.
You can specify the packages.config or the .sln file to restore packages, when you specify the packages.config, you also need provide the Destination directory, the default value is /packages:
Hope this helps.
Hi Leo thanks for answering, unfortunately I don't think you read the question fully as your answer is describing my current set up. I can't use the .sln as it doesn't know anything about packages (should it?) so i am using the packages.config file. The issue is after this point as as the build solution isn't finding the package files. How do I tell it to look in the /packages folder and moved the into the Bin folder for the website build?
– Ben Close
Nov 21 '18 at 10:13
add a comment |
Azure DevOps, Restore NuGet packages for “Visual Studio Build” when using a website.sln?
You should use the NuGet Installer task during your build pipeline.
The option Restore NuGet Packages is deprecated:
This option is deprecated. To restore NuGet packages, add a NuGet
Installer step before the build
So to resolve this issue, please try to use NuGet Installer task, go to Package tab, add nuget restore task.
You can specify the packages.config or the .sln file to restore packages, when you specify the packages.config, you also need provide the Destination directory, the default value is /packages:
Hope this helps.
Hi Leo thanks for answering, unfortunately I don't think you read the question fully as your answer is describing my current set up. I can't use the .sln as it doesn't know anything about packages (should it?) so i am using the packages.config file. The issue is after this point as as the build solution isn't finding the package files. How do I tell it to look in the /packages folder and moved the into the Bin folder for the website build?
– Ben Close
Nov 21 '18 at 10:13
add a comment |
Azure DevOps, Restore NuGet packages for “Visual Studio Build” when using a website.sln?
You should use the NuGet Installer task during your build pipeline.
The option Restore NuGet Packages is deprecated:
This option is deprecated. To restore NuGet packages, add a NuGet
Installer step before the build
So to resolve this issue, please try to use NuGet Installer task, go to Package tab, add nuget restore task.
You can specify the packages.config or the .sln file to restore packages, when you specify the packages.config, you also need provide the Destination directory, the default value is /packages:
Hope this helps.
Azure DevOps, Restore NuGet packages for “Visual Studio Build” when using a website.sln?
You should use the NuGet Installer task during your build pipeline.
The option Restore NuGet Packages is deprecated:
This option is deprecated. To restore NuGet packages, add a NuGet
Installer step before the build
So to resolve this issue, please try to use NuGet Installer task, go to Package tab, add nuget restore task.
You can specify the packages.config or the .sln file to restore packages, when you specify the packages.config, you also need provide the Destination directory, the default value is /packages:
Hope this helps.
answered Nov 21 '18 at 3:14
Leo Liu-MSFTLeo Liu-MSFT
18.4k21932
18.4k21932
Hi Leo thanks for answering, unfortunately I don't think you read the question fully as your answer is describing my current set up. I can't use the .sln as it doesn't know anything about packages (should it?) so i am using the packages.config file. The issue is after this point as as the build solution isn't finding the package files. How do I tell it to look in the /packages folder and moved the into the Bin folder for the website build?
– Ben Close
Nov 21 '18 at 10:13
add a comment |
Hi Leo thanks for answering, unfortunately I don't think you read the question fully as your answer is describing my current set up. I can't use the .sln as it doesn't know anything about packages (should it?) so i am using the packages.config file. The issue is after this point as as the build solution isn't finding the package files. How do I tell it to look in the /packages folder and moved the into the Bin folder for the website build?
– Ben Close
Nov 21 '18 at 10:13
Hi Leo thanks for answering, unfortunately I don't think you read the question fully as your answer is describing my current set up. I can't use the .sln as it doesn't know anything about packages (should it?) so i am using the packages.config file. The issue is after this point as as the build solution isn't finding the package files. How do I tell it to look in the /packages folder and moved the into the Bin folder for the website build?
– Ben Close
Nov 21 '18 at 10:13
Hi Leo thanks for answering, unfortunately I don't think you read the question fully as your answer is describing my current set up. I can't use the .sln as it doesn't know anything about packages (should it?) so i am using the packages.config file. The issue is after this point as as the build solution isn't finding the package files. How do I tell it to look in the /packages folder and moved the into the Bin folder for the website build?
– Ben Close
Nov 21 '18 at 10:13
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53400474%2fazure-devops-restore-nuget-packages-for-visual-studio-build-when-using-a-webs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown