Archiv der Kategorie: Visual Studio

Visual Studio – The following property is missing or has incorrect value: SccLocalPath

Error

Dialog: One or more Projects in the solution were not loaded correctly. Please see the Output Window for Details.

In Output „Source Control – Team Foundation“: The following property is missing or has incorrect value: SccLocalPath<no>

Solution

  1. Open your Solution-File with Notepad.
  2. Search for SccLocalPath, find the last one below, e.g. „SccLocalPath227„.
  3. Find „SccNumberOfProjects = <no>“.
  4. Correct the number „<no>“ to 228 (0-based!).
  5. Save the Solution File.

 

Code First Migration in Multiple DbContext

Package Manager Console – Commands

  • enable-migrations -ContextTypeName <DbContext-Name-with-Namespaces> -MigrationsDirectory:<Migrations-Directory-Name>
  • add-migration -configuration <DbContext-Migrations-Configuration-Class-with-Namespaces> <Migrations-Name>
  • update-database -configuration <DbContext-Migrations-Configuration-Class-with-Namespaces> -Verbose

Samples

  • enable-migrations -ContextTypeName App1.Model.App1DataModel -MigrationsDirectory:MigrationApp1Data
  • update-database -configuration:App1.MigrationApp1Cache.Configuration

More info in Data Developer Center

Code First Migrations