2013-08-01 15 views
2

我一直在我的表上做計算propeties,但是當我去編輯代碼(甚至使用「Edit Method」鏈接)時,我無法編譯,因爲它說定義聲明是mia。Lightswitch Computed屬性不會編譯

這裏是一個錯誤的例子。

Error 1 No defining declaration found for implementing declaration of partial method 'LightSwitchApplication.CampaignLevel.Property1_Compute(ref string)' 
C:\Users\Jason\Documents\Visual Studio 2012\Projects\Application1\Application1\Common\UserCode\CampaignLevel.cs 
11 22 Common 

代碼後面是空的:

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Microsoft.LightSwitch; 
namespace LightSwitchApplication 
{ 
    public partial class CampaignLevel 
    { 

     partial void Property1_Compute(ref string result) 
     { 
      // Set result to the desired field value 

     } 
    } 
} 

我有1,在項目上不同的表的作品,但我不能爲我的生活出的差異是什麼,爲什麼那個人可以工作,而任何其他我嘗試創造的人都不會。

有沒有人知道我在這裏失蹤?

回答

0

我會嘗試重新創建屬性。屬性定義在別處創建(應用程序定義),並傳遞給此用戶代碼文件供您參考。如果沒有參考,那麼以某種方式保存其他文件可能存在問題。

可能需要更多信息才能給出更明確的答案,但這是我首先要嘗試的。