<commit_before># Building, Testing, and Debugging
_This page contains instructions for building Roslyn on Windows. For special instructions on **building Roslyn on Linux** see [here](https://github.com/dotnet/roslyn/blob/master/docs/infrastructure/cross-platform.md)._

## Required Software

- Visual Studio 2015 with the [Visual Studio Extensibility and Windows 10 tools optional components](https://github.com/dotnet/roslyn/wiki/Getting-Started-on-Visual-Studio-2015) installed
- To prevent unnecessary project.json changes, turn off NuGet package restore within Visual Studio
  - Uncheck **Tools** -> **Options** -> **NuGet Package Manager** -> **General** -> **Automatically check for missing packages during build in Visual Studio**

## Getting the code

1. Open Developer Command Prompt for VS2015
2. Clone https://github.com/dotnet/roslyn
3. Run: `nuget.exe restore Roslyn.sln`
4. Open Roslyn.sln 

## Running Unit Tests
To run the unit tests:

> msbuild /v:m /m BuildAndTest.proj /p:PublicBuild=true /p:DeployExtension=false

This command will build and run all of the code / tests which are supported on the current public build of Visual Studio 2015.  

To debug suites use the *xunit.console.x86.exe* runner command which is included in the [xunit.runners](https://www.nuget.org/packages/xunit.runners) NuGet package.  Make sure to use a 2.0 version of the runner.  

> xunit.console.x86.exe [UnitTestDll] -noshadow 

## Contributing
Please see [[Contributing Code]] for details on contributing changes back to the code.

## Using earlier versions of Visual Studio 2015 

The Roslyn build depends on Visual Studio APIs that change from release to release.  In order to use an older version of Visual Studio to load the source code you will need to use the appropriate branch.

> Use git branch --list from the command line to see the possible branches, E.g:

```
git branch --list --all
  master
  remotes/origin/HEAD -> origin/master
  remotes/origin/releases/Dev14CTP5
```

> Select the branch that matches your Visual Studio preview release, E.g:

```
git checkout releases/Dev14CTP5 
```

Note: PRs will only be accepted from the master branch.  

## Strong Name Verification
Roslyn binaries are configured to be delay signed using the Microsoft strong name key.  We are using a new technique to allow these assemblies to be loaded - currently 'fakesign' - these assemblies do not need to have strong name signing disabled to be loaded.  However, they cannot be installed in the GAC neither can they be loaded from a partially trusted AppDomain.

In order to test changes in Visual Studio without affecting the normal development environment, Visual Studio can be run using an isolated registry hive and AppData directories via the /rootSuffix Roslyn command line option.  When Roslyn is built it creates and populates this hive with the necessary packages.

```
"%devenvdir%"\devenv.exe /rootSuffix Roslyn
```

## Download NuGet Packages
From the command prompt, change directory to `<clone dir>` and run `Src\.nuget\nuget restore Src\Roslyn.sln`

This ensures that all of the references and tools needed to build Roslyn are present on the computer.  Because we use toolset packages, it's important to do this before opening the solution.
<commit_msg>Removed earlier versions of Visual Studio 2015<commit_after># Building, Testing, and Debugging
_This page contains instructions for building Roslyn on Windows. For special instructions on **building Roslyn on Linux** see [here](https://github.com/dotnet/roslyn/blob/master/docs/infrastructure/cross-platform.md)._

## Required Software

- Visual Studio 2015 with the [Visual Studio Extensibility and Windows 10 tools optional components](https://github.com/dotnet/roslyn/wiki/Getting-Started-on-Visual-Studio-2015) installed
- To prevent unnecessary project.json changes, turn off NuGet package restore within Visual Studio
  - Uncheck **Tools** -> **Options** -> **NuGet Package Manager** -> **General** -> **Automatically check for missing packages during build in Visual Studio**

## Getting the code

1. Open Developer Command Prompt for VS2015
2. Clone https://github.com/dotnet/roslyn
3. Run: `nuget.exe restore Roslyn.sln`
4. Open Roslyn.sln 

## Running Unit Tests
To run the unit tests:

> msbuild /v:m /m BuildAndTest.proj /p:PublicBuild=true /p:DeployExtension=false

This command will build and run all of the code / tests which are supported on the current public build of Visual Studio 2015.  

To debug suites use the *xunit.console.x86.exe* runner command which is included in the [xunit.runners](https://www.nuget.org/packages/xunit.runners) NuGet package.  Make sure to use a 2.0 version of the runner.  

> xunit.console.x86.exe [UnitTestDll] -noshadow 

## Contributing
Please see [[Contributing Code]] for details on contributing changes back to the code.

## Strong Name Verification
Roslyn binaries are configured to be delay signed using the Microsoft strong name key.  We are using a new technique to allow these assemblies to be loaded - currently 'fakesign' - these assemblies do not need to have strong name signing disabled to be loaded.  However, they cannot be installed in the GAC neither can they be loaded from a partially trusted AppDomain.

In order to test changes in Visual Studio without affecting the normal development environment, Visual Studio can be run using an isolated registry hive and AppData directories via the /rootSuffix Roslyn command line option.  When Roslyn is built it creates and populates this hive with the necessary packages.

```
"%devenvdir%"\devenv.exe /rootSuffix Roslyn
```

## Download NuGet Packages
From the command prompt, change directory to `<clone dir>` and run `Src\.nuget\nuget restore Src\Roslyn.sln`

This ensures that all of the references and tools needed to build Roslyn are present on the computer.  Because we use toolset packages, it's important to do this before opening the solution.

{'fraction_non_alphanumeric': 0.07259558699679973, 'fraction_numerical': 0.011790466565605525, 'mean_word_length': 4.447706422018348, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3930802', 'n_tokens_mistral': 1649, 'n_tokens_neox': 1543, 'n_words': 770}