Could not load file or assembly System.Net.Http.Primitives. Located assembly's manifest definition does not match the assembly reference - exception

I'm working on a program that uses the Google API. However every time I run my program, it I keeps getting the following error:
Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f711d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
I'm using Visual Studio 2012 express. I've tried following this link and looked through many forums, but none seem to work. The main problem seems to come from the DLL file "Google.Apis.dll" which I referenced, and it references System.Net.Http.Primitives v1.5.0.0. However the version my program references is 2.2.13.0. I've tried having the program reference v1.5.0.0 instead (I manage to find the dll along with the source code of Google.Apis) however this only caused another problem in which I needed a more recent version of System.Net.Http.Primitives.
I'm been trying find a way to work around this, however I can't seem to find anything that works. Thank you for time.

I ran into the same issue with the Google API's. The main issue here is if you install the Microsoft Http Client Libraries it puts in your project an updated version of the System.Net.Http.Primitives DLL. The web.config assumes you are still using the default version of 1.5. There are two things that need to happen to fix it:
First: Update to the latest versions of Google API and Microsoft Http Client Libraries. You can install the updates via NuGet. Right click on your website, click "Manage NuGet Packages", select Updates on the left. At the time of this post some of the Google API's are prerelease only. You can install them via NuGet by selecting "include prerelease" on the top left of the update screen.
Second Update/add a dependentAssembly into your web.config. To do this you need to know the version of the System.Net.HTTP.Primitives.dll that was installed. Look in your bin directory within Windows Explorer. Find System.Net.HTTP.Primitives.dll, right click on it, select properties, and click the "Details" tab. Note the version located there. At the time of this post mine was 4.0.10.0.
Then add/update a dependentAssembly section for the correct version.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

What worked for me was to simply install the "Microsoft Http Client Libraries" from Nuget.

Add following to your web.config (app.config):
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.2.13.0" newVersion="4.2.13.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

For me it worked the following:
On Visual Studio (2012) > Tools > Nuget Package Manager > Package Manager Console.
On top of package Manager Console I have
Package Source: nuget.org
Default project: the project that requires the System.Net.Http.Primitives
Watching inside the project file (yourproject.csproj) with an editor I read which version is needed (in my case was Microsoft.Net.Http.2.2.28)
So I went to https://www.nuget.org/packages/Microsoft.Net.Http/ and I clicked on my version under "Version History" (scroll a bit the page if you don't see it).
After choosing the version you copy the suggested command - in my case it was:
Install-Package Microsoft.Net.Http -Version 2.2.28
but if you need the latest version is just this:
Install-Package Microsoft.Net.Http
and you paste it on your Visual Studio Package Manager Console previously opened as I described before. Execute the command.
In the project under the references, System.Net.Http.Primitives is now updated.

I've had a similar problem.
Try to update nuget (tools/extensions and updates...)
Solved that and some other problems for me.
/Jonas

We were having the similar problem.
But in my case, the solution of modifying the app.config by Paul didn't work.
The reason is I am using it as a plugin inside another application. So it considers that application's configuration file.
So we got the Google api code from GitHub and built the Google.Apis.Core library after removing the dependency of System.Net.Http.Primitives. Then we used that dll which solved our issue.

I ran into this problem when I released my code that uses Google.Apis.Drive.v2 (v1.9.2.1860) to the company I work for. I gave them the exe and all of the DLLs that Visual Studio (and NuGet) generated, and they got the error. I never got the error.
The fix was easy (once I figured it out): When installing the api from Nuget the file 'assemblyname.exe.config' is automatically generated in the output (aka, Debug or Release) folder. All you have to do is include that file when you are running the assembly somewhere other than the folder it was generated. Here's the code for that file for me:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.29.0" newVersion="4.2.29.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
This is basically Paul's "second" fix but it's automatically generated by the package manager. The issue for me was when I tried his "first" fix by updating to Google.Apis.Auth and Google.Apis.Core (v1.9.3) it made things worse. I'd get the same error except now it was for "Google.Apis.Core" was the wrong version (although that probably could have been solved as well by including the same .exe.config file.)
Hope this helps someone, I know this thread is pretty old, but it's the one that a quick Google search led me to.
Edit: Forgot to mention, this is relevant to a console application targeting .NET 4.5. Some of it is probably still relevant to other .NET targets or ASP.NET but I don't know for sure. Your mileage may vary.

The above answer about assemblybinding are correct, but you should NOT touch the machine.config.
The assemblybinding must be set in the config file of all of the EXECUTABLE assemblies of your project (.exe.config) who reference your library, and not in the library assemblies (.dll.config)

NuGet made the following change in Web.Config
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.22.0" newVersion="4.2.22.0" />
</dependentAssembly>
to
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.28.0" newVersion="4.2.28.0" />
</dependentAssembly>
This was following install and subsequent removal (by version control revert) of this package https://www.nuget.org/packages/Microsoft.AspNet.WebApi.MessageHandlers.Compression/

Somehow the popular answer by Paul Lemke was not working for me.
The project is a webforms application that started with .net v 2.0 and has been upgraded to .net version 4.5
I updated the packages and nuget created the correct dependentAssembly/bindingRedirects.
As per some of the comments, it probably is not the best idea to change your local machine.config file.
Apprently I had an attribute in my web.config file that was causing the app to ignore the bindingRedirects.
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
I removed that xmlns attribute and it started working.

Was able to resolve this pretty easily. Just opened up the Nuget Package Manager and updated the Microsoft ASP.NET Web API 2.2 Client Library package. This updated Microsoft.Net.Http to the newest version which resolved the issue with the System.Net.Http.Primitives Assembly from being able to be located. Hope this helps!

In my case I was referencing the NuGet packages from a class library. NuGet fails to inform us that the class library's app.config is completely ignored and we have to manually copy its contents to the .exe's app.config.

I had a similar issue with PowerShell scripts for TFS 2017. The scripts called .NET code to perform custom actions during build processes. I kept getting errors about dll version conflicts.
I was unable to resolve the issue until I implemented a hook into the AppDomain AssemblyResolve event as per this answer: Making binding redirects work for office add-ins
This solution forced the process to use dlls from the current path. I know this is somewhat of a hack, but I had read that when running PowerShell, you cannot always use binding redirects, which is what I originally though I could try: https://github.com/google/google-api-dotnet-client/issues/555

Install-Package Microsoft.Net.Http -Version 2.2.22
This version has that dll \packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll

In my case, Nuget automatic add following to web.config
<runtime xmlns="">
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.22.0" newVersion="2.2.22.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.10.0" newVersion="2.1.10.0" />
</dependentAssembly>
</assemblyBinding>
But I still got the above error Message, finally I figure it out. You have to copy those tags to the machine.config file located at C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config.
To find the tag of "runtime" on machine.config, replace or add(if there is no such tag) it with your tags from your web.config (the ones I listed just above).

Related

Visual Studio Team Services release XML transformation doesn't work

Visual Studio Team Services - Build & Release
In the release definition, under File Transforms & Variable Substitution Options, there are XML transformation, and XML variable substitution.
I checked both checkboxes, but after deployment, nothing in my Web.Dev.config replaces web.config. The transformation doesn't happen at all.
What is the problem?
--------edit: detail---------
build
all the settings here is default.
release
web.dev.config
This transformation works fine if I deploy from visual studio 2015.
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<connectionStrings>
<add name="DefaultConnection" connectionString="Server=tcp:xxxx.database.windows.net,1433;Database=xxxx;User ID=xxx#xxx;Password=xxxx;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" providerName="System.Data.SqlClient" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
<add name="NicoContext" connectionString="metadata=res://*/Nico.csdl|res://*/Nico.ssdl|res://*/Nico.msl;provider=System.Data.SqlClient;provider connection string="data source=tcp:xxxx.database.windows.net,1433;initial catalog=xxxx;User Id=xxxx#xxxx;Password=xxxx;App=EntityFramework"" providerName="System.Data.EntityClient" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
</system.web>
<appSettings>
<add key="Environment" value="Dev" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="AzureStorageContainerName" value="xxx" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=xxx;EndpointSuffix=core.windows.net" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="FacebookLoginAppId" value="xxx" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="FacebookLoginAppSecret" value="xxx" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
</appSettings>
</configuration>
--------edit 2: no longer work ---------
I did as the solution suggested on a new project in another Azure account, but this time it didn't work. For build, I choose template "Asp.net (preview)", for release, I choose template "Azure App Service Deployment".
--------edit 3: Release - Package or folder ---------
You have already deployed/published the web app, so the web.config has already been transformed (For web package deployment, the related values in web.config will be updated during web deploy, the values are in parameters.xml).
So, there isn’t other config files (e..g web.dev.config, web.release.config) in published folder and check XML transformation and XML variable substitution is useless.
Based on the build log, the web app build with release configuration, but there isn’t web.release.config, so there isn’t update for web.config.
You can refer to these steps to achieve your requirement:
Publish/deploy the web app with File System way (e.g. /p:WebPublishMethod=FileSystem /p:publishUrl= $(build.artifactstagingdirectory)\)
Add Copy file step copy others config files (web.dev.config, web.prod.config etc) to the published folder (artifact directory)
Add Publish Build Artifacts
For release, uncheck Publish using Web Deploy option and specify $(System.DefaultWorkingDirectory) to Package or folder.

Entity Framework IndexAttribute error when Using MySql with ASP.Net MVC

I want my mvc application to connect to MySQL database and I have done the following steps since morning but am missing something.
Installed MySQL Connector for .Net (Connector ODBC 5.3)
Installed (MySQL for Visual Studio 1.2.6)
Followed the tutorial
https://learn.microsoft.com/en-us/aspnet/identity/overview/getting-started/aspnet-identity-using-mysql-storage-with-an-entityframework-mysql-provider#configure-entityframework-to-work-with-a-mysql-database
nuget installed entityframework 6.1.3
now when I run the website and try to register, it crashed saying
Could not load type
'System.ComponentModel.DataAnnotations.Schema.IndexAttribute' from
assembly 'EntityFramework, Version=6.0.0.0
my .csproj file contains
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="MySql.Data">
<HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="MySql.Data.Entity, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" />
<Reference Include="MySql.Data.Entity.EF6">
<HintPath>..\packages\MySql.Data.Entity.6.9.9\lib\net45\MySql.Data.Entity.EF6.dll</HintPath>
</Reference>
My application references include:
EntityFramework
EntityFramework.SqlServer
Microsoft.AspNet.Identity.EntityFramework
MySql.Data
MySql.Data.Entity.EF6
I also added
MySql.Data.Entity from the assemblies in (MySQL for Visual Studio 1.2.6)
I am new to both MVC and MySQL. So, don't have a clear picture of what could go wrong.
UPDATE Someone suggested on another post that i need to remove it from the gacutil. Now gacutil is saying i need admin privileges to remove an assembly which already have.. Is there a work around? is this the right-solution?
Well, the update i was trying was correct. So the problem was that i had a duplicate EntityFramework dll with version 6.0.0.0 in the gac. And to do that i had to right-click on command prompt and choose "run as administrator" and then try uninstalling the dll.
BOOM!! This was what i was missing.

Delphi dcc32 and manifest compilation

How to compile a Delphi project using DCC32.EXE with the default manifest file?
I've compiled some project and the Task Dialog doesn't appear because of missing the manifest file.
When I compile from the IDE everything works fine but when I use the DCC32.EXE the Task Dialog component doesn't work.
I think the problem in the version info file.
Create a file and name it anything.xml
Write the following into the file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="App" version="3.1.0.0" processorArchitecture="*"/>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</compatibility>
</assembly>
Create a resource file such as proj_manifest.rc and write the following line into it:
1 24 "anything.xml"
Compile the resource file using brcc32.exe
Add the following line to the project source:
{$R 'proj_manifest.res'}
Compile the project using the dcc32.exe and thats all.

Cannot connect to mysql from visual studio 2015

So I have already spent about 2 days trying fix this. I have succeeded in fixing this on my workplace pc and can't get it to work on my home pc. I have read about a dozen SO articles and oracle forums articles and whatnot but still it does not work.
I have 1.2.4 msql for visual studio which is supposed to be a release which works on vs2015. I have installed mysql connector 6.8.6 and have first tried to add mysql to my project via nuget but after not being able to find a 6.8.6 version (there are 6.8.3 and 6.9.7 for one package and then again something else for the other...) I have referenced to my C:\Program Files (x86)\MySQL\MySQL Connector Net 6.8.6\Assemblies\v4.5 and have taken the 4 files there and have copied them ove the whole fkin computer. I have pasted it like everywhere. The vs2013 private assembly, my packages folder which I do not even reference to anyway and I think some vs2015 folder. I have ran a search for Mysql.Data and have pasted these files in every folder that came up as a result. I have rebuilt the solution for about 100-200 times and have cried for at least 20 minutes.
What do I have to do to get my new ADO.Net Entity Data Model generated?
I keep getting this stupid
image and I have really absolutely no idea what to do next. I just want to code but every time I start doing something I keep wasting days on tools not working. Do I really have to code in notepad so that I am sure it's my fault that something isn't working?
This is my app.Config file. I do not have anything else in my project.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v12.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.8.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.8.6.0" newVersion="6.8.6.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<connectionStrings>
<add name="KPlusConnectionString" connectionString="server=dito.ninja;user id=xxx;password=xxx;database=xxx" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
</configuration>
In order for VS 2015 to connect to MySql you need to be using a later version of the MySql libraries. While that seems like a pretty simple answer, in all honesty I have run into several problems along the way. With that in mind I am going to write out the 1 process that has consistently worked for me as far as getting EF working with MySql and VS2015. So, without further ado, here are the steps I have been taking in order to get this to work.
1) Make sure the MySql connector installation is updated
2) Create your web project
3) Open Nuget
4) Install Entity Framework
5) Search for MySql
6) Install MySql.Data
7) Install MySql.Data.Entity
8) Install MySql.Data.Entities
9) Install MySql.Web
10) Go to the references for the project and delete MySql.Data.Entity.EF6
11) Check the versions of the MySql.Data and MySql.Web libraries. If they are under 6.9.6 delete them as well
12) Add a new reference by browsing to the install location for the mysql connector for your version of the .NET framework (mine is C:\Program Files (x86)\MySQL\Connector.NET 6.9\Assemblies\v4.5) and grabbing the MySql.Data.Entity.EF6.dll (my version is 6.9.6, keep that in mind when we change the web.config later)
13) If the other libraries were also older versions, add references to them by browsing to the packages folder in your solution and grabbing the files from their respective folders. I do not normally have to do this.
14) Now the Web.config will need to be edited. The first step is to replace the entity framework section with this code (change the version number to your current version. Please note that I found this snippet on the web a couple weeks ago and do not have the original link. I apologize to the original poster of this information.)
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</providers>
</entityFramework>
15) Make sure your DbProviderFactories section matches
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
16) Save and build
I am not sure how many of these steps are actually required but after finally getting it once I had to actually get some work done and didn’t have time to narrow things down further. Hopefully that gets you moving.
P.S. If after all of that you go through the wizard and it just disappears before it shows you the tables in the database to create entities from then it could be one of three problems I have run into along the way. The database server cannot be contacted. The user does not have the needed permissions on the database. The wrong version of MySql.Data.Entity.EF6 was added as a reference or the version number is wrong in the web.config. If I grab this file from the packages directory of my solution I often run into this aborted-wizard-with-no-error-message problem. Grabbing it from the MySql install directory has worked fine for me every time.
It works for me.
I have Visual Studio 2015, and just installed latest version of connector:
http://dev.mysql.com/downloads/windows/visualstudio/
Read this more carefully:
http://dev.mysql.com/doc/relnotes/mysql-for-visual-studio/en/visual-studio-news-1-2-4.html
They mention that version of "Microsoft ASP.NET MVC" could be a problem.
Wrong is that they say VS2015 ships with version 5, but I have version 4 installed with VS2015 Enterprise final.
Tried this and it didn't work for me. What eventually worked was making sure I had the right driver. I run a 64bit Windows 7 computer. I eventually had to install the 32bit version of the MySQL ODBC connector/driver and used the following connection string "Provider=MSDASQL; Driver={MySQL ODBC 5.3 ANSI Driver}; Server=localhost; Database=xxxx; User=xxxx; password=xxxx; Option=3;" and that solved it. tested it on a new project without making all the above changes, and it worked just fine. This post was super helpful in explaining this: https://support.microsoft.com/en-us/kb/942976. Hope this saves someone a lot of time
install the package from this site. http://dev.mysql.com/downloads/windows/visualstudio/ in the Development release tab.
I stopped Visual Studio.. I installed. WAITED.. Seams to take for ever. Visual studio will be running in the background.
Wait till completed.
reopen Visual Studio. boom back in play!
Good luck !
For VS2015 I removed all version installed and through the MySql Installer - Community. I selected Customize Installation and selected MySQL Connectors to install: 1. MySql for Visual Studio 2) MySQl ConnectorNet.
I added references: MySql.Data y MySql.Data.Entity.EF5 both in
C:\Program Files (x86)\MySQL\Connector.NET 6.9\Assemblies\v4.5\
Recompiled the project And When creating de ADO.Net Object the famous MySql data provider was shown!
A warning was displayed about Entity Frame Versions, I just clicked Next And worked![enter image description here][1]

Getting a Reflector error Assembly Not Found when installing CruiseControl.NET

I see an entry in ccnet.exe.config
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NetReflector" publicKeyToken="2f4dd8b32acbcd8e" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.120" newVersion="1.1.2009.1004" />
</dependentAssembly>
</assemblyBinding>
When I first installed the service, I had no errors, but after following this tutorial
link text
I am getting this error when I try to run the service or CCValidator.
Could not load file or assembly 'NetReflector, Version=1.1.2009.1004, Culture=neutral, PublicKeyToken=dbcd6104b72f39b2' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Can anyone point me in the right direction?
Thanks,
~ck in San Diego
There was issue with cc.net 1.4.4 and the vsts plugin where I had to compile the plugin from source against the netreflector version 1.1.
However this issue has been fixed. Just install the latest version of cc.net, 1.4.4.83 (i.e. 1.4.4 SP1) and use the ccnet.vsts.plugin.dll 1.3.1.
I would use backup the ccnet.config and then just unzip on top
Get the binary zip distribution