Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9
This is the forum to discuss the Wrox book Professional SharePoint 2007 Development by John Holliday, John Alexander, Jeff Julian, Eli Robillard, Brendon Schwartz, Matt Ranlett, J. Dan Attis, Adam Buenz, Tom Rizzo; ISBN: 9780470117569
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 23rd, 2008, 03:16 PM
Registered User
Join Date: Jan 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error in Chapter 11 Sample Code

The sample code 'Proposal Manager' in Chapter 11 has an error in the setup.bat file that will prevent installation of the application. The bat file has the following entry in the :LDeply segment:
   echo Activating feature ProjectProposalItemEventReceiver ...
    "%SPAdminTool%" -o activatefeature -id 7b451019-6e9a-407e-8af9-b1fe9e8a5b1f -url %TargetUrl%

It has also this entry in the LRetract segment:
  echo Deactivating feature ProjectProposalItemEventReceiver ...
    "%SPAdminTool%" -o deactivatefeature -id 7b451019-6e9a-407e-8af9-b1fe9e8a5b1f -url %TargetUrl%

These are references to an inexistent feature. To install, just comment out these entries by prefacing them with 'echo"

Also, ensure that Site Definition has a unique ID. The sample uses 10001. If you have done any previous customization and used this number, installation will fail

  #2 (permalink)  
Old February 1st, 2008, 01:43 PM
Wrox Author
Join Date: Jun 2007
Location: Fernandina Beach, FL, USA.
Posts: 10
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to jholliday

When developing this code, I used the newly released Visual Studio Extensions for Windows SharePoint Services (VSeWSS), which has several issues. One of them is the way it generates GUIDs behind the scenes, which makes it difficult to make changes to the supporting files.

The setup.bat file in the ProposalManager solution is generated by VSeWSS, so editing it directly might not always work. It also assumes that the feature will be recreated and deployed together so the ID must match the generated GUID. If they don't match, then you will see this error.

Another approach is to make a copy of the setup.bat file and then change the activatefeature and deactivatefeature commands to use the feature name instead of the ID that VSeWSS generates. Then you will have to run the custom setup yourself, either by using a post-build action or a custom MSBuild target.

It is true that the Site Definition identifier must be unique, so you'll simply have to determine what works in your environment.

John F. Holliday, MOSS MVP

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 11 Code Examples ablinco BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 October 9th, 2006 03:56 AM
Chapter 11 Code Problems vbswshare BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 3 April 9th, 2006 08:39 PM

All times are GMT -4. The time now is 09:05 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.