C++/CLI project fails to build if using Delay Sign when manifest generation is not used - by Ståle L. Hansen

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 650617 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 3/10/2011 6:47:09 AM
Access Restriction Public


If Generate Manifest = No and Delay Sign = Yes the projects fails to build, with the error error MSB4044: The "WriteLinesToFile" task was not given a value for the required parameter "File". 
Sign in to post a comment.
Posted by Ståle L. Hansen on 4/5/2011 at 11:11 PM
Hello Felix,
Thanks for the fix, it worked perfectly.
But considering the hassle with the deployment of this kind of fix we will be using the "Embed Manifest = No" workaround.

-- Ståle
Posted by Microsoft on 3/31/2011 at 5:39 PM
Hello Ståle L. Hansen,
Thanks for reporting the issue. The issue is that the build is trying to embed the manifest by Link (or resource obj) while it should be doing by MT. The change below should solve the logic.

Open %Programfiles%\msbuild\microsoft.cpp\v4.0\Microsoft.cppcommon.targets.
Look for the comment "If we are compiling managed" and change the conditions as shown below. Please backup the file before make any changes.
<!-- If we are compiling managed -->
<PropertyGroup Condition="'$(EmbedManifest)'=='true' AND '$(CLRSupport)'!='' AND '$(CLRSupport)'!='false' AND
     ('$(ConfigurationType)'=='Application' OR '$(ConfigurationType)'=='DynamicLibrary' ) ">
    <EmbedManifestBy Condition="'$(LinkKeyFile)'=='' OR '$(LinkDelaySign)'=='true'">MT</EmbedManifestBy>
    <EmbedManifestBy Condition="'$(LinkKeyFile)'!='' AND '$(LinkDelaySign)'!='true'">LINK</EmbedManifestBy>

Let me know if it resolves your issue. Alteratively, you could set Project Properties->Manifest Tool->Input and Output->Embed Manifest = No.


Posted by Microsoft on 3/23/2011 at 7:47 PM

Thanks for reporting this issue. We identify this as a bug in the product and we are investigating a fix for this issue. A fix will be available in the future release of Visual Studio.

Amit Mohindra
Visual C++ Team
Posted by Ståle L. Hansen on 3/15/2011 at 5:44 PM
This item seems to describe the real issue here:
Posted by Microsoft on 3/10/2011 at 11:23 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by Microsoft on 3/10/2011 at 7:13 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)