title: MSBuild is saying I need a Main method for a library compilation
body: <p>I'm trying to use MSBuild to compile my ASP.NET MVC3 applicaiton. Since DLL's don't require a <code>Main</code> method and I have specified that the target is a Library, why is the compiler throwing the following exception:</p>
  
  <pre><code>CSC : error CS5001: Program 'c:\MvcApplication1\web\bin\MvcApplication1.dll' does not contain a static 'Main' method suitable for an entry point[C:\MvcApplication1\web\MvcApplication1.csproj]
  </code></pre>
  
  <p>Here's the .csproj file:</p>
  
  <pre><code>&lt;Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
  
      &lt;PropertyGroup&gt;
          &lt;OutputType&gt;Library&lt;/OutputType&gt;
          &lt;AssemblyName&gt;MvcApplication1&lt;/AssemblyName&gt;
          &lt;OutputPath&gt;bin\&lt;/OutputPath&gt;
      &lt;/PropertyGroup&gt;
  
      &lt;ItemGroup&gt;
          &lt;Compile Include="*.cs" /&gt;
      &lt;/ItemGroup&gt;
  
      &lt;ItemGroup&gt;
          &lt;Reference Include="..\lib\*.dll" /&gt;
      &lt;/ItemGroup&gt;
  
      &lt;Target Name="Build"&gt;
          &lt;MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" /&gt;
          &lt;Csc References="@(Reference)" Sources="@(Compile)" OutputAssembly="$(OutputPath)$(AssemblyName).dll" /&gt;
          &lt;Copy SourceFiles="@(Reference)" DestinationFolder="$(OutputPath)" /&gt;
      &lt;/Target&gt;
  
  &lt;/Project&gt;
  </code></pre>