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

Migration from ASP.NET Core 2.2 to 3.0, #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

UseMuse
Copy link

@UseMuse UseMuse commented Oct 16, 2019

adaptation of the project for asp core 3.0 with hot reload by Westwind.AspnetCore.LiveReload,because hot reload from asp core 2.2 stopped working

… asp core 3.0 with hot reload by Westwind.AspnetCore.LiveReload
@MarkPieszak
Copy link
Member

Hey @UseMuse !

Just seeing this now, did you have any other issues with this upgrade?
I need to take a deeper look, I know that with NodeServices etc deprecated I'm wondering what kind of issues we might experience here

@UseMuse
Copy link
Author

UseMuse commented Oct 28, 2019

@MarkPieszak

             //the design is obsolete
            // Webpack initialization with hot-reload.
                app.UseWebpackDevMiddleware (new WebpackDevMiddlewareOptions
                {
                    HotModuleReplacement = true,
                });

suggest using
Use Microsoft.AspNetCore.SpaServices.Extensions

I just marked the Configure method as Obsolete

design

 app.UseMvc (routes =>
            {
                routes.MapRoute (
                    name: "default",
                    template: "{controller = Home} / {action = Index} / {id?}");

                routes.MapSpaFallbackRoute (
                    name: "spa-fallback",
                    defaults: new {controller = "Home", action = "Index"});
            });

gives a warning:

Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing. To continue using 'UseMvc', please set 'MvcOptions.EnableEndpointRouting = false' inside 'ConfigureServices'.

In the ConfigureServices Method
in replaced it

  services.AddMvc ()
                .SetCompatibilityVersion (CompatibilityVersion.Version_2_2);

on this

            // Add framework services.
            services.AddMvc (opt => opt.EnableEndpointRouting = false)
                .SetCompatibilityVersion (CompatibilityVersion.Version_3_0);

//with explicit opt ​​=> opt.EnableEndpointRouting = false

also a discussion on my proposed update can be seen here:
#138

@UseMuse
Copy link
Author

UseMuse commented Nov 1, 2019

@Laranjeiras did you start with my fork? what mistake do you have?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants