I have .NET MVC app (.NET Framework 4.6.1) and I want to add ClearScript to my app. I've added package Microsoft.ClearScript via NuGet and after launch app I have error:

Could not load file or assembly 'file:///D:\PathToProject\bin\ClearScriptV8.win-x64.dll' or one of its dependencies. The module was expected to contain an assembly manifest.

This file is in bin folder

What am I doing wrong? And how can I resolve this issue?

UPDATE

The next step I did removing assemblies into web.config files as @BitCortex advised:

<system.web>
  <compilation>
    <assemblies>
      <remove assembly="ClearScriptV8.win-x64" />
      <remove assembly="ClearScriptV8.win-x86" />
    </assemblies>
  </compilation>
</system.web>

but it didn't help.

In the result I've comment out these strings into .csproj file:

<Import Project="..\packages\Microsoft.ClearScript.V8.Native.win-x86.7.2.5\build\Microsoft.ClearScript.V8.Native.win-x86.props" Condition="Exists('..\packages\Microsoft.ClearScript.V8.Native.win-x86.7.2.5\build\Microsoft.ClearScript.V8.Native.win-x86.props')" />
<Import Project="..\packages\Microsoft.ClearScript.V8.Native.win-x64.7.2.5\build\Microsoft.ClearScript.V8.Native.win-x64.props" Condition="Exists('..\packages\Microsoft.ClearScript.V8.Native.win-x64.7.2.5\build\Microsoft.ClearScript.V8.Native.win-x64.props')" />
<Import Project="..\packages\Microsoft.ClearScript.V8.ICUData.7.2.5\build\Microsoft.ClearScript.V8.ICUData.props" Condition="Exists('..\packages\Microsoft.ClearScript.V8.ICUData.7.2.5\build\Microsoft.ClearScript.V8.ICUData.props')" />

Now the initial issue was fixed but during executing script I see the following error:

Cannot load ClearScript V8 library. Load failure information for ClearScriptV8.win-x64.dll:
C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\...\runtimes\win-x64\native\ClearScriptV8.win-x64.dll: The specified module could not be found
C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\...\ClearScriptV8.win-x64.dll: The specified module could not be found
D:\pathtoproject\ClearScriptV8.win-x64.dll: The specified module could not be found
D:\pathtoproject\bin\ClearScriptV8.win-x64.dll: The specified module could not be found
C:\WINDOWS\system32\ClearScriptV8.win-x64.dll: The specified module could not be found'

What am I doing wrong? And how can I resolve this issue?

What's assembly manifest from initial issue? Maybe some .xml file was missed into package folder or something else? (because I see in bin folder for example ClearScript.V8.dll and ClearScript.V8.xml files)

2

There are 2 answers

2
BitCortex On

Try excluding ClearScript's native assemblies from compilation by merging the following into all of your Web.config files:

<system.web>
  <compilation>
    <assemblies>
      <remove assembly="ClearScriptV8.win-x64" />
      <remove assembly="ClearScriptV8.win-x86" />
    </assemblies>
  </compilation>
</system.web>
0
jackhab On

You should've also install Microsoft.ClearScript.V8.Native.win-x64 package in addition to the main Microsoft.ClearScript.V8.

This solved the same error message in my case.