Home Dashboard Directory Help
Search

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


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 650617
Opened: 3/10/2011 6:47:09 AM
Access Restriction: Public
1
Workaround(s)
view
2
User(s) can reproduce this bug

Description

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".
Details
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>
</PropertyGroup>

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

Thanks

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

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.

Thanks,
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:
http://blogs.msdn.com/b/vcblog/archive/2011/03/11/10140139.aspx
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)
Sign in to post a workaround.
Posted by Ståle L. Hansen on 3/10/2011 at 6:52 AM
Set Embed Manifest = No
File Name Submitted By Submitted On File Size  
ManifestBug.zip 3/10/2011 1 KB