|
18 | 18 |
|
19 | 19 | <ItemGroup Condition=" '$(PackageSources)' == '' ">
|
20 | 20 | <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
|
21 |
| - <!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list --> |
| 21 | + <!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list --> |
22 | 22 | <!--
|
23 |
| - <PackageSource Include="https://nuget.org/api/v2/" /> |
| 23 | + <PackageSource Include="https://www.nuget.org/api/v2/" /> |
24 | 24 | <PackageSource Include="https://my-nuget-source/nuget/" />
|
25 | 25 | -->
|
26 | 26 | </ItemGroup>
|
|
50 | 50 | <RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
|
51 | 51 | <NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
|
52 | 52 |
|
| 53 | + <PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir> |
| 54 | + <PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir> |
| 55 | + |
53 | 56 | <!-- Commands -->
|
54 |
| - <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir "$(SolutionDir) " </RestoreCommand> |
55 |
| - <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand> |
| 57 | + <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand> |
| 58 | + <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand> |
56 | 59 |
|
57 | 60 | <!-- We need to ensure packages are restored prior to assembly resolve -->
|
58 | 61 | <BuildDependsOn Condition="$(RestorePackages) == 'true'">
|
|
118 | 121 |
|
119 | 122 | Log.LogMessage("Downloading latest version of NuGet.exe...");
|
120 | 123 | WebClient webClient = new WebClient();
|
121 |
| - webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename); |
| 124 | + webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename); |
122 | 125 |
|
123 | 126 | return true;
|
124 | 127 | }
|
|
0 commit comments