forked from dotnet/fsharp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
tests/fsharp/typeProviders/samples/TypePassing/Erasing/.paket/Paket.Restore.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<!-- Mark that this target file has been loaded. --> | ||
<IsPaketRestoreTargetsFileLoaded>true</IsPaketRestoreTargetsFileLoaded> | ||
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath> | ||
<MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath> | ||
<MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath> | ||
<!-- Paket command --> | ||
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket.exe')">$(PaketRootPath)paket.exe</PaketExePath> | ||
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath> | ||
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand> | ||
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand> | ||
</PropertyGroup> | ||
|
||
<Target Name="PaketRestore" BeforeTargets="_GenerateRestoreGraphWalkPerFramework;CollectPackageReferences" > | ||
|
||
<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" ' /> | ||
|
||
<PropertyGroup> | ||
<PaketReferencesFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references</PaketReferencesFilePath> | ||
</PropertyGroup> | ||
|
||
<ReadLinesFromFile File="$(PaketReferencesFilePath)" > | ||
<Output TaskParameter="Lines" ItemName="PaketReferencesFileLines"/> | ||
</ReadLinesFromFile> | ||
|
||
<ItemGroup Condition=" '@(PaketReferencesFileLines)' != '' " > | ||
<PaketReferencesFileLinesInfo Include="@(PaketReferencesFileLines)" > | ||
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName> | ||
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion> | ||
</PaketReferencesFileLinesInfo> | ||
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)"> | ||
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<RestoreConfigFile>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile> | ||
</PropertyGroup> | ||
|
||
</Target> | ||
</Project> |
38 changes: 38 additions & 0 deletions
38
tests/fsharp/typeProviders/samples/TypePassing/Erasing/.paket/paket.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<!-- Enable the restore command to run before builds --> | ||
<RestorePackages Condition=" '$(RestorePackages)' == '' ">true</RestorePackages> | ||
<!-- Download Paket.exe if it does not already exist --> | ||
<DownloadPaket Condition=" '$(DownloadPaket)' == '' ">true</DownloadPaket> | ||
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath> | ||
<PaketRootPath>$(MSBuildThisFileDirectory)..\</PaketRootPath> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<!-- Paket command --> | ||
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath> | ||
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath> | ||
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand> | ||
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(PaketExePath)</PaketCommand> | ||
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand> | ||
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(PaketBootStrapperExePath)</PaketBootStrapperCommand> | ||
<!-- Commands --> | ||
<PaketReferences Condition="!Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectDirectory)\paket.references</PaketReferences> | ||
<PaketReferences Condition="Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectFullPath).paket.references</PaketReferences> | ||
<RestoreCommand>$(PaketCommand) restore --references-files "$(PaketReferences)"</RestoreCommand> | ||
<DownloadPaketCommand>$(PaketBootStrapperCommand)</DownloadPaketCommand> | ||
<!-- We need to ensure packages are restored prior to assembly resolve --> | ||
<BuildDependsOn Condition="$(RestorePackages) == 'true'">RestorePackages; $(BuildDependsOn);</BuildDependsOn> | ||
</PropertyGroup> | ||
<Target Name="CheckPrerequisites"> | ||
<!-- Raise an error if we're unable to locate paket.exe --> | ||
<Error Condition="'$(DownloadPaket)' != 'true' AND !Exists('$(PaketExePath)')" Text="Unable to locate '$(PaketExePath)'" /> | ||
<MsBuild Targets="DownloadPaket" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadPaket=$(DownloadPaket)" /> | ||
</Target> | ||
<Target Name="DownloadPaket"> | ||
<Exec Command="$(DownloadPaketCommand)" Condition=" '$(DownloadPaket)' == 'true' AND !Exists('$(PaketExePath)')" /> | ||
</Target> | ||
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites"> | ||
<Exec Command="$(RestoreCommand)" WorkingDirectory="$(PaketRootPath)" Condition="Exists('$(PaketReferences)')" /> | ||
</Target> | ||
</Project> |