"Error ... Could not load file or assembly 'MySql.Data.Entity.EF5, Version=6.9.9.0 ..." - mysql

In fact, I wanted MySql.Data.Entity.EF6, however, for some reason Visual Studio ADO EDMX editor wanted MySql.Data.Entity.EF5 (same version, 6.9.9.0).
First, I checked if the NuGet packages 'MySql.Data' and 'MySql.Data.Entity' were installed.
I then issued the following command in PowerShell to reinstall all packages to help fix any .net version errors:
update-packages -reinstall
and proceeded to verify that all references in web.config were correct; however, the error remained. I even reinstalled MySQL for Visual Studio 1.2.6, but still the same.
(FYI: Restarting Visual Studio at each step above)

The solution for me was to simply add a new "dummy" ADO Entities Data Model to the project, referencing the same database (not sure this matters), which seemed to correct some references (somewhere) within the solution/project to the wrong version of the MySQL DLL (the error said 'EF5', but it should have been looking for 'EF6'). I'm sure there was a cache somewhere that was doing this, but just not sure where.
Edit: In retrospect, I perhaps should have tried deleting the obj folder first, as there are some *AssemblyReferences*.cache files in there. I tried rolling back to a previous version of the source (using Git) to test this, but the old version works now! So I'm sure it must have been the obj folder, which is ignored by Git by default.

Related

NetCore project - Nuget configuration is invalid

I have an old porject i need to work on, and suddenly, got this message.
error shown by VS
I've tried to closing and then re-opening VS to see if it helps, it didn't. Then created a new project and try to manage nuget packages, but i get the same error. There was no Nuget.Config file, no nothing, just a NEW project and the VS error message persists...
So, what would be a real solution for this scenario?
Because I've seen some answers indicating that reopening VS solved the problem, others said that removing Nuget.config file, but nothing solves this.
Right now I am only able to run some projects where i don't need to redownload dependencies, but for new or old projects which haven't used Nuget yet, I am not able to build anything.
I am currently running with:
specs
UPDATE:
After trying this steps I managed to solved the problem
Go to this path: C:\Users{{username}}\AppData\Roaming.
Delete Nuget.config.
Restart your machine. Restarting Vs did not solved the problem, but
restarting my machine did.
So the error was an actual "NuGet.config" setting hosted outside my solution/project.

silverstripe 4 server error after removing module

I'm having problems with using fluent in Silverstripe 4. So I tested to install different versions of fluent to see if I was able to get it working. The version of Silverstripe is 4.1.1.
After uninstalling fluent again, I get "server error" and I can't see anything in the php logs and when trying to run in dev mode, I don't see any difference.
One puzzling thing is that a folder named "themes" appeared in the root folder. I think that it was added by composer during the module installation, but I'm not sure. But I do know that git listed the themes folder as an untracked file. Which suggests that it was automatically added. So I removed that folder when uninstalling the module.
Now I'm not sure what to do. I would want to restore the database as it was before installing fluent (I've tried to add language to see if fluent was working). Or at least get back to square one.
How do people usually do when working with Silverstripe and testing modules?
What I've done so far:
Checked the php logs. No errors found.
Added "Director::set_environment_type("dev");" to _config.php, without seeing any difference when loading the page.
Tested to load the page with ?dev=1 without any difference.
I ran composer update and now the site is working. Might be one thing to test for silverstripe noobs (like me).

Visual Basic Compiling EXE... How do i include dependencies?

I have made a program in Visual Basic which connects to my MySQL server, asks for the password and checks it to the username...
Not very secure, as i learned how to use a database yesterday(i had never touched it before...).
Now, when i try to compile to an exe, gets it from the release folder, and puts the release folder on my other PC, it is missing the MySQL.Data, which i had to add as referance in visual basic...
Is there any way I can include dependencies in my Exe/Release? This will of course apply to all dependencies!
BTW, i am using Visual Basic 2010 Express!
After adding reference, go to Solution Explorer window, expand References, click on MySql.Data to select. Go to Properties window and set Copy local property to True. After next build, you will get missing MySQL.Data.Dll in build folder. Then you can copy .exe and .dll to other PC.

Marmalade: error LNK1181: cannot open input file 'python.lib

I'm trying to build Marmalade project for Windows Phone 8 in Visual Studio Ultimate 2012 but receive following error:
error LNK1181: cannot open input file 'python.lib'
Seems that it happens because of wrong path to project's additional library directories. Currently it's c:\users\*user_name_omitted*\appdata\roaming\marmalade\packages\6.3.0\python_2.6.4\lib\wp8\x86
But in fact there is no wp8 folder. As I understand this foulder should be created automatically...
I have Marmalade evaluation license.
How can i get rid ot this error?
Two suggestions:
I've not got a working version to hand, but the bundled version of python with marmalade is (IIRC) 2.5.x, so the reference to 2.6.4 looks odd. I wonder if when you ran s3eConfig it was running a different version and got confused? More as like it should have downloaded some extra stuff and has not.
It might be worth uninstalling marmalade and then re-installing. There are reports of people not having a full installation following the install.

Locked .csproj file breaking Mercurial respository

I am using VisualHG inside Visual Studio. On occasion when pulling (with Fetch) I get this error message:
[Errno 13] C:\inetpub\Websites\SomeProject.csproj: The process cannot access the file because it is being used by another process
This in turn makes a mess of my repository causing me to have to delete everything and pull again. Is there anything I can do to prevent this? It seems this issue never happens when pulling from TortoiseHG or from the command line, only when the project is opened in Visual Studio and pulling with VisualHG.
We're seeing something very similar on a machine here with TortoiseHg 2.0.4 and VS2008. It looks like Visual Studio it briefly locking the file as it detects a file modification event, and this is causing Hg to fail. We're seeing this with both TortoiseHg and the command-line client.
Whilst it's pretty frustrating when it happens during a pull, it also happens during a merge too, which can be pretty catastrophic.
It may be the only thing you can do is to not have Visual Studio open when you fetch. It's not the pull part of fetch that's causing it, but the update. Visual Studio seems to have a lock on your project file and won't let Mercurial change it while it's open.
You didn't specify, however, if the project was open when you used fetch through TortoiseHG or the commandline. You could also try just pulling and updating separately rather than using fetch.
Edit: It could also be the TortoiseHg version. I tried doing an update to a different revision earlier with an open project and Visual Studio 2008 just wanted to reload it (no file lock error), but I'm using TortoiseHg 2.0.5. You can always go back to 1.1.* if you don't like it or it doesn't work.
We have seen the same issue with file locking with Mercurial and VS2008, but unrelated to the .csproj files. We don't even version control our project files as they are generated by cmake and we version control our cmake files instead.
This problem has caused me to lose a days worth of work in one case and caused improper merges in other cases in that older files were overwriting newer files.
I was using the fetch extension when these things happened.
Z:>hg --version Mercurial Distributed SCM (version 1.9.2) (see
http://mercurial.selenic.com for more information)
Copyright (C) 2005-2011 Matt Mackall and others This is free software;
see the source for copying conditions. There is NO warranty; not even
for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.