Skip to content

Strange failure when using ProjectFile.GetInterProjectDependencies() #452

Closed

Description

@Vidarls

I just took over a project from another team and wanted to put it into our buildsystem (using Project Scaffolding as the base).

I noticed a strange failure when creating nuget packages (using the code from fsprojects/ProjectScaffold#116).

Part of what is done in this code is to calculate interproject dependencies of libary output projects and adding them as nuget dependencies.

For this I use ProjectFile.GetInterProjectDependencies() which failed with the message unable to parse ProjectReference

After reading the code of this function I found that on line 269 (

Private = forceGetInnerText n "Private" |> bool.Parse }]
) the function tries to read a node named Private. It also (due to the use of the forceGetInnerText function) throws an exception when this node is not found.

I checked, (and even tried to re-add the reference) but this node is not created in my project files.

Is there any reason for not reading this node in a more soft manner, IE: If it is present, read it. If not assume False ?

Activity

  1. forki commented on Dec 12, 2014

    @forki
    Member

    probably just a bug. I'm not at my dev box - could you please send a pull request?

  2. Vidarls commented on Dec 12, 2014

    @Vidarls
    ContributorAuthor

    Need to catch the bus home soon, I'll see what I can do in the evening.

    I did load up one of the test files used in the tests of this feature, and found that all the projectreference nodes there had the private sub node, but VS underlined them and gave a warning that it was an invalid child elemen "Private" so not sure it should even be there.

    I suppose making the parsing soft is a safe step anyway, then we can remove it later if it has no use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions