复制/移动应用code到新项目 [英] Copying/Moving App Code to New Project

查看:247
本文介绍了复制/移动应用code到新项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我打破相隔Intranet应用程序的过程中(VS 2010 Web站点,ASP.NET Web窗体用VB code后面)。在这个过程中我试图一些我们我们APP_ code文件转换到WCF休息服务于一个新的项目。然而,当我复制或添加现有VB文件复制到新的服务项目。我得到吨的错误,包括...

Ok, I am in the process of breaking apart of intranet application (VS 2010 Web Site, ASP.NET Web Forms with VB code behind). During this process i'm trying to convert some of our our app_code files in to WCF rest service in a new project. However, when I copy or "add existing" vb files into the new "services" project. I get tons of errors including...


  1. 错误BC30002:类型'XXX'没有定义

  2. 警告BC40056:命名空间
    或进口System.ServiceModel指定的类型不
    包含任何公共成员或无法找到。确保
    命名空间或类型被定义,并包含至少一个公共
    会员。确保导入的元素名不使用任何别名。

从我读过它可能(也可能不会)有事情做组件和引用,我只是有很少的知识。我从目前的web.config中新项目的web.config添加的命名空间和文件是相同的。因此,有背景的东西需要被添加到新的项目,我只是不知道它。

From what i've read it may (or may not) have something to do with Assemblies and references that I just have very little knowledge on. I have added the namespaces from the current web.config to new project's web.config, and the files are identical. So there is something in the background that needs to be added to the new project I just don't know what its.

请帮助!

感谢
JOSH

THANKS JOSH

更新1

所以,我越来越=的错误之一的错误BC30002:类型MAILMESSAGE没有定义这是被添加到web.config命名空间,这显然是不被拾起???想法?

So one of the errors i'm getting = "error BC30002: Type 'MailMessage' is not defined." Which is a namespace that is added to the web.config, which apparently isn't being picked up??? IDEAS?

推荐答案

此问题似乎被捆绑到Web应用程序项目与网站项目之间的差异。最后,我不得不对新的项目级别添加不同的命名空间。

This issue seems to be tied to the the differences between Web Application Projects versus Web Site Projects. Eventually I had to add different namespaces on the new project level.

下面是关于WAP VS WSP更多信息....
http://msdn.microsoft.com/en -us /库/ dd547590(v = vs.110)的.aspx

Here is more info about WAP vs WSP.... http://msdn.microsoft.com/en-us/library/dd547590(v=vs.110).aspx

这篇关于复制/移动应用code到新项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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