Unable to find package Microsoft.AspNetCore
I'm setting up a new development machine with no internet access.
I've installed Visual Studio 2017 (15.8.9) with the ASP.NET and .NET Core workloads - including .NET Core 2.1 development tools and .NET Framework 4.6.1 development tools.
I've created a new "API" project with File > New Project > New ASP.NET Core Web Application and selected the "API" template with the full .NET Framework and ASP.NET Core 2.1.
This gives me a project file that looks like this:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.6" />
<PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
</ItemGroup>
</Project>
This seems fine. However, I get the following errors when trying to restore nuget packages:
NU1101: Unable to find package Microsoft.AspNetCore.
NU1102: Unable to find package Microsoft.AspNetCore.Mvc with version (>=2.1.3)
I didn't have this problem on my old machine with a slightly older versions of VS 2017 and .NET Core 2.1. The project was able to restore the ASP.NET core packages from a local cache of packages installed with the .NET Core SDK (I assume). Also, I don't have this problem on a similar machine that has internet access, presumably because it can download the packages it needs from nuget.org.
How should I go about troubleshooting and/or fixing this problem?
visual-studio-2017 asp.net-core-2.1
add a comment |
I'm setting up a new development machine with no internet access.
I've installed Visual Studio 2017 (15.8.9) with the ASP.NET and .NET Core workloads - including .NET Core 2.1 development tools and .NET Framework 4.6.1 development tools.
I've created a new "API" project with File > New Project > New ASP.NET Core Web Application and selected the "API" template with the full .NET Framework and ASP.NET Core 2.1.
This gives me a project file that looks like this:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.6" />
<PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
</ItemGroup>
</Project>
This seems fine. However, I get the following errors when trying to restore nuget packages:
NU1101: Unable to find package Microsoft.AspNetCore.
NU1102: Unable to find package Microsoft.AspNetCore.Mvc with version (>=2.1.3)
I didn't have this problem on my old machine with a slightly older versions of VS 2017 and .NET Core 2.1. The project was able to restore the ASP.NET core packages from a local cache of packages installed with the .NET Core SDK (I assume). Also, I don't have this problem on a similar machine that has internet access, presumably because it can download the packages it needs from nuget.org.
How should I go about troubleshooting and/or fixing this problem?
visual-studio-2017 asp.net-core-2.1
add a comment |
I'm setting up a new development machine with no internet access.
I've installed Visual Studio 2017 (15.8.9) with the ASP.NET and .NET Core workloads - including .NET Core 2.1 development tools and .NET Framework 4.6.1 development tools.
I've created a new "API" project with File > New Project > New ASP.NET Core Web Application and selected the "API" template with the full .NET Framework and ASP.NET Core 2.1.
This gives me a project file that looks like this:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.6" />
<PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
</ItemGroup>
</Project>
This seems fine. However, I get the following errors when trying to restore nuget packages:
NU1101: Unable to find package Microsoft.AspNetCore.
NU1102: Unable to find package Microsoft.AspNetCore.Mvc with version (>=2.1.3)
I didn't have this problem on my old machine with a slightly older versions of VS 2017 and .NET Core 2.1. The project was able to restore the ASP.NET core packages from a local cache of packages installed with the .NET Core SDK (I assume). Also, I don't have this problem on a similar machine that has internet access, presumably because it can download the packages it needs from nuget.org.
How should I go about troubleshooting and/or fixing this problem?
visual-studio-2017 asp.net-core-2.1
I'm setting up a new development machine with no internet access.
I've installed Visual Studio 2017 (15.8.9) with the ASP.NET and .NET Core workloads - including .NET Core 2.1 development tools and .NET Framework 4.6.1 development tools.
I've created a new "API" project with File > New Project > New ASP.NET Core Web Application and selected the "API" template with the full .NET Framework and ASP.NET Core 2.1.
This gives me a project file that looks like this:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.6" />
<PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
</ItemGroup>
</Project>
This seems fine. However, I get the following errors when trying to restore nuget packages:
NU1101: Unable to find package Microsoft.AspNetCore.
NU1102: Unable to find package Microsoft.AspNetCore.Mvc with version (>=2.1.3)
I didn't have this problem on my old machine with a slightly older versions of VS 2017 and .NET Core 2.1. The project was able to restore the ASP.NET core packages from a local cache of packages installed with the .NET Core SDK (I assume). Also, I don't have this problem on a similar machine that has internet access, presumably because it can download the packages it needs from nuget.org.
How should I go about troubleshooting and/or fixing this problem?
visual-studio-2017 asp.net-core-2.1
visual-studio-2017 asp.net-core-2.1
edited Nov 21 '18 at 20:15
Peter
asked Nov 21 '18 at 20:08
PeterPeter
10.2k32229
10.2k32229
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I ended up asking this question on the ASP.NET Core github project/repository. It turns out that "restoring packages in .NET Framework projects is not currently one of the scenarios supported by the offline cache." The solution is to make sure you have the correct versions of all the Microsoft.AspNetCore packages are available in a local nuget package source.
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%2f53419762%2funable-to-find-package-microsoft-aspnetcore%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
I ended up asking this question on the ASP.NET Core github project/repository. It turns out that "restoring packages in .NET Framework projects is not currently one of the scenarios supported by the offline cache." The solution is to make sure you have the correct versions of all the Microsoft.AspNetCore packages are available in a local nuget package source.
add a comment |
I ended up asking this question on the ASP.NET Core github project/repository. It turns out that "restoring packages in .NET Framework projects is not currently one of the scenarios supported by the offline cache." The solution is to make sure you have the correct versions of all the Microsoft.AspNetCore packages are available in a local nuget package source.
add a comment |
I ended up asking this question on the ASP.NET Core github project/repository. It turns out that "restoring packages in .NET Framework projects is not currently one of the scenarios supported by the offline cache." The solution is to make sure you have the correct versions of all the Microsoft.AspNetCore packages are available in a local nuget package source.
I ended up asking this question on the ASP.NET Core github project/repository. It turns out that "restoring packages in .NET Framework projects is not currently one of the scenarios supported by the offline cache." The solution is to make sure you have the correct versions of all the Microsoft.AspNetCore packages are available in a local nuget package source.
answered Nov 21 '18 at 22:51
PeterPeter
10.2k32229
10.2k32229
add a comment |
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%2f53419762%2funable-to-find-package-microsoft-aspnetcore%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