Build .NET Core Applications with an Agent, that can't connect to the internet
I have some trouble configuring / setting up the VSTS Agent and the TFS to be able to build .NET Core without connecting to the Internet.
Our build clients/agents currently are by security design not able to connect to the internet. That is a problem, because .NET Core seems to have a lot of packages, that are being retrieved from Nuget. Even the standard things like System.Runtime.Loader
, which I have know knowledge of on what it does. But I think it's just a standard microsoft library that is needed by .NET Core and automatically added when creating a project right?
Anyways, back to the problem: Whenever I try to restore a project, it of course fails with something like this:
Unable to resolve 'Microsoft.AspNetCore.Razor.Design (>= 2.1.2)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.App (>= 2.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.VisualStudio.Web.CodeGenerators.Mvc (>= 2.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.Platforms (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'NETStandard.Library (>= 2.0.3)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.DotNetHostPolicy (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.Targets (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.IO.FileSystem.Watcher (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Runtime.Loader (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Net.Requests (>= 4.0.11)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Net.NameResolution (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Data.Common (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.ComponentModel.Primitives (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Threading.Thread (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Reflection.TypeExtensions (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.ComponentModel.TypeConverter (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Xml.XmlDocument (>= 4.0.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.TraceSource (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.Process (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.StackTrace (>= 4.0.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Http (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'NLog.Extensions.Logging (>= 1.3.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Routing.Abstractions (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
I think I have a solution, but I don't like it at all: I could make a nuget feed to include every single package, that is required by my application.
But what I'd like to know, isn't there any other way to make this work? I don't like the idea of always having to upload/update all these standard .NET Core nuget packages all the time.
It would be nice to only have the real third party libraries like NLog / EF in the feed...
Edit:
What I don't understand, why doesn't the vsts-agent not use the folder:
C:Program FilesdotnetsdkNuGetFallbackFolder
c# tfsbuild tfs2017 nuget-package-restore
add a comment |
I have some trouble configuring / setting up the VSTS Agent and the TFS to be able to build .NET Core without connecting to the Internet.
Our build clients/agents currently are by security design not able to connect to the internet. That is a problem, because .NET Core seems to have a lot of packages, that are being retrieved from Nuget. Even the standard things like System.Runtime.Loader
, which I have know knowledge of on what it does. But I think it's just a standard microsoft library that is needed by .NET Core and automatically added when creating a project right?
Anyways, back to the problem: Whenever I try to restore a project, it of course fails with something like this:
Unable to resolve 'Microsoft.AspNetCore.Razor.Design (>= 2.1.2)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.App (>= 2.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.VisualStudio.Web.CodeGenerators.Mvc (>= 2.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.Platforms (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'NETStandard.Library (>= 2.0.3)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.DotNetHostPolicy (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.Targets (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.IO.FileSystem.Watcher (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Runtime.Loader (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Net.Requests (>= 4.0.11)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Net.NameResolution (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Data.Common (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.ComponentModel.Primitives (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Threading.Thread (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Reflection.TypeExtensions (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.ComponentModel.TypeConverter (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Xml.XmlDocument (>= 4.0.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.TraceSource (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.Process (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.StackTrace (>= 4.0.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Http (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'NLog.Extensions.Logging (>= 1.3.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Routing.Abstractions (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
I think I have a solution, but I don't like it at all: I could make a nuget feed to include every single package, that is required by my application.
But what I'd like to know, isn't there any other way to make this work? I don't like the idea of always having to upload/update all these standard .NET Core nuget packages all the time.
It would be nice to only have the real third party libraries like NLog / EF in the feed...
Edit:
What I don't understand, why doesn't the vsts-agent not use the folder:
C:Program FilesdotnetsdkNuGetFallbackFolder
c# tfsbuild tfs2017 nuget-package-restore
Could yourNuGetFallbackFolder
be corrupt by any chance? I've heard that deleting it and then restoring again has worked for some people.
– silkfire
Nov 26 '18 at 7:57
add a comment |
I have some trouble configuring / setting up the VSTS Agent and the TFS to be able to build .NET Core without connecting to the Internet.
Our build clients/agents currently are by security design not able to connect to the internet. That is a problem, because .NET Core seems to have a lot of packages, that are being retrieved from Nuget. Even the standard things like System.Runtime.Loader
, which I have know knowledge of on what it does. But I think it's just a standard microsoft library that is needed by .NET Core and automatically added when creating a project right?
Anyways, back to the problem: Whenever I try to restore a project, it of course fails with something like this:
Unable to resolve 'Microsoft.AspNetCore.Razor.Design (>= 2.1.2)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.App (>= 2.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.VisualStudio.Web.CodeGenerators.Mvc (>= 2.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.Platforms (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'NETStandard.Library (>= 2.0.3)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.DotNetHostPolicy (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.Targets (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.IO.FileSystem.Watcher (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Runtime.Loader (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Net.Requests (>= 4.0.11)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Net.NameResolution (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Data.Common (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.ComponentModel.Primitives (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Threading.Thread (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Reflection.TypeExtensions (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.ComponentModel.TypeConverter (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Xml.XmlDocument (>= 4.0.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.TraceSource (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.Process (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.StackTrace (>= 4.0.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Http (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'NLog.Extensions.Logging (>= 1.3.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Routing.Abstractions (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
I think I have a solution, but I don't like it at all: I could make a nuget feed to include every single package, that is required by my application.
But what I'd like to know, isn't there any other way to make this work? I don't like the idea of always having to upload/update all these standard .NET Core nuget packages all the time.
It would be nice to only have the real third party libraries like NLog / EF in the feed...
Edit:
What I don't understand, why doesn't the vsts-agent not use the folder:
C:Program FilesdotnetsdkNuGetFallbackFolder
c# tfsbuild tfs2017 nuget-package-restore
I have some trouble configuring / setting up the VSTS Agent and the TFS to be able to build .NET Core without connecting to the Internet.
Our build clients/agents currently are by security design not able to connect to the internet. That is a problem, because .NET Core seems to have a lot of packages, that are being retrieved from Nuget. Even the standard things like System.Runtime.Loader
, which I have know knowledge of on what it does. But I think it's just a standard microsoft library that is needed by .NET Core and automatically added when creating a project right?
Anyways, back to the problem: Whenever I try to restore a project, it of course fails with something like this:
Unable to resolve 'Microsoft.AspNetCore.Razor.Design (>= 2.1.2)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.App (>= 2.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.VisualStudio.Web.CodeGenerators.Mvc (>= 2.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.Platforms (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'NETStandard.Library (>= 2.0.3)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.DotNetHostPolicy (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.NETCore.Targets (>= 2.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.IO.FileSystem.Watcher (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Runtime.Loader (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Net.Requests (>= 4.0.11)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Net.NameResolution (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Data.Common (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.ComponentModel.Primitives (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Threading.Thread (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Reflection.TypeExtensions (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.ComponentModel.TypeConverter (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Xml.XmlDocument (>= 4.0.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.TraceSource (>= 4.0.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.Process (>= 4.1.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'System.Diagnostics.StackTrace (>= 4.0.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Hosting.Abstractions (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Http (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'NLog.Extensions.Logging (>= 1.3.0)' for '.NETCoreApp,Version=v2.1'.
Unable to resolve 'Microsoft.AspNetCore.Routing.Abstractions (>= 1.1.1)' for '.NETCoreApp,Version=v2.1'.
I think I have a solution, but I don't like it at all: I could make a nuget feed to include every single package, that is required by my application.
But what I'd like to know, isn't there any other way to make this work? I don't like the idea of always having to upload/update all these standard .NET Core nuget packages all the time.
It would be nice to only have the real third party libraries like NLog / EF in the feed...
Edit:
What I don't understand, why doesn't the vsts-agent not use the folder:
C:Program FilesdotnetsdkNuGetFallbackFolder
c# tfsbuild tfs2017 nuget-package-restore
c# tfsbuild tfs2017 nuget-package-restore
edited Nov 26 '18 at 7:41
Jannik
asked Nov 26 '18 at 7:21
JannikJannik
1,12021949
1,12021949
Could yourNuGetFallbackFolder
be corrupt by any chance? I've heard that deleting it and then restoring again has worked for some people.
– silkfire
Nov 26 '18 at 7:57
add a comment |
Could yourNuGetFallbackFolder
be corrupt by any chance? I've heard that deleting it and then restoring again has worked for some people.
– silkfire
Nov 26 '18 at 7:57
Could your
NuGetFallbackFolder
be corrupt by any chance? I've heard that deleting it and then restoring again has worked for some people.– silkfire
Nov 26 '18 at 7:57
Could your
NuGetFallbackFolder
be corrupt by any chance? I've heard that deleting it and then restoring again has worked for some people.– silkfire
Nov 26 '18 at 7:57
add a comment |
0
active
oldest
votes
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%2f53476348%2fbuild-net-core-applications-with-an-agent-that-cant-connect-to-the-internet%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f53476348%2fbuild-net-core-applications-with-an-agent-that-cant-connect-to-the-internet%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
Could your
NuGetFallbackFolder
be corrupt by any chance? I've heard that deleting it and then restoring again has worked for some people.– silkfire
Nov 26 '18 at 7:57