Você está na página 1de 11

V is u a l S tu d io E x te n s io n s fo r S h a re P o in t S e rv ic e s (V S E W S S ) 1 .

3
2 0 0 9 M ic ro s o ft C o rp o ra tio n . A ll rig h ts re s e rv e d . This is the release notes updated for the March 2009 CTP (Community Technology Preview) release of VSeWSS v1.3.
If you need the previous full release v1.2 for Visual Studio 2008 it is available here: http://www.microsoft.com/downloads/details.aspx?familyid=7BF65B28-06E2-4E87-9BAD086E32185E68&displaylang=en If you need the extensions for Visual Studio 2005 it is available here: http://www.microsoft.com/downloads/details.aspx?familyid=3E1DCCCD-1CCA-433A-BB4D97B96BF7AB63&displaylang=en

IMPORTANT GETTING STARTED NOTES

Previous versions of VSeWSS will need to be uninstalled prior to installing VSeWSS 1.3.

Windows Communication Foundation HTTP Activation must be enabled on the server. If the script maps for WCF are not installed you may receive the error System.ServiceModel.ProtocolException The content type text/xml; charset=utf-8; of the response message does not match the content type of the binding (text/xml; charset=utf-8)

See the following for troubleshooting WCF Registration problems http://msdn.microsoft.com/enus/library/ms752252.aspx

If not already configured NTLM must be enabled on the IIS server. See the following for instructions on how to enable it: http://support.microsoft.com/kb/215383

VSeWSS 1.3 includes a web service that needs to run as a member of the local Administrators group. The web service is used by the Visual Studio extension to communicate with SharePoint and is restricted to local connections only. As a security precaution the installer does not add the account running the web service to the local Administrators group. You must do it. If you select the default during install the web service is run under the account that SharePoint Central Administration runs as. To do this: 1) Run Internet Information Services (IIS) Manager to look up the account name 2) Run Computer Manager to edit the Administrators group and add the account 3) If you choose to create a custom user and application pool o To Create a custom user and custom application pool for Server 2008 Create a new account using Computer Management in Administrative tools Add the new account to the following local groups: o o o Administrators IIS_IUSRS Users

o o o o

WSS_ADMIN_WPG WSS_RESTRICTED_WPG WSS_WPG SQLServer2005MSSQLUser$ - Unique on your machine created for SQL Server access

Use an administrative command prompt: ASPNET_REGIIS ga DOMAIN\USER Use Internet Information Services (IIS) Manager from Administrative Tools Create a new Application Pool called VSeWSS and enter the new account and password to run it Select the VSeWSS Site and right click on the site and choose Manage Web Site and the sub menu Advanced Settings. In this dialog you can choose the new Application Pool.

To Create a custom user and custom application pool for Server 2003 Create a new account using Computer Management in Administrative tools Add the new account to the following groups o o o o o o Administrators IIS_WPG WSS_ADMIN_WPG WSS_RESTRICTED_WPG WSS_WPG SQLServer2005MSSQLUser$ - Unique on your machine created for SQL Server access

Use an administrative command prompt: ASPNET_REGIIS ga DOMAIN\USER Use Internet Information Services (IIS) Manager from Administrative Tools Create a new Application Pool called VSeWSS and enter the new account and password to run it Select the VSeWSS Site and right click on the site and choose properties. Go to the Home Page tab and select the newly created app pool.

We recommend using VSeWSS with Visual Studio 2008 SP1. 2 FEEDBACK

You can submit feedback for this CTP on the SharePoint Community Connect site: https://connect.microsoft.com/site/sitehome.aspx?SiteID=428

V is u a l S tu d io E x te n s io n s fo r S h a re P o in t S e rv ic e s (V S E W S S ) 1 .3
2 0 0 9 M ic ro s o ft C o rp o ra tio n . A ll rig h ts re s e rv e d .
You can discuss this CTP on the SharePoint Developer MSDN Forum: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/threads/

NEW FEATURES IN THIS RELEASE

These are features added in v1.3 which were not available in v1.2 or v1.1. Support for developing and deploying on 64 bit (x64). New menu commands within Visual Studio o o o Package - package the solution but does not deploy. Retract - retracts and deletes the active solution from SharePoint. Quick Deploy Copy to 12 - copies template files, modules to the 12 Hive. Copy Binarie(s) - deploys only the assemblies. Copy Both Recycle Application Pool Attach to IIS Worker Processes

WSP View Improvements (Create New Feature) o o o o Allows specify feature scope (Web, Site, Web Application, Farm) Allows creation of a feature receiver Option to automatically create elements.xml with new feature Elements can be dragged from one feature to another

Build Commands Updates o o Package command added to Visual Studio IDE and command line. Retract command added to Visual Studio IDE and command line.

1) Command line operation is as follows: devenv.exe <Project.csproj or Solution.sln and other usual flags> /deploy Debug devenv.exe <Project.csproj or Solution.sln and other usual flags> /deploy Debug /package devenv.exe <Project.csproj or Solution.sln and other usual flags> /deploy Debug /retract Note that with the /package and /retract flags the /deploy flag is required. CTRL-F5 no longer launches the debugger. Use F5 to launch the debugger. CTRL-F5 will just launch the web browser and show the SharePoint site. SharePoint Solution Generator Enhancements

Export from publishing sites. Note that round tripping of generated sites is not supported for anything but the simplest of sites. Instead some editing may be required.

Correct VB and C# Inconsistency Correction o VB VSeWSS projects no longer use VSeWSS as the root namespace

New Item Templates for RootFiles o Create a <RootFiles> item from template.

Web Part Item Template Improvements o Allows selection of deployment model to the global assembly cache (GAC) or to the \BIN directory. For /BIN deployment a simple Code Access Security permissions set is provided.

Easier Web Part Project Item Rename o Detect web part rename and modify dependent files

Support for deploying dependant assemblies added as a reference with CopyLocal=true. o VSeWSS now checks for any "CopyLocal=true" reference and incorporates this binary in the manifest. The binary is added to the manifest with a DeploymentTarget matching the first binary found in the manifest, usually the project target binary. Subsequent changes to "CopyLocal", or removing a binary altogether will correctly be cleaned up when rebuilding the manifest (either through WSP view or through a deployment command). Changes to the DeploymentTarget can be made by editing the manifest.

Improved solution validation during full deployment Validation Logging o Adding the element <add key="IfLog" value="true" /> to the <appSettings> node of your web.config will turn on validation logging. Logging occurs during a full deployment from a VSeWSS project and can be used for diagnostic purposes. Note: The log location will be noted on the build output window."

Conflict resolution dialog when deploying from within Visual Studio o Duplicate Features: If a feature with the same name as a feature you are trying to deploy is already on the server a dialog will give you the choice of uninstalling the existing feature first. If the feature was deployed via WSP the entire solution is retracted. If the feature was manually installed it will be deactivated then uninstalled. Duplicate Site Definition Folders: Site definition folder is the same as 12/Templates/SiteTemplates or the WebTemp folder already exists. The option to delete the deployed folder is available. RootFiles and Templates: If there is a RootFile or Template with the same name the option to delete the files first is given. Solutions: If a solution with the same name exists on the server (possibly unique solution IDs) the option is given to retract and delete the existing solution.

o o

The List Definition from Content Type template now allows for the creation of a List Definition Event Receiver.

V is u a l S tu d io E x te n s io n s fo r S h a re P o in t S e rv ic e s (V S E W S S ) 1 .3
2 0 0 9 M ic ro s o ft C o rp o ra tio n . A ll rig h ts re s e rv e d .
4 KNOWN ISSUES AND WORKAROUNDS

This is not a final release. Here are the known issues and how to avoid them where possible. Insufficient logging in Access Denied error o The VSeWSS Application Pool account may also need to be configured as a member of the Site Collection Administrators group. To configure this browse to http://YourSiteCollection/_layouts/mngsiteadmin.aspx and specify the Application Pool account.

Changing the ID of a web part feature may cause duplicate features to be displayed in WSP view upon refresh. o To change the ID of a feature you must update the feature ID in the solution.xml and feature.xml files. To modify the solution.xml click the "Show All Files" toolbar option in Solution Explorer. Expand pkg and double click solution.xml and ensure the ID is the same in both files. Note: Not all features will be referenced in the solution.xml (those without Element Manifests are not). You only need to update the feature ID if it is present.

Custom Field Controls o During packaging additional XML configuration code will be added to the fldtypes_FieldControlName.xml file. To ensure the correct deployment of your field control you must add (if not already present) and Guid attribute to your SPField derived class.

Example: [Guid("f5627588-e216-402e-844f-f85a0db34aa5")] public class MyFC1Field : SPFieldText

After packaging your project you must modify the fldtytypes_FieldControlName.xml file and synchronize the following element with your class's Guid: <Field Name="FieldTypeClass">f5627588-e216-402e-844f-f85a0db34aa5</Field>

Field control items are not able to be deployed due to a GUID being inserted instead of the type in the XML o This is a known issue , you can manually add the correct entry which will result in two entries in the fldTypes*.xml file

Root file projects do not correctly deploy from the command line o This may happen with occasionally, you can deploy these project types from the Visual Studio UI

During deploy you may see the error System.Exception: Failed to retrieve property MSBuildProjectDirectory from project. Object reference not set to an instance of an object o Resolution: Confirm that the DTE80 files are registered. If these files are in another location, register them from that location instead.

regsvr32 "C:\Program Files\Common Files\Microsoft Shared\MSEnv\DTE80.OLB" regsvr32 "C:\Program Files\Common Files\Microsoft Shared\MSEnv\DTE80a.OLB"

Setting ActivateOnDefault=FALSE in your <Feature element is ignored. Your feature is activated anyways. o You could write a custom feature receiver that deactivates the feature on activation.

You may receive a security error when deploying when the application pool is running as a security restricted account. The error may read Microsoft.SharePoint.Tools.Utilities.VSeWSSServiceException: VSeWSS Service Error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) o Resolution: The easiest way to resolve this is to run the web service under the same application pool as the SharePoint Central Admin site, and adding this user to the local Administrators group. The description in section 1 explains how to configure a new account for this.

After selecting "Package" from within Visual Studio the status bar erroneously says "Deploy Succeeded". o The package was not deployed, it was just packaged but the output text doesnt change

You may see the message The template you have chosen is invalid or cannot be found. when exporting a collaboration site with SharePoint solution generator and creating a site after deploying. o Work around: This occurs when you export a site using SharePoint solution generator which includes GIF images. You need to manually extract those GIF images from SharePoint to the Visual Studio 2008 solution.

Recycle application pool may recycle the wrong application pool if there are multiple SharePoint Application Pools in use. o Work around: Recycle the correct application pool yourself.

If you cancel the wizard creating a new project for SharePoint templates the files already created are not removed. o Work around: Do not cancel the new project wizard, or delete the files yourself

WSP View fails to show newly added features or is inaccurate. This can occur because WSP View depends on metadata in the generated assembly. If the assembly is not built yet inconsistencies can occur.

V is u a l S tu d io E x te n s io n s fo r S h a re P o in t S e rv ic e s (V S E W S S ) 1 .3
2 0 0 9 M ic ro s o ft C o rp o ra tio n . A ll rig h ts re s e rv e d .
o Resolution: Build the assembly and try the WSP View again

You may receive an error after deploying a solution created by the SharePoint Solution Generator that contained custom web part pages. o SharePoint Solution Generator does not support exporting and importing custom web part pages.

You may receive an error after deploying a solution created by the SharePoint Solution Generator that contained a custom master page. o SharePoint Solution Generator does not support exporting and importing custom master pages.

Site definitions created from SharePoint Solution Generator that contain custom folders may have incorrect folder names on deployment. For example a custom folder named My Folder will have the name SiteDefinitionMyFolder on deployment. o Work around: Rename the folders manually

You may receive the following error The solution cannot be deployed. Directory DirName associated with feature FeatureID in the solution is used by feature FeatureID installed in the farm. All features must have unique directories to avoid overwriting files. When deploying a solution generated by SharePoint Solution Generator. This can occur if a feature with the same name as a feature being deployed by SharePoint Solution Generator is already installed. o Resolution: Use a new feature name in the generated solution or delete the original solution from the SharePoint server.

You may receive the error Directory Not Empty when building/packaging or deploying if the /bin/debug/solution cache directory is open by another process. o Resolution: Close the process (such as Explorer) that has the directory open.

If you rename a folder in WSP View it does not get renamed in the Solution Explorer. o Resolution: Switch to the Solution Explorer and also rename the folder there.

You may receive the error Value does not fall within the expected range. When deploying a SharePoint solution that also contains an ASP.NET Web Project. o Resolution: Use a separate Visual Studio solution for each of the ASP.NET and SharePoint projects.

You may receive multiple versions of your assembly installed in the GAC if you modify the version number in assemblyinfo.cs/vb and choose Quick Deploy -> Copy Binaries. o Resolution: If you would like the old version removed first use the retract command before you deploy.

SharePoint Solution Generator allows the user to overwrite an existing project if you specify name and path of an existing solution with the same name. Note the warning given An item with the specified name already exists. o Resolution: Change the name if you do not want the original project item to be overwritten.

After renaming a feature receiver you may receive an error or inconsistent behaviour such as your receiver not running after deploying. o Resolution: Run IISRESET

You may receive the error The language-neutral solution package was not found or Feature Feature Name (ID: Feature-Id) is already activated at scope http://server when deploying to SharePoint after the solution was retracted and deleted using central administration. o Resolution: Run setup u from the command line in your solutions /bin/debug folder. Then redeploy the solution through Visual Studio

The VSEWSS installation may fail if you use the back button and then go forward again during the installation wizard. o Work around: Restart the installer and dont press the back button

When starting SharePoint Solution Generator you may receive the following error This program requires Windows SharePoint Services o Resolution: This can occur for one of two reasons: If the registry key HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\SharePoint does not say Installed. If you are using the incorrect architecture x86 or x64 of SharePoint Solution Generator for the SharePoint installation

Why can I not see the SafeControls section in the manifest.xml? o Answer: This section is added automatically during WSP creation and can be found in the manifest that is left in the bin/Debug/solution directory.

During packaging you may get the error System.ServiceModel.ProtocolException Error: The content type text/html o Enable the Windows feature Windows Communication Foundation HTTP Activation in the Microsoft .NET Framework 3.5.1 section

You do not have Intellisense when modifying SharePoint related xml files. o o o Within Visual Studio 2008: Open the manifest (or any xml) file to enable the XML menu Click XML Menu > Schemas Add %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\wss.xsd

V is u a l S tu d io E x te n s io n s fo r S h a re P o in t S e rv ic e s (V S E W S S ) 1 .3
2 0 0 9 M ic ro s o ft C o rp o ra tio n . A ll rig h ts re s e rv e d .

You receive The yourWebPartName Web Part appears to be causing a problem or An unexpected error has occurred or another generic error message when developing a web part. o Exceptions are caught by SharePoint and a friendly error message is displayed instead of a stack trace. To display the full exception needed for debugging make the following changes to your SharePoint sites web.config file (C:\Inetpub\wwwroot\wss\VirtualDirectories\yoursite\web.config) and to the layouts web.config (C:\program files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\web.config). Find: <SafeMode CallStack=false /> Replace with: <SafeMode CallStack=true /> Find: <customErrors mode=On /> Replace with: <customErrors mode=Off /> Find: <compilation debug=false /> Replace with: <compilation debug=true />

During Packaging you see the error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. o This commonly happens if your SharePoint project references another project. Referenced projects are not supported. Instead of referencing another project, reference the compiled DLL from the project directly and it will get included.

Root file projects do not correctly deploy from the command line o This may happen with occasionally, you can deploy these project types from the Visual Studio UI

You cant get the SharePoint Workflow project templates working on x64 OS. o These templates shipped with Visual Studio 2008 and are not part of VSeWSS. They do not work on x64 OS.

The VSeWSS User Guide says to download the User Guide for VSeWSS 1.3 separately on the section titled Starting SharePoint Development with Visual Studio 2008 extensions for Windows SharePoint Services, version 1.3 o This link points to the VSeWSS 1.1 user guide which was separate to the VSeWSS tools. For VSeWSS 1.3 the user guide is included in the tool installer. This is an error in the user guide.

NOTES ON EXTENSIBILITY

Certain portions of the configuration files within a SharePoint solution are managed by VSeWSS and some are available for edit by advanced users. This section will identify what is available for direct editing and offer guidance for areas under the control of VSeWSS.

Configuration Files
Manifest.xml The deployment of assemblies is controlled by VSeWSS. To add an assembly to be deployed with your solution simply add a reference to the assembly. If CopyLocal=True on the reference properties the assembly will be automatically added to the <assemblies> section when you choose package or deploy. <Solution> element: You may modify the attributes DeploymentServerType and ResetWebServer <Assembly> element: You may modify the DeploymentTarget attribute of the <Assembly> element. Available options are GlobalAssemblyCache and WebApplication. <SafeControls> element: Managed by VSeWSS automatically. This element is added to your manifest on packaging or deployment. <RootFiles> element: <RootFiles> can be edited directly as long as the files are stored in a folder within your project called RootFiles. <FeatureManifests> element:You may manually add a feature to the manifest.xml. Create a folder beneath the pkg folder and place your feature.xml within. <ApplicationResourceFiles> element: This element can be edited directly. <Resource> element: This element can be edited directly. <TemplateFile> element: This element can be edited directly. <Module> element: This element can be edited directly. <DwpFiles> element: This element can be edited directly. <SiteDefinitionManifests> element: This element can be edited directly.

Feature.xml <Feature> element: You may modify all attributes of the <Feature> element. Note: There is a known issue with changing the ID of a feature that installs a web part (see known issues list). <ActivationDependencies> element: You may modify all attributes and child elements of the <ActivationDependencies> element. <Properties> element: You may modify all attributes and child elements of the <Properties> element. <ElementManifests> element: You may add an <ElementManifest> using the following instructions: Scenario: You have existing feature defined in a feature.xml that you would like to extend by adding an additional ElementManifest file to. Step 1: Create a folder within Solution Explorer with the same name as your feature. Step 2: Drop your ElementManifest file within the folder (Elements.xml or whatever).

V is u a l S tu d io E x te n s io n s fo r S h a re P o in t S e rv ic e s (V S E W S S ) 1 .3
2 0 0 9 M ic ro s o ft C o rp o ra tio n . A ll rig h ts re s e rv e d .
Note the <Elements element must have a unique identifier for an ID and xmlns attribute. Example: <?xml version="1.0" encoding="utf-8"?> <Elements Id="53652095-c5ae-4702-8f40-a9f98d420c58" xmlns="http://schemas.microsoft.com/sharepoint/" > <CustomAction Id="UserInterfaceCustomActions.SiteActionsToolbar" GroupId="SiteActions" Location="Microsoft.SharePoint.StandardMenu" Sequence="1000" Title="ManualElement1 - Title, Description, and Icon"> <UrlAction Url="/_layouts/prjsetng.aspx"/> </CustomAction> </Elements > Step 1: In Solution Explorer select Show All Files Step 2: Within the pkg folder open solution.xml Step 3: Add a <feature> element that contains <featureElements> element which maps the id of your element. The <feature> elements Id should match the feature ID you are trying to extend. The <featureElement> ID should match the ID specified in the element manifest file. Example: <feature id="76b42bde-16d8-440f-b142-bdf05083cb2d"> <featureElements> <featureElement id="65322716-4c53-4447-8bea-18c5b11d684d" name="Element1" /> </featureElements> </feature> Step 4: Save all files and open WSP View. Then click the refresh button.

Feature Receivers: There are two methods of associating a feature receiver with a feature. 1) Specify the ReceiverClass and ReceiverAssembly attributes of the <Feature> element. 2) Add a Guid attribute to your FeatureReceiver class. The attribute should specify the feature ID the FeatureReceiver is for. Example: [Guid("feature-id-specified-here")] public class MyFeatureReceiver : SPFeatureReceiver

Elements.xml (Element Manifest) The contents of element manifest files are not managed by VSeWSS and can be modified directly.

Você também pode gostar