Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McDonald <paddymcdonald@gmail.com>2015-05-20 19:21:01 +0300
committerPatrick McDonald <paddymcdonald@gmail.com>2015-05-20 19:21:01 +0300
commit3324f4b00f85cc27c1c4fbf0c040e98dbf1fbd91 (patch)
tree4585135aa6b31897c77ffccf5b93de458a391adb /dir.targets
parentee9c51f501cc367b339fe0799fef95fb05f66235 (diff)
Support Proxy servers for our nuget download task
Reapply #38, but handle the case when DefaultWebProxy is null. Fix #963
Diffstat (limited to 'dir.targets')
-rw-r--r--dir.targets8
1 files changed, 5 insertions, 3 deletions
diff --git a/dir.targets b/dir.targets
index b61b410ef5..f3405083c5 100644
--- a/dir.targets
+++ b/dir.targets
@@ -17,6 +17,8 @@
var tempFile = Path.Combine(directory, Path.GetRandomFileName());
var client = new System.Net.WebClient();
+ client.Proxy = System.Net.WebRequest.DefaultWebProxy;
+ if (client.Proxy != null) client.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
var tryCount = 1;
var maxTries = 3;
@@ -57,7 +59,7 @@
</Task>
</UsingTask>
- <!--
+ <!--
Needed to avoid the IntialTargets from having an Output which ends up getting
added to the output references when you have a project to project reference.
-->
@@ -86,7 +88,7 @@
<Exec Command="$(_RestoreBuildToolsCommand)" StandardOutputImportance="Low" />
<!-- currently DNU doesn't support -ConfigFile: https://github.com/aspnet/dnx/issues/1693
- Our DnuRestoreCommand doesn't force a config file and we rely on the
+ Our DnuRestoreCommand doesn't force a config file and we rely on the
directory probing for it to find nuget.config. This works for restore from source,
but not restore from PackagesDir as happens for test project restore since PackagesDir
will not be under src. To workaround, copy our nuget.config to packages. -->
@@ -99,7 +101,7 @@
<Exec Condition="'$(OsEnvironment)'=='Unix'"
Command="chmod a+x &quot;$(DnxPackageDir)/bin/dnx&quot;" />
<Exec Condition="'$(OsEnvironment)'=='Unix'"
- Command="find '$(RoslynPackageDir)tools' -name &quot;*.exe&quot; -exec chmod &quot;+x&quot; '{}' ';'" />
+ Command="find '$(RoslynPackageDir)tools' -name &quot;*.exe&quot; -exec chmod &quot;+x&quot; '{}' ';'" />
<Error Condition="'$(ErrorIfBuildToolsRestoredFromIndividualProject)'=='true'"
Text="The build tools package was just restored and so we cannot continue the build of an individual project because targets from the build tools package were not able to be imported. Please retry the build the individual project again." />