none
ResolveManifestFiles build task failed

    Question

  • hello,

    i have a c# project that i am trying to debug in VS.NET 2005. ( the project was originally in VS.NET 2003, and has been renamed / moved around on the HD a couple of times, and this may be the source of the problem.)

    the build now fails with the following error messages:

    Error    20    The "ResolveManifestFiles" task failed unexpectedly.
    System.ArgumentException: Illegal characters in path. 
    at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
    at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
    at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
    at System.IO.Path.GetFullPath(String path)
    at Microsoft.Build.Tasks.Deployment.ManifestUtilities.Util.RemoveDuplicateItems(ITaskItem[] items)
    at Microsoft.Build.Tasks.ResolveManifestFiles.set_NativeAssemblies(ITaskItem[] value)   

    Error    21    The "NativeAssemblies=@(NativeReferenceFile);@(_DeploymentNativePrerequisite)" parameter for the "ResolveManifestFiles" task is invalid.   

    Error    22    The "ResolveManifestFiles" task could not be initialized with its input parameters. 
      

    Clicking one of the 3 items in the error list brings up this section in Microsoft.Common.targets:

            <!-- Create list of items for manifest generation -->
            <ResolveManifestFiles NativeAssemblies="@(NativeReferenceFile);@(_DeploymentNativePrerequisite)">
                <Output TaskParameter="OutputAssemblies" ItemName="_DeploymentManifestDependencies"/>
            </ResolveManifestFiles>

    I have gone through all csproj files to see whether there are any illegal paths, but I don't really know where to look further. It's annoying because I can't compile :-( and it does not go away after restarting the IDE like some of the other MSB errors do. By the way, the error codes are MSB4018, MSB4026 and MSB4063 respectively.

    Thanks for any help !

    Saturday, November 04, 2006 1:21 PM

Answers

  • Problem solved after playing around with the project references.

    It seems there was one project reference that caused the error to appear. That project in question used three different names: one for the assembly name (.exe), one for its source code root, and yet another one for the name of the project itself. The referenced project itself compiles.
    Apparently VS.NET could not resolve the project reference under these circumstances. After correcting this, everything would compile smooth.
    Wednesday, November 08, 2006 11:50 AM

All replies

  • I have seen some manifest problems with Visual Studio 2005 Pro under C++. These problems seem to ‘manifest’ : ) themselves after a couple of compiles. I have not had VS 2005 long enough to investigate this, as I have too much coding to do right now. 

    But it did stop me from compiling, so I had to determine how I could work around this possible bug. I am not sure if this is the same problem you are encountering, but I will explain what I did anyway as perhaps it will help you.

    This is what I did: I disabled manifest embedding.

     Instructions to do so:

    From the Visual Studio IDE menu bar select Project ->Properties ->Configuration Properties -> Manifest Tool (expand this): Input and Output.

    In the Right pane you will see a list item: ‘Embed Manifest’.

    Click it and a drop down list arrow will appear in the associated text box immediately to the right and on the same line as ‘Embed Manifest’.

    Select ‘No’ to disable the manifest embedding.

    After this I was able to compile.

    I hope this helps.
    Good luck!

    -yoshiro (mark) aoki

    Saturday, November 04, 2006 5:31 PM
  • Problem solved after playing around with the project references.

    It seems there was one project reference that caused the error to appear. That project in question used three different names: one for the assembly name (.exe), one for its source code root, and yet another one for the name of the project itself. The referenced project itself compiles.
    Apparently VS.NET could not resolve the project reference under these circumstances. After correcting this, everything would compile smooth.
    Wednesday, November 08, 2006 11:50 AM
  • Hi I've encountered the same set of errors that you got.

    I'm trying to use the unit test wizard to test a demo application that I downloaded.

    Right after I create the unit tests and try to build them I get those errors, and I'm not able to run any tests.

    All references are auto-generated. I made sure that the paths weren't the problem, and it doesn't seem to be a permission problem either.

    Any help would be much appreciated.

    Also when I tried this I did not have any manifest tool in the configuration properties.

     mark aoki wrote:

    From the Visual Studio IDE menu bar select Project ->Properties ->Configuration Properties -> Manifest Tool (expand this): Input and Output.

    In the Right pane you will see a list item: ‘Embed Manifest’.

    Click it and a drop down list arrow will appear in the associated text box immediately to the right and on the same line as ‘Embed Manifest’.

    Select ‘No’ to disable the manifest embedding.

    Friday, December 01, 2006 4:06 PM
  •  

    Hi

    I have same error message comming up, after writing some code that load unmanged .dll and trying to call a function after marshalling.

    Any help is Highly apriciated. I have no idea what is this about. googled a lot did not help.

    my .csproj file has entry <GenerateManifests>false</GenerateManifests>



    Error 1 The "ResolveManifestFiles" task failed unexpectedly.
    System.ArgumentException: Illegal characters in path.
       at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
       at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
       at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
       at System.IO.Path.GetFullPath(String path)
       at Microsoft.Build.Tasks.Deployment.ManifestUtilities.Util.RemoveDuplicateItems(ITaskItem[] items)
       at Microsoft.Build.Tasks.ResolveManifestFiles.set_NativeAssemblies(ITaskItem[] value) AdapterIGSS
    Error 2 The "NativeAssemblies=@(NativeReferenceFile);@(_DeploymentNativePrerequisite)" parameter for the "ResolveManifestFiles" task is invalid. AdapterIGSS
    Error 3 The "ResolveManifestFiles" task could not be initialized with its input parameters. AdapterIGSS


    Thank you

    Monday, December 15, 2008 3:00 PM
  • I don't know if this might resolve this problem, but I encoutered it to and apparently there was a reference that was removed or changed. When I removed the reference, the compilation succeeded once more without having tot restart VS. I used VS2008 for this, so don't shoot if it doesn't work :)
    The only way to solve problems with Microsuck is to accelarate your computer with 9.81 m/s²
    • Proposed as answer by Helfdane Wednesday, September 30, 2009 12:39 PM
    Friday, July 17, 2009 4:49 PM
  • I ran into the same issue while migrating to the new team server. What my problem was, that I used legal path's as my workspace local folder existed. When I aligned my local folder to the source control one, it appeared to be working (checkout etc was working). But: building my solution gave me the error shown above.

    As it turned out, I had a '&' in my local folder. While this is perfectly legal for the file system and al, it's causing the error you see there. I fixed it by remapping my local folder to a folder without the '&' and now the solution builds again.

    Hope it helps.
    • Proposed as answer by JKota Thursday, June 14, 2012 5:19 AM
    • Unproposed as answer by JKota Thursday, June 14, 2012 5:20 AM
    • Proposed as answer by JKota Thursday, June 14, 2012 5:21 AM
    Wednesday, September 30, 2009 12:43 PM