Skip to content

Commit 49d31e8

Browse files
author
Hovsep Mkrtchyan
committed
Fixed nuget restore.
(cherry picked from commit e6aef4b)
1 parent 896e539 commit 49d31e8

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

build.proj

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<LibraryRoot>$(MSBuildThisFileDirectory)</LibraryRoot>
3232
<LibrarySourceFolder>$(LibraryRoot)src</LibrarySourceFolder>
3333
<LibraryToolsFolder>$(LibraryRoot)tools</LibraryToolsFolder>
34+
<LibraryNugetPackageFolder>$(LibrarySourceFolder)\packages</LibraryNugetPackageFolder>
3435
<PublishDirectory>$(LibrarySourceFolder)\Publish</PublishDirectory>
3536
<PackageDirectory>$(LibrarySourceFolder)\Package</PackageDirectory>
3637
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -111,8 +112,7 @@
111112

112113
<PropertyGroup>
113114
<NuGetCommand>$(MSBuildProjectDirectory)\tools\NuGet.exe</NuGetCommand>
114-
<NuGetRestoreConfigFile>$(MSBuildProjectDirectory)\restore.config</NuGetRestoreConfigFile>
115-
<NuGetRestoreConfigSwitch>-ConfigFile &quot;$(NuGetRestoreConfigFile)&quot;</NuGetRestoreConfigSwitch>
115+
<NuGetRestoreConfigSwitch>-PackagesDirectory $(LibraryNugetPackageFolder)</NuGetRestoreConfigSwitch>
116116
<PowerShellCommand>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShellCommand>
117117
</PropertyGroup>
118118

@@ -127,14 +127,9 @@
127127
</ItemGroup>
128128
<Delete Files="@(NuGetCache)" />-->
129129

130-
<Delete Files="$(NuGetRestoreConfigFile)" />
131-
<WriteLinesToFile
132-
File="$(NuGetRestoreConfigFile)"
133-
Lines="&lt;configuration&gt;&lt;/configuration&gt;"
134-
Overwrite="true"
135-
Encoding="Unicode"/>
136130

137-
<Exec Command="$(NuGetCommand) sources add -Name LocalFeed -Source &quot;$(MSBuildProjectDirectory)\tools\LocalFeed&quot; $(NuGetRestoreConfigSwitch)"/>
131+
<!-- <Exec Command="$(NuGetCommand) sources add -Name LocalFeed -Source &quot;$(MSBuildProjectDirectory)\tools\LocalFeed&quot;"/> -->
132+
<!--<Exec Command="$(NuGetCommand) sources add -Name nugetRemote -Source &quot;https://api.nuget.org/v3/index.json&quot; "/> -->
138133

139134
<!-- Restore packages -->
140135
<Exec Command="$(NuGetCommand) restore %(CmdletSolutionsToBuild.FullPath) $(NuGetRestoreConfigSwitch)"
@@ -145,8 +140,6 @@
145140

146141
<!--Restore the xunit runner needed to run unit tests-->
147142
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\packages.config -PackagesDirectory $(MSBuildProjectDirectory)\packages" />
148-
149-
<Delete Files="$(NuGetRestoreConfigFile)" />
150143
</Target>
151144

152145
<!-- Build all flavors of the Cmdlets -->

src/ResourceManager/Cdn/NuGet.Config

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,4 @@
33
<config>
44
<add key="repositorypath" value="..\..\packages" />
55
</config>
6-
<packageSources>
7-
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
8-
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
9-
</packageSources>
106
</configuration>

0 commit comments

Comments
 (0)