diff --git a/Setup/Product.wxs b/Setup/Product.wxs index ef95c99..bfe5302 100644 --- a/Setup/Product.wxs +++ b/Setup/Product.wxs @@ -21,7 +21,7 @@ - + diff --git a/VS2017OfflineSetupUtility/Properties/AssemblyInfo.cs b/VS2017OfflineSetupUtility/Properties/AssemblyInfo.cs index 9533f60..b19d7fd 100644 --- a/VS2017OfflineSetupUtility/Properties/AssemblyInfo.cs +++ b/VS2017OfflineSetupUtility/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0.0")] -[assembly: AssemblyFileVersion("1.2.0.0")] +[assembly: AssemblyVersion("1.3.0.0")] +[assembly: AssemblyFileVersion("1.3.0.0")] diff --git a/VS2017OfflineSetupUtility/Utils/FeatureUtil.cs b/VS2017OfflineSetupUtility/Utils/FeatureUtil.cs index 50de4de..bedef84 100644 --- a/VS2017OfflineSetupUtility/Utils/FeatureUtil.cs +++ b/VS2017OfflineSetupUtility/Utils/FeatureUtil.cs @@ -30,7 +30,7 @@ internal static List GetFeatures() var cleanUtilIcon = new CleanUtilIcon() { IsCheckedColor = (SolidColorBrush)App.Current.Resources["BlueSolidColorBrush"]}; cleanUtilIcon.SetBinding(CleanUtilIcon.IsCheckedProperty, new System.Windows.Data.Binding("IsSelected") { UpdateSourceTrigger = System.Windows.Data.UpdateSourceTrigger.PropertyChanged}); - var cleanUtilFeature = new Feature() { Icon = cleanUtilIcon, Name = "VS2017 Offline Clean Util", About= "Allow deletion of old version Visual Studio 2017 Offline Setup files and folder, which saves your hard disk space.", Version="1.1.0.0", NavigateToView = new Views.CleanUtilPage() , IsSelected = true}; + var cleanUtilFeature = new Feature() { Icon = cleanUtilIcon, Name = "VS2017 Offline Clean Util", About= "Allow deletion of old version Visual Studio 2017 Offline Setup files and folder, which saves your hard disk space.", Version="1.3.0.0", NavigateToView = new Views.CleanUtilPage() , IsSelected = true}; #endregion @@ -38,7 +38,7 @@ internal static List GetFeatures() var downloadUtilIcon = new DownloadUtilIcon() { IsCheckedColor = (SolidColorBrush)App.Current.Resources["BlueSolidColorBrush"]}; downloadUtilIcon.SetBinding(DownloadUtilIcon.IsCheckedProperty, new System.Windows.Data.Binding("IsSelected") { UpdateSourceTrigger = System.Windows.Data.UpdateSourceTrigger.PropertyChanged }); - var downloadUtilFeature = new Feature() { Icon = downloadUtilIcon, Name = "VS2017 Offline Download", About = "Download Visual Studio 2017 Offline Setup files and folder, using command line interface. (Need internet connection)", Version = "1.1.0.0" , NavigateToView = new Views.DownloadUtilPage()}; + var downloadUtilFeature = new Feature() { Icon = downloadUtilIcon, Name = "VS2017 Offline Download", About = "Download Visual Studio 2017 Offline Setup files and folder, using command line interface. (Need internet connection)", Version = "1.3.0.0" , NavigateToView = new Views.DownloadUtilPage()}; #endregion diff --git a/VS2017OfflineSetupUtility/ViewModels/DownloadUtilPageViewModel.cs b/VS2017OfflineSetupUtility/ViewModels/DownloadUtilPageViewModel.cs index 4763706..26de4a7 100644 --- a/VS2017OfflineSetupUtility/ViewModels/DownloadUtilPageViewModel.cs +++ b/VS2017OfflineSetupUtility/ViewModels/DownloadUtilPageViewModel.cs @@ -227,7 +227,11 @@ private void DownloadWorkloadFromWeb(string vsEdition) string markdownText = null; try { - markdownText = new WebClient().DownloadString(selectedVsEdition.WorkloadGitHubUri); + WebClient webClient = new WebClient(); + IWebProxy webProxy = WebRequest.DefaultWebProxy; + webProxy.Credentials = CredentialCache.DefaultCredentials; + webClient.Proxy = webProxy; + markdownText = webClient.DownloadString(selectedVsEdition.WorkloadGitHubUri); } catch (Exception exception) @@ -266,8 +270,12 @@ public DelegateCommand DownloadCommand var subdirInfo = dirInfo.CreateSubdirectory("Setup"); try { + WebClient webClient = new WebClient(); + IWebProxy webProxy = WebRequest.DefaultWebProxy; + webProxy.Credentials = CredentialCache.DefaultCredentials; + webClient.Proxy = webProxy; //Download Setup exe from web - new WebClient().DownloadFile(new Uri(selectedVsEdition.SetupUri), subdirInfo.FullName + @"\vs_" + selectedVsEdition.Name + ".exe"); + webClient.DownloadFile(new Uri(selectedVsEdition.SetupUri), subdirInfo.FullName + @"\vs_" + selectedVsEdition.Name + ".exe"); File.WriteAllText(subdirInfo.FullName + @"\CliCommand.bat", CliText); Process.Start(new ProcessStartInfo() { diff --git a/VS2017OfflineSetupUtility/bin/Release/VS2017OfflineSetupUtility.exe b/VS2017OfflineSetupUtility/bin/Release/VS2017OfflineSetupUtility.exe index f511ebf..175ec85 100644 Binary files a/VS2017OfflineSetupUtility/bin/Release/VS2017OfflineSetupUtility.exe and b/VS2017OfflineSetupUtility/bin/Release/VS2017OfflineSetupUtility.exe differ diff --git a/VS2017OfflineSetupUtility/bin/Release/VS2017OfflineSetupUtility.pdb b/VS2017OfflineSetupUtility/bin/Release/VS2017OfflineSetupUtility.pdb index 186a1fc..f014aab 100644 Binary files a/VS2017OfflineSetupUtility/bin/Release/VS2017OfflineSetupUtility.pdb and b/VS2017OfflineSetupUtility/bin/Release/VS2017OfflineSetupUtility.pdb differ