The DataSourceID of ‘QuickLaunchMenu’ must be the ID of a control of type IHierarchicalDataSource. A control with ID ‘QuickLaunchSiteMap’ could not be found.

July 12, 2009

This Error message happens after I changed the Web.Config.

whatever I want to Modify the Web.config (some strange character, Case of character), it still the same thing.

My solution:

copy the Web.config from other Port, put it in current Port, and add in the “SPXmlAdminContentMapProvider”.

then the error message disppeared.

Advertisements

[MOSS开发]:webpart在部署时应该注意的地方

July 8, 2009
 http://www.blogjava.net/zhaijianhui/archive/2009/05/16/270967.html
由于近期项目的需要,我开始学习MOSS编程,刚开始接触的时候觉的特别的别扭,觉的没有自己全新创建的web application来的自由,但是MOSS还是有很多优点的,这篇我先说下自定义webpart的部署问题。
    如何创建webpart我并不想在这篇中讲,具体我会另外写一篇关于webpart开发的文章。

    MOSS中的webpart与普通.net控件的不同点:

       1:webpart一般都是以类库的形式出现,它是没有前端可视化页面的,类似于asp.net中的自定义控件。

       2:两者继承的基类不同:

           1):asp.net控件的基类:System.Web.UI.WebControls.WebControl;

           2):webpart的基类:System.Web.UI.WebControls.WebParts.WebPart;

       3:两者生成的文件不同,下面几个是asp.net控件所不包含的:

           1):密钥文件;

           2):每个 Web 部件都应有一个 .webpart 文件,还有一个描述 Web 部件的 XML 文件。这是webpart独有的特征。
       4:MOSS中的webpart部署并不像asp.net网站中的一样,控件和网站程序放在一起然后部署就行,我总结以个几点应该注意的地方:

          1>:首先把生成的webpart的dll文件复制到sharepoint网站对应的目录中,而程序集的部署分以下几种方式:
             1):bin目录,在创建一个web application时,会选择一个端口,此时在IIS中就会创建一个对应端口的网站目录:Inetpub”wwwroot”wss”VirtualDirectories”20983,在这个目录下面有两个文件夹:_app_bin,bin,将编译好的程序集放进任何一个目录即可;

             2):全局程序集缓存:全局程序集缓存使各个应用能够共享程序集,它会被.Net运行时自动加载。它的位置在:[System Drive]”Windows”Assemply。 因为它会强命名程序集,所有具体开发时不推荐这种方式。

             3).指定目录,参考第一条,bin,_app_bin,这两个文件夹都可以用来部署程序集,MOSS还支持指定目录方式,这需要在Web.Config中进行配置。在<configuration>节下进行配置:

   <runtime>
      
<assemblyBinding xmlns=urn:schemas-microsoft-com:asm.v1>
         
<probing privatePath=bin;_app_bin;CustomBin />
      
</assemblyBinding>
   
</runtime>

           小结:其实上面的方式一和方式三是同一原理,实际上可以说是两种方式。还有一点就是如果想手工复制程序集到sharepoint网站的bin,这里有两种简单的方式:

                    1:选择项目-属性-生成-更改输出路径到sharepoint网站的bin即可;

                    2:选择项目-属性-生成事件-增加生成事件:

copy $(TargetPath) E:InetpubwwwrootwssVirtualDirectories20983bin

          

           BIN目录的优点和缺点:

                   1:优点。它是一个单独信任位置,默认的,代码访问安全级别非常低。如果想让webpart正常运行,一般都需要开发人员显示的提升BIN目录的信任级别。一个BIN目录对应一个web application,这样我们可以为不同的web application创建不同的独立代码。

                  2:缺点。如果想在另外一个web 应用中应用此webpart,则需要重新部署。

          全局程序集缓存的优点和缺点:

                  1:优点。它是经过签名的程序集,信任级别最高,属于完全信任。因为它部署于全局位置,所有能够被所有web应用所共享。

                  2:缺点。由于它是完全信任,所以它失去了相应的防御措施。

           2>:设置特殊安全属性,如果是采用部署到bin的方式,则会存在安全性问题,如不做处理则会出现如图一的情况。

 

             原因:默认情况下bin 目录的代码访问安全权限很低,对存储的webpart具有特殊的安全约束,Web 部件在执行时不会自动授予完全信任代码权限。我们可以手工来设置这些属性。

                   1:在web.config文件中有一个配置节trust level,是控制信任级别的,我们可以更改此配置节来提升bin目录的安全性:trust level=Full。

                   2:在生成的程序集文件 assembly添加一句 [assembly: AllowPartiallyTrustedCallers()]

             小结:上面方法一般性地提升了信任级别,所以会授予您可能不需要的任何新权限,这样就不如另一种创建新信任策略文件的方法安全。创建一个新的信任策略文件,将 web.config 文件指向该新文件。这种方法较为复杂,但是可以更为精确地设置 Web 部件的权限属性。[引用MSDN],

          3>:注册控件。控件的注册离不开web.config文件,找到SharePoint节点,在最下面添加如下信息: (Assembly,Version,Culture,PublicKeyToken的查看方式可以通过.Net Reflector。 )

<SafeControl Assembly=WebParts.Samples, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5 Namespace=WebParts.Samples TypeName=* Safe=True />

    </SafeControls>

 

          4>:导入到Webpart部件库。网站操作-网站设置-修改所有网站设置-库-web部件-新建-选中刚才创建的webpart-点击“导入库”-在页面中添加webpart即可。

  总结:

       本文总结了些webpart部署时对于新手的一些困惑,虽然没有比较深入的地方,但是学会部署webpart是MOSS编程的基本功。希望大家指点。

  注:

      本文所讲的环境均为MOSS 2007

How to manually remove a webpart (SPS WSS 2003)

July 2, 2009

by Servé Hermans | 5:13 PM in Sharepoint 2007 Other |
Somehow, I was not able to deinstall webparts using the stsadm -o deletewppack -name command. This happened after we upgraded a webpart with a new version.

To manually remove the webpart:
1. Access the configuration database and locate your webpart. Write down the ID number (eg 5.) and delete the entry from the WebPartPackages table
2. Go to the InstalledWebPartPackages table and delete all the rows which match the specific ID (in our case the ID was 5)
3. delete all dwp files that match your webppart name in every website _wpcatalog folder for every front end server. Leave all the other dwp files untoched.
4. now you can check if the deinstallation was succesful by stsadm -o enumwppacks -farm.

Eventually you can reinstall the webpart package.

How to Build a SharePoint Development Machine

June 28, 2009

How to Build a SharePoint Development Machine

[Update 2008-12-05: Justin Devine posted a fantastic article to build on this posting that contains many screen shots, additional comments and a section on writing and debugging your first SharePoint program in your new environment. So give this a read-through, but as you walk the steps I recommend starting from Justin’s posting where you’ll also see the visual cues and where necessary, links back to here.]

There are two choices: You can build a SharePoint server that contains all your developer tools too. Or you can build your SharePoint server in a virtual machine (VM or VPC), and keep all your developer tools local. Then you can treat your virtual machine just like a physical server, and surf or demo it just as you would a production environment. This way you avoid all the inconsistencies that come with running browser session on locked-down web servers, don’t fill your server’s GAC with quite as much junk, and really get the client experience. You can use this post as a starting point to build either.

This post describes the tools you will use. There are always others, so go ahead and tell me about yours in the comments section. I’ve left off CSS and XML editors because frankly the best aren’t free. Even though a few items listed here are commercial products (e.g. Visual Studio), all have evaluation versions that last long enough for you to learn the ropes and prepare for that first big SharePoint interview.

Client Hardware

The biggest controllable factors on the speed of your SharePoint development environment are RAM and hard drive speed. If you do a lot of development, you will also want a lot of storage space to hold all those virtual machines.

The configuration described here is intended for a good laptop, which today is limited to 4Gb RAM. If you have 4Gb, give the virtual machine 2Gb. If you have 3Gb, give the virtual machine either 1.5Gb or 2Gb. If you have 2Gb or less, buy more RAM or host your virtual server elsewhere. Seriously.

If you need Exchange Server for any reason (1 to 2Gb recommended), you’ve grown out of laptop labs and should build this on a Virtual Server (or VMWare) host if you want some hair left over when you’re done. To build medium or large farms in a virtual environment, Virtual Server running on a 64-bit Windows 2003 Server R2 machine will remove your memory limitations. A 64-bit Vista machine provides the same expandability with Virtual PC or VMWare.

There are several factors to hard drive speed: keeping your VM on a different drive than your OS, drive transfer rates, and drive speed. Put another way: you want a big fast external drive. You can get a pretty big drive for around $200CAD now (I like my Seagate), and an enclosure with Firewire or eSATA (external SATA) is about $50CAD. If you don’t have Firewire or eSATA on your laptop you’ll need an adapter for that as well (also $50). Why not USB 2.0? Firewire is 33% to 70% faster than USB depending on the operation. eSATA is about five times faster than USB 2.0. While many enclosures also have a USB port, the difference is well worth it. PCMCIA (CardBus) runs at 132Mbytes per sec so an adapter for any of these will treat you fine. Note that newer laptops may have an ExpressCard slot instead of a PCMCIA slot.

Technology Transfer Rate (Mbits per second)
USB 2.0 480
Firewire 800 786
eSATA 1500 to 2400

 

Minimal Configurations

The assumption is that you know what you like, know what you want to do, and will download and install accordingly. That said, maybe you really do want to develop with Notepad so here goes.

On your development machine you need the .Net Framework version 3.0 and a development interface (IDE), whether it’s Visual Studio, SharePoint Designer, or a plaintext editor like Notepad. If you don’t have a physical server available, you will use either Virtual PC or VMWare to host SharePoint. Beyond these, everything is optional.

On your server, you need Windows Server, IIS, the .Net Framework version 3.0, and either WSS, MOSS Standard, or MOSS Enterprise.

Building the Client

.Net Framework 2.0. This is optional, but if you do any development beyond SharePoint you likely have clients on v2.0.

.Net Framework 3.5
WPF, WCF, and essential to SharePoint: Workflow. Note that MOSS 2007 works great with .NET 3.5, is supported by Microsoft, and there is no reason not to deploy it for all your servers.

[Update 2008-11-04] Do not install .NET 3.5 SP1 if you require Records Center, and until the cause is identified there is a risk that other features are also affected. .NET 3.5 itself remains okay, this issue is only reported with SP1.

Microsoft Office SharePoint Server 2007 SDK [Read it online]
The MOSS SDK includes the Enterprise Content Management (ECM) Starter Kit, a BDC definition editor, an Excel UDF sample, great workflow samples, and lots more.

Windows SharePoint Services (WSS) 3.0 Software Development Kit (SDK) [Read it online]
The MOSS SDK contains this so you don’t need both. If you only do WSS development, then you only need the WSS SDK.

Red Gate .NET Reflector (was Lutz Roeder’s Reflector)

One of the best .NET tools ever, and the way you’ll browse object models and cut the class-assembly strings you’ll need to paste into your manifests and web.config. “Reflector is a class browser, explorer, analyzer and documentation viewer for .NET. Reflector allows you to view, navigate, search, decompile and analyze .NET assemblies in C#, Visual Basic and IL.”

SharePoint Manager 2007
The best SharePoint management tool there is. Browse the complete object model, deactivate features, and even update object properties. You do need to be careful with this one, but wow it’s powerful.

Office System Professional Plus Edition
Grab your disc, MSDN, or get the evaluation version. The Professional Plus edition includes Word, Excel, Outlook and PowerPoint plus: Access, Publisher and InfoPath. There is also an Enterprise edition which also includes OneNote and Groove.

SharePoint Designer (SPD)
Grab your disc, MSDN, or get the evaluation version.

Visual Studio 2005 or 2008
Grab your disc, MSDN, or get the evaluation version. I prefer either VS Professional or VSTS Developer Edition.

Visual Studio 2005 Extensions for .NET Framework 3.0 (Workflow Foundation)

Not required with VS 2008 where these features are baked-in. Design Windows Workflow Foundation solutions for SharePoint and other .NET applications.

Visual Studio 2005 Tools for the 2007 Microsoft Office System (VSTO)
VSTO is used to build: Office System (Word, Excel, etc.) Add-ins and Ribbon elements, Outlook forms, and InfoPath templates.

Other Visual Studio Extensions. Optional extensions are available unrelated to SharePoint, though you should know they exist if you do other .NET development.

Virtual PC 2007

This is where you will build all those beautiful webs! VMWare is a popular alternative.

SQL Server Express Edition
You may want SQL Express if you develop more than SharePoint and need a local data store. If not, it is built into the SharePoint standalone install so you do not need to download or install it locally.

 

Optional

Fiddler HTTP Debugger
Optional and strongly recommended. Inspect and manipulate HTTP traffic between your browser and the server, great for debugging forms and web services, determining whether Kerberos tokens are being generated, and more.

Internet Explorer Developer Toolbar
The IE Developer Toolbar is optional, but recommended. Inspect HTML source, style usage, IFRAME content, image locations, and more.

PowerShell (formerly Monad). [SharePoint Provider] [Script Repository]
PowerShell is optional, but recommended. Write scripts to automate administration and configuration tasks. Colin Byrne has posts to get you started: PowerShell and SharePoint, Build Me A Portal, and Upload a Directory in 4 Lines.

BDC Metadata Manager 
Generate BDC XML from SQL data sources. The commercial version also builds definitions for web services. An alternative is baked into the MOSS SDK, but BDC Metaman will continue to be the gold standard.

Visual Studio 2005 Extensions for Windows SharePoint Services 3.0 (VSeWSS)
Not recommended. VSeWSS contains nothing to help you deploy features on anything but the machine running VS, does not support x64, and is required to open projects that it creates. So if you create a project today on a 32-bit machine, you will be unable to open it in a year when you’re building on 64-bit. This is bad. The one good feature included is the SharePoint Solution Generator (SPSolGen) which converts lists and sites “Saved as Template” into list and site definitions. [Learn more here] [Registry hack to install VSeWSS to a machine that is not the server]

 

 Required to create a private LAN between the client and server

 

Microsoft Loopback Adapter

a.       Click Start, Control Panel, and open the Add Hardware wizard.

b.      Click Next. Wait a moment while the wizard scans for hardware.

c.       Select: Yes, I have already connected the hardware, click Next.

d.      Scroll to the bottom of the list and select Add a new hardware device. Click Next.

e.      Select: Install the hardware that I manually select from a list (Advanced). Click Next.

f.        Select: Network adapters. Select: Microsoft. Select: Microsoft Loopback Adapter.

g.       Click Next. Click Next again. Wait a moment. Click Finish.

Configure the Loopback Adapter

h.      Click Start, Control Panel, and open the Network Connections utility.

i.         Right-click the Microsoft Loopback Adapter connection and select Properties.

j.        Double-click Internet Protocol (TCP/IP).

k.       Now configure an address for this adapter.
Select: Use the following address
IP Address: 10.50.50.1
Subnet mask: 255.255.255.0
Default gateway:
You can ignore DNS. Click OK. Click OK again.

 

Building the Server: Articles

Bob Fox explains step-by-step how to install Windows 2003 to Virtual PC and VMWare (up to the point where you install the OS).

Bob Fox explains good habits on re-using your base image for several implementations, and why you might need to add servers to the farm (e.g. for Exchange).

How to Create a MOSS 2007 VPC Image. This step-by-step series with screenshots by Tony Zink is as complete as complete can be and starts with configuration of IIS. Note that he puts SPD and Office on the server, while the goal of this post is to keep your server clean of client apps.

Microsoft Guidance on Standalone and Farm configurations.

Kevin Hoffman explains how to build a Standalone SharePoint server. He installs Visual Studio to the server, you can skip that step and run it locally on your development machine.

Jonathan Bradshaw explains how to build a Small Farm configuration with SQL and AD on a separate machine. His “OfficeDev” machine looks the most like our local development machine. One day someone will write an article with configuration steps, until then this is a good start.

 

Building the Server: Step-by-Step

Step 1: Install the Operating System

Windows 2003 Server R2. Grab your disc, MSDN, or get the evaluation version. Bring the machine up-to-date with Windows Update. Note that  this process can last several hours.

 

Step 2: Configure Networking

R. Aaron Zupancic describes how to configure an IP address and host file entry so you can surf your virtual SharePoint sites from your development machine.

Simon Guest describes how to get all the machines in a virtual farm to talk to each other. In this configuration, while your virtual machines will see each other, your local machine will not be able to surf or debug the virtual machines.

Note that if you can join your virtual machine to your company’s domain and create domain accounts there (but different accounts than you will use for testing or production), it will simplify configuration and debugging, and you won’t need to make this or any machine in your development farm an Active Directory domain controller (DC). The drawback is that you need to be connected to the domain to get any work done.

 

Step 3: Install the .NET Framework

.Net Framework 3.0
WPF, WCF, and essential to SharePoint: Workflow.

Once activated and configured, Shut Down and back up your base server image. In the next steps you’ll prepare this machine for a specific purpose.

 

Step 4: Install Active Directory and DNS.

If this is going to be a Standalone configuration, you need a domain controller (DC). The Configure Your Server Wizard (Start, Administrative Tools) is a great way to assign roles to a server. Start with Domain Controller (Active Directory) and DNS.

If this is going to be a Small Farm, copy your base server image from the last step, and start building a second machine to host Active Directory and SQL Server. Note that after you install SharePoint you will not be able to make the machine a domain controller (unless you’re prepared for a world of hurt).

 

Step 5: Install Internet Information Server (IIS)

Once again, the Configure Your Server Wizard (Start, Administrative Tools) is an easy way to add the Application Server role to your VM.

Once IIS is installed, you will need to Allow ASP.NET 2.0.* in the Web Server Extensions section of the IIS Manager. If this option is not available, you may need to run the ASP.NET 2.0 setup and Repair your installation, which also sets the Allow flag.

 

Step 6: Install SQL Server

SQL Server Developer Edition [Google]
This is optional. If you don’t install it, Express Edition will be installed when you install SharePoint. However, Developer Edition includes the excellent SQL Server Management Studio, so if you have MSDN you may prefer it. For a production environment you will need to license SQL Server Standard or Enterprise Edition.

 

Step 7: Install SharePoint (WSS or MOSS)

Windows SharePoint Services (WSS) 3.0
WSS is a free extension to Windows Server. If your installation didn’t include WSS as an option, you can download now. If installing MOSS, then you do not need to separately install WSS. Also remember that you can upgrade a server, but you cannot downgrade from MOSS back to WSS. If you’re evaluating SharePoint you may want to start with WSS.

If you installed SQL Server Developer Edition, choose Advanced Installation to select your database.

Install the WSS Service Pack.  

Microsoft Office SharePoint Server (MOSS) 2007
Grab your disc or MSDN, or get the evaluation version. Standard and Enterprise editions exist, so again keep in mind that you can upgrade but not downgrade. Enterprise includes Forms Server and the BDC. 

Install the Office SharePoint Server Service Pack. [SP1]

Shut down and back up your virtual machine image(s). 

 

Step 8: Configure SharePoint

Create a domain group for SharePoint Administrators, assign rights to it rather than any single account. The exception will be configuring SQL Server, where rights buried inside groups aren’t always resolved and you need to assign permissions per-account.  

Create an account to use as your SharePoint Service account (e.g. SPService). Configure this to be your Application Pool identity (you’ll need to search what rights are required until I complete this section).

Create a content crawler account (you’ll need to search what rights are required until I complete this section).

Create a developer account with the same name as the account you use on your development machine (and it better not be Administrator). Add your developer account to the Administrators group (Global Administrators if this is a DC, local Administrators if not) and Debugger Users group.

Create a typical end-user account for testing. Make it a member of Domain Users.

 

Step 9: Configure the server for Development

If you must develop on the server, install Visual Studio now. On one side, developing locally is simpler than developing remotely. On the other side, it’s so handy to keep all your code in one place and you won’t ever wonder where the most recent version of x is residing. If you really can’t get the hang of remote debugging, you can always install VS later.

Open up File Explorer on the server and Add to Favorites your frequently-used paths including the 12 hive and the default web root.
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\
C:\inetpub\wwwroot\

Backup the 12 hive into a zip file marked as read-only, and named “[Drive]:\Backups\12Hive-Out-of-Box-DoNotUpdate.zip”. You get the idea. When you accidentally edit a default ONET.XML file with WordPad and kill your site you will be glad you did.

And finally, make a text file on your desktop with Joubin’s SharePoint paths.

 

Step 10: Configure remote debugging.

Once SharePoint is installed, share the folder with SharePoint’s assemblies (*.DLL). You may also want to copy the assemblies to your development machine:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI

Share the server’s web root and enable Read/Write.
C:\inetpub\wwwroot\

Install the Visual Studio 2005 Debugging Components to the server. You want Full Remote Debugging, not Native Remote Debugging.

Follow Ross Dargan’s instructions on configuring remote debugging. You’ve just completed his step 1 and if you created your developer account as specified then you’ve also done 2 and 3.

Take a look at Andrew Noon’s document on Remote Debugging SharePoint Web Parts. He has additional steps for enabling error messages in web.config and screen shots that show what debugging looks like in action.

Read: Setup Remote Debugging

Read: Debugging SharePoint Web Parts

 

Acknowledgements

Thanks to the MOSS MVPs for suggesting ways to improve this post.

Thomas Lloyd was one of the first people to build minimal servers, and he’s always got great new gadgets like eSATA drives.

 

 

Updates

2007-03-02 Rearranged and added sections in a major overhaul of this post.

2008-02-27 Added a section for optional utilities, added references to VS 2008 and the service packs, added SharePoint manager 2007, rewrote parts of the introduction.

 2008-11-04 Updated links to Reflector and others, added caveat for .NET 3.5 SP1, and minor text corrections.

Published Friday, February 23, 2007 5:47 PM by erobillard Filed under: , , , , ,

http://www.cnblogs.com/team/SharePointTeam.html

June 28, 2009

SharePoint Development Improves in Visual Studio 2010

June 27, 2009

Jason Zander, General Manager for Visual Studio, recently announced Visual Studio 2010 Tools for Sharepoint. The focus of the tooling is to automate tedious tasks, enhance the debugging experience, and provide a GUI surface for visually exploring deployment and feature packaging.

This enhanced tool support has been long-awaited by SharePoint developers. These tools will replace the much-derided SharePoint Designer, a descendant of MS FrontPage. Many within the .NET community view inadequate tool support and poor developer experience as the last major hurdles for SharePoint to overcome. If the VS 2010 Tools for SharePoint deliver on their promise, many expect MOSS, Microsoft Office SharePoint Server, to become the predominant web application framework within Microsoft IT departments and an increasingly prevalent choice for public-facing .NET websites. Certainly, with increased Visual Studio integration, traditional .NET developers will find it easier to use the OS-embedded Windows SharePoint Services, which is the foundation for MOSS.

Items addressed in Zander’s TechEd EMEA keynote:

  • Building and DebuggingVisual Studio will be able to building and debug SharePoint projects. “F5 Just Works!”
  • Server Explorer IntegrationSharePoint Connections will be an option in the VS Server Explorer. Standard Sharepoint artifacts will be viewable: ContentTypes, Features, Templates, Lists, Sites, Workflows, Workspaces. Direct manipulation of some artifact attributes will be supported through VS property grid integration.
  • Windows SharePoint Services Project (WSP) ImportThis will automate the manual task of creating Windows SharePoint Services solution package files. Previously, to create a solution package file, a developer had to use the Makecab.exe console application that is included in the Microsoft Cabinet Software Development Kit (SDK). Makecab.exe requires specifying the Diamond Directive File (.ddf) that contains a list of all the files to include in the package. Much of this will be automated.
  • Visual Web Part DesignerA new WSYWIG designer will exist for authoring Web Parts. The designer will also load a user control as a web part for SharePoint. This seems to be a more tightly integrated version of the widely-used SmartPart, which is a Web Part that allows hosting of ASP.NET User Controls in SharePoint.
  • Event Receiver WizardAdding Event Receivers and connecting them to Sources can be done visually through a wizard.
  • Workflow IntegrationA new ASPX Workflow Initiation form for Workflow Project will be added. Workflow initiation forms will have a visual designer.
  • Packaging EditorA new Packaging Explorer will exist that supports editing Packaging and structuring the SharePoint Features and WSP file.

Channel 9 also has an interview with Reza Chitsaz, Senior Program Manager working on Office and Sharepoint tooling. In this interview, Reza discusses his team’s mission for improving the SharePoint development experience:

[Paraphrased]

SharePoint is on version 4.0. The VS 2010 Tools for SharePoint is a version 1.0 product, which means we’ll be forced to prioritize some features and leave some features for next version.

The overarching goal for this team is to make sharepoint development more approachable, to make it easy for any type of developer to come into Visual Studio and start building custom SharePoint applications.

We’re focusing on tooling to improve the “F5 experience.” Just go into VS, create your project, use VS tools to create a SharePoint artifact, hit F5, and the rest is automated: building the project, deploying to SharePoint, attaching the debugger, etc. We want to put the developer in a place where they easily test their code and debug their application.

Reza also shows a demo with more details. He specifically highlights “GUID matching across multiple files,” Application Pool Recycling, and MSBuild support as items they are working to automate. He also shows the new VS Project Templates available in VB.NET and C#:

  • Blank Site Definition
  • Content Type
  • List Definition
  • State Machine Workflow
  • WSP Import
  • Business Data Catalog
  • Deployment Module
  • Event Receiver
  • Sequential Workflow
  • Web Part

There are no release dates set for when the tools will be available. A VS 2010 CTP is available, but the SharePoint tools are not included as indicated on the Channel 9 forums by Christin Boyd, Program Manager on the Visual Studio team:

The new features Reza describes in this video will not be in the VS 2010 CTP, nor in the Beta 1 build. This video was a real “sneak peek” at the future.

RelatedVendorContent

Rapidly Resolve performance problems across the Software Application Lifecycle

The Future of Software Delivery According to visionaries Grady Booch & Erich Gamma

NEW: ANTS Memory Profiler 5 just released!

5 Ways to Ensure Application Performance

Server Gated Cryptography

gauge

June 25, 2009

This document contains information concerning Dundas Gauge for SharePoint – Microsoft Office SharePoint Server 2007 Edition. Please read this document thoroughly before attempting to use the Gauge web part control.

Introduction

Platform Requirements

Deploying Gauge WebPart To New WebApplication Instances

Activating Dundas Gauge For SharePoint On The SharePoint Web Site

Adding The Dundas Gauge Web Part To A Web Site Gallery

A Note About SharePoint Server Farms

Uninstallation

Support


Introduction

Developed for Microsoft Office SharePoint Server (MOSS), this fully-managed Gauge web part takes the use of gauges to a whole new level. Incredible design-time support allows you to quickly create sensational looking Gauges with a minimal amount of effort. A lot of time and energy has been invested in making sure that this Gauge control is as easy, and as flexible to use as possible so you can get up and running in minutes.

 Top


Platform Requirements

    Microsoft Office SharePoint Server 2007

Top


Deploying Gauge WebPart To New WebApplication Instances

In order to deploy this web part to a newly created web application, you will need to run the GaugeMSSInstaller.exe installation file. This application can be found in the InstallDir\Tools directory.

Typically this directory is found at the following location on your machine:

    Program Files\Dundas Software\Gauge\SharePoint\Tools\GaugeMSSInstaller.exe

The GaugeMSSInstaller application will display a dialog where you must specify a location for the Source Package Directory, and where you must then click on the Install button to get things started.

The default folder location is set to:

    Program Files\Dundas Software\Gauge\SharePoint\Bin

Top


Activating Dundas Gauge For SharePoint On The SharePoint Web Site.

Since the Dundas Gauge for SharePoint web part is installed on your SharePoint server as a feature, this allows site administrators to quickly enable or disable this web part on their SharePoint sites as required. The Dundas Gauge for SharePoint web part is activated automatically upon installation, however, if you find that it has been deactivated, then follow the steps shown below to manually reactivate it.

To manually activate the Dundas Gauge for SharePoint web part, follow these steps:

  1. Go to the Home page of the SharePoint site.
  2. Choose Site Actions to open the dropdown menu.
  3. Select Site Settings.
  4. Select Modify All Site Settings.
  5. In the Site Settings screen, click on the Site Collection Features option that is found in the Site Collection Administration section of the page.
  6. Find the Dundas Gauge Web Part in the list of available features, and click on the Activate button.

Once you have successfully activated the Dundas Gauge for SharePoint web part, you will be able to add it to all of the sites as desired.

Top


Adding The Dundas Gauge for SharePoint Web Part To A Web Site Gallery

Once the Dundas Gauge for SharePoint installation process has completed, then the web part should be visible in the Add New Web Part dialog screen. This screen is where you will go to add new web parts to your SharePoint projects.

The installation process should have automatically activated the web part for use. However if the web part is not activated, then you may have to manually activate it prior to using it in any SharePoint project.

Follow these steps to manually activate the Dundas Gauge for SharePoint web part:

  1. Proceed to the Home page of your SharePoint web site.
  2. Choose Site Actions from the dropdown menu.
  3. Select Site Settings, and in the fly-out menu choose Modify All Site Settings to go to the Site Settings screen.
  4. In the Site Settings screen, go to the Galleries heading, and under there choose Web Parts to go to the Web Parts Gallery screen.
  5. In the Web Parts Gallery screen, click on the New button to go to the Web Parts Gallery: New Web Parts screen.
  6. In the Web Parts Gallery: New Web Parts screen, put a check in the Dundas.SharePoint.Gauge.WebParts.GaugeWebPart, and click on the Populate button.
  7. The GaugeWebPart.webpart will be added to the web site’s web part list.

Once the web part has been activated, then it will be available in the Add New Web Part dialog.

Top


A Note About SharePoint Server Farms

When using this product in a server farm, the installation program must be run on every front-end server handling requests. This will insure that the correct DLLs and needed entries are all in place as required to use the product.

 Top


Uninstallation

Use Windows Control Panel’s Add/Remove Programs utility to un-install the samples and the Gauge web part control.

Top


Dundas Gauge for SharePoint Support

All of our products include 60 days live technical support. Our support staff are available from Monday to Friday, 9 AM to 6 PM Eastern Standard Time (EST) and can be contacted at 416-467-9100 or at support@dundas.com.

Top

dundas

June 25, 2009

Dundas Chart for SharePoint

This document contains information about Dundas Chart for SharePoint – Microsoft Office SharePoint Server 2007 Edition. Please read this document thoroughly before attempting to use the charting web part control.

Developed for Microsoft Office SharePoint Server (MOSS), this fully-managed charting web part control takes charting to a whole new level. Dundas Chart for SharePoint provides extensive functionality and abilities that go far beyond the native SharePoint chart available in Microsoft Office SharePoint Server. Incredible design-time support lets you quickly create sensational charts with a minimal amount of effort. A lot of time and energy has been invested in making this charting control as easy and as flexible as possible so you can get things up and running in minutes.

Platform Requirements

  • Microsoft Office SharePoint Server 2007

→ Top

Deploying ChartWebPart to new Web Application Instances

To deploy this web part to a newly created web application, you will need to run the ChartMSSInstaller.exe installation file. This application can be found in the InstallDir\Tools directory.

Typically this directory is found in:

  • C:\Program Files\Dundas Software\Charting\SharePoint\Tools\ChartMSSInstaller.exe

The ChartMSSInstaller.exe application displays a dialog where you must specify a location for the Source Package Directory. Click the Install button to get things started.

The default folder location is set to:

  • C:\Program Files\Dundas Software\Charting\SharePoint\Bin

→ Top

Activating Dundas Chart for SharePoint on the SharePoint Web Site

The Dundas Chart for SharePoint web part is installed on your SharePoint server as a feature, letting site administrators quickly enable or disable the web part as required. The Dundas Chart for SharePoint web part is activated automatically upon installation.

To manually activate the Dundas Chart for SharePoint web part:

  1. On the SharePoint site’s My Site page, click Site Actions to open the drop-down menu.
  2. Click Site Settings to display the SharePoint site settings page.
  3. Click the Site Collection Features option in the Site Collection Administration section.
  4. Click the Activate button next to the Dundas Chart Web Part in the list of available features.

Once the Dundas Chart for SharePoint web part is activated, you can add it to all of the desired sites.

→ Top

Adding the Dundas Chart for SharePoint Web Part to a Web Site Gallery

After installing Dundas Chart for SharePoint the web part will be visible in the Add New Web Part dialog. This is where you will go to add new web parts to your SharePoint projects.

Adding Chart to the main site

If the Dundas Chart Web Part isn’t in the Add New Web Part dialog, manually activate it:

  1. On the SharePoint site’s home page, click Site Actions to open the drop-down menu.
  2. Choose Site Actions from the drop-down menu.
  3. Click Site Settings, then Modify All Site Settings to display the SharePoint site settings page.
  4. Click the Galleries heading, then choose Web Parts to go to the Web Parts Gallery page.
  5. Click the New button to go to the Web Parts Gallery: New Web Parts page.
  6. Check the Dundas.SharePoint.Charting.WebParts.ChartWebPart entry, then click the Populate button.ChartWebPart.webpart is added to the web site’s web part list.

Once the web part has been activated it will be available in the Add New Web Part dialog.

→ Top

Adding Chart to a subsite

If the Dundas Chart Web Part isn’t in the Add New Web Part dialog, manually activate it:

  1. On the SharePoint site’s My Site page, click Site Actions to open the drop-down menu.
  2. Click Site Settings to display the SharePoint site settings page.
  3. Click the Galleries heading, then choose Web Parts to go to the Web Parts Gallery page.
  4. Click the New button to go to the Web Parts Gallery: New Web Parts page.
  5. Check the Dundas.SharePoint.Charting.WebParts.ChartWebPart entry, then click the Populate button.ChartWebPart.webpart is added to the web site’s web part list.

Once the web part has been activated it will be available in the Add New Web Part dialog.

→ Top

Disabling the Code Editor

You may want to disable the Code Editor for some sites; this is possible by editing the configuration file.

To disable the Code Editor:

  1. Locate your site’s app.config file, located in the web server extensions directrory.For example, C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\Dundas\Charting\WebUI\app.config.

    Note that the exact path may be different for your SharePoint installation.

  2. Open the app.config using a text editor such as Notepad.This file is an XML configuration file, much like IIS’ web.config file.
  3. In the appSettings element, either add a CodeEditorOn key set to false, or change the existing one:
    <add key="CodeEditorOn" value="false"/>
  4. Save the app.config file.
  5. Restart IIS to load the changed configuration settings.

→ Top

A Note About SharePoint Server Farms

When using Dundas Chart for SharePoint in a server farm, you must run the installation program on every front-end server handling requests. This will ensure that the correct DLLs and needed entries are in place.

→ Top

Uninstallation

Use the Windows Control Panel’s Add/Remove Programs utility to uninstall Dundas Chart for SharePoint.

→ Top

Dundas Chart for SharePoint Support

All Dundas products include 60 days of live technical support. Our support staff are available during regular office hours from Monday to Friday, 9 AM to 6 PM Eastern Time, and can be contacted at 416-467-9100 or by email at support@dundas.com.

The Dundas Support site also contains online documentation and helpful support articles that can help answer your questions.

→ Top

Dundas Support Home | Contact Us | Dundas Corporate Home

All content Copyright © 2008 Dundas Data Visualization, Inc.. All rights reserved. Microsoft®, Visual Studio®, and SharePoint® are registered trademarks of Microsoft Corporation in the United States and other countries.

怎样更方便的创建SharePoint解决方案包?

June 19, 2009

怎样更方便的创建SharePoint解决方案包?

在回答这个仁者见仁的问题之前,我先来解释一下什么是SharePoint解决方案包(Solution Pack)。

在SharePoint上做开发时,我们会发现,所开发的某个功能或某套功能基本都可以分为如下几个方面:

1、特定化的SharePoint列表模板及其实例

SharePoint提供了非常灵活的数据存储容器:列表,所以我们经常借助这些列表(或文档库)来实现我们的功能。

而且,有的时候我们正在开发的功能就是用来管理某些列表或文档库的。

2、特定化的网站模板

有可能我们所开发的功能非常大,所以需要一个特殊的SharePoint网站来呈现。

3、Web部件

我们可以把功能特定的Web部件放到需要的页面上,以此来拼装呈现给用户的最终UI。

4、事件处理程序

除了用Web部件来与用户进行UI的交互之外,我们可能还需要监控网站数据的变化,所以事件处理程序有时也不可缺少。

5、自定义的操作

SharePoint在自己的界面上提供了大量的管理操作按钮、菜单、链接,我们开发的内容也可能需要在其中加载自己的操作。

6、其他的种种…………

综上,可以看到,一套自己开发的SharePoint解决方案可能包含各种各样的内容:功能(这个功能指的就是SharePoint的“功能”了, 也就是Feature),程序集,Web部件属性说明文件,列表或网站模板等等等等。如何把这一大堆内容一次性安装到SharePoint环境中,而不必 一个一个的部署呢?

答案就是:SharePoint解决方案包(SharePoint Solution Pack)

一个SharePoint解决方案包就是一个后缀为.wsp的文件,这个文件其实就是一个.cab文件,里面包括了前面提到的一个大功能所包含的所有小方面。

部署的时候,只需要执行命令行操作:

stsadm -o addsolution -filename <path>\YourSolution.wsp

这个解决方案包就被添加到SharePoint服务器场上了

我们再进入SharePoint管理中心,在“操作”选项卡中选择“解决方案管理”,就可以对这个解决方案进行最终部署,部署后,所有里面包含的功能和程序就都发布到SharePoint网站中了。非常非常的方便。

于是,回到了本文标题的问题,如何把我们的开发工程打包成一个SharePoint解决方案包,生成出这个.wsp文件呢?

方法有很多,我以前经常参考的方法是Andrew的方式,利用VS2005和makecab.exe生成wsp文件:

http://www.andrewconnell.com/blog/articles/UsingVisualStudioAndMsBuildToCreateWssSolutions.aspx

但这种方式略为复杂了一些。

杜伟经常用的方法是自己写那堆配置文件,或者借助某些第三方cab生成工具进行打包。

但这都无法避免去直接操作那些并不复杂但有些繁琐的xml文件。

昨天,我百无聊赖地随便乱搜,找到了刚刚发布不久的一个开源命令行工具WSPBuilder,它的作者是Carsten Keutmann(不过好像SharePointBlogs连同SharePointu一起挂掉了)

今天试了一把,非常好用。借助这个命令行工具,你只需要把你的解决方案中涉及到的所有文件都按最终部署路径排好,然后运行这个命令行程序,wsp文件就会自动生成出来。

举例如下:

我开发了一个小功能,里面涉及到一个Web部件和一个自定义了字段的列表。

首先把Web部件的dll编译好,以及描述这个Web部件属性webpart文件准备好。

然后制作出能够自动生成出这个自定义列表的Feature(这个过程我会在下一篇博客文章中介绍给大家)

打包过程如下:

1、创建了一个文件夹名为“FavouriteResult”。

2、在这个文件夹下面创建了“12”和“80”目录。

3、在“80”目录下,我放置了带有上述dll的bin目录,和带有webpart文件的wpcatalog目录。

4、在“12”目录下,创建“Template\Features”路径,并把我自己开发的Feature放在这个路径里。

5、把WSPBuilder工具的两个文件(一个exe,一个dll)拷贝到FavouriteResult文件夹里。

6、双击WSPBuilder.exe。

7、我需要的wsp文件就生成出来了。

.

接下来的操作就是用命令行添加这个wsp文件,再在管理中心里部署这个Solution了。

注意,由于这个命令行工具是个老外开发的(好像是德国的),所以,用来生成wsp文件的这个路径(在这个例子里就是FavouriteResult文件夹)不能夹杂中文。不过这是一个开源项目,有兴趣的话,你也可以给完善一把。

总之,这个程序是我最近遇到的最棒的SharePoint工具,大家如果有需要制作SharePoint解决方案包的话,不妨试一试。

best SP

June 19, 2009

http://www.andrewconnell.com/blog/articles/UsingVisualStudioAndMsBuildToCreateWssSolutions.aspx