![powershell 编程](https://i-blog.csdnimg.cn/blog_migrate/4449f80260b931eeeb6eea23365f5bbe.png)
powershell 编程
UPDATE: Why my own MacGyver solution was brilliant in its horrible way, the folks over at World of VS have taken up the challenge and created a proper Visual Studio extension that you should use. I'll chat with them and get some details and maybe a write-up of how they did it. So, while I encourage you to enjoy my tale below, go get the World of VS Default Browser Switcher now!
更新:为什么我自己的MacGyver解决方案以其可怕的方式出色,为什么VS World的人们已经接受了挑战,并创建了应使用的适当Visual Studio扩展。 我将与他们聊天,并获取一些详细信息,以及有关其工作方式的书面记录。 因此,尽管我鼓励您在下面欣赏我的故事,但现在就去获得VS Default Browser Switcher的世界!
I've heard and seen lots of complaints about how it's hard to set the default browser that Visual Studio launches when you launch a debug session for a website.
我听到并看到很多抱怨,当您为网站启动调试会话时,很难设置Visual Studio启动的默认浏览器。
步骤0-足够 (Step 0 - Adequate)
Folks spend time hunting around the Tools|Options dialog in Visual Studio looking for setting. They eventually realize it's not in there at all, but instead you have to right-click on an ASPX page within a Web Project and click "Browse With..."
人们花时间在Visual Studio的“工具|选项”对话框中寻找设置。 他们最终意识到它根本不存在,但是您必须在Web项目中的ASPX页面上单击鼠标右键,然后单击“浏览...”。
![Right Click | Browse With Right Click | Browse With](https://i-blog.csdnimg.cn/blog_migrate/052e84f170ae944cb93554b47a91356f.png)
From this dialog you can click Set Default, which is totally obvious, right my daimies? Um, no. This doesn't work for ASP.NET MVC people who use other view engines and might not even have a .ASPX file in their solution. Plus, it's slow and irritating. Sa da tay.
在此对话框中,您可以单击“设置默认值”,这很明显,对吗? 不。 这对于使用其他视图引擎并且甚至可能在其解决方案中甚至没有.ASPX文件的ASP.NET MVC用户不起作用。 另外,它又慢又烦人。 萨达泰。
![Browse With - Default.aspx Browse With - Default.aspx](https://i-blog.csdnimg.cn/blog_migrate/a2bc1321fcc564a5724dcccb14e3cc3e.png)
It IS interesting that I can add other browsers, like Google Chrome to this dialog via Add. Note that Google Chrome installs in C:\Users\Scott\appdata\Local\Google\Chrome\Application\chrome.exe which may not be c:\Program Files where you usually go hunting for these things.
我可以通过“添加”将其他浏览器(例如Google Chrome)添加到此对话框,这很有趣。 请注意,谷歌浏览器安装在C:\ Users \ Scott \ appdata \ Local \ Google \ Chrome \ Application \ chrome.exe中,该文件可能不是c:\ Program Files,通常您会在其中寻找这些东西。
“我的思想过程是什么”-或-“ CSI:Visual Studio默认浏览器” ("What my thought process was" - or - "CSI: Visual Studio Default Browser")
Where is this browser information stored? That was my first question. Remember that your computer is NOT a black box. Even good programmers make this mistake and they "flip this switch and hope that light turns on" without confirming that the switch and the light are connected with good wire and they know how electricity works.
该浏览器信息存储在哪里? 那是我的第一个问题。 请记住,您的计算机不是黑匣子。 即使是优秀的程序员犯这样的错误,他们“翻转这个开关和希望,指示灯变为”不确认开关和光都具有良好的导线连接,他们知道电力是如何工作的。
I can guess all day, or I can open up ProcMon and just see for myself. Seriously, learn how to use this freaking tool. You can flip light switches all day or you can just open up the wall and see the wires. If you know how to use Process Monitor competently, people of both sexes will immediately find you more attractive. It's true. I get all sorts of free Tacos and Chips when folks look can I run ProcMon like