0

The question is about the assembly properties.

Build Action:                None
Copy to Output Directory:    Do not copy

Oddly, these settings still land the assemblies in the bin. I've read the answer to this question: What are the various "Build action" settings in Visual Studio project properties and what do they do? It seems like these shouldn't be landing in the bin.

  • Why are these landing in the bin?
  • Is this expected behavior with those settings?
  • If it isn't expected behavior, then what settings would be more appropriate?

Scenario: we're deploying SQL Server CE with the Entity Framework to a Windows Azure Web App.

After running Install-Package EntityFramework.SqlServerCompact, our csproj now has a _bin_deployableAssemblies directory. That directory contains a bunch of assemblies that the Azure Web App requires (we don't need them locally if SQL Server CE is installed.)

When we build the csproj, all of those assemblies end up in the bin. This is all good.

Images

Assembly Properties

enter image description here

Build Results

enter image description here

Community
  • 1
  • 1
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467

1 Answers1

0

I could be wrong, but I think if MSBuild detects a dependency on that dll it will include it in the output regardless of that setting, so if one of the things you are copying to the output folder has such a dependency you'll get this one also. Check the build messages for "Including blahblah.dll..." (the exact wording escapes me for now).

Perhaps you could list it in the Referenced Libraries for the project?

FWIW, we use a post-build step to handle things like this.

DaveE
  • 3,579
  • 28
  • 31