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

Use full/core command line binaries in NSwagStudio and fallback #953

Closed
9 tasks done
RicoSuter opened this issue Sep 18, 2017 · 11 comments
Closed
9 tasks done

Use full/core command line binaries in NSwagStudio and fallback #953

RicoSuter opened this issue Sep 18, 2017 · 11 comments

Comments

@RicoSuter
Copy link
Owner

RicoSuter commented Sep 18, 2017

  • Package NSwagStudio with all binaries (full and core1.0/1.1/2.0)
  • Add "runtime" setting and generate files via command line binary (chosen via "runtime" settting)
  • Generate output via command line binary (inline)
  • Implement "runtime" check in command line binaries (full/core) so that other binaries are called when not in correct runtime
  • Load available controllers via command line
    • Commands: list-controllers and list-types
  • Cleanup
    • Remove NSwagStudio.x86 => Not needed anymore (x86 cmd line tool is bundled)
    • Refactor settings
  • Add "Default" to Runtime

Branch:

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

@RicoSuter
Copy link
Owner Author

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

@RicoSuter
Copy link
Owner Author

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

@RicoSuter
Copy link
Owner Author

RicoSuter commented Sep 20, 2017

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

RicoSuter added a commit that referenced this issue Sep 20, 2017
@andrecarlucci
Copy link

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

@RicoSuter
Copy link
Owner Author

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...

@andrecarlucci
Copy link

Hmm.. it makes sense. Perfect :)

@RicoSuter
Copy link
Owner Author

Isnt this error you posted as screenshot an issue?

@RicoSuter
Copy link
Owner Author

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 :)

RicoSuter added a commit that referenced this issue Sep 20, 2017
@RicoSuter
Copy link
Owner Author

Added runtime detection for command line:

image

@RicoSuter
Copy link
Owner Author

RicoSuter commented Sep 20, 2017

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

@zuckerthoben
Copy link

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

RicoSuter added a commit that referenced this issue Sep 21, 2017
RicoSuter added a commit that referenced this issue Sep 21, 2017
Use full/core command line binaries in NSwagStudio and fallback #953
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants