diff options
author | Matt Ellis <matell@microsoft.com> | 2015-05-21 10:27:41 +0300 |
---|---|---|
committer | Matt Ellis <matell@microsoft.com> | 2015-05-21 10:27:41 +0300 |
commit | 6c2aefac6523de518d89a8f40dd990adec3b64d7 (patch) | |
tree | d08b2b771ca084f16ab4b97747e462f358549ef7 /dir.targets | |
parent | 4f9f06ce58d9734760abd46155b45b10d8f6b1b5 (diff) | |
parent | 3324f4b00f85cc27c1c4fbf0c040e98dbf1fbd91 (diff) |
Merge pull request #1798 from PatrickMcDonald/proxy-build
Support Proxy servers for our nuget download task
Diffstat (limited to 'dir.targets')
-rw-r--r-- | dir.targets | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dir.targets b/dir.targets index 1765e86326..30822c8b92 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 "$(DnxPackageDir)/bin/dnx"" /> <Exec Condition="'$(OsEnvironment)'=='Unix'" - Command="find '$(RoslynPackageDir)tools' -name "*.exe" -exec chmod "+x" '{}' ';'" /> + Command="find '$(RoslynPackageDir)tools' -name "*.exe" -exec chmod "+x" '{}' ';'" /> <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." /> |