拖放到在 Windows 10 上运行的 Visual Studio 2017 不起作用 [英] Drag and drop into Visual Studio 2017 running on Windows 10 does not work

查看:33
本文介绍了拖放到在 Windows 10 上运行的 Visual Studio 2017 不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直能够将源代码文件拖到 Visual Studio 编辑器中打开它们.这非常方便,但最近它不再有效.

我认为问题是我升级到 VS2017 但在阅读了几个

当您现在以管理员身份启动资源管理器和 Visual Studio 时,您可以拖动 &删除文件.

I have always been able to drag source code files into the Visual Studio editor to open them. This is very convenient but lately it no longer works.

I thought the issue was my upgrading to VS2017 but after reading several similar questions here on Stack Overflow, I understand that the issue is probably that I'm running Visual Studio 2017 in Admin mode but since explorer is not run in admin mode Windows 10 apparently prevents dragging files from one user account to another to be opened via drag and drop.

That's all well and good. But the solution outlined here Drag & Drop files into Visual Studio doesn't work involves control panel UI for Windows 8 and that don't exist in the same place in Windows 10 and I can't seem to find them anywhere in Windows 10.

Another similar question, Visual Studio does not let me drag drop items into it? has an accepted answer of installing VS Commands for VS 2012 which provides features to deal with the issue. But when I search online I'm unable to find a similar download for VS 2017.

Another highly upvoted answer to that same questions suggests running cmd.exe as administrator then running explorer.exe from there. The thought being that when explorer.exe is ran this way it will be ran as administrator and then drag and drop to VS 2017 running as administrator should work. But I tried this and alas, it still doesn't work to drag a file (in my case AppSettings.json) into VS2017 from this special explorer window and have it open. Using a tip from one of the answers below, used task manager to see if this approach resulted in explorer.exe running with elevated privs and it did not.

All suggestions welcome.

解决方案

Use my workaround to be able to start Windows Explorer.exe as admin.

When you now start Explorer and Visual Studio as admin, you can drag & drop files.

这篇关于拖放到在 Windows 10 上运行的 Visual Studio 2017 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆