.net 重命名Lightswitch数据源表时出错
在Lightswitch中重命名数据源表后,我得到以下运行时异常:.net 重命名Lightswitch数据源表时出错,.net,entity-framework,visual-studio-lightswitch,.net,Entity Framework,Visual Studio Lightswitch,在Lightswitch中重命名数据源表后,我得到以下运行时异常: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <code>1</code> <message xml:lang="en-US">
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>1</code>
<message xml:lang="en-US">
<?xml version="1.0" encoding="utf-16"?><ExceptionInfo><Message>Schema specified is not valid. Errors: 
REDCanonicalData.msl(653,10) : error 2007: The Table 'EntityNames' specified as part of this MSL does not exist in MetadataWorkspace.
REDCanonicalData.msl(652,8) : error 2063: At least one property must be mapped in the set mapping for 'EntityNames'.</Message><StackTrace> at Microsoft.LightSwitch.Threading.DispatcherExtensions.Invoke(IDispatcher dispatcher, Action action)
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataService`1.LogicInvoke[T](Func`1 f)
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataService`1.Microsoft.LightSwitch.ServerGenerated.Implementation.IODataService.LogicInvoke[T](Func`1 f)
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceQueryProvider.QueryableWrapper`1.ExecuteGeneric[TResult](Expression expression)
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceQueryProvider.QueryableWrapper`1.Execute[TResult](Expression expression)
at System.Linq.Queryable.LongCount[TSource](IQueryable`1 source)</StackTrace><ErrorInfo /></ExceptionInfo>
</message>
</error>
问题是生成过程没有自动签出位于项目的…/Server/GeneratedArtifacts目录中的.ssdl文件。由于文件未签出,因此它将保持只读,并且无法通过生成过程进行更新 解决方案是进入TFS源代码资源管理器,手动签出文件,然后重新生成解决方案
如果您不使用Team Foundation Server进行源代码管理,则该文件可能是只读的,或者您可能没有更改它的权限。