2013-06-27 19 views
0

重命名一個數據源表中的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"> 
     &lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;ExceptionInfo&gt;&lt;Message&gt;Schema specified is not valid. Errors: &#xD; 
     REDCanonicalData.msl(653,10) : error 2007: The Table 'EntityNames' specified as part of this MSL does not exist in MetadataWorkspace.&#xD; 
     REDCanonicalData.msl(652,8) : error 2063: At least one property must be mapped in the set mapping for 'EntityNames'.&lt;/Message&gt;&lt;StackTrace&gt; at Microsoft.LightSwitch.Threading.DispatcherExtensions.Invoke(IDispatcher dispatcher, Action action)&#xD; 
     at Microsoft.LightSwitch.ServerGenerated.Implementation.DataService`1.LogicInvoke[T](Func`1 f)&#xD; 
     at Microsoft.LightSwitch.ServerGenerated.Implementation.DataService`1.Microsoft.LightSwitch.ServerGenerated.Implementation.IODataService.LogicInvoke[T](Func`1 f)&#xD; 
     at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceQueryProvider.QueryableWrapper`1.ExecuteGeneric[TResult](Expression expression)&#xD; 
     at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceQueryProvider.QueryableWrapper`1.Execute[TResult](Expression expression)&#xD; 
     at System.Linq.Queryable.LongCount[TSource](IQueryable`1 source)&lt;/StackTrace&gt;&lt;ErrorInfo /&gt;&lt;/ExceptionInfo&gt; 
    </message> 
</error> 

回答

0

的問題是,構建過程不會自動檢查出設在.ssdl文件項目的.../Server/GeneratedArtifacts目錄。由於該文件未被檢出,因此它保持只讀狀態,不能通過構建過程進行更新。

解決方案是進入TFS源代碼資源管理器,手動檢出文件,然後重新生成解決方案。

如果您未使用Team Foundation Server進行源代碼管理,那麼該文件可能是隻讀的,或者您可能沒有權限對其進行更改。