Cannot find this file specified in the manifest file: TestWebPart\WebParts.xml

Jul 25, 2008 at 4:09 AM

I'm having a lot of trouble getting the web part project to work with vs2008.  This is the output I get when I do a debugInstall:

 

------ Build started: Project: TestWebPart, Configuration: DebugInstall Any CPU ------

TestWebPart -> C:\workspaces\TestWebPart\TestWebPart\bin\Debug\TestWebPart.dll

Refreshing Deployment Files...

"C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\STSDev\PatchVersion\stsdev.exe" /refresh "TestWebPart" "C:\workspaces\TestWebPart\TestWebPart\"

STSDEV - Simple Tools for SharePoint Developers

Version: 1.2.0.2

Refreshing Solution Package Files

Current Solution Name:

Current Solution Directory:

Refreshing deployment files...

Rebuilding DeploymentFiles\manifest.xml

Rebuilding DeploymentFiles\SolutionPackage.ddf

Deleting Solution Package File...

Building Solution Package (Debug Version)

"C:\WINDOWS\system32\makecab.exe" /F DeploymentFiles\SolutionPackage.ddf /D CabinetNameTemplate=TestWebPart.wsp

Microsoft (R) Cabinet Maker - Version 5.2.3790.0

Copyright (c) Microsoft Corporation. All rights reserved..

Parsing directives

Parsing directives (DeploymentFiles\SolutionPackage.ddf: 1 lines)

9,886 bytes in 7 files

Executing directives

0.00% - manifest.xml (1 of 7)

0.00% - TestWebPart.dll (2 of 7)

0.00% - TestWebPart\feature.xml (3 of 7)

0.00% - FEATURES\TestWebPart\WebParts.xml (4 of 7)

0.00% - FEATURES\TestWebPart\WebParts\CustomWebPart1.webpart (5 of 7)

0.00% - FEATURES\TestWebPart\WebParts\CustomWebPart2.webpart (6 of 7)

0.00% - IMAGES\TestWebPart\AfricanPith32.gif (7 of 7)

100.00% - IMAGES\TestWebPart\AfricanPith32.gif (7 of 7)

0.00% [flushing current folder]

91.78% [flushing current folder]

7.20% [flushing current folder]

100.00% [flushing current folder]

Total files: 7

Bytes before: 9,886

Bytes after: 4,398

After/Before: 44.49% compression

Time: 0.05 seconds ( 0 hr 0 min 0.05 sec)

Throughput: 193.09 Kb/second

Copying WSP file to CAB

Installing Solution...

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o addsolution -filename DeploymentFiles\TestWebPart.wsp

EXEC : warning : Cannot find this file specified in the manifest file: TestWebPart\WebParts.xml

 

DeploymentFiles\TestWebPart.wsp: The Solution installation failed.

MSBUILD : warning MSB3073: The command ""C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o addsolution -filename DeploymentFiles\TestWebPart.wsp" exited with code -1.

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o execadmsvcjobs

Executing .

Operation completed successfully.

Done building project "TestWebPart.csproj".

========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

 

Aug 27, 2008 at 11:39 AM
I have the same problem, when building in VS2008 (SP 1) with .NET 3.5 SP 1, I get on BuildDeploy configuration profile:

------ Rebuild All started: Project: MSQDemo.WebParts, Configuration: DebugDeploy Any CPU ------
C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\Microsoft.SharePoint.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug+ /debug:full /keyfile:KeyMSQ.snk /optimize- /out:obj\DebugDeploy\MSQDemo.WebParts.dll /target:library Properties\AssemblyInfo.cs CustomWebPart1.cs CustomWebPart2.cs

Compile complete -- 0 errors, 0 warnings
MSQDemo.WebParts -> D:\Projects\MS-Q\Sharepoint\MSQDemo.WebParts\bin\Debug\MSQDemo.WebParts.dll
Refreshing Deployment Files...
"D:\kits\Sharepoint\STSDev\rebuilt\stsdev.exe" /refresh "MSQDemo.WebParts" "D:\Projects\MS-Q\Sharepoint\MSQDemo.WebParts\"

STSDEV - Simple Tools for SharePoint Developers
Version: 1.2.0.1
Refreshing Solution Package Files
Current Solution Name:
Current Solution Directory:
Refreshing deployment files...
Rebuilding DeploymentFiles\manifest.xml
Rebuilding DeploymentFiles\SolutionPackage.ddf
Deleting Solution Package File...
Building Solution Package (Debug Version)
"C:\Windows\system32\makecab.exe" /F DeploymentFiles\SolutionPackage.ddf /D CabinetNameTemplate=MSQDemo.WebParts.wsp
Cabinet Maker - Lossless Data Compression Tool

Parsing directives
Parsing directives (DeploymentFiles\SolutionPackage.ddf: 1 lines)
9,971 bytes in 7 files                                          
Executing directives
  0.00% - manifest.xml (1 of 7)
  0.00% - MSQDemo.WebParts.dll (2 of 7)
  0.00% - MSQDemo.WebParts\feature.xml (3 of 7)
  0.00% - FEATURES\MSQDemo.WebParts\WebParts.xml (4 of 7)
  0.00% - FEATURES\MSQDemo.WebParts\WebParts\CustomWebPart1.webpart (5 of 7)
  0.00% - FEATURES\MSQDemo.WebParts\WebParts\CustomWebPart2.webpart (6 of 7)
  0.00% - IMAGES\MSQDemo.WebParts\AfricanPith32.gif (7 of 7)               
100.00% - IMAGES\MSQDemo.WebParts\AfricanPith32.gif (7 of 7)
  0.00% [flushing current folder]                          
 91.20% [flushing current folder]
  7.79% [flushing current folder]
100.00% [flushing current folder]
Total files:              7     
Bytes before:         9,971
Bytes after:          4,393
After/Before:            44.06% compression
Time:                     0.14 seconds ( 0 hr  0 min  0.14 sec)
Throughput:              67.15 Kb/second
Copying WSP file to CAB
Installing Solution...
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o addsolution -filename DeploymentFiles\MSQDemo.WebParts.wsp

EXEC : warning : Cannot find this file specified in the manifest file: MSQDemo.WebParts\WebParts.xml

DeploymentFiles\MSQDemo.WebParts.wsp: The Solution installation failed.

MSBUILD : warning MSB3073: The command ""C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o addsolution -filename DeploymentFiles\MSQDemo.WebParts.wsp" exited with code -1.
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o execadmsvcjobs

Operation completed successfully.

Deploying Solution...
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o deploysolution -name MSQDemo.WebParts.wsp -immediate -allowgacdeployment -allcontenturls

"MSQDemo.WebParts.wsp" does not exist in the solution store.

D:\Projects\MS-Q\Sharepoint\MSQDemo.WebParts\DeploymentFiles\Microsoft.SharePoint.targets(51,5): error MSB3073: The command ""C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o deploysolution -name MSQDemo.WebParts.wsp -immediate -allowgacdeployment -allcontenturls" exited with code -1.
Done building project "MSQDemo.WebParts.csproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


Any solution for this?
Aug 29, 2008 at 4:58 AM

Got rid of the error by removing the section from the feature.xml file 

<

ElementManifests>

 

<

ElementManifest

 

 

Location="WebParts.xml" />

 

<

ElementFile

 

 

Location="WebParts\WebPart.2.webpart" />

 

</

ElementManifests>

 

Aug 29, 2008 at 8:28 AM
zjacob,

yes it's true, will deploy if you remove ElementManifests section, BUT that removes your webparts definition of your solution, so basicaly will remain a blank solution.

Thanks,
Sep 18, 2008 at 8:14 PM
Edited Sep 18, 2008 at 9:30 PM

Move "WebParts.xml" file to the feature folder where in feature.xml file is located. This should resolve your issue. Same issue had bothered me for a while before I found out this trick.

For some reason, SharePoint does not recognize the ElementManifests under the sub folders. However, this is not the case if you install the feature using "stsadm.exe -o installfeature" command!!

Hope this helps.

Thanks,
Shiva

Sep 19, 2008 at 3:15 AM
Edited Sep 19, 2008 at 3:26 AM
"WebParts.xml" is already in the feature folder. 

It seems like the .ddf file is not accurately mapped to the file structure of the generated wsp.  More specifically, the manifest looks for for WebParts.xml and .webpart files in the "\TestWebPart" folder that gets created in the .wsp, not in the "\FEATURES\TestWebPart\..." folder where they are. 

I think this is related to the comments made for STSDEV v14625, which mentions adding additional config files to the Features node in SolutionConfig.  When you use a "[folder]\[filename]" type of path in a <Feature> node, the generated .ddf and manifest files dont match, so you file-not-found errors when deploying.

The only way that I can get the generated WebPart project to work is to move the .webpart files out of the "WebParts" folder, add any additional files to my solutionconfig.xml's <Features> node, and modify my feature.xml <ElementFile> entries to point to the new file locations. 

So, if you just use a flat file structure it seems to work, but dont forget to add <Feature> nodes for each of your files.

Shiva: Am I missing something?  Can you be more specific about how you moved files to get things to deploy properly using subfolders?