Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #5520
Closed
Open
Issue created Mar 04, 2020 by William Cheng@wing328Contributor6 of 6 checklist items completed6/6 checklist items

[BUG] Errors when running `nuget pack`

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

Got the following errors when running nuget pack -Build -OutputDirectory out src/Open.Petstore/Open.Petstore.csproj (package name set to Open.Petstore)

  Model/Order.cs(37,10): error CS0246: The type or namespace name 'JsonConverterAttribute' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/Code/csharp/openapi_client/src/Open.Petstore/Open.Petstore.csproj]
  Model/Order.cs(37,10): error CS0246: The type or namespace name 'JsonConverter' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/Code/csharp/openapi_client/src/Open.Petstore/Open.Petstore.csproj]
  Model/Order.cs(37,31): error CS0246: The type or namespace name 'StringEnumConverter' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/Code/csharp/openapi_client/src/Open.Petstore/Open.Petstore.csproj]
  Model/Pet.cs(69,10): error CS0246: The type or namespace name 'JsonConstructorAttributeAttribute' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/Code/csharp/openapi_client/src/Open.Petstore/Open.Petstore.csproj]
  Model/Pet.cs(69,10): error CS0246: The type or namespace name 'JsonConstructorAttribute' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/Code/csharp/openapi_client/src/Open.Petstore/Open.Petstore.csproj]
  Client/OpenAPIDateConverter.cs(19,41): error CS0246: The type or namespace name 'IsoDateTimeConverter' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/Code/csharp/openapi_client/src/Open.Petstore/Open.Petstore.csproj]
  Client/ExceptionFactory.cs(23,67): error CS0246: The type or namespace name 'IRestResponse' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/Code/csharp/openapi_client/src/Open.Petstore/Open.Petstore.csproj]
  Model/Pet.cs(37,10): error CS0246: The type or namespace name 'JsonConverterAttribute' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/Code/csharp/openapi_client/src/Open.Petstore/Open.Petstore.csproj]
  Model/Pet.cs(37,10): error CS0246: The type or namespace name 'JsonConverter' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/Code/csharp/openapi_client/src/Open.Petstore/Open.Petstore.csproj]
  Model/Pet.cs(37,31): error CS0246: The type or namespace name 'StringEnumConverter' could not be found (are you missing a using directive or an assembly reference?) [/private/tmp/Code/csharp/openapi_client/src/Open.Petstore/Open.Petstore.csproj]

    3 Warning(s)
    44 Error(s)

Time Elapsed 00:00:05.19
Error NU5013: Failed to build 'Open.Petstore.csproj'.
openapi-generator version

Latest master

OpenAPI declaration file content or url

Pestore spec (OAS 2.0)

Command line used for generation
nuget pack -Build -OutputDirectory out src/Open.Petstore/Open.Petstore.csproj

A workaround is to use nuget pack src/Open.Petstore/Open.Petstore.nuspec instead.

Assignee
Assign to
Time tracking