|
23 | 23 | <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))</_PaketExeExtension>
|
24 | 24 | <PaketCommand Condition=" '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</PaketCommand>
|
25 | 25 |
|
| 26 | + <!-- no extension is a shell script --> |
| 27 | + <PaketCommand Condition=" '$(_PaketExeExtension)' == '' ">"$(PaketExePath)"</PaketCommand> |
| 28 | + |
26 | 29 | <PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' AND Exists('$(PaketRootPath)paket.bootstrapper.exe')">$(PaketRootPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
|
27 | 30 | <PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
|
28 | 31 | <PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
|
|
40 | 43 | <!-- Step 1 Check if lockfile is properly restored -->
|
41 | 44 | <PropertyGroup>
|
42 | 45 | <PaketRestoreRequired>true</PaketRestoreRequired>
|
43 |
| - <NoWarn>$(NoWarn);NU1603</NoWarn> |
| 46 | + <NoWarn>$(NoWarn);NU1603;NU1604;NU1605;NU1608</NoWarn> |
44 | 47 | </PropertyGroup>
|
45 | 48 |
|
46 | 49 | <!-- Because ReadAllText is slow on osx/linux, try to find shasum and awk -->
|
47 | 50 | <PropertyGroup>
|
48 |
| - <PaketRestoreCachedHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreCachedHasher)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum $(PaketRestoreCacheFile) | /usr/bin/awk '{ print $1 }'</PaketRestoreCachedHasher> |
49 |
| - <PaketRestoreLockFileHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreLockFileHash)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum $(PaketLockFilePath) | /usr/bin/awk '{ print $1 }'</PaketRestoreLockFileHasher> |
| 51 | + <PaketRestoreCachedHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreCachedHasher)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }'</PaketRestoreCachedHasher> |
| 52 | + <PaketRestoreLockFileHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreLockFileHash)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }'</PaketRestoreLockFileHasher> |
50 | 53 | </PropertyGroup>
|
51 | 54 |
|
52 | 55 | <!-- If shasum and awk exist get the hashes -->
|
53 |
| - <Exec Condition=" '$(PaketRestoreCachedHasher)' != '' " Command="$(PaketRestoreCachedHasher)" ConsoleToMSBuild='true'> |
54 |
| - <Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreCachedHash" /> |
| 56 | + <Exec StandardOutputImportance="Low" Condition=" '$(PaketRestoreCachedHasher)' != '' " Command="$(PaketRestoreCachedHasher)" ConsoleToMSBuild='true'> |
| 57 | + <Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreCachedHash" /> |
55 | 58 | </Exec>
|
56 |
| - <Exec Condition=" '$(PaketRestoreLockFileHasher)' != '' " Command="$(PaketRestoreLockFileHasher)" ConsoleToMSBuild='true'> |
57 |
| - <Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreLockFileHash" /> |
| 59 | + <Exec StandardOutputImportance="Low" Condition=" '$(PaketRestoreLockFileHasher)' != '' " Command="$(PaketRestoreLockFileHasher)" ConsoleToMSBuild='true'> |
| 60 | + <Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreLockFileHash" /> |
58 | 61 | </Exec>
|
59 | 62 |
|
60 | 63 | <PropertyGroup Condition="Exists('$(PaketRestoreCacheFile)') ">
|
|
66 | 69 | <PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '' ">true</PaketRestoreRequired>
|
67 | 70 | </PropertyGroup>
|
68 | 71 |
|
| 72 | + |
69 | 73 | <!-- Do a global restore if required -->
|
70 | 74 | <Exec Command='$(PaketBootStrapperCommand)' Condition="Exists('$(PaketBootStrapperExePath)') AND !(Exists('$(PaketExePath)'))" ContinueOnError="false" />
|
71 |
| - <Exec Command='$(PaketCommand) restore' Condition=" '$(PaketRestoreRequired)' == 'true' " ContinueOnError="false" /> |
| 75 | + <Exec Command='$(PaketCommand) restore --target-framework "$(TargetFrameworks)"' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(TargetFramework)' == '' " ContinueOnError="false" /> |
| 76 | + <Exec Command='$(PaketCommand) restore --target-framework "$(TargetFramework)"' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(TargetFramework)' != '' " ContinueOnError="false" /> |
72 | 77 |
|
73 | 78 | <!-- Step 2 Detect project specific changes -->
|
74 | 79 | <PropertyGroup>
|
|
124 | 129 | <PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
|
125 | 130 | <Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
|
126 | 131 | <PrivateAssets Condition="%(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'true'">All</PrivateAssets>
|
| 132 | + <ExcludeAssets Condition="%(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets> |
127 | 133 | </PackageReference>
|
128 | 134 | </ItemGroup>
|
129 | 135 |
|
|
145 | 151 | </DotNetCliToolReference>
|
146 | 152 | </ItemGroup>
|
147 | 153 |
|
| 154 | + <!-- Disabled for now until we know what to do with runtime deps - https://github.com/fsprojects/Paket/issues/2964 |
148 | 155 | <PropertyGroup>
|
149 | 156 | <RestoreConfigFile>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile>
|
150 |
| - </PropertyGroup> |
| 157 | + </PropertyGroup> --> |
151 | 158 |
|
152 | 159 | </Target>
|
153 | 160 |
|
|
179 | 186 |
|
180 | 187 | <ConvertToAbsolutePath Condition="@(_NuspecFiles) != ''" Paths="@(_NuspecFiles)">
|
181 | 188 | <Output TaskParameter="AbsolutePaths" PropertyName="NuspecFileAbsolutePath" />
|
182 |
| - </ConvertToAbsolutePath> |
183 |
| - |
| 189 | + </ConvertToAbsolutePath> |
| 190 | + |
184 | 191 |
|
185 | 192 | <!-- Call Pack -->
|
186 | 193 | <PackTask Condition="$(UseNewPack)"
|
|
0 commit comments