@@ -142,14 +142,6 @@ type ProjectFile =
142142
143143 ! hasCustom
144144
145- member this.HasFrameworkAssemblyNode ( assemblyName ) =
146- let found = ref false
147- for node in this.Document.SelectNodes( " //ns:Reference" , this.Namespaces) do
148- if node.Attributes.[ " Include" ]. InnerText.Split( ',' ).[ 0 ] = assemblyName then
149- found := true
150-
151- ! found
152-
153145 member this.DeleteCustomNodes ( model : InstallModel ) =
154146 let nodesToDelete = List<_>()
155147
@@ -169,25 +161,22 @@ type ProjectFile =
169161 let itemGroup = createNode( this.Document, " ItemGroup" )
170162
171163 for lib in references do
172- match lib with
173- | Reference.Library lib ->
174- let fi = new FileInfo( normalizePath lib)
164+ let reference =
165+ match lib with
166+ | Reference.Library lib ->
167+ let fi = new FileInfo( normalizePath lib)
175168
176- createNode( this.Document, " Reference" )
177- |> addAttribute " Include" ( fi.Name.Replace( fi.Extension, " " ))
178- |> addChild ( createNodeWithText( this.Document, " HintPath" , createRelativePath this.FileName fi.FullName))
179- |> addChild ( createNodeWithText( this.Document, " Private" , " True" ))
180- |> addChild ( createNodeWithText( this.Document, " Paket" , " True" ))
181- |> itemGroup.AppendChild
182- |> ignore
183- | Reference.FrameworkAssemblyReference frameworkAssembly ->
184- if not <| this.HasFrameworkAssemblyNode( frameworkAssembly) then
169+ createNode( this.Document, " Reference" )
170+ |> addAttribute " Include" ( fi.Name.Replace( fi.Extension, " " ))
171+ |> addChild ( createNodeWithText( this.Document, " HintPath" , createRelativePath this.FileName fi.FullName))
172+ |> addChild ( createNodeWithText( this.Document, " Private" , " True" ))
173+ |> addChild ( createNodeWithText( this.Document, " Paket" , " True" ))
174+ | Reference.FrameworkAssemblyReference frameworkAssembly ->
185175 createNode( this.Document, " Reference" )
186176 |> addAttribute " Include" frameworkAssembly
187177 |> addChild ( createNodeWithText( this.Document, " Paket" , " True" ))
188- |> itemGroup.AppendChild
189- |> ignore
190-
178+
179+ itemGroup.AppendChild( reference) |> ignore
191180 itemGroup
192181
193182 let groupChooseNode = this.Document.CreateElement( " Choose" , Constants.ProjectDefaultNameSpace)
0 commit comments