在我的一个项目上启用迁移时遇到了问题。我Enable-Migrations
从 Nuget 控制台执行命令并收到一条错误消息:
Exception calling "SetData" with "2" argument(s): "Type
'Microsoft.VisualStudio.TeamArchitect.ModelingProject.ModelProjectAutomationObject' in assembly
'Microsoft.VisualStudio.TeamArchitect.ModelingProject, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable."
At D:\Solution\packages\EntityFramework.5.0.0\tools\EntityFramework.psm1:391 char:5
+ $domain.SetData('startUpProject', $startUpProject)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : SerializationException
在此之前有没有人遇到过这个问题可以为我指明正确的方向。
环境:
.NET 4.5
Entity Framework 5
Visual Studio 2012 Update 2