-
Notifications
You must be signed in to change notification settings - Fork 6k
[C#][ASP.NET CORE] upgrade generated files to support Visual Studio 2017 format #5520
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
base: master
Are you sure you want to change the base?
Conversation
-s | ||
``` | ||
|
||
-v ������docker���ļ���ӳ���ϵ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seven1986 instead of providing Chinese instruction, what about using English instead?
I can read simplified Chinese but I believe our users would prefer English :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, no problem, thanks 👍
@seven1986 thanks for the PR. I notice some changes such as removal of "sourceFolder", would these change still good for developers using Visual Studio 2015? cc @jimschubert |
This change is a hard upgrade to VS2017 format, and will break all previous users (including those not on Windows). I think the change should be behind a flag and conditionally apply the new changes. The |
@jimschubert Agree. What about |
@wing328 I would prefer something like
I think the nuance is that "support" sounds like it is related to generated code features, while others like "project", "format", "structure", etc. sound more related to supporting files to me. |
@wing328 @jimschubert As a c# developer, I think visual studio will let c# developers know the version changing and benefits(such as the version from 1.0,1.1,2.0), then we go forward ,keep the newest version about server stub and client template. Could be add a flag to keep every template, for now and feature users That what I think |
@seven1986 I don't understand your comment about VS providing hints about the benefits of future versions. VS2015 won't open a VS2017 file, so that can't yet be the default. Also, the switches would be passed as
or whatever. It wouldn't make sense to create global switches on swagger-codegen for Visual Studio because most of the languages aren't supported by Visual Studio. In another point, I don't think |
Hi @jimschubert , sorry for my english.
vs2017 can open vs2015 template, but need to convert them. the benefits I don't know, but the official will make everyone know exactly, that is enough, we just keep the newest official template |
@seven1986 my take is to keep vs2015 as the default. This is not to say vs2017 is bad. Just that it was just launched recently and my guess is that our developers are still using vs2015. In 2.3.0, we will consider making vs2017 as the default if there are enough demand to make the switch. |
@seven1986 I see what you're saying. For a server generator, I agree it's not that big of a deal. However, for client generators we have to stick with VS2015 and opt-in to future structure. Like I said, for aspnetcore it could make sense to say it's the latest only. But for the clients, our users may generate against master and it would be confusing to generate clients that support VS2015 in one build followed by a forced VS2017 in the following build. It would be confusing for us maintainers of the C# client(s) and aspnetcore server to have one go VS2015->VS2017 and the other go VS2017->VS2015 via options. We usually side on opt-in for newer code for consistency with other generators and to avoid confusion for the larger user base. I hope that clarifies my comment a bit more. |
With the release of .NET Core 2.0 MS set the IDE minimum to VS2017. What if instead of specifying which version of VS to use, we allow setting the .NET Core version?
The runtime download page shows both a current and LTS version. The version you specify generates project definitions that work with the minimum version IDE. The default can be kept at the LTS version to prevent users from upgrading all the time. |
@kraihn instead of using
Ref: |
@wing328, targetFramework works great. Then instead of the shortened framework version, I would use the named framework version. That would be more aligned to how the dotnet cli works, and it's the value present in the project files.
|
Is there a workaround for getting the server stubs to work in vs2017 while we wait for this to get merged? I tried to merge this pull locally so I could generate working server stubs but 2.3.0 doesn't build. |
I don't have a Visual Studio 2017 license to evaluate these changes. Does the branch from this PR not build? |
@jimschubert I pulled down this pull request as a branch and got 111 test failures when building the core lib. I followed github's instructions after cloning master: https://help.github.com/articles/checking-out-pull-requests-locally/#modifying-an-inactive-pull-request-locally |
Looks like @seven1986 has removed the branch. @seven1986 can you add back the branch so that others from the community can help move this forward? |
To all, To add the support, we can follow the post below to upgrade the C# Petstore project file to VS2017: https://msdn.microsoft.com/en-us/library/ms185327(v=vs.100).aspx Then commit the change and submit a PR. Based on the difference, we can reverse engineer the change back to the mustache templates. If anyone has better suggestion, please reply to let us know. (I don't have Visual Studio 2017 so can't help with this task) |
@wing328 After a couple days of playing with it I did get the currently generated files to work in VS2017. The route attributes had Also I would expect the latest version of VS Code to have the same project file format expectations and that is free, open source, and runs on all 3 major platforms (windows, linux, and macos) in both 64 bit and 32 bit. |
Hi all, |
where's this one at? interested to see this support land |
update aspnetcore template to newest, can use vs2017 run it