Skip to content

Commit

Permalink
Fixes to allow restore and build on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
wjk authored and Oren Novotny committed Nov 27, 2018
1 parent 1432809 commit 1e37f53
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tools/MSBuild.DevLocal.targets
Expand Up @@ -3,6 +3,8 @@
<!-- Tools to make local dev easier -->
<Target Name="_EnsureTempPackageSource" BeforeTargets="Restore;_LocalPublish">
<PropertyGroup>
<!-- TEMP is not defined by default on macOS. TMPDIR, however, is. -->
<TEMP Condition="'$(TEMP)' == ''">$(TMPDIR)</TEMP>
<TempPackagePath Condition="'$(TempPackagePath)' == ''">$(TEMP)\Packages</TempPackagePath>
</PropertyGroup>
<MakeDir Directories="$(TempPackagePath)" Condition="!Exists('$(TempPackagePath)')" />
Expand All @@ -14,7 +16,8 @@
</ItemGroup>

<Delete Files="@(ToDelete)"/>
<Exec Command='rd "$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())" /q /s' Condition="Exists('$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())')"/>
<Exec Command='rd "$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())" /q /s' Condition="Exists('$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())') and $([MSBuild]::IsOSPlatform(Windows))"/>
<Exec Command='rm -rf "$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())"' Condition="Exists('$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())') and !$([MSBuild]::IsOSPlatform(Windows))"/>
</Target>

<Target Name="_SetFixedVersion"
Expand All @@ -32,4 +35,4 @@
<Copy SourceFiles="$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$(TempPackagePath)"/>
</Target>

</Project>
</Project>

0 comments on commit 1e37f53

Please sign in to comment.