powershell 编程_如何使用PowerShell以编程方式更改Visual Studio中的默认浏览器,并可能使自己陷入困境...

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 sho...
摘要由CSDN通过智能技术生成
powershell 编程

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

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

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Visual Studio使用CMakeLists.txt文件可以方便地管理和构建C++项目。下面是使用Visual Studio的步骤: 1. 确保您已经安装了CMake,并将其添加到系统的PATH环境变量。 2. 创建一个新的文件夹作为您的项目文件夹。 3. 在项目文件夹创建一个CMakeLists.txt文件,并在其编写构建脚本。以下是一个简单的示例: ```cmake cmake_minimum_required(VERSION 3.14) project(MyProject) # 添加源文件 add_executable(MyProject main.cpp) # 设置编译选项 target_compile_features(MyProject PRIVATE cxx_std_11) # 设置链接的库文件(如果需要) target_link_libraries(MyProject MyLibrary) ``` 在这个示例,我们定义了一个名为"MyProject"的项目,添加了一个名为"main.cpp"的源文件,并设置了编译选项和链接的库文件(如果需要)。您可以根据您的项目需求进行调整。 4. 打开命令提示符或者PowerShell,并切换到您的项目文件夹。 5. 运行以下命令来生成Visual Studio的项目文件: ```shell cmake -G "Visual Studio 16 2019" . ``` 请注意,根据您安装的Visual Studio版本,可能需要调整命令的"Visual Studio 16 2019"参数。 6. 在项目文件夹会生成一个.sln文件,双击打开它,就可以在Visual Studio打开您的项目了。 7. 在Visual Studio,您可以进行代码编辑、构建和调试等操作。 使用CMakeLists.txt文件可以让您的项目在跨平台环境更具可移植性。您可以根据您的项目需求进行更复杂的配置和设置。 希望这些步骤能帮助您在Visual Studio使用CMakeLists.txt文件。如果您有更多问题,请随时提问。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值