cake-contrib / Cake.Incubator

This project contains various experimental but useful extension methods and aliases for Cake
http://cakebuild.net/api/Cake.Incubator/
Other
19 stars 26 forks source link

`ProjectParser` compatibility #203

Open lonix1 opened 1 year ago

lonix1 commented 1 year ago

Moved here from https://github.com/cake-build/cake/issues/1662

I'm using the "incubator" version of ParseProject. Some feedback:

  1. It supports this traditional style:

    <Project Sdk="Microsoft.NET.Sdk">
    </Project>

    But not this form:

    <Project>
      <Sdk Name="Microsoft.NET.Sdk" />
    </Project>

    ...Which is common in large monorepos, because lots of reusable config is hidden away in Directory.Build.props (etc.) files. It errors with "Error: Failed to parse pre VS2017 project properties".

  2. It does not support nuget's new "Central Package Management" feature. So when versions are kept in a Directory.Package.props file instead of the Foo.csproj file, then the ProjectParserResult.References has null for the versions.

  3. I'm using it on a monorepo with a few dozen projects, and so far (other than the above) it works quite well. Thanks!