使用 TFS 进行虚拟机和版本控制中的 SharePoint 开发
我们的团队将使用本地虚拟机针对 SharePoint 进行开发。我们的虚拟机不允许加入主机域。此外,我们的主机网卡被禁止使用互联网连接共享。我们需要使用 Team Foundation Server 对所有开发工作进行源控制。我们的 TFS 安装使用 Kerebos 进行身份验证。
为了能够使用 TFS 进行源代码控制,我们认为可以在主机和虚拟机之间共享一个文件夹,在虚拟机上完成我们的工作,保存到共享文件夹,然后从主机进行签入等操作,这样就可以针对 TFS 进行身份验证。
我希望有一种更干净的方法来做到这一点,或者有类似限制的人可以提供一些见解。
注意:我已经使用 Tortoise SVN 和 Ankh SVN 成功设置了一个类似的机制,该机制有效,但管理层不会在 TFS 要求上让步。我也不是责怪他们,许可证非常昂贵,他们希望觉得自己的钱花得值。因此,TFS 必须包含在答案中。
Our team is going to be developing against SharePoint using local VMs. Our VMs are not allowed to join the host domain. Additionally our host nics are prohibited from using Internet Connection Sharing. We have a requirement to source control all our development work using Team Foundation Server. Our TFS installation is using Kerebos for authentication.
To be able to use TFS for source control we were thinking we could share a folder between the host and VM, do our work on the VM, save to the shared folder and then do check ins and such from the host which will be able to authenticate against TFS.
I'm hoping there is a cleaner way to do this or someone with similar restrictions can provide some insight.
Note: I have successfully setup a similar mechanism using Tortoise SVN and Ankh SVN that works, but management will not budge on the TFS requirement. Not that I blame them either, the license is very expensive and they want to feel they are getting their money's worth. Therefore TFS has to be included in the answer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是一个非常适合 SharePoint 2007 开发的解决方案。
在我正在进行的项目中,我们在 Windows XP 计算机上运行 Windows Server 2008 的虚拟化实例。我们使用Sun VirtualBox 作为虚拟化软件。
其次,每个虚拟机都是一个独立的域控制器+ sql服务器+报告服务器+分析服务器+共享点服务器,因此不加入主域。
当打开 Visual Studio 2008 并连接到 TFS 时,您不需要将计算机/服务器连接到域,因为 VM NAT 通过主机网络适配器 - 使用 TFS 的完全限定地址,您不应该从 VM 内部连接到 TFS 的任何问题。
您可能需要关闭集成的 Windows 身份验证(IE -> 工具 -> Internet 选项 -> 高级)...
我们还在虚拟机中运行 VS08,而不是在主机上..
另一件事是使用 WSPBuilder 来构建您的解决方案并为您创建部署脚本(或者只是从 VS08 设置一个运行 stsadm.exe -o deploysolution 命令的外部工具/命令)..您可以轻松部署到 VM 并确保其正常运行 - 然后只需签入您的代码,设置在构建服务器上触发 WSPBuilder 的构建脚本,为您构建解决方案并从那里进行部署(或将 WSP 复制到服务器并在那里运行它们)。
Here's a solution that works perfectly for SharePoint 2007 development.
We run virtualised instances of Windows Server 2008 on our Windows XP machines at the project i'm on. We use Sun VirtualBox as the virtualisation software.
secondly, each VM is a standalone domain controller + sql server + reporting server + analysis server + sharepoint server and as such isn't joined to the main domain.
when opening up Visual Studio 2008 and connecting to TFS you don't need the machine/server to be connected to the domain as the VM NATs through the host machines network adapters - use a fully qualified address for your TFS and you shouldn't have any problems connecting to TFS from within the VM.
you may need to turn off integrated windows authentication (IE -> Tools -> Internet Options -> Advanced)...
We also run VS08 in the VM and not on the host..
Another thing is to use WSPBuilder to build your solutions and create the deployment scripts for you (or alternatively just set up an external tool/command from VS08 that runs the stsadm.exe -o deploysolution command)..you can deploy effortlessly to the VM and ensure that it runs fine - then just check in your code, set up build scripts that fires off WSPBuilder on the build server to build the solutions for you and deploy from there (or copy the WSP up to the server and run them there).
我认为您的解决方案非常干净。您可以在主机上映射一个文件夹,然后直接在虚拟机中从那里打开 Visual Studio 项目。节省复印。提交必须来自主机。使用 TFS 功能会有点尴尬,您还必须在主机上打开 VS 才能将提交连接到工作项等。这并不完全是投资 TFS 的目的。
为什么他们为 TFS 投入了现金却不愿意为其提供便利?虚拟机确实应该位于域中……或者至少位于受信任的域中。
我们运行相同的设置,只是我们有 SVN 并且可以直接从虚拟机提交。可行 :)
顺便说一句,如果您针对 SharePoint 2010 进行开发,情况会更好;它将允许在非服务器操作系统上安装,以便您可以在本地计算机上进行开发(我猜是在域上)。
I think your solutions is as clean as it will get.. you could map a folder on your host machine and open the Visual Studio project straight from there within the VM. Saves copying. Committing will have to be from the host. Use of TFS features will be a bit awkward, you'll have to open VS on your host machine as well to connect commits to work items etc. Not exactly what the investment in TFS was for.
How come they've dished out the cash for TFS but are not willing to facilitate it? The VM's should really be in the domain.. or at least a trusted domain.
We run the same setup except we do have SVN and can commit directly from the VM. Workable :)
BTW, if you develop for SharePoint 2010 this gets better; it'll allow installation on non-server OS's so you can develop on your local machine (which I guess, is on the domain).
我通常使用在主机上运行的 VS2008,并将 SharePoint 程序集安装到主机的 GAC 上。我使用带有共享文件夹和 sysinternals 的构建事件/构建目标来直接构建到 SharePoint VM 的 bin/GAC 文件夹。这样,Visual Studio 可以直接构建到 SharePoint 服务器,您无需管理 2 个安装(主机和 VM)。我还建议在虚拟机上安装 VS2008 调试器作为服务,以便于调试。
希望这有帮助!
I generally use VS2008 running on the host with the SharePoint assemblies installed to the GAC of the host. I use build events/build targets with a shared folder and sysinternals to build directly to the SharePoint VM's bin/GAC folders. This way Visual Studio builds directly to the SharePoint server and you do not have to manage 2 installations (host and VM). I would also recommend installing VS2008 debugger as a service on the VM for easy debugging.
Hope this helps!