Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

<!-- Common nuget properties -->
<PropertyGroup>
<NuGetDir>$(PackagesDir)</NuGetDir>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed anymore. Or do you plan on doing something with it later on?

<NuGetToolPath>$(PackagesDir)NuGet.exe</NuGetToolPath>
<NuGetConfigFile>$(SourceDir).nuget$([System.IO.Path]::DirectorySeparatorChar)NuGet.Config</NuGetConfigFile>
<NuGetConfigCommandLine>-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>
Expand All @@ -23,6 +24,7 @@
<NugetRestoreCommand>$(NugetRestoreCommand) install</NugetRestoreCommand>
<NugetRestoreCommand>$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('\/'.ToCharArray()))"</NugetRestoreCommand>
<NugetRestoreCommand>$(NugetRestoreCommand) $(NuGetConfigCommandLine)</NugetRestoreCommand>
<NugetRestoreCommand Condition="'$(OS)' != 'Windows_NT'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
</PropertyGroup>

<!-- Set default Configuration and Platform -->
Expand Down
7 changes: 4 additions & 3 deletions dir.targets
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@
Inputs="$(MSBuildThisFileFullPath);$(MSBuildThisFileDirectory)dir.props"
Outputs="$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll;$(NugetToolPath)">

<!-- Download latest nuget.exe -->
<DownloadFile FileName="$(NuGetToolPath)"
Address="http://nuget.org/nuget.exe"
Condition="!Exists('$(NuGetToolPath)')" />
Condition="!Exists('$(NuGetToolPath)') AND '$(OS)' == 'Windows_NT'" />

<Exec Command="curl -sSL --create-dirs -s -o $(NuGetToolPath) https://api.nuget.org/downloads/nuget.exe" Condition="!Exists('$(NuGetToolPath)') AND '$(OS)' != 'Windows_NT'" />

<!-- Restore build tools -->
<!--
Expand All @@ -61,4 +62,4 @@
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." />
</Target>

</Project>
</Project>