NUnit assembly not found

前端 未结 5 1541
被撕碎了的回忆
被撕碎了的回忆 2021-02-02 12:25

I\'ve used NUnit before, but not in a while, and never on this machine. I unzipped version 2.4.8 under Program Files, and I keep getting this error when trying to l

5条回答
  •  遥遥无期
    2021-02-02 13:03

    I had the same problem, and I had installed using NUnit-2.4.8-net-2.0.msi. Expanding on the "add to the GAC" comment, here's what I did:

    • Open your "Visual Studio command prompt (generally: make sure gacutil is in your path) and: cd "C:\Program Files\NUnit 2.4.8\bin"

    • Unregister your NUnit entries from the GAC. You can do this by finding the NUnit entries registered in the GAC:

      gacutil /l | find /i "nunit" > temp.bat && notepad temp.bat
      
    • Prepend the nunit.core and nunit.framework lines with "gacutil /uf", i.e.:

      gacutil /uf nunit.core,Version=2.4.2.0,Culture=neutral,PublicKeyToken=96d09a1eb7f44a77
      
      gacutil /uf  nunit.framework,Version=2.4.2.0,Culture=neutral,PublicKeyToken=96d09a1eb7f44a77
      
    • Run your .bat file to remove them: temp.bat

    • Register the NUnit DLL files you need:

      gacutil /i nunit.core.dll
      
      gacutil /i nunit.framework.dll
      

提交回复
热议问题