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 9268847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:57:45+00:00 2026-06-18T14:57:45+00:00

I have a two project .NET 4.5 C# solution, one project (projectA) is a

  • 0

I have a two project .NET 4.5 C# solution, one project (projectA) is a class library that has 5 referenced .dll (non-COM) files. These files are 32/64-bit specific, so I have two include/ folders in my build path (include/x86/ and include/x64/) with their respective .dll files in each. The .dll are named exactly the same between the 32 and 64-bit versions. The other project (projectB) is a console app that references projectA. When I configure to Debug (or Release, it doesn’t matter) x64 mode and build, everything works. It copies all 5 .dll to the bin/x64/ directory and the program works as expected. However, when I switch configuration to x86 mode and build, only two of the five .dll are copied over to the bin/x86/ directory and the program obviously doesn’t work. It throw the FileNotFoundException and complains that the assembly isn’t loaded because it cannot find it in the bin/ directory.

If I manually copy (or use xcopy in post build event) the missing .dll files over to the bin/x86/ folder, the program works. So it appears the issue has something to do with Visual Studios (2012 Update 1) not correctly copying the files during a build. All 5 references in projectA are set to Copy: Local and their path in the Properties box in Visual studios is correct for both x86 and x64 modes. When I build projectA by itself, in either x86-64 mode, all 5 .dll are correctly copied to the correct bin/ folder. So the issue has to also deal with projectB referencing projectA.

Here is an excerpt from the projectA.csproj file:

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
   <PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
   <PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<Reference Include="BaseCommon">
  <HintPath>include\$(Platform)\BaseCommon.dll</HintPath>
</Reference>
<Reference Include="BaseDataAccess">
  <HintPath>include\$(Platform)\BaseDataAccess.dll</HintPath>
</Reference>
<Reference Include="BaseError">
  <HintPath>include\$(Platform)\BaseError.dll</HintPath>
</Reference>
<Reference Include="BaseTof">
  <HintPath>include\$(Platform)\BaseTof.dll</HintPath>
</Reference>
<Reference Include="MassSpecDataReader">
  <HintPath>include\$(Platform)\MassSpecDataReader.dll</HintPath>
</Reference>
<Reference Include="System" />

Any ideas on the problem? I assume i could do the xcopy command, but that seems like it shouldn’t be necessary, especially if it correctly works in x64 mode.

Tested with windows 8 and windows 7 64-bit on three different computers.

  • 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-06-18T14:57:46+00:00Added an answer on June 18, 2026 at 2:57 pm

    I solved the issue after realizing that some of the .dll files were the wrong version. I used ildasm.exe on the .dll, open up the manifests, and realized that the some of the .dll were referencing the wrong version of the other .dll files. So msbuild did not perform the copy of the binaries files as expected. The reason why the code worked when I manually copied the missing .dll files was that the API didn’t change between the two versions.

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

Sidebar

Related Questions

I have a solution that contains two projects. One project is an ASP.NET Web
I have two projects in the same solution, VS2k10. One is a class library,
I currently have an ASP.NET MVC 3 project, plus a class library project, that
I have two projects in my solution   1- asp.net web project.   2-
I have two projects.One project is build in MVC asp.net and the other project
I have a ASP.NET MVC2 project in VS2010 that can be deployed in two
Need to add two same name .csproj class libraries in my solution.Have two project
I have two versions of a project. One for Silverlight and one for .NET.
I have a Visual Studio C# .NET project. I have two master templates. One
I have a Visual Studios Solution with two projects, one VB.net the other VC++.

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.