Visual Studio Unit Tests : dll is not trusted

前端 未结 5 1531
别那么骄傲
别那么骄傲 2021-01-16 10:02

I\'m struggling getting some unit tests running and wondering if anyone might have anything insightful.

The setup is that we\'ve got a bunch of referenced DLL\'s on

相关标签:
5条回答
  • 2021-01-16 10:43

    You need to download the streams.exe from the below path: http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx

    place it in the same folder where you have the problem with the dll and navigate to that path in powershell/command prompt and run the below command: streams -s -d(command prompt) .\streams.exe -s -d "Folder Name"(from powershell)

    0 讨论(0)
  • 2021-01-16 10:46

    Are the .dlls in question files downloaded from the internet?

    If so, they may be 'blocked' by the OS unless you explicitly unblock them. You can do this by right-clicking the files in question and select Properties, and then click on the Unblock button.

    0 讨论(0)
  • 2021-01-16 10:50

    Uncheck 'readonly' before you select 'Unblock' from the properties dialog of the assembly in question. It should stay unblocked if it is not readonly.

    0 讨论(0)
  • 2021-01-16 11:00

    Ian had the key that started the fix for me. I'm attempting to use WatiN on Windows 7 64bit and kept getting the "not trusted" error. Here are the steps I took to fix it.

    1. Close VS.
    2. Delete the WatiN directory from Programs Files (x86)
    3. Navigate to my user directory. Search for and delete WatiN dll's.
    4. Navigate to my project directory. Search for and delete all WatiN dll's.
    5. Re-download WatiN.
    6. Right click on the .zip file and unblock the contents before the copy operation.
    7. Recreate the WatiN directory under the Programs Files (x86) and copy the file from the .zip.

    Unless you get the stray WatiN dll's VS will continue to access the untrusted DLL's and drive you nuts.

    0 讨论(0)
  • 2021-01-16 11:01

    If you go to the dll through Winodws Explorer, right click and go to properties there's an "Unblock" button.

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