<commit_before># AddFeatureFolders
[![Build status](https://ci.appveyor.com/api/projects/status/k4aotmbkugavs2mq?svg=true)](https://ci.appveyor.com/project/OdeToCode/addfeaturefolders)
### Installation
```
    Install-Package OdeToCode.AddFeatureFolders 
```

### Usage 
```c#
    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc()
                    .AddFeatureFolders();

            // "Features" is the default feature folder root. To override, pass along 
            // a new FeatureFolderOptions object with a different FeatureFolderName
        }

        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            app.UseDeveloperExceptionPage();
            app.UseMvcWithDefaultRoute();
        }
    }    
```

### Don't Forget!
Add your feature folder to the list of assets to publish. In project.json:
```
  "publishOptions": {
    "include": [
      "wwwroot",
      "web.config",
      "Features/**/*.cshtml"
    ]
  }
```
... Or for Visual Studio 2017 add to your .csproj file:
```
  <ItemGroup>
    <Content Include="wwwroot\**\*;**\*.cshtml;appsettings.json;web.config;Features\**\*.cshtml">
      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
    </Content>
  </ItemGroup>
```

### Just one more thing!
AddFeatureFolders uses the namespace of the controller to figure out where the views are. 
For example: 
```<commit_msg>Updated for Visual Studio 2017 RC4<commit_after># AddFeatureFolders
[![Build status](https://ci.appveyor.com/api/projects/status/k4aotmbkugavs2mq?svg=true)](https://ci.appveyor.com/project/OdeToCode/addfeaturefolders)
### Installation
```
    Install-Package OdeToCode.AddFeatureFolders 
```

### Usage 
```c#
    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc()
                    .AddFeatureFolders();

            // "Features" is the default feature folder root. To override, pass along 
            // a new FeatureFolderOptions object with a different FeatureFolderName
        }

        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            app.UseDeveloperExceptionPage();
            app.UseMvcWithDefaultRoute();
        }
    }    
```

### Don't Forget!
Add your feature folder to the list of assets to publish. In project.json:
```
  "publishOptions": {
    "include": [
      "wwwroot",
      "web.config",
      "Features/**/*.cshtml"
    ]
  }
```
Visual Studio 2017 doesn't have a project.json and what to do depends the Release Candidate (RC) version you are using:  
  
_Visual Studio 2017 RC2_ you need to add to your .csproj file:
```
  <ItemGroup>
    <Content Include="wwwroot\**\*;**\*.cshtml;appsettings.json;web.config;Features\**\*.cshtml">
      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
    </Content>
  </ItemGroup>
```
_Visual Studio 2017 RC4_ you don't need to add anything to your csproj file.  
  
If you had added the above because you were using RC2 then you will need to remove it when you use RC4.

### Just one more thing!
AddFeatureFolders uses the namespace of the controller to figure out where the views are. 
For example: 
```
{'fraction_non_alphanumeric': 0.11283119976183388, 'fraction_numerical': 0.008633521881512354, 'mean_word_length': 3.014336917562724, 'pattern_counts': {'":': 4, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7670963', 'n_tokens_mistral': 1030, 'n_tokens_neox': 965, 'n_words': 269}