Aug 30

SOLVED: Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong.

After making some (of in fact a lot of) changes to my persistent classes I get the error: Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong.

I’m using Entity Framework 6, code first and automatic migrations.

How did I solve this:

– run in the package manager console : update-database -verbose -sourcemigration $initialdatabase

Now you can see what is causing the migration to fail. In my case it was changing a one-many relationship to a many-to-many using a extra (explicit) linking table.

Remark: often the issue is with foreignkey  and relationships. Since you perhaps try to modify the relationships, it could be necessary to modify of delete the related data, so SQL server can delete and recreate references on empty tables

Aug 02

Publishing to Azure: Could not load file or assembly ‘Microsoft.Web.XmlTransform,Version=1.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies

When publishing my MVC 5 webapp to Azure I get the error:

The “ImportParametersFile” task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.Web.XmlTransform,Version=1.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. File name: ‘Microsoft.Web.XmlTransform, Version=1.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’

I’m using Visual Studio 2012 Update 4. Azure SDK 2.3.

I’ve tried:

– reinstall azure SDK
– reinstall Web Tools 2013.1 for VS2012
– installed slowcheetah nuget package
– installed Microsoft.Web.xdt nuget package
– uninstalled VS 2013

So far no luck, the Microsoft.Web.Xmltransform.dll is just missing and the version that is somewhere on my system is the wrong version. I’ve tried to find the 1.4.0.0 version somewhere, but it seems unfindable.

MY SOLUTION:

– repair Microsoft ASP.NET & Web Tools 2013.1 Visual Studio 2012

reinstall does not work