Nswag: Use full/core command line binaries in NSwagStudio and fallback

Created on 18 Sep 2017  路  11Comments  路  Source: RicoSuter/NSwag

  • [x] Package NSwagStudio with all binaries (full and core1.0/1.1/2.0)
  • [x] Add "runtime" setting and generate files via command line binary (chosen via "runtime" settting)
  • [x] Generate output via command line binary (inline)
  • [x] Implement "runtime" check in command line binaries (full/core) so that other binaries are called when not in correct runtime
  • [x] Load available controllers via command line

    • Commands: list-controllers and list-types

  • [x] Cleanup

    • [x] Remove NSwagStudio.x86 => Not needed anymore (x86 cmd line tool is bundled)

    • [x] Refactor settings

  • [x] Add "Default" to Runtime

Branch:

https://github.com/RSuter/NSwag/tree/studio-uses-command-line

committed enhancement

Most helpful comment

In the current version in the branch, you can select a runtime and the selected binary is used (this currently works only for "Generate Files"):

image

The build can be tested here:

https://ci.appveyor.com/project/rsuter/nswag-25x6o/build/2657

All 11 comments

In the current version in the branch, you can select a runtime and the selected binary is used (this currently works only for "Generate Files"):

image

The build can be tested here:

https://ci.appveyor.com/project/rsuter/nswag-25x6o/build/2657

With the latest commit, the outputs are redirected to temp files so that "Generate" and display output in UI only also works.

I think all changes in NSwagStudio are now done (maybe more refactorings will come), can you please test with the latest CI artifacts:

https://ci.appveyor.com/project/rsuter/nswag-25x6o/build/2662

Yeap, it worked, thank you so much!

The only problem was that as my assemblies are .net core 2.0 and the default runtime is winx64, I got an error when loading my old powerhub.nswag file. Changing the runtime makes the error disappear, so maybe a friendly message saying that would be nice to the final user :)

Once again, thank you and congrats for such a great tool NSwagStudio is.

error-snagit

I changed the Runtime names from Core20 to NetCore20 => I think you got the error from this. Correct? Because you created the file with a prerelease build, this should not be a problem for the normal user...

Hmm.. it makes sense. Perfect :)

Isnt this error you posted as screenshot an issue?

Sorry, the error message cannot be easily avoided - we have to detect what type of assembly is selected and check the runtime with this... this will be a feature for the future :)

Added runtime detection for command line:

image

I think I'm done here :-), now we have to test this with as many projects as possible

We will test this with our solution after our first release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saephraim picture saephraim  路  3Comments

akamyshanov picture akamyshanov  路  4Comments

jjohs picture jjohs  路  3Comments

Rui90 picture Rui90  路  3Comments

p0wertiger picture p0wertiger  路  3Comments