Skip to content

Commit

Permalink
Property Definitions: placed after csharp targets
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Mar 30, 2016
1 parent 04ae7c9 commit de12ae8
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 63 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 2.57.1 - 30.03.2016
* BUGFIX: Property Definitions: placed after csharp targets - https://github.com/fsprojects/Paket/pull/1522

#### 2.57.0 - 30.03.2016
* BUGFIX: Property Definitions: placed after non-paket imports if they directly follow the top property groups - https://github.com/fsprojects/Paket/pull/1561
* BUGFIX: Fixed inconsistent condition generation in paket.lock file - https://github.com/fsprojects/Paket/issues/1552
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -51,6 +44,13 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<ItemGroup>
<Content Include="FodyWeavers.xml.install.xdt" />
<Content Include="FodyWeavers.xml.uninstall.xdt" />
Expand All @@ -54,6 +47,13 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
</PropertyGroup>
<ItemGroup>
<Content Include="FodyWeavers.xml.install.xdt" />
<Content Include="FodyWeavers.xml.uninstall.xdt" />
Expand All @@ -53,7 +46,14 @@
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<ItemGroup>
<Content Include="FodyWeavers.xml.install.xdt" />
<Content Include="FodyWeavers.xml.uninstall.xdt" />
Expand All @@ -54,6 +47,13 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<ItemGroup>
<Content Include="FodyWeavers.xml.install.xdt">
<Paket>True</Paket>
Expand All @@ -59,7 +52,14 @@
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<ItemGroup>
<Content Include="FodyWeavers.xml.install.xdt" />
<Content Include="FodyWeavers.xml.uninstall.xdt" />
Expand All @@ -54,6 +47,13 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@
<PropertyGroup>
<SignAssembly>False</SignAssembly>
</PropertyGroup>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.6')">
<PropertyGroup>
<__paket__MultiTarget_props>MultiTarget</__paket__MultiTarget_props>
<__paket__MultiTarget_targets>MultiTarget</__paket__MultiTarget_targets>
</PropertyGroup>
</When>
</Choose>
<Import Project="..\..\packages\MultiTarget\build\$(__paket__MultiTarget_props).props" Condition="Exists('..\..\packages\MultiTarget\build\$(__paket__MultiTarget_props).props')" Label="Paket" />
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.configuration" />
Expand Down Expand Up @@ -77,7 +68,16 @@
<Name>DIPS.Infrastructure.Services</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.6')">
<PropertyGroup>
<__paket__MultiTarget_props>MultiTarget</__paket__MultiTarget_props>
<__paket__MultiTarget_targets>MultiTarget</__paket__MultiTarget_targets>
</PropertyGroup>
</When>
</Choose>
<Import Project="..\..\packages\MultiTarget\build\$(__paket__MultiTarget_props).props" Condition="Exists('..\..\packages\MultiTarget\build\$(__paket__MultiTarget_props).props')" Label="Paket" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<ItemGroup>
<Content Include="FodyWeavers.xml.install.xdt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand All @@ -60,6 +53,13 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1')">
<PropertyGroup>
<__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody</__paket__Fody_targets>
</PropertyGroup>
</When>
</Choose>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
6 changes: 6 additions & 0 deletions src/Paket.Core/ProjectFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,12 @@ module ProjectFile =
String.containsIgnoreCase "paket" (project.ProjectNode.ChildNodes.[!k].OuterXml.ToString())))) do
incr k

let l = ref !k
while !l < project.ProjectNode.ChildNodes.Count do
if String.containsIgnoreCase "microsoft.csharp.targets" (project.ProjectNode.ChildNodes.[!l].OuterXml.ToString()) then
k := !l + 1
incr l

let addProps() =
if !j = 0 then
propsNodes
Expand Down

0 comments on commit de12ae8

Please sign in to comment.