使用 Visual Studio 2010 Express 构建 Web 部件

发布于 2024-09-01 19:10:07 字数 831 浏览 5 评论 0原文

我正在尝试开始构建自己的 Web 部件,计划遵循此 MSDN文章

我已经下载了 Visual C# 2010 Express - 我还没有达到放弃 1000 个大版本的地步,并且我通过 WPInstaller 安装了 Visual Web Developer 2010 Express。

完成本教程后,除了我没有选择创建“Web 控件库”这一事实之外,我还用 这篇文章,我似乎找不到 sn.exe 工具(或“Visual Studio 2005 命令提示符”!)。

我知道这不是一个直接与编程相关的问题,但我什至还无法让事情继续下去!

任何帮助表示赞赏。 谢谢

编辑:-

我想我可能有点操之过急,我写了一个简单的 hello world 示例并尝试构建它,但它没有任何对 Microsoft.SharePoint 包的引用,它们不要出现在我的列表中。

我是否正确理解了我所做的更多研究(即这个),因为我有在我正在开发的计算机上真正完整安装实际的 SharePoint?

I'm trying to get started with building my own webparts, planning to follow this MSDN article.

I've downloaded Visual C# 2010 Express - I'm not quite at the point where I feel comfortable dropping 1000 big ones yet, and I installed Visual Web Developer 2010 Express via the WPInstaller.

Following through the tutorial, aside from the fact that I don't get the option to create a "Web Control Library", a gap I filled with this article, I can't seem to find the sn.exe tool (or the "Visual Studio 2005 Command Prompt"!).

I know it's not quite a direct programming related question, but I can't even get the thing going yet!

Any help is appreciated.
Thanks

EDIT:-

I think I may be jumping the gun quite considerably, I wrote a simple hello world example and tried to build it but it doesn't have any references to the Microsoft.SharePoint packages and they don't appear in my lists.

Am I understanding some more research I've done (namely this) correctly, in that I have to actually have a full installation of actual SharePoint on the machine I'm developing on?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

柠檬色的秋千 2024-09-08 19:10:07

sn.exe< /a> 是 .Net Framework SDK 工具的一部分 - 实际上不是 Visual Studio 的一部分。

如果您已经安装了 SDK(我认为如果您使用 VS,则必须安装),那么它将位于以下目录中(取决于您安装的 .NET SDK 版本)

c :\program files\microsoft.net\SDK\v2.0\Bin

您可以使用 VS Express 开发 SharePoint Web 部件,但无法使用 VSeWSS 这可以让您的生活更轻松一些。

您无需在安装了 SharePoint 的计算机上进行开发 - 您只需从安装了 Microsoft.SharePoint.dll 的计算机上复制 Microsoft.SharePoint.dll 程序集并在项目中引用它即可。

在 SharePoint 计算机上进行开发有利有弊。

  • 更容易上手——
    特别是在本地调试
    比远程调试。
  • 更难成为
    确保您的代码可以工作
    “真实服务器” - 你确定吗
    没有任何可能的依赖关系
    无法安装。
  • 更难合作
    SharePoint 的多个版本(2007
    WSS 和 MOSS 以及 2010 年基金会,
    服务器等)。

如果您确实想使用本地安装的 SharePoint,则

  • 可以使用 SharePoint 和 Visual Studio 安装 Windows 服务器操作系统。
  • 有一个在 vista 上安装 SharePoint 2007 的技巧(在您链接到的 SO 文章中引用)
  • 您可以在 Windows 7 上安装 SharePoint Foundation 2010 (但我不确定许可限制是什么 - 这可能是给出的东西通过 MSDN?)

如果您决定进行远程服务器安装,那么请使用虚拟化,例如 VMWare Server、Virtual PC 或 Hyper-V,这样可以省去一些麻烦。

sn.exe is part of the .Net Framework SDK tools - not actually part of Visual Studio.

If you've got the SDK installed (which I think you must have if you're using VS) then it will be in a directory such as (depending on which version of .NET SDK you've got installed)

c:\program files\microsoft.net\SDK\v2.0\Bin

You can develop SharePoint web parts with VS express but you won't be able to use extensions like VSeWSS which can make your life a little easier.

You don't have develop on a machine with SharePoint installed upon - you can just copy the Microsoft.SharePoint.dll assembly from a machine with it installed on and reference it in your project.

There are pros and cons to developing on a SharePoint machine.

  • Its easier to get started -
    especially debugging locally rather
    than remote debugging.
  • Harder to be
    sure that you're code will work a
    'real server' - are you sure you
    don't have any dependencies that may
    not be installed.
  • Harder to work with
    multiple versions of SharePoint (2007
    WSS and MOSS and 2010 foundation,
    server etc).

If you do want to work with a locally installed SharePoint then

  • You can install windows server OS with SharePoint and Visual Studio.
  • there is a hack for installing SharePoint 2007 on vista (referenced in the SO article you link to)
  • you can install SharePoint Foundation 2010 on Windows 7 (but I am not sure what the licensing restrictions are - is this maybe something thats given through MSDN?)

If you decide to go with the remote server installation then save yourself some grief and use virtualization such as VMWare Server, Virtual PC or Hyper-V.

不可一世的女人 2024-09-08 19:10:07

如果您正在进行 SharePoint 开发并尝试引用 Microsoft.SharePoint 命名空间,则需要在计算机上安装 SharePoint(如果您想要执行调试等操作)。对于 SP 2010,您可以在 Win 7 计算机上安装 SharePoint。对于以前版本的 SharePoint,您需要设置 Server 2003 或 Server 2008 服务器(无法在客户端计算机上安装 SP 2007 及更早版本)。一般来说,这是供开发人员使用的虚拟机。

综上所述,您需要 SharePoint 来开发 WebPart 的原因相对较少。绝大多数 WebPart 功能都是 System.Web.UI.WebControls.WebParts 命名空间的一部分。即使我访问 SharePoint 数据,我通常也会使用 ASP.NET Web 部件。

如果您尝试使用新的 SharePoint VS 2010 功能来创建可视化 Web 部件等,则需要安装 SP 2010,因为早期版本的 SharePoint 不支持该功能。

约翰

If you are doing SharePoint development trying to reference the Microsoft.SharePoint namespaces you need to have SharePoint installed on the machine if you want to do things like debugging, etc. For SP 2010 you CAN install SharePoint on a Win 7 machine. For previous versions of SharePoint, you will need to setup a Server that is Server 2003 or Server 2008 (you can't install SP 2007 and earlier on client machines). Generally this is a Virtual Machine for developers.

Having said all of that, there are relatively few reasons you need SharePoint to develop a WebPart. The vast majority of the WebPart functionality is part of the System.Web.UI.WebControls.WebParts namespace. Even if I am accessing SharePoint data, I generally use the ASP.NET web part.

If you are trying to use the new SharePoint VS 2010 functionality to create Visual Web Parts, etc, then you will need to install SP 2010, since that functionality is not supported in earlier version of SharePoint.

John

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文