将WCF RIA服务添加到Visual Studio Light Switch项目时出错 [英] Error in adding WCF RIA service to the Visual Studio Light Switch Project

查看:60
本文介绍了将WCF RIA服务添加到Visual Studio Light Switch项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,

i我正在制作一个视觉工作室灯光开关项目。我正在为这个项目添加一个WCF RIA服务,我正在使用一些参考资料......

使用System;

使用System.Collections.Generic;

使用System.ComponentModel;

使用System.ComponentModel.DataAnnotations;

使用System.Linq;

使用System.ServiceModel.DomainServices.Hosting;

使用System.ServiceModel.DomainServices.Server;

使用ApplicationData.Implementation;

使用System.Data.EntityClient;

使用System.Web .Configuration;



但我遇到一个问题,命名空间 ApplicationData.Implementation 显示汇编错误。可以有人帮我告诉需要为这个命名空间添加哪个汇编参考....



谢谢和问候

Shivam Kumar

Softwa重新设计工程师

Hello All,
i am making a visual studio light switch project.And i am adding a WCF RIA service to this project and I am using some references as bellow...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.ServiceModel.DomainServices.Hosting;
using System.ServiceModel.DomainServices.Server;
using ApplicationData.Implementation;
using System.Data.EntityClient;
using System.Web.Configuration;

But I am facing a problem the namespace ApplicationData.Implementation is showing assembly error.Can someone help me to tell which assembly reference needs to be added for this namespace....

Thanks And Regards
Shivam Kumar
Software Engineer

推荐答案

亲爱的Shivam,



我在工作时面临同样的问题 WCF RIA服务教程,用于 LightSwitch 应用程序。它不是您需要引用的程序集。 ApplicationData 是LightSwitch自动创建的类,用于与 LightSwitch Intrinsic 数据库进行通信( LightSwitch 在\Bin\Data\Temp \ ApplicationDatabase.mdf)中创建一个LocalDB开发数据库。

所以你需要添加这个 ApplicationData WCF RIA服务项目的课程,以便与 LightSwitch 数据库进行通信。

要做到这一点,您需要右键单击 WCF RIA服务项目,然后选择添加,然后现有项目

导航到.. .'YourLightSwitchProject'\ Server \GeneratedArtifacts 并单击 ApplicationData.cs 添加为链接

建议使用添加为链接,以便每当 LightSwitch 更新此类时, WCF RIA服务也会更新。

尽快您添加 ApplicationData.cs 类作为 WCF RIA服务的链接 使用ApplicationData.Implementation 所面临的问题将会解决。



最好的问候,



Vassilis Tsolekas,MSc

高级软件工程师
Dear Shivam,

I have faced the same problem while I was working on a tutorial for WCF RIA Services for a LightSwitch application. It is not an assembly that you need to reference. ApplicationData is a class that LightSwitch automatically creates, in order to communicate with the Intrinsic database of LightSwitch (LightSwitch creates a LocalDB development database in the location \Bin\Data\Temp\ApplicationDatabase.mdf).
So you need to add this ApplicationData class to your WCF RIA Service project to communicate with the LightSwitch database.
To do that you need to Right-click on your WCF RIA Service project and select Add then Existing Item.
Navigate to ...'YourLightSwitchProject'\Server\GeneratedArtifacts and click on ApplicationData.cs and Add As Link.
It is recommended to use "Add As Link" so that whenever LightSwitch updates this class, WCF RIA Service is also updated.
As soon as you add ApplicationData.cs class as a link to your WCF RIA Service the problem you face with using ApplicationData.Implementation will be solved.

Best Regards,

Vassilis Tsolekas, MSc
Senior Software Engineer


这篇关于将WCF RIA服务添加到Visual Studio Light Switch项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆