Visual Studio does not let me drag drop items into it?

前端 未结 9 594
执笔经年
执笔经年 2020-11-30 05:46

Using Visual studio 2010 I got problems when double-clicking, for example a config file (*.config). Visual Studio would open but give me a error message about parameters. If

9条回答
  •  一个人的身影
    2020-11-30 06:08

    I had this problem as well because I was opening VS in admin mode and the file explorer by default is not in admin mode.

    Ended up creating a PowerShell and bat script to start explorer in admin mode every time the computer start.

    admin.bat file:

    @ECHO OFF
    PowerShell.exe -Command "& {Start-Process PowerShell.exe -ArgumentList '-ExecutionPolicy Bypass -File ""%~dpn0.ps1""' -Verb RunAs}"
    

    admin.ps1 file:

    taskkill /f /im explorer.exe
    start-process explorer.exe
    

    The files just have to be in the same folder. Doesn't matter what they are called. Run the .bat file to restart explorer in admin mode or just create a shortcut to the .bat file in the startup folder ;) the script and ps1 file can be hidden.

提交回复
热议问题