title: How to set initial database file size and filegrowth in a database project?
body: <p>I'm trying to set the initial database file size and its auto growth parameter in a <em>Database Project</em> in <em>Visual Studio</em> to be used with the <em>Publish</em> option. I've added a <em>Filegroup file</em> (<em>SqlFile1.sql</em>) to the project with the following contents:</p>
  
  <pre class="lang-sql prettyprint-override"><code>ALTER DATABASE [$(DatabaseName)]
      ADD FILE
      (
          NAME = [SqlFile1],
          FILENAME = '$(DefaultDataPath)$(DefaultFilePrefix)_SqlFile1.ndf',
          SIZE = 5000MB,
          MAXSIZE = UNLIMITED,
          FILEGROWTH = 50%
      ) TO FILEGROUP [PRIMARY]
  </code></pre>
  
  <p>(<a href="http://msdn.microsoft.com/en-us/library/bb522469.aspx" rel="nofollow">documentation</a>). </p>
  
  <p>When I click <em>Publish</em> with the option <em>Always re-create database</em> checked, the file <code>SqlFile1</code> is created within the <em>PRIMARY</em> filegroup, but has the <em>Initial size</em> set to <em>3 MB</em> and <em>Autogrowth</em> is <em>By 1 MB, unrestricted growth</em>. There are no error or warning messages.</p>
  
  <p>What's interesting, the following SQL script:</p>
  
  <pre><code>ALTER DATABASE DatabaseTest
  MODIFY FILE (NAME = [SqlFile1], SIZE = 5000MB, FILEGROWTH = 50%);
  GO
  </code></pre>
  
  <p>ran from <em>SQL Management Studio</em> correctly modifies file's properties.</p>
  
  <p>Why are my settings ignored and how to make them work?</p>