Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6063041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:07:13+00:00 2026-05-23T09:07:13+00:00

C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(2341,9): error MSB3171: Problem generating manifest. Could not load file or assembly ‘…CppCli.dll.manifest’ or

  • 0

C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(2341,9): error MSB3171: Problem generating manifest. Could not load file or assembly '...CppCli.dll.manifest' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I’m getting this error compiling CSharp project, where:

CSharp project

A VS2008 C# project, that adds CppCli project as a reference

Output type, Windows application
Platform target, Any CPU
I've also tried with Platform target, x86

CppCli project

A VS2008 C++/CLI project that links to an external C++ static lib

Targeted framework .NET Framework 3.5
Configuration type, Dynamic Library (.dll)
Configuration properties, Common Language Runtime support, /clr
Manifest tool, Embed manifest, No

Installed software (I understand VS2008+SP1 and .NET3.5+SP1)

Microsoft Visual C++ 2005 Redistributable KB2467175
Microsoft Visual C++ 2008 Redistributable KB2467174 x86 9.0.30729.5570
Microsoft Visual C++ 2008 Redistributable x86 9.0.21022
Microsoft Visual C++ 2008 Redistributable x86 9.0.30729.4974

Some more details
– Generating an embedded manifest for CppCli, CSharp builds correctly.
– Line 2341 of Microsoft.Common.targets is a tag regarding GeneralApplicationManifest
– CppCli.intermediate.manifest points to Microsoft.VC90.DebugCRT.dll 9.0.30729.4148
– CppCli.manifest points to 9.0.21022.8
– C:\Archivos de programa\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist\x86\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.manifest shows 9.0.30729.4148 version
– Manually changing CppCli.manifest to point to 9.0.30729.4148, procmon traces show a NAME NOT FOUND when querying for C:\MyProject\Microsoft.VC90.DebugCRT.dll.manifest. Obviously, CRT manifest is not there. The point is that I don’t find any traces querying for C:\Archivos de programa…\Microsoft.VC90.DebugCRT.dll.manifest, where the CRT manifest lives.

Questions
So I seem to have met two issues here: first, manifest generation. For that, I’ve found this link, although I don’t know how useful it will be: http://www.eggheadcafe.com/software/aspnet/33380343/compiling-32bit-application-x86-in-vs2008-vc2008-on-vista-64bit—-x64.aspx. It says you have to use a define in every compilation unit. Secondly, and most important to me now, how come changing the CppCli.manifest manually I still cannot build CSharp project.

Edit
I’ve moved the project to VS2010, using the tool wizard, and I still have the same problem.

Edit 2011/06/13
I’m going now for the “use an embedded manifest” option. The project builds, but when I try to execute the CppCli code, it says that I’m not running a valid Win32 application.

Edit 2011/06/15
CppCli project is linking to the following static libraries:

YetAnother.lib
libcurl.lib
libboost_system-vc90-mt-gd-1_44.lib
libboost_thread-vc90-mt-gd-1_44.lib
libboost_filesystem-vc90-mt-gd-1_44.lib
libeay32MDd.lib
ssleay32MDd.lib
shlwapi.lib
ws2_32.lib
winmm.lib
wldap32.lib
winhttp.lib

Dependencies are:

  • CppCli uses YetAnother.
  • YetAnother is a C++ project that uses curl and boost thread and date time.
  • curl uses openssl.

I’m reading (http://marc.info/?l=boost-users&m=123425857320026) that statically linked boost libraries don’t get on with CLR projects at all. So I remove those libboost lines, and use BOOST_ALL_DYN_LINK in CppCli, copy boost_thread-vc90-mt-gd-1_44.lib and boost_date_time-vc90-mt-gd-1_44.lib to YetAnother\Debug directory. Same error. The solution builds, but when I try to execute the CppCli code, it says that I’m not running a valid Win32 application.

Edit 2011/06/16
Giving up! I’m clearly being punished for taking Microsoft name in vain. Too many comments in the net saying boost static libs and CLR are not compatible. I’ll change CppCli to not use CLR, and to communicate with CSharp via P/Invoke instead of Interop.

Edit 2011/06/17
All fine with P/Invoke.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:07:13+00:00Added an answer on May 23, 2026 at 9:07 am

    I’ve had this issue before and it was because somehow a bunch of NGENed assemblies got corrupted and were no longer recognized as valid 64-bit or 32-bit assemblies. I first started removing the NGENed assemblies one by one, and the compilation would fail when attempting to load another dependency; it went all the way down to mscorlib, at which point I deleted all NGENed assemblies. Everything was fine after that, once they were re-NGENed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

**c:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(0,0): warning MSB3245: Could not resolve this reference. Could not locate the assembly System.Web.Mvc,
(this is a .net build server) I'm getting the following error: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1679,9): error MSB3091:
I am getting the following Warnings while running tests using cc.net c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets (,): warning
I'm getting the following warning and error from msbuild: C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets : warning MSB3155: Item
I've discovered this folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files and have a few questions. What
On Windows Mobile metod InternetSetOption http://msdn.microsoft.com/en-us/library/ms918381.aspx does not support option INTERNET_OPTION_HTTP_DECODING is there some
In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ is the list of installed programs in my machine (at least most
I read a list of SIDs from the registry, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList . How would
Did Microsoft abandon support for Windows Presentation Foundation (WPF) on Visual Studio 2005? There
Microsoft's new Windows Live Application Based Storage API is a RESTful API. More info

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.