MissingMethodException: Void System.Data.Entity.Infrastructure.LocalDbConnectionFactory..ctor() after upgrading EF6 - asp.net

I upgraded EF6 from 6.2.0 to 6.3.0 and now I'm getting this error on the server (not in Visual Studio):
Méthode introuvable : 'Void System.Data.Entity.Infrastructure.LocalDbConnectionFactory..ctor()'.
Description : Une exception non gérée s'est produite au moment de l'exécution de la requête Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code.
Détails de l'exception: System.MissingMethodException: Méthode introuvable : 'Void System.Data.Entity.Infrastructure.LocalDbConnectionFactory..ctor()'.
I even tried to publish the old version of the website (using EF 6.2.0) and I'm still getting the same error.
The server is Windows Server 2012 with asp.net framework 4.8. The website is made with WebForms.
I tried restarting IIS and the server itself, without success.

I was able to fix the problem by publishing with the option to "delete existing files".
I guess it was different versions of the EntityFramework DLL that were conflicting on the server.

For anyone who has same problem during development, not deploying:
Probably, your project reads EntityFramework.dll from different place than your project bin folder. You can check this in Modules window (for open it start debugging and choose Debug -> Windows -> Modules). Now, just find there an entry for EntityFramework.dll and check out the path value. In my case it pointed out an old version from GAC_MSIL directory. After deletion these trash from GAC and re-running my project, file EntityFrmaework.dll was loaded from my project folder and the error was gone.

Related

Intel OpenCL SDK for FPGA compile kernel for emulation with aoc command gives linker error

I'm trying to compile a kernel for emulation with aoc in the Intel FPGA SDK, I have set all environment variables as possible even using the init_opencl.bat included in the SDK.
I'm running the following line using the visual studio 2017 developers command prompt in order to use visual studio linker:
aoc -march=emulator -v -board=a10gx my_kernel.cl -o my_kernel.aocx
but it always throws a linker error (the errors are in Spanish, sorry about that).
Creando biblioteca libkernel.lib y objeto libkernel.exp
libkernel.obj : error LNK2019: símbolo externo
__imp___translate_sampler_initializer sin resolver al que se hace referencia en la función my_kernel
libkernel.obj : error LNK2019: símbolo externo floorf sin resolver al
que se hace referencia en la función __acl__copysignf
libkernel.obj : error LNK2019: símbolo externo ceilf sin resolver al
que se hace referencia en la función __acl__copysignf
libkernel.obj : error LNK2019: símbolo externo log2 sin resolver al
que se hace referencia en la función __acl__sppow_approx
libkernel.obj : error LNK2019: símbolo externo exp2 sin resolver al
que se hace referencia en la función __acl__sppow_approx
LINK : error LNK2001: símbolo externo _DllMainCRTStartup sin resolver
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x86\msvcrt.lib :
warning LNK4272: el tipo de máquina de biblioteca 'x86' está en
conflicto con el tipo de máquina de destino 'x64'
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x86\legacy_stdio_definitions.lib
: warning LNK4272: el tipo de máquina de biblioteca 'x86' está en
conflicto con el tipo de máquina de destino 'x64'
libkernel.dll : fatal error LNK1120: 6 externos sin resolver
I have no idea what else to do.
Note:
The kernel uses image2d objects which I'm not entirely sure are compatible with FPGAs. Actually that's another question.
Quite likely the problem is that they (Altera, now Intel) still require on Windows to use MSVC 2010 to successfully link their libraries with the host project.
That is at least the case for fft-2d where is such a requirement.
So you probably have 2 choices:
Install MSVC 2010
Figure out how to successfully link with their libraries being built using MSVC 2010
Update
I checked my notes. To be able to successfully link with Altera libraries using VS 2015 I was additionally linking with legacy_stdio_definitions.lib. That should go into AdditionalDependencies in the linker section. Can't assure this will help your case too but it's worth a try.
First of all thanks doqtor for your answer...in the end I was finnaly able to compile without having to change much....actually if you run the aoc offline compiler from the Visual Studio Developers Command Prompt x64 most of the problems are solved.
I decided to cleanly reinstall the entire Intel FPGA SDK and this time set up correctly every environment variable...and everything worked perfectly...I was able to compile and execute the SDK examples.
But one problem could not be solved....my kernel uses image2d_t objects and of course sampler_t....turns out according to the Intel SDK Programming Guide...the SDK does not support images and samplers while working with OpenCL 1.0.
The weird thing is that the FPGA Emulator platform does support it so i was able to compile using the emulator....although this wont solve much for me.....I have decided to change my kernel and find an alternative to image and samplers.
Thanks
Answering your questions:
FPGA emulator is not supporting x86 platform, just x86_64 (but I see you are already resolved this I guess).
About images. The SDK isn't supporting image type indeed, but it doesn't mean that aoc will fail during compilation. You will fail later when you try to run your application.

NuGet Package RProvider crashes build in F# by failing to link to RProvider.dll in JetBrains Rider

Including the package "RProvider 1.1.20" in F# project throws a rather cryptic error:
Use build tool: C:\Program Files\dotnet\sdk\2.1.402\MSBuild.dll
0>------- Project started: OP 2 - rebuilt in Rider
0>FSC(0,0): Error FS3053: Der Typanbieter 'RProvider.RProvider' hat einen Fehler gemeldet: Der Typanbieterkonstruktor hat eine Ausnahme ausgelöst: Exception has been thrown by the target of an invocation.
0>FSC(0,0): Warning FS3005: Die referenzierte Assembly 'C:\Users\Wolfgang\.nuget\packages\rprovider\1.1.20\lib\net40\RProvider.dll' verfügt über das Attribut 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' auf Assemblyebene, es wurden jedoch keine öffentlichen Typanbieterklassen gefunden.
0>------- Project finished: OP 2 - rebuilt in Rider. Succeeded: False. Errors: 1. Warnings: 1
In English:
The referenced assembly "...RProvider.dll" has the attribute
'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute'
on assembly level, but no public type provider classes were found.
And the shorthand error message is translated:
The type provider 'RProvider.RProvider' has reported an error: The
type provider constructor has thrown an exception: Exception has been
thrown by the target of an invocation.
Now that's pretty cryptic, no?
Tried these to alleviate, but nothing worked:
Installed R as standalone application.
Used newest version of RProvider (1.1.21), but the error still remains, and moreover, it causes version conflicts with other packages (I don't list them cause I believe they contribute nothing to the problem)
Isolated the problem by creating a project with only the RProvider reference in, error remains the same.
It did work, however, when I was using Visual Studio (which just doesn't work right now on this machine). The problem came in JetBrains Rider.
Thank you very much for your help!

LibGit2Sharp TypeInitializationException in Web project

I use VS 2012. My solution contains one web-site project and one project library .
I installed the nuget package on my project Library only.
In my Library I created a simple class "GitRepo" to test git access. In the constructor, I want to access the repository :
public GitRepo(string repoPathName)
{
m_Repo = new Repository(repoPathName);
}
In the code behind of my web page, I try to instantiate a GitRepo object :
GitRepo repo = new GitRepo(repoPathName);
And I get the TypeInitializationException with no more details. And yes, dll and native libraries structure seems correct in the file tree (installed by nuget package).
I have a simple console program's solution where I added my previous library (add existing object). In the "main" function, I instantiate a "GitRepo" object... and it works fine.
Some help would be greatly appreciated.
Here the full exception :
System.TypeInitializationException was unhandled by user code
HResult=-2146233036
Message=Une exception a été levée par l'initialiseur de type pour 'LibGit2Sharp.Core.NativeMethods'.
Source=LibGit2Sharp
TypeName=LibGit2Sharp.Core.NativeMethods
StackTrace:
à LibGit2Sharp.Core.NativeMethods.git_repository_open(RepositorySafeHandle& repository, FilePath path)
à LibGit2Sharp.Core.Proxy.git_repository_open(String path)
à LibGit2Sharp.Repository..ctor(String path, RepositoryOptions options)
à CDM.ESD1_WSGINSTALL.Business.GitRepo..ctor(String repoPathName) dans c:\PRIV\Projects\ESD1\ESD1_WSGINSTALL\ESD1_WSGINSTALL.Business\GitRepo.cs:ligne 39
à CDM.ESD1WSGINSTALL.Commands.CharteView.DoBuildRPM(String id) dans c:\PRIV\Projects\ESD1\ESD1_WSGINSTALL\ESD1_WSGINSTALL\App_Code\Commands\CharteViewActivity\CharteView.cs:ligne 262
InnerException: System.DllNotFoundException
HResult=-2146233052
Message=Impossible de charger la DLL 'git2-e0902fb': Le module spécifié est introuvable. (Exception de HRESULT : 0x8007007E)
Source=LibGit2Sharp
TypeName=""
StackTrace:
à LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
à LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject..ctor()
à LibGit2Sharp.Core.NativeMethods..cctor()
InnerException:
nulltoken, thank you for your help.I've started a new console project and added my library located in another folder. When I instanciate my "GitRepo" object (from my library) there's no exception. So I checked the directory tree of the solution and I saw that LibGit2Sharp.dll and NativeBinaries folder were added automatically under bin/debug of the program's folder.
Thus I checked the bin folder of my web project and I saw there was not the "NativeBinaries" folder. I add it manually and now there's no more exception.

Harmon.ie error when upload file

After completing instalation of Harmo.ie for Outlook 2010, I tried to upload file into a custom document Library. For info, the document library used custom content type and has item receiver attached to it (ItemAdded and ItemUpdated). Sometime, harmon.ie display a error which say "Could not upload file... into the selected Library."
After debugging, the error occured before item receivers. Is anybody have information about the issue ? I did'nt find anything in ULS logs and i tried to isolate bug but no luck !!
here the stack trace of harmo.ie :
!ENTRY com.mainsoft.sharepoint.sidebar.SideBarViewPart 4 0 2015-03-16 14:42:25.892
!MESSAGE Impossible de télécharger ...' vers la bibliothèque sélectionnée.
Le téléchargement du fichier ...' n'a pas pu être terminé.
!STACK 0
com.mainsoft.sharepoint.sidebar.services.UploadOperationFailedException: Le téléchargement du fichier'...' n'a pas pu être terminé.
at com.mainsoft.sharepoint.sidebar.services.UpdateMetadata.onAfterUpload(UpdateMetadata.java:74)
at com.mainsoft.sharepoint.sidebar.services.FilesUploader.uploadNextDocument(FilesUploader.java:169)
at com.mainsoft.sharepoint.sidebar.services.FilesUploader.upload(FilesUploader.java:126)
at com.mainsoft.sharepoint.sidebar.services.FilesUploader.upload(FilesUploader.java:107)
at com.mainsoft.sharepoint.sidebar.operations.BaseFilesUploadOperation.run(BaseFilesUploadOperation.java:157)
at com.mainsoft.common.OperationBase.run(OperationBase.java:94)
at com.mainsoft.common.OperationBase$1.run(OperationBase.java:33)
at com.mainsoft.common.Job$SecondJob.run(Job.java:191)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
at java.lang.Thread.threadProc(Thread.java:2297)
at java.lang.Thread$1.Invoke(Thread.java:797)
at cli.System.Threading.ThreadHelper.ThreadStart_Context(Unknown Source)
at cli.System.Threading.ExecutionContext.Run(Unknown Source)
at cli.System.Threading.ThreadHelper.ThreadStart(Unknown Source)
Run Fiddler to trace requests sent from harmon.ie to SharePoint - the trace details may give you some insight. Also try the same operation against a library that doesn't have any event handlers.

'MySQL' is not recognized as an internal command (Apache Cordova for visual studio)

When i'm building an Blank App in visual studio with Cordova Apache Tools, i got this error:
'MySQL' is not recognized as an internal command.
------ Build started: Project: FirstAppInCordova, Configuration: Debug Android ------
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(95,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
GeneratedJavascript=
C:\Users\Douglas\documents\visual studio 2013\Projects\FirstAppInCordova\FirstAppInCordova>call "C:\Program Files (x86)\nodejs\"\nodevars.bat
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : 'MySQL' n�o � reconhecido como um comando interno
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : ou externo, um programa oper�vel ou um arquivo em lotes.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : 'MySQL' n�o � reconhecido como um comando interno
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(208,5): error : ou externo, um programa oper�vel ou um arquivo em lotes.
Your environment has been set up for using Node.js 0.10.33 (ia32) and npm.
Android Emulator is running on AVD Control.
UPDATE
I fixed it by add in the system variable the bin folder of mysql server, now the output log just return:
------ Build started: Project: FirstAppInCordova, Configuration: Debug Android ------
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(95,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
GeneratedJavascript=
C:\Users\Douglas\documents\visual studio 2013\Projects\FirstAppInCordova\FirstAppInCordova>call "C:\Program Files (x86)\nodejs\"\nodevars.bat
Your environment has been set up for using Node.js 0.10.33 (ia32) and npm.
------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\1DKIFLHP.GW1\packages\vs-mda
This looks like it occurs when you already have mySql installed on the box.
I fixed by adding quotes around the following MySql items in the path. Be sure and restart VS once you've made the path changes.
...;"C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.2 & MySQL Utilities 1.5.2 1.5"\;"C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.2 & MySQL Utilities 1.5.2 1.5\Doctrine extensions for PHP\";...
I also added a user with the name of ODBC to mySql with a blank password... prolly not wise, but this is my personal dev box.
I've solved by removing doing what Jim says and also removing C:\Users\Miquel\AppData\Roaming\npm\node_modules\vs-mda\node_modules\*.* and C:\Users\Miquel\AppData\Roaming\npm-cache\*.*
Then in cmd I went to C:\Users\Miquel\AppData\Roaming\npm\node_modules\vs-mda and ran:
npm install

Resources