Skip to content

Commit

Permalink
Removed dependency on .net core app 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson committed May 15, 2019
1 parent ba75343 commit 5799aa0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/Pharmacist.MsBuildTask/Pharmacist.MsBuildTask.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<Package>Pharmacist.MSBuildTask</Package>
</PropertyGroup>

<ItemGroup>
<PackageReference Condition="'$(TargetFramework)' == 'net461' " Include="Microsoft.Build.Tasks.Core" Version="14.3" PrivateAssets="all" />
<PackageReference Condition="'$(TargetFramework)' == 'netcoreapp2.1' " Include="Microsoft.Build.Tasks.Core" Version="15.1.548" PrivateAssets="all" />
<PackageReference Condition="'$(TargetFramework)' == 'netstandard2.0' " Include="Microsoft.Build.Tasks.Core" Version="15.1.548" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Label="Package">
<None Include="targets\pharmacist.targets" PackagePath="build\net461" Pack="true" />
<None Include="targets\pharmacist.targets" PackagePath="buildTransitive\net461" Pack="true" />
<None Include="targets\pharmacist.targets" PackagePath="build\netstandard1.4" Pack="true" />
<None Include="targets\pharmacist.targets" PackagePath="buildTransitive\netstandard1.4" Pack="true" />
<None Include="targets\pharmacist.targets" PackagePath="build\netstandard2.0" Pack="true" />
<None Include="targets\pharmacist.targets" PackagePath="buildTransitive\netstandard2.0" Pack="true" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 2 additions & 8 deletions src/Pharmacist.MsBuildTask/targets/pharmacist.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@

<PropertyGroup>
<IntermediateOutputPath Condition="$(IntermediateOutputPath) == '' Or $(IntermediateOutputPath) == '*Undefined*'">$(MSBuildProjectDirectory)obj\$(Configuration)\</IntermediateOutputPath>
<PharmacistTaskAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\..\build\MSBuildCore21\Pharmacist.BuildTasks.dll</PharmacistTaskAssemblyFile>
<PharmacistTaskAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\..\build\MSBuildFull46\Pharmacist.BuildTasks.dll</PharmacistTaskAssemblyFile>
<PharmacistTaskAssemblyFile Condition="'$(MSBuildRuntimeType)' != 'Full'">$(MSBuildThisFileDirectory)..\..\lib\netstandard2.0\Pharmacist.BuildTasks.dll</PharmacistTaskAssemblyFile>
<PharmacistTaskAssemblyFile Condition="'$(MSBuildRuntimeType)' == 'Full'">$(MSBuildThisFileDirectory)..\..\lib\net461\Pharmacist.BuildTasks.dll</PharmacistTaskAssemblyFile>

<PharmacistMinCoreVersionRequired>2.1</PharmacistMinCoreVersionRequired>
<!-- Our default CLI version for error checking purposes -->
<PharmacistNetCoreAppVersion>$(BundledNETCoreAppTargetFrameworkVersion)</PharmacistNetCoreAppVersion>
<PharmacistNetCoreAppVersion Condition="'$(PharmacistNetCoreAppVersion)' == ''">1.0</PharmacistNetCoreAppVersion>
Expand All @@ -21,11 +20,6 @@
<UsingTask TaskName="Pharmacist.MsBuildTask.PharmacistNuGetTask" AssemblyFile="$(PharmacistTaskAssemblyFile)" />

<Target Name="GeneratePharmacist" BeforeTargets="CoreCompile">
<Error Condition="'$(MSBuildRuntimeType)' == 'Core' and '$(PharmacistMinCoreVersionRequired)' > '$(PharmacistNetCoreAppVersion)' "
Text="Pharmacist requires at least the .NET Core SDK v2.1 to run with 'dotnet build'"
ContinueOnError="false"
/>

<PharmacistNuGetTask SourceFiles="@(PackageReference)"
TargetFramework="$(TargetFramework)"
OutputFile="$(IntermediateOutputPath)\Pharmacist.g.cs" />
Expand Down

0 comments on commit 5799aa0

Please sign in to comment.