Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot parse csproj files with only one ItemGroup #20

Closed
amlweems opened this issue Dec 4, 2020 · 0 comments
Closed

cannot parse csproj files with only one ItemGroup #20

amlweems opened this issue Dec 4, 2020 · 0 comments

Comments

@amlweems
Copy link

amlweems commented Dec 4, 2020

If you modify the sample.csproj file to use a single ItemGroup, parsing will fail. For example:

test/sample.csproj:

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <LangVersion>latest</LangVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.1" />
    <PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.8.0" />
    <PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.8.0" />
    <PackageReference Include="Microsoft.Bot.Builder.Adapters.Facebook" Version="4.8.0-rc2-preview" />
    <PackageReference Include="AdaptiveCards" Version="1.0.3" />
  </ItemGroup>
</Project>
$ npm test
...
 FAIL  ./utils.test.js (17.311s)
  ✓ SSRI test (5ms)
  ✓ finds license id from name (1ms)
  ✓ parse gradle dependencies (6ms)
  ✓ get py metadata (123ms)
  ✓ parseGopkgData (6576ms)
  ✓ get crates metadata (225ms)
  ✕ parse cs proj (18ms)
  ✓ get nget metadata (242ms)
  ✓ parsePomFile (22ms)
  ✓ parsePomMetadata (805ms)
  ✓ get repo license (657ms)
  ✓ get go pkg license (510ms)
  ✓ get licenses (2ms)
  ✓ parsePkgLock (11ms)
  ✓ parseNodeShrinkwrap (9ms)
  ✓ parseSetupPyFile (509ms)
  ✓ parsePnpmLock (137ms)
  ✓ parseYarnLock (357ms)
  ✓ parseComposerLock (5ms)
  ✓ parse requirements.txt with comments (1652ms)
  ✓ parse pipfile.lock with hashes (2693ms)
  ✓ parse scala sbt list (2ms)
...
Test Suites: 1 failed, 1 total
Tests:       1 failed, 21 passed, 22 total
Snapshots:   0 total
Time:        17.563s, estimated 24s
Ran all test suites.
npm ERR! Test failed.  See above for more details.
@prabhu prabhu closed this as completed in fe1c296 Dec 4, 2020
prabhu added a commit that referenced this issue Dec 4, 2020
Fixes #20: support csproj elements with a single ItemGroup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant