将2008年转换为2010年 [英] Converting 2008 to 2010

查看:64
本文介绍了将2008年转换为2010年的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将一个项目从2008年转换为2010年。因为我得到了错误,例如



'FDR.Properties.Settings'不包含'RPCSS_DEVConnectionString'的定义,并且没有扩展方法'RPCSS_DEVConnectionString'接受类型为'FDR.Properties.Settings'的第一个参数'(您是否缺少using指令或汇编引用?)C:\ RPCSS \\ \\ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ $ 

  public  eRPTDataContext()
base global :: FDR.Properties.Settings.Default。 RPCSS_DEVConnectionString ,mappingSource)
{
OnCreated();
}





我在这里得到错误,请有人帮助我摆脱这个问题





[edit]已添加代码块[/ edit]

解决方案

嘿理查德,

感谢您的回复。我解决了这个问题。



我有两个解决方案。



public eRPTDataContext():

base(ConfigurationManager.ConnectionStrings [" RPCSS_DEVConnectionString"]。ConnectionString.ToString(),mappingSource)

{

OnCreated();

}



(或)



public eRPTDataContext()

:base(global :: FDR.Properties.Settings.Default.SettingsKey,mappingSource)

{

OnCreated();

}

在这里,我将应用程序设置更改为配置和应用程序,并解决了我的问题。但无论如何我的团队配合工作在配置管理器上,所以我现在使用第一个解决方案


Im converting one project from 2008 to 2010. in that iam getting error like

'FDR.Properties.Settings' does not contain a definition for 'RPCSS_DEVConnectionString' and no extension method 'RPCSS_DEVConnectionString' accepting a first argument of type 'FDR.Properties.Settings' could be found (are you missing a using directive or an assembly reference?)   C:\RPCSS\_svn_code_working_on_5032013_second_copy\FDR\FdrApp\eRPT.designer.cs





public eRPTDataContext()
            : base(global::FDR.Properties.Settings.Default.RPCSS_DEVConnectionString, mappingSource)
        {
            OnCreated();
        }



Im getting error in this, Please anyone help me out to get rid from this issue


[edit]Code block added[/edit]

解决方案

Hey Richard,
Thanks for response. I solved this issue.

I got two solutions for this.

public eRPTDataContext() :
base(ConfigurationManager.ConnectionStrings["RPCSS_DEVConnectionString"].ConnectionString.ToString(), mappingSource)
{
OnCreated();
}

(or)

public eRPTDataContext()
: base(global::FDR.Properties.Settings.Default.SettingsKey, mappingSource)
{
OnCreated();
}
Here I changed application setting into configuration and to application and solved my issue. but any way my team mate working on configuration manager so now iam using first solution


这篇关于将2008年转换为2010年的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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