使用PowerShell命令的Windows窗体应用程序部署wsp文件 [英] Windows Forms Application using PowerShell Commands to deploy a wsp file

查看:96
本文介绍了使用PowerShell命令的Windows窗体应用程序部署wsp文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我是Sharepoint的新手。我被分配了一个任务,即自动部署wsp文件的过程。为此我需要开发一个可以完成所有工作的.exe文件。我检查了codeplex项目Sharepoint Solution Installer。但这对我们的项目来说还不够。我们必须使用此.exe文件本身创建网站。我们还应该能够部署整个解决方案。为此,我认为PowerShell脚本会很有用。所以请帮助我实现这一目标。任何帮助将不胜感激。



谢谢和问候,

Srivikas

解决方案

正如我所说,在PowerShell中编写一个 System.Windows.Forms 应用程序是非常有可能的。



我在回答这个问题时已经写了这个示例代码。它让我工作了几分钟。这是完全成熟的简约应用程序,即使使用事件处理程序和很少的效果。在PowerShell下运行:

 


null = [System.Reflection.Assembly] :: LoadWithPartialName( System.Windows.Forms


form = New-Object System.Windows .Forms.Form

Hi friends,

I am a fresher in Sharepoint. I have been assigned a task of making the process of deploying a wsp file automatic. For this I need to develop an .exe file which can do all the stuff. I have checked the codeplex project "Sharepoint Solution Installer". But it is not sufficient for our project. We have to create the site by using this .exe file itself. We should also be able to deploy an entire solution. For this, I thought that PowerShell scripts would be useful. So please help me in achieving this. Any help would be greatly appreciated.

Thanks & Regards,
Srivikas

解决方案

As I say, writing a System.Windows.Forms application in PowerShell is quite possible.

I''ve written this sample code write now while answering to this question. It tool me a couple of minutes. This is fully fledged minimalistic application, even with an event handler and few effects. Run it under PowerShell:


null = [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")


form = New-Object System.Windows.Forms.Form


这篇关于使用PowerShell命令的Windows窗体应用程序部署wsp文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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