swagger-api / swagger-api/swagger-codegen

Cannot open aspnetcore generated project file due to project GUID

Open
#8,660 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

When swagger-codegen generates aspnetcore server project, Visual Studio 2017 cannot open the generated project file. I'm using Visual Studio 15.8.1 (2017).

Currently, aspnetcore lang generates solution file and solution file describes the project guid value with guid {8BB2217D-0F2D-49D1-97BC-3654ED321F3B}.

But Visual Studio 2017 seems support the guid {9A19103F-16F7-4668-BE54-9A1E7A4F7556} only.

Swagger-codegen version

Swagger-codegen 2.3.1

Swagger declaration file content or url

I attached generated code file into this post.

aspnetcore.zip

Command line used for generation
set JAVA_OPTS=-Dfile.encoding=UTF-8
java -jar swagger-codegen-cli.jar generate -i optool-sample.yaml -l aspnetcore -o .\samples\aspnetcore
Steps to reproduce

I simply called swagger-codgen basic functions in Windows 10.

Related issues/PRs
Suggest a fix/enhancement

I think aspnetcore module should produce the new GUID value into solution file instead of current GUID.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the aspnetcore generator templates and inspect how the generated solution file writes its project GUID. Reproduce generation with the documented Java command on Windows, then verify that Visual Studio 2017 opens the generated project with the expected GUID.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.