【问题标题】:Lightswitch Computed property wont compileLightswitch Computed 属性无法编译
【发布时间】:2013-08-01 22:25:44
【问题描述】:

我一直在我的表上创建计算属性,但是当我去编辑代码时(即使使用“编辑方法”链接),我无法编译,因为它说定义声明是 mia。

这是一个错误示例。

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 个在不同的桌子上的项目中工作,但我一生都无法弄清楚有什么区别,以及为什么这个工作有效,而我尝试创建的其他任何工作都没有。

有人知道我在这里缺少什么吗?

【问题讨论】:

    标签: visual-studio-lightswitch lightswitch-2012


    【解决方案1】:

    我会尝试重新创建该属性。属性定义在别处创建(应用程序定义),并传递到此用户代码文件供您参考。如果没有引用,则可能是在保存其他文件时出现了问题。

    可能需要更多信息才能给出更明确的答案,但这是我首先要尝试的。

    【讨论】:

      猜你喜欢
      • 2021-07-15
      • 2011-06-29
      • 1970-01-01
      • 2019-02-01
      • 1970-01-01
      • 2021-04-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多