Could not load file or assembly 'Microsoft.CSharp' when logged in with user which is not a member of administrator group

前端 未结 3 917
你的背包
你的背包 2021-01-11 09:59

I have created a website which compiles successfully when I log-in using administrator but when I log-in using any other user, following error occurs.

相关标签:
3条回答
  • 2021-01-11 10:35

    I was surprised when I can't find options always run as administrator for file of vs 2017 pro (devenv.exe). It was resolved and set only with troubleshoot compatibility option.

    Solution for the latest window versions:

      - Find  "devenv.exe" file
      - Right mouse click and selects "troubleshoot compatibility" option
      - Troubleshoot program option
      - Checks "The program requires additional permissions"
      - Next
      - Test the program
      - Next 
      - Yes,save these settings for this program
    
    0 讨论(0)
  • 2021-01-11 10:50

    This one solved my problem.

    1. Right click on Visual studio (whichever version you use)
    2. Properties
    3. Select compatibility tab
    4. Fill the checkbox which says "Run this program as administrator"
    5. Open the project from the file location
    6. Run the application
    0 讨论(0)
  • 2021-01-11 10:58

    The accepted answer does not work in the latest version of windows. My Windows 10 operating system with VS 2017 did not have a "Compatibility Tab" in the properties window - it appears they have now moved this option.

    For windows 10 users, follow the below steps:

    Firstly, you need to be logged in as an administrator for the computer you're using.

    1. Right click Visual Studio (whichever version).
    2. Click "properties" - and a properties window will open.
    3. Click on the "Shortcut" tab.
    4. Click on "Advanced" box - at the bottom right.
    5. Check the "Run as Administrator" box, and click OK.
    6. Click "Apply" and then "OK" on the Visual Studio Properties window.

    For previous versions, please follow the following steps

    1. Right click Visual Studio (whichever version).
    2. Click "properties" - and a properties window will open.
    3. Click on the "Compatibility" tab.
    4. Check the "Run as Administrator" box.
    5. Click "Apply" and then "OK" on the Visual Studio Properties window.

    Your project should now open up as administrator going forwards, and common access issues to the Assembly will be resolved.

    0 讨论(0)
提交回复
热议问题