[{"data":1,"prerenderedAt":365},["ShallowReactive",2],{"article-attaching-to-net-debugger-wvisual-studio-aspnet-core":3},{"article":4,"tags":116,"previous":157,"next":201},{"id":5,"title":6,"author":7,"body":8,"createdAt":103,"description":104,"extension":105,"img":28,"meta":106,"navigation":107,"path":108,"seo":109,"stem":110,"tags":111,"updatedAt":103,"__hash__":115},"articles\u002Farticles\u002Fattaching-to-net-debugger-wvisual-studio-aspnet-core.md","Attaching to .NET Debugger w\u002FVisual Studio ASP.NET Core",null,{"type":9,"value":10,"toc":99},"minimark",[11,15,41,44,48,51,54,65,68,77,80,89],[12,13,14],"p",{},"Attaching from within Visual Studio to the dotnet.exe process Debug – Attach to Process",[16,17,18,19,18,32,18],"blockquote",{},"  \n",[20,21,23],"a",{"href":22},"\u002Farticles\u002Fimages\u002Fimage_thumb3_636794037223872773.png",[24,25],"img",{"style":26,"title":27,"src":28,"alt":27,"width":29,"height":30,"border":31},"margin: 0px; border: 0px currentcolor; display: inline; background-image: none;","image_thumb3","\u002Farticles\u002Fimages\u002Fimage_thumb3_thumb_636794037227151161.png",166,244,0,[20,33,35],{"href":34},"\u002Farticles\u002Fimages\u002Fimage_thumb4_636794037229825895.png",[24,36],{"style":37,"title":38,"src":39,"alt":38,"width":30,"height":40,"border":31},"border: 0px currentcolor; display: inline; background-image: none;","image_thumb4","\u002Farticles\u002Fimages\u002Fimage_thumb4_thumb_636794037232542538.png",174,[16,42,43],{},"  \nThis works fine, however to me seems too many clicks\u002Fsteps to do efficiently.  \n",[20,45,47],{"href":46},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=arcticdev.AnotherAttachToAny","AnotherAttachToAny",[12,49,50],{},"Once installed, I then set keystroke shortcut keys to execute the above steps.  This is how it is currently configured to me.  You can see I have Alt-A setup to immediately attach to the w3process (IIS), and Alt-D attaches to dotnet.exe. ",[12,52,53],{},"This is one keystroke to attach to the running process and any breakpoints within my .net code are hit and I can then step through.",[12,55,56],{},[20,57,59],{"href":58},"\u002Farticles\u002Fimages\u002Fimage_636794037234623240.png",[24,60],{"style":61,"title":62,"src":63,"alt":62,"width":30,"height":64,"border":31},"margin: 0px; display: inline; background-image: none;","image","\u002Farticles\u002Fimages\u002Fimage_thumb_636794037237173898.png",62,[12,66,67],{},"Configuration of this extension is done through Tools – Options – Another Attach To Any",[12,69,70],{},[20,71,73],{"href":72},"\u002Farticles\u002Fimages\u002Fimage_636794037240524929.png",[24,74],{"style":61,"title":62,"src":75,"alt":62,"width":30,"height":76,"border":31},"\u002Farticles\u002Fimages\u002Fimage_thumb_636794037243711700.png",193,[12,78,79],{},"Setting up a keystroke to one of the above commands is done through Tools – Options – Keyboard",[12,81,82],{},[20,83,85],{"href":84},"\u002Farticles\u002Fimages\u002Fimage_636794037246961946.png",[24,86],{"style":61,"title":62,"src":87,"alt":62,"width":30,"height":88,"border":31},"\u002Farticles\u002Fimages\u002Fimage_thumb_636794037249700449.png",191,[12,90,91,92],{},"This single extension has saved me hundreds of hours ",[24,93],{"className":94,"src":97,"alt":98},[95,96],"wlEmoticon","wlEmoticon-smile","\u002Farticles\u002Fimages\u002FwlEmoticon-smile_636794037251738341.png","Smile",{"title":100,"searchDepth":101,"depth":101,"links":102},"",2,[],"2018-12-03T03:15:25.405Z","You have a website up and running, and now you want to connect the Visual Studio Debugger.  This is often the case if you do not start with F5 - Debug to start the browser and automatically attach to the .net debugger.  In reality, I almost never push F5.  Instead, I attach to the debugger on the fly with the approach below.  Take a moment to check it out.","md",{},true,"\u002Farticles\u002Fattaching-to-net-debugger-wvisual-studio-aspnet-core",{"title":6,"description":104},"articles\u002Fattaching-to-net-debugger-wvisual-studio-aspnet-core",[112,113,114],"netcore","aspnet","visualstudio","Nscy8wnaq8s7ro0UwOm6dGcZvHofFD7TMOQpO4pRHZs",[117,131,144],{"id":118,"title":119,"body":120,"description":124,"extension":105,"img":125,"meta":126,"name":113,"navigation":107,"path":127,"seo":128,"stem":129,"__hash__":130},"tags\u002Ftags\u002Faspnet.md","Aspnet",{"type":9,"value":121,"toc":122},[],{"title":100,"searchDepth":101,"depth":101,"links":123},[],"ASP.NET is an open source web framework, created by Microsoft, for building modern web apps and services with .NET.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1598313183973-4effcded8d5e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=675&q=80",{},"\u002Ftags\u002Faspnet",{"description":124},"tags\u002Faspnet","SlUGLdZWQy8mYOWC6OetgJkwVulWNURoVHeuESIDleI",{"id":132,"title":133,"body":134,"description":138,"extension":105,"img":125,"meta":139,"name":112,"navigation":107,"path":140,"seo":141,"stem":142,"__hash__":143},"tags\u002Ftags\u002Fnetcore.md","Netcore",{"type":9,"value":135,"toc":136},[],{"title":100,"searchDepth":101,"depth":101,"links":137},[],".NET Core is a new version of .NET Framework, which is a free, open-source, general-purpose development platform maintained by Microsoft. It is a cross-platform framework that runs on Windows, macOS, and Linux operating systems.",{},"\u002Ftags\u002Fnetcore",{"description":138},"tags\u002Fnetcore","D5BWCPpKVXJTUKU0TRuD3sWQ9rXtqETGkxzHAK__g5w",{"id":145,"title":146,"body":147,"description":151,"extension":105,"img":125,"meta":152,"name":114,"navigation":107,"path":153,"seo":154,"stem":155,"__hash__":156},"tags\u002Ftags\u002Fvisualstudio.md","Visualstudio",{"type":9,"value":148,"toc":149},[],{"title":100,"searchDepth":101,"depth":101,"links":150},[],"Develop apps for Android, iOS, Mac, Windows, web, and cloud",{},"\u002Ftags\u002Fvisualstudio",{"description":151},"tags\u002Fvisualstudio","glm3bYyBlAXGun4NJe-CV_iOzhszydeBRIpbGNNLeEk",{"id":158,"title":159,"author":7,"body":160,"createdAt":193,"description":194,"extension":105,"img":188,"meta":195,"navigation":107,"path":196,"seo":197,"stem":198,"tags":199,"updatedAt":193,"__hash__":200},"articles\u002Farticles\u002Fmultiple-solution-explorer-tools-visual-studio-extension.md","Multiple Solution Explorer Tools–Visual Studio Extension",{"type":9,"value":161,"toc":191},[162,165,174,177,180],[12,163,164],{},"This is a must-have for your Visual Studio 2017 and 2019.",[12,166,167],{},[20,168,173],{"href":169,"target":170,"rel":171},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=misaz.multiplesolutionexplorertools","_blank",[172],"noopener","Multiple Solution Explorer Tools",[12,175,176],{},"This extension mainly makes scoped Solution Explore view (create by New Solution Explorer View in context menu in Solution Explorer) persistent across solution unload and load (ie. it saves state when Visual Studio shutdown and restores it when solution is opened next time). It allows you to rename solution explorer view so you can easily distinguish it.",[12,178,179],{},"It allows you to create multiple solution explorer windows, rename them AND best of all you can close Studio and re-open, and it remembers your settings.",[12,181,182],{},[20,183,185],{"href":184},"\u002Farticles\u002Fimages\u002Fimage_636839483796186628.png",[24,186],{"style":187,"title":62,"src":188,"alt":62,"width":189,"height":190},"display: inline;","\u002Farticles\u002Fimages\u002Fimage_thumb_636839483797297446.png",160,399,{"title":100,"searchDepth":101,"depth":101,"links":192},[],"2019-01-24T17:39:39.809Z","This extension mainly makes scoped Solution Explore view (create by New Solution Explorer View in context menu in Solution Explorer) persistent across solution unload and load (ie. it saves state when Visual Studio shutdown and restores it when solution is opened next time).  Definitely a must have!",{},"\u002Farticles\u002Fmultiple-solution-explorer-tools-visual-studio-extension",{"title":159,"description":194},"articles\u002Fmultiple-solution-explorer-tools-visual-studio-extension",[114],"9vW9DawB66Pk-Z5BJTPAmcJ9KezrCWHX1ISmdlCpLJg",{"id":202,"title":203,"author":7,"body":204,"createdAt":356,"description":357,"extension":105,"img":325,"meta":358,"navigation":107,"path":359,"seo":360,"stem":361,"tags":362,"updatedAt":356,"__hash__":364},"articles\u002Farticles\u002Fvue-app-and-mvc-routing-wvisual-studio-aspnet-core.md","Vue App and MVC Routing w\u002FVisual Studio ASP.NET Core",{"type":9,"value":205,"toc":354},[206,209,212,219,225,240,259,286,299,348,351],[12,207,208],{},"###What page is loaded on starting the application.",[12,210,211],{},"The default route for this VS.NET ASP.NET Core application is the public\u002Findex.html with the following setup in the Startup.cs",[12,213,214,215,218],{},"app.UseSpa(spa => { ",[216,217],"br",{}," spa.Options.SourcePath = \"ClientApp\";",[12,220,221,222,224],{}," if (env.IsDevelopment()) ",[216,223],{}," {",[12,226,227,228,230,231,233,234,236,237,239],{}," \u002F\u002F run npm process with client app ",[216,229],{}," spa.UseVueCli(npmScript: \"serve\", port: 8080); ",[216,232],{}," ",[216,235],{}," } ",[216,238],{}," }); ",[12,241,242,246,247,250,251,254,255,258],{},[243,244,245],"strong",{},"If you have"," a HomeController and a Views\u002FHome\u002FIndex.cshtml view, \nwhen the application starts via F5 it will route by default to http:\u002F\u002Flocalhost:50557 ",[243,248,249],{},"or"," \n",[20,252,253],{"href":253},"http:\u002F\u002Flocalhost:50557\u002Findex.html"," and if you want to navigate to your controller\u002Fview you can navigate to \n",[20,256,257],{"href":257},"http:\u002F\u002Flocalhost:50557\u002FHome\u002FIndex"," Essentially it will default to the vue index.html page in this scenario.",[16,260,261,271,274],{},[12,262,263],{},[20,264,266],{"href":265},"\u002Farticles\u002Fimages\u002Fimage_thumb[1]_636791382475500953.png",[24,267],{"style":26,"title":268,"src":269,"alt":268,"width":30,"height":270,"border":31},"image_thumb[1]","\u002Farticles\u002Fimages\u002Fimage_thumb[1]_thumb_636791382476448208.png",141,[12,272,273],{},"Navigating to http:\u002F\u002Flocalhost:50557\u002Fhome\u002Findex will navigate to the MVC view, however if you want this route to navigate the vue app you can add, \nwhich would redirect the user from the MVC view to the vue app again.",[12,275,276,277,279,280,282,283,285],{},"public IActionResult Index() ",[216,278],{}," { ",[216,281],{}," return Redirect(\"~\u002Findex.html\"); ",[216,284],{}," }",[12,287,288,290,291,294,295,298],{},[243,289,245],{}," a HomeController ",[243,292,293],{},"AND ","and you add ",[243,296,297],{},"MapSpaFallbackRoute"," reference within the Startup.cs similar to the following, starting via F5 the site will navigate to http:\u002F\u002Flocalhost:50557\u002F and land on the Views\u002FHome\u002FIndex.cshtml This really is the reverse of the above scenario. In this case it will default to the MVC view and you have to explicitly navigate to the \u002Findex.html for the vue app.",[16,300,301,313,321,331,338],{},[12,302,303,304,306,307,309,310,312],{},"app.UseMvc(routes => { ",[216,305],{}," routes.MapRoute( ",[216,308],{}," name: \"default\", ",[216,311],{}," template: \"{controller}\u002F{action=Index}\u002F{id?}\");",[12,314,233,315,233,318,320],{},[243,316,317],{},"routes.MapSpaFallbackRoute(\"spa-fallback\", new { controller = \"Home\", action = \"Index\" });",[216,319],{},"});",[12,322,323],{},[20,324,326],{"href":325},"\u002Farticles\u002Fimages\u002Fimage_thumb[2]_636791382477200018.png",[24,327],{"style":26,"title":328,"src":329,"alt":328,"width":30,"height":330,"border":31},"image_thumb[2]","\u002Farticles\u002Fimages\u002Fimage_thumb[2]_thumb_636791382477864407.png",74,[12,332,333,334,337],{},"If you want to navigate to your vue app, you must ",[243,335,336],{},"explicitly"," reference http:\u002F\u002Flocalhost:50557\u002FIndex.html Any invalid routes will default to the Home\u002FIndex view.",[12,339,340],{},[20,341,343],{"href":342},"https:\u002F\u002Fwww.davidyardy.com\u002FPosts\u002Ffiles\u002Fimage_thumb[3]_636791382478902143.png",[24,344],{"style":26,"title":345,"src":346,"alt":345,"width":30,"height":347,"border":31},"image_thumb[3]","\u002Farticles\u002Fimages\u002Fimage_thumb[3]_thumb_636791382479671548.png",126,[12,349,350],{},"There are a number of combinations and can be confusing. \n",[12,352,353],{},"Primarily, both the vue app and MVC navigation work fine. It really just depends on if you want the MVC to be the default route, or the vue app index.html page.",{"title":100,"searchDepth":101,"depth":101,"links":355},[],"2018-11-30T01:30:48.068Z","Vue.js SPA routing conflicts with MVC routing.  Short article reviewing the options, and an approach on how to get both working nicely together.",{},"\u002Farticles\u002Fvue-app-and-mvc-routing-wvisual-studio-aspnet-core",{"title":203,"description":357},"articles\u002Fvue-app-and-mvc-routing-wvisual-studio-aspnet-core",[363,112],"vuejs","up2a1CH7j5uH_V7CzCVaVuAZueA1QSdo_Obd_kNIwWU",1781574761542]