After upgrading to PuppeteerSharp version 3.0, we get the following runtime exception:
Could not load file or assembly 'PuppeteerSharp' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key.
Related
I'm getting this error trying to build a Xamarin.iOS project referencing a .NET Standard 2.0 library.
None of the MT2001 issues online seem to have this specific "Error while processing references" reason, so I'm at a loss as to how to diagnose this. I've tweaked and fiddled about as much as any one person can and stay sane, but I'm really in the dark.
Can anyone out there point me in a direction?
Adding -v -v -v -v to "Additional mtouch arguments" in the project iOS Build settings will help diagnose the issue. After that, you can search the build output for MT2001 and view the inner exceptions. Obviously, each project may differ as to what assembly causes the linker to fail. You may need to add, remove or fix your references based on the output.
For example, I was trying to use SignalR from AspNetCore 2.1, which has a dependency on System.Threading.Tasks.Extensions 4.5.1 in my project, which it seems Mono does not yet support. Mono does not provide its own version of the assembly yet, so when mtouch goes to link the assembly, it's unable to do so and throws an exception:
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
Removing all references to this assembly (and therefore the whole feauture in my case) allowed the build and linking to succeed.
I've found that I get this when using a Xamarin library that is dependent on System.Reactive 4.1.0. There's a bug in there associated with System.Threading.Tasks.Extensions, and since it is a library I'm writing, I had to roll back to System.Reactive 4.0.0.
For me the error is as follows.
one of the package is mentioned in package.config file but it was not available in packages. So i added the missing package from nuget and the app works fine
Im getting the following error in the Portable Class Library (PCL) in Xamarin, how to resolve this,?
Assembly generation failed -- Referenced assembly 'Xamarin.Forms.Core' does not have a strong name
Xamarin.Forms assemblies distributed through nuget.org are not strong-signed.
You're trying to strong-sign your application assembly, and this require all dependencies to be strong-signed too. That's the problem you're seeing.
IMHO, strong-signing application adds none to very little value in mobile, esp on Android and iOS.
I tried to follow
https://github.com/Expensify/WindowsPhoneTestFramework/wiki/Setting-up-a-new-BDD-machine
to setup Specflow on WindowsPhone.
I had a Specflow 1.8.1 installed. so I uninstall 1.8.1 first and install Specflow 1.9 plugin on VS2010.
When running the Specflow. I still got following exception.
[ERROR] Add two numbers: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at TechTalk.SpecFlow.Bindings.Discovery.RuntimeBindingRegistryBuilder.BuildBindingsFromAssembly(Assembly assembly)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.Initialize(Assembly[] bindingAssemblies)
at TechTalk.SpecFlow.TestRunner.InitializeTestRunner(Assembly[] bindingAssemblies)
at TechTalk.SpecFlow.Infrastructure.TestRunnerFactory.Create(Assembly testAssembly)
at TechTalk.SpecFlow.TestRunnerManager.CreateTestRunner(TestRunnerKey key)
at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(TestRunnerKey key)
at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(Assembly testAssembly, Boolean async)
at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner()
at ClassLibrary1.SpecFlowFeature1Feature.FeatureSetup() in C:\source\PhoneApp1\ClassLibrary1\SpecFlowFeature1.feature.cs:line 0
at TechTalk.SpecRun.Framework.TaskExecutors.StaticOrInstanceMethodExecutor.ExecuteInternal(TestThreadExecutionContext testThreadExecutionContext) in c:\TeamCity\buildAgent\work\1ace6ed01d0a43bb\TechTalk.SpecRun.Framework\TaskExecutors\StaticOrInstanceMethodExecutor.cs:line 40
at TechTalk.SpecRun.Framework.TaskExecutors.StaticOrInstanceMethodExecutor.Execute(TestThreadExecutionContext testThreadExecutionContext) in c:\TeamCity\buildAgent\work\1ace6ed01d0a43bb\TechTalk.SpecRun.Framework\TaskExecutors\StaticOrInstanceMethodExecutor.cs:line 21
at TechTalk.SpecRun.Framework.TaskExecutors.ChainedTaskExecutor.Execute(TestThreadExecutionContext testThreadExecutionContext) in c:\TeamCity\buildAgent\work\1ace6ed01d0a43bb\TechTalk.SpecRun.Framework\TaskExecutors\ChainedTaskExecutor.cs:line 20
at TechTalk.SpecRun.Framework.TestThreadExecutor.ExecuteTestNodeTask(TestNode testNode, ITaskExecutor task, TraceEventType eventType) in c:\TeamCity\buildAgent\work\1ace6ed01d0a43bb\TechTalk.SpecRun.Framework\TestThreadExecutor.cs:line 220
The internal exception is LoaderExceptions include
{"Could not load file or assembly 'TechTalk.SpecFlow, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0778194805d6db41' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"TechTalk.SpecFlow, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0778194805d6db41"}
I don't know why it still load 1.8.1 SpecFlow assembly. I have uninstalled the SpecFlow 1.8.1. Is there any other place I need to change manually?
Thanks!
The WP7Test package seems to have a dependency to SpecFlow 1.8.1. As far as i see on the github project, it has not been updated yet to SpecFlow 1.9.
SpecRun.SpecFlow 1.1 requires SpecFlow 1.9. (This will be used if you install the obsolete SpecRun (1.0) package.)
I think the best would be to fork the WP7Test project on github and update it to use SpecFlow 1.9. After doing this it should also work fine with the latest SpecRun.
(An alternative way would be to use SpecRun.SpecFlow 1.0 package that works with SpecFlow 1.8.1 and also supported by the SpecFlow 1.9 IDE integration.)
I'm running a 32 bit ver of win7 in a vm. I am trying to reference 5 com dlls (VB6) in my .net project. These dlls (and their dependencies) are registered ok since I can use them natively as they form a part of another app and that app is working fine.
I try to set a reference to any of them directly in vs and I get the error message - Library not registered (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
However, if I set a reference to another com component (which I don't want to reference but which in turn does reference these libs) I find that the references to these com dlls (which I do want to reference) gets set correctly in vs. I then just need to remove the ref to the unwanted dll and everything seems to be good to go.
If I look at the GUID and version details of one of the successfully referenced component, they appear to be the same as the GUID and version that appears in the caption of the error form, when I unsuccessfully try and set a reference to the same component directly.
BTW I have tried repairing the VS installation to no avail
I was wondering if someone could explain what I am doing wrong.
EDIT: Follow-up following Hans suggestion
So I ran
tlbimp mylib.dll
and it returned a TI1006 error - Output would overwrite the input file. So following suggestions found, I then issued
tlbimp mylib.dll /OUT:interop.mylib.dll
and this then returned the error
TlbImp : warning TI3011 : Type library importer has encountered an interface not derived from IUnknown: '_HiddenInterface'. The interface is skipped.
TlbImp : error TI1033 : Cannot find type 'ADODB._Recordset_Deprecated' in 'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. There could be a mismatch between the referenced assembly and the type library.
But I'm not sure if this is a red herring since this lib could be referenced when successfully referencing the different higher level dll. I have tried with a dll which doesn't reference ADODB and that seems to work using tlbimp. So, e.g.
tlbimp myNONADODBlib.dll /OUT:interop.myNONADODBlib.dll
works from the commandline. However
tlbimp myNONADODBlib.dll
still generates the error TI1006 - output file will overwrite input file, and I cannot reference this into my .net project
EDIT:
There seems to be a problem with ADO and Win7 SP1. http://support.microsoft.com/kb/2517589 which would account for the deprecated error message (TI1033) I was getting, but not why VS was failing to create a CCW for the dll I can manually create a CCW via tlbimp.
EDIT (12/03/28 10:40):
So I have rebuilt the com dll with the suggested tlb. I can now successfully run
tlbimp mylib.dll
without getting any error messages and it appears to complete successfully. However, when I try and add a reference to that dll in VS, I still get the same original error message ( Library not registered (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))). I have checked the registry and the registration looks ok i.e. it is pointing to the correct path - I'm wondering if it is a permissions-type issue - but I am running vs as admin.
EDIT (12/03/28 10:15):
So I ended up creating a new completely new vm with the same environment - and it worked ok. So I've no idea what is going on other than some registry corruption perhaps!
Many thx
Simon.
You need to use REGTLIB.exe to register the type library of the DLLs.
Type library registration is separate from component registration - the type library supports the introspection/type explorer functionality, and isn't usually required for running a precompiled application, though it may be required for compilation.
I have Solution in vs2008 with framework 2.0. Now I migrated solution to vs2010 .net framework 2, and it works.
Here problem occur when I changed framework from 2.0 to 4.0, after that when I run application(win-form) it throws error on resource file saying
"System.IO.FileNotFoundException: Could not load file or assembly
'SpServer.resources, Version=1.0.0.2, Culture=en-US,
PublicKeyToken=null' or one of its dependencies. The system cannot
find the file specified. File name: 'SpServer.resources,
Version=1.0.0.2, Culture=en-US, PublicKeyToken=null' --->
System.IO.FileNotFoundException: Could not load file or assembly
'...SpServer.resources.dll' or one of its dependencies. The system
cannot find the file specified.
I have not made any extra resource file, and assembly was not satellite assembly too before if there is error. Please let me know how to sort out this issue.
From MSDN:
Beginning with the .NET Framework 4, the AssemblyResolve event is raised for satellite assemblies. This change affects an event handler that was written for an earlier version of the .NET Framework, if the handler tries to resolve all assembly load requests. Event handlers that ignore assemblies they do not recognize are not affected by this change: They return null, and normal fallback mechanisms are followed.
Please also see my answer to this question.