I’ve setup a solution with a WebAPI and a MVC 4 application. I’m using the Entity Framework 5 which stores it data into a SQL Azure database. In the package manager console I typ: enable-migrations and get the error:
Unable to load the specified metadata resource.
This due to the context connectionstring in the web.config. Check if you have the right settings under <connectionStrings>
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=220.127.116.11, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. File name: ‘Microsoft.Web.XmlTransform, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’
I’m using Visual Studio 2012 Update 4. Azure SDK 2.3.
– 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 22.214.171.124 version somewhere, but it seems unfindable.
– repair Microsoft ASP.NET & Web Tools 2013.1 Visual Studio 2012
I try to do an insert in to n:n (SQL Azure based) related tables (UserSet and TenantSet) using the Entity Framework, but it fails with the error: “tables without a clustered index are not supported in this version of sql server”. I’ve used the model first approach to generate the SQL database, so the SQL Server database should be fine.
After extensive search it seems that the table UserTenant has no clustered index. The script that the Entity Framework generate contains (in my opinion) an error. The relevant part of the script is:
Creating primary key on [User_UserId], [Tenant_TenantId] in table ‘UserTenant’
ALTER TABLE [dbo].[UserTenant] ADD CONSTRAINT [PK_UserTenant] PRIMARYKEY NONCLUSTERED ([User_UserId], [Tenant_TenantId] ASC); GO
Of course the NONCLUSTERED parameter should me CLUSTERED. Change that and run the script again.
That’s all, hope the Entity Framework team resolves this what looks like a bug.