Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Property Definitions: placed after non-paket imports if they directly…
… follow the top property groups #1537
  • Loading branch information
cdrnet committed Mar 30, 2016
commit 7e963408f6aa9f1a9be2d98b1e73ab712eb7bca0
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETCore' And $(TargetFrameworkVersion) == 'v4.5.1'">
<PropertyGroup>
Expand Down Expand Up @@ -68,7 +69,6 @@
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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 @@ -30,6 +30,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -43,7 +44,6 @@
<None Include="packages.config" />
<None Include="paket.references" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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,6 +29,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.5'">
<PropertyGroup>
Expand Down
6 changes: 5 additions & 1 deletion src/Paket.Core/ProjectFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,11 @@ module ProjectFile =
incr j

let k = ref !j
while !k < project.ProjectNode.ChildNodes.Count && String.startsWithIgnoreCase "<PropertyGroup" (project.ProjectNode.ChildNodes.[!k].OuterXml.ToString()) do
while !k < project.ProjectNode.ChildNodes.Count &&
(String.startsWithIgnoreCase "<PropertyGroup" (project.ProjectNode.ChildNodes.[!k].OuterXml.ToString()) ||
(String.startsWithIgnoreCase "<import" (project.ProjectNode.ChildNodes.[!k].OuterXml.ToString()) &&
not (String.containsIgnoreCase "label" (project.ProjectNode.ChildNodes.[!k].OuterXml.ToString()) &&
String.containsIgnoreCase "paket" (project.ProjectNode.ChildNodes.[!k].OuterXml.ToString())))) do
incr k

let addProps() =
Expand Down