diff --git a/.gitignore b/.gitignore
index d0eee1b3..66a8c9df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,9 @@ bld/
[Bb]in/
[Oo]bj/
msbuild.log
+*.binlog
+
+.vs/
# Roslyn stuff
*.sln.ide
@@ -235,3 +238,6 @@ Icon
Network Trash Folder
Temporary Items
.apdisk
+
+# Local msbuild copy to run on Mono
+src/ExternalApis/
\ No newline at end of file
diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md
new file mode 100644
index 00000000..775f221c
--- /dev/null
+++ b/CODE-OF-CONDUCT.md
@@ -0,0 +1,6 @@
+# Code of Conduct
+
+This project has adopted the code of conduct defined by the Contributor Covenant
+to clarify expected behavior in our community.
+
+For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 00000000..14a1c1c2
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,10 @@
+
+
+
+ $(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\
+ $(MSBuildThisFileDirectory)bin\$(MSBuildProjectName)\
+ Microsoft Corporation
+
+
+
+
diff --git a/NuGet.config b/NuGet.config
new file mode 100644
index 00000000..85a8e8fc
--- /dev/null
+++ b/NuGet.config
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/README.md b/README.md
index d9666aa3..0da801f6 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# CodeFormatter
-[](http://dotnet-ci.cloudapp.net/job/dotnet_codeformatter/job/innerloop/)
+***NOTE: This repo is archived. The replacement is [dotnet/format](https://github.com/dotnet/format).***
CodeFormatter is a tool that uses Roslyn to automatically rewrite the source to
follow our coding styles, which are [documented here][corefx-coding-style].
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000..030ac0c0
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,15 @@
+# Security Policy
+
+## Supported Versions
+
+The .NET Core and ASP.NET Core support policy, including supported versions can be found at the [.NET Core Support Policy Page](https://dotnet.microsoft.com/platform/support/policy/dotnet-core).
+
+## Reporting a Vulnerability
+
+Security issues and bugs should be reported privately to the Microsoft Security Response Center (MSRC), either by emailing secure@microsoft.com or via the portal at https://msrc.microsoft.com.
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your
+original message. Further information, including the MSRC PGP key, can be found in the [MSRC Report an Issue FAQ](https://www.microsoft.com/en-us/msrc/faqs-report-an-issue).
+
+Reports via MSRC may qualify for the .NET Core Bug Bounty. Details of the .NET Core Bug Bounty including terms and conditions are at [https://aka.ms/corebounty](https://aka.ms/corebounty).
+
+Please do not open issues for anything you think might have a security implication.
\ No newline at end of file
diff --git a/build.cmd b/build.cmd
index 48cd28bc..3da80a2b 100644
--- a/build.cmd
+++ b/build.cmd
@@ -4,35 +4,31 @@ SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
SET SOLUTION_PATH="%~dp0src\CodeFormatter.sln"
-SET MSBUILD14_TOOLS_PATH="%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe"
-SET MSBUILD12_TOOLS_PATH="%ProgramFiles(x86)%\MSBuild\12.0\bin\MSBuild.exe"
-SET BUILD_TOOLS_PATH=%MSBUILD14_TOOLS_PATH%
+SET VSWHERELOCATION="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
+
+IF NOT EXIST %VSWHERELOCATION% (
+ goto :error
+)
+
+for /f "usebackq tokens=*" %%i in (`%VSWHERELOCATION% -latest -prerelease -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
+ set BUILD_TOOLS_PATH="%%i\MSBuild\15.0\Bin\MSBuild.exe"
+)
-IF NOT EXIST %MSBUILD14_TOOLS_PATH% (
- echo In order to run this tool you need either Visual Studio 2015 or
- echo Microsoft Build Tools 2015 tools installed.
- echo.
- echo Visit this page to download either:
- echo.
- echo http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs
- echo.
- echo Attempting to fall back to MSBuild 12 for building only
- echo.
- IF NOT EXIST %MSBUILD12_TOOLS_PATH% (
- echo Could not find MSBuild 12. Please install build tools ^(See above^)
- exit /b 1
- ) else (
- set BUILD_TOOLS_PATH=%MSBUILD12_TOOLS_PATH%
- )
+if exist %BUILD_TOOLS_PATH% (
+ goto :restore
)
-IF EXIST %CACHED_NUGET% goto restore
-echo Downloading latest version of NuGet.exe...
-IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
-@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"
+:error
+echo In order to run this tool you need either Visual Studio 2017 Update 2 or
+echo Microsoft Build Tools 2017 Update 2 installed.
+echo.
+echo Visit this page to download either:
+echo.
+echo https://go.microsoft.com/fwlink/?linkid=840931
+echo.
+exit /b 2
:restore
-IF NOT EXIST src\packages md src\packages
-%CACHED_NUGET% restore %SOLUTION_PATH%
+%BUILD_TOOLS_PATH% %SOLUTION_PATH% /t:restore /nologo /m /v:m /bl:restore.binlog
-%BUILD_TOOLS_PATH% %SOLUTION_PATH% /p:OutDir="%~dp0bin" /nologo /m /v:m /flp:verbosity=normal %*
+%BUILD_TOOLS_PATH% %SOLUTION_PATH% /p:OutDir="%~dp0bin" /nologo /m /v:m /bl:build.binlog %*
diff --git a/build.props b/build.props
deleted file mode 100644
index 0047328e..00000000
--- a/build.props
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- $(MsBuildThisFileDirectory)obj\$(MSBuildProjectName)\$(Configuration)\
- $(MsBuildThisFileDirectory)bin\$(MSBuildProjectName)\$(Configuration)\
- v4.5.2
- 512
- true
-
-
-
-
- true
- full
- false
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- TRACE
- prompt
- 4
-
-
diff --git a/dependencies.props b/dependencies.props
new file mode 100644
index 00000000..8ac81396
--- /dev/null
+++ b/dependencies.props
@@ -0,0 +1,10 @@
+
+
+
+ 15.7.179
+ 2.8.2
+ 2.6.1
+ 2.4.0
+ 14.0.0.1
+
+
diff --git a/init-tools.sh b/init-tools.sh
new file mode 100755
index 00000000..cfae2681
--- /dev/null
+++ b/init-tools.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+SRC="src"
+EXTERNAL_APIS_DIR="$SRC/ExternalApis"
+#see https://github.com/mono/msbuild/blob/xplat-c9/cibuild.sh
+MSBUILD_DOWNLOAD_URL="https://github.com/radical/msbuild/releases/download/v0.03/mono_msbuild_d25dd923839404bd64cc63f420e75acf96fc75c4.zip"
+MSBUILD_ZIP="$EXTERNAL_APIS_DIR/msbuild.zip"
+MSBUILD_EXE="$EXTERNAL_APIS_DIR/MSBuild/msbuild.exe"
+
+downloadMSBuildForMono()
+{
+ if [ ! -e "$MSBUILD_EXE" ]
+ then
+ mkdir -p $EXTERNAL_APIS_DIR
+
+ echo "** Downloading MSBUILD from $MSBUILD_DOWNLOAD_URL"
+ curl -sL -o $MSBUILD_ZIP "$MSBUILD_DOWNLOAD_URL"
+
+ unzip -q $MSBUILD_ZIP -d $EXTERNAL_APIS_DIR
+ find "$EXTERNAL_APIS_DIR/msbuild" -name "*.exe" -exec chmod "+x" '{}' ';'
+ rm $MSBUILD_ZIP
+ fi
+}
+
+downloadMSBuildForMono
diff --git a/netci.groovy b/netci.groovy
index f93c1ab8..1aee15d4 100644
--- a/netci.groovy
+++ b/netci.groovy
@@ -1,8 +1,10 @@
// Import the utility functionality.
-
import jobs.generation.Utilities;
+// Import functionality for job reporting
+import jobs.generation.JobReport;
-def project = 'dotnet/codeformatter'
+def project = GithubProject
+def branch = GithubBranchName
// Define build string
def buildString = '''call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\VsDevCmd.bat" && build.cmd'''
@@ -10,11 +12,20 @@ def buildString = '''call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0
[true, false].each { isPR ->
def newJob = job(Utilities.getFullJobName(project, '', isPR)) {
- label('windows')
steps {
batchFile(buildString)
}
}
- Utilities.simpleInnerLoopJobSetup(newJob, project, isPR, 'Windows Debug')
-}
\ No newline at end of file
+ Utilities.setMachineAffinity(newJob, 'Windows_NT', 'latest-or-auto')
+ Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
+ if (isPR) {
+ Utilities.addGithubPRTriggerForBranch(newJob, branch, 'Windows Debug')
+ }
+ else {
+ Utilities.addGithubPushTrigger(newJob)
+ }
+}
+
+// Generate the job report
+JobReport.Report.generateJobReport(out)
\ No newline at end of file
diff --git a/src/CodeFormatter.sln b/src/CodeFormatter.sln
index 14b08354..01ad2e69 100644
--- a/src/CodeFormatter.sln
+++ b/src/CodeFormatter.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.31101.0
+# Visual Studio 15
+VisualStudioVersion = 15.0.27616.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.CodeFormatting", "Microsoft.DotNet.CodeFormatting\Microsoft.DotNet.CodeFormatting.csproj", "{D535641F-A2D7-481C-930D-96C02F052B95}"
EndProject
@@ -9,11 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeFormatter", "CodeFormat
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.DotNet.CodeFormatting.Tests", "Microsoft.DotNet.CodeFormatting.Tests\Microsoft.DotNet.CodeFormatting.Tests.csproj", "{D4D6FF88-0586-43C7-BDE4-D336EB25E7AA}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{34034F12-9FB5-4154-91DA-7914B7D013BD}"
- ProjectSection(SolutionItems) = preProject
- .nuget\packages.config = .nuget\packages.config
- EndProjectSection
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XUnitConverter", "XUnitConverter\XUnitConverter.csproj", "{81B0FF57-C128-4F6B-83C7-94DBAF261582}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XUnitConverter.Tests", "XUnitConverter.Tests\XUnitConverter.Tests.csproj", "{BA4C1700-8A72-4F33-AF67-0E60F324E521}"
@@ -66,4 +61,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {641F7536-D98F-4D5C-AF9F-1B24FC80BAED}
+ EndGlobalSection
EndGlobal
diff --git a/src/CodeFormatter/App.config b/src/CodeFormatter/App.config
index 3652bc09..d1fe0d0c 100644
--- a/src/CodeFormatter/App.config
+++ b/src/CodeFormatter/App.config
@@ -1,42 +1,11 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/CodeFormatter/CodeFormatter.csproj b/src/CodeFormatter/CodeFormatter.csproj
index db7d5844..b13f2636 100644
--- a/src/CodeFormatter/CodeFormatter.csproj
+++ b/src/CodeFormatter/CodeFormatter.csproj
@@ -1,87 +1,8 @@
-
-
-
+
- {B0E1A988-F762-459D-AD0D-56A3CF4FFF3F}
Exe
- Properties
- CodeFormatter
- CodeFormatter
+ net46
-
-
-
-
-
- ..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll
- True
-
-
-
- ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
- True
-
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll
-
-
-
- ..\packages\System.Reflection.Metadata.1.0.21\lib\portable-net45+win8\System.Reflection.Metadata.dll
- True
-
-
-
-
-
-
-
-
-
-
-
-
PreserveNewest
@@ -91,22 +12,24 @@
-
-
-
-
-
- {D535641F-A2D7-481C-930D-96C02F052B95}
- Microsoft.DotNet.CodeFormatting
-
-
-
-
-
+
-
-
+
+
+ <_CopyItems Include="..\ExternalApis\msbuild\*.*" />
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CodeFormatter/CommandLineParser.cs b/src/CodeFormatter/CommandLineParser.cs
index 61ba409b..72aaa123 100644
--- a/src/CodeFormatter/CommandLineParser.cs
+++ b/src/CodeFormatter/CommandLineParser.cs
@@ -15,6 +15,7 @@ public enum Operation
{
Format,
ListRules,
+ ShowHelp
}
public sealed class CommandLineOptions
@@ -30,6 +31,18 @@ public sealed class CommandLineOptions
allowTables: false,
verbose: false);
+ public static readonly CommandLineOptions ShowHelp = new CommandLineOptions(
+ Operation.ShowHelp,
+ ImmutableArray.Empty,
+ ImmutableArray.Empty,
+ ImmutableDictionary.Empty,
+ ImmutableArray.Empty,
+ ImmutableArray.Empty,
+ null,
+ allowTables: false,
+ verbose: false);
+
+
public readonly Operation Operation;
public readonly ImmutableArray PreprocessorConfigurations;
public readonly ImmutableArray CopyrightHeader;
@@ -117,31 +130,33 @@ public static class CommandLineParser
{
private const string FileSwitch = "/file:";
private const string ConfigSwitch = "/c:";
- private const string CopyrightSwitch = "/copyright:";
+ private const string CopyrightWithFileSwitch = "/copyright:";
private const string LanguageSwitch = "/lang:";
private const string RuleEnabledSwitch1 = "/rule+:";
private const string RuleEnabledSwitch2 = "/rule:";
private const string RuleDisabledSwitch = "/rule-:";
- private const string Usage =
+ private const string Usage =
@"CodeFormatter [/file:] [/lang:] [/c:[,...]>]
- [/copyright: | /nocopyright] [/tables] [/nounicode]
+ [/copyright(+|-):[]] [/tables] [/nounicode]
[/rule(+|-):rule1,rule2,...] [/verbose]
- /file - Only apply changes to files with specified name
- /lang - Specifies the language to use when a responsefile is
- specified. i.e. 'C#', 'Visual Basic', ... (default: 'C#')
- /c - Additional preprocessor configurations the formatter
- should run under.
- /copyright - Specifies file containing copyright header.
- Use ConvertTests to convert MSTest tests to xUnit.
- /nocopyright - Do not update the copyright message.
- /tables - Let tables opt out of formatting by defining
- DOTNET_FORMATTER
- /nounicode - Do not convert unicode strings to escape sequences
- /rule(+|-) - Enable (default) or disable the specified rule
- /rules - List the available rules
- /verbose - Verbose output
+ /file - Only apply changes to files with specified name
+ /lang - Specifies the language to use when a responsefile is
+ specified. i.e. 'C#', 'Visual Basic', ... (default: 'C#')
+ /c - Additional preprocessor configurations the formatter
+ should run under.
+ /copyright(+|-) - Enables or disables (default) updating the copyright
+ header in files, optionally specifying a file
+ containing a custom copyright header.
+ /nocopyright - Do not update the copyright message.
+ /tables - Let tables opt out of formatting by defining
+ DOTNET_FORMATTER
+ /nounicode - Do not convert unicode strings to escape sequences
+ /rule(+|-) - Enable (default) or disable the specified rule
+ /rules - List the available rules
+ /verbose - Verbose output
+ /help - Displays this usage message (short form: /?)
";
public static void PrintUsage()
@@ -163,7 +178,7 @@ public static CommandLineParseResult Parse(string[] args)
var formatTargets = new List();
var fileNames = new List();
var configBuilder = ImmutableArray.CreateBuilder();
- var copyrightHeader = FormattingDefaults.DefaultCopyrightHeader;
+ var copyrightHeader = ImmutableArray.Empty;
var ruleMap = ImmutableDictionary.Empty;
var language = LanguageNames.CSharp;
var allowTables = false;
@@ -172,15 +187,22 @@ public static CommandLineParseResult Parse(string[] args)
for (int i = 0; i < args.Length; i++)
{
string arg = args[i];
- if (arg.StartsWith(ConfigSwitch, StringComparison.OrdinalIgnoreCase))
+ if (arg.StartsWith(ConfigSwitch, comparison))
{
var all = arg.Substring(ConfigSwitch.Length);
var configs = all.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
configBuilder.Add(configs);
}
- else if (arg.StartsWith(CopyrightSwitch, StringComparison.OrdinalIgnoreCase))
+ else if (comparer.Equals(arg, "/copyright+") || comparer.Equals(arg, "/copyright"))
+ {
+ ruleMap = ruleMap.SetItem(FormattingDefaults.CopyrightRuleName, true);
+ copyrightHeader = FormattingDefaults.DefaultCopyrightHeader;
+ }
+ else if (arg.StartsWith(CopyrightWithFileSwitch, comparison))
{
- var fileName = arg.Substring(CopyrightSwitch.Length);
+ ruleMap = ruleMap.SetItem(FormattingDefaults.CopyrightRuleName, true);
+
+ var fileName = arg.Substring(CopyrightWithFileSwitch.Length);
try
{
copyrightHeader = ImmutableArray.CreateRange(File.ReadAllLines(fileName));
@@ -194,13 +216,14 @@ public static CommandLineParseResult Parse(string[] args)
return CommandLineParseResult.CreateError(error);
}
}
- else if (arg.StartsWith(LanguageSwitch, StringComparison.OrdinalIgnoreCase))
- {
- language = arg.Substring(LanguageSwitch.Length);
+ else if (comparer.Equals(arg, "/copyright-") || comparer.Equals(arg, "/nocopyright"))
+ { // We still check /nocopyright for backwards compat
+
+ ruleMap = ruleMap.SetItem(FormattingDefaults.CopyrightRuleName, false);
}
- else if (comparer.Equals(arg, "/nocopyright"))
+ else if (arg.StartsWith(LanguageSwitch, comparison))
{
- ruleMap = ruleMap.SetItem(FormattingDefaults.CopyrightRuleName, false);
+ language = arg.Substring(LanguageSwitch.Length);
}
else if (comparer.Equals(arg, "/nounicode"))
{
@@ -234,6 +257,14 @@ public static CommandLineParseResult Parse(string[] args)
{
return CommandLineParseResult.CreateSuccess(CommandLineOptions.ListRules);
}
+ else if (comparer.Equals(arg, "/?") || comparer.Equals(arg, "/help"))
+ {
+ return CommandLineParseResult.CreateSuccess(CommandLineOptions.ShowHelp);
+ }
+ else if (arg.StartsWith("/", comparison))
+ {
+ return CommandLineParseResult.CreateError($"Unrecognized option \"{arg}\"");
+ }
else
{
formatTargets.Add(arg);
diff --git a/src/CodeFormatter/Program.cs b/src/CodeFormatter/Program.cs
index 349e629c..42a7a8a2 100644
--- a/src/CodeFormatter/Program.cs
+++ b/src/CodeFormatter/Program.cs
@@ -31,6 +31,11 @@ private static int Main(string[] args)
int exitCode;
switch (options.Operation)
{
+ case Operation.ShowHelp:
+ CommandLineParser.PrintUsage();
+ exitCode = 0;
+ break;
+
case Operation.ListRules:
RunListRules();
exitCode = 0;
@@ -42,7 +47,7 @@ private static int Main(string[] args)
throw new Exception("Invalid enum value: " + options.Operation);
}
- return 0;
+ return exitCode;
}
private static void RunListRules()
@@ -76,6 +81,7 @@ private static int RunFormat(CommandLineOptions options)
throw;
Console.WriteLine("ERROR: Type loading error detected. In order to run this tool you need either Visual Studio 2015 or Microsoft Build Tools 2015 tools installed.");
+ Console.WriteLine(typeLoadException.StackTrace);
var messages = typeLoadException.LoaderExceptions.Select(e => e.Message).Distinct();
foreach (var message in messages)
Console.WriteLine("- {0}", message);
diff --git a/src/CodeFormatter/Properties/AssemblyInfo.cs b/src/CodeFormatter/Properties/AssemblyInfo.cs
deleted file mode 100644
index 302158de..00000000
--- a/src/CodeFormatter/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyCopyright("\x00a9 Microsoft Corporation. All rights reserved.")]
-[assembly: AssemblyCompany("Microsoft Corporation")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: AssemblyInformationalVersion("1.0.0.0")]
-[assembly: AssemblyVersion("1.0.0.0")]
-
-[assembly: AssemblyTitle("CodeFormatter")]
-[assembly: AssemblyProduct("CodeFormatter")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
diff --git a/src/CodeFormatter/packages.config b/src/CodeFormatter/packages.config
deleted file mode 100644
index 8eec5702..00000000
--- a/src/CodeFormatter/packages.config
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/DeadRegions/App.config b/src/DeadRegions/App.config
deleted file mode 100644
index 3652bc09..00000000
--- a/src/DeadRegions/App.config
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/DeadRegions/DeadRegions.csproj b/src/DeadRegions/DeadRegions.csproj
index cdb8297f..67bff135 100644
--- a/src/DeadRegions/DeadRegions.csproj
+++ b/src/DeadRegions/DeadRegions.csproj
@@ -1,91 +1,9 @@
-
-
-
+
- {B65D5F61-64BF-4219-863C-74C2744AE8FC}
Exe
- Properties
- DeadRegions
- DeadRegions
+ net46
-
-
-
-
- ..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll
- True
-
-
-
- ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
- True
-
-
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll
-
-
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll
-
-
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll
-
-
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll
-
-
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll
-
-
-
-
- ..\packages\System.Reflection.Metadata.1.0.21\lib\portable-net45+win8\System.Reflection.Metadata.dll
- True
-
+
-
-
-
-
-
-
-
-
-
-
-
-
- {27f04393-37fd-4d02-b574-0084bb7f6a59}
- Microsoft.DotNet.DeadRegionAnalysis
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/DeadRegions/Properties/AssemblyInfo.cs b/src/DeadRegions/Properties/AssemblyInfo.cs
deleted file mode 100644
index 6b8bed81..00000000
--- a/src/DeadRegions/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Reflection;
-
-[assembly: AssemblyCopyright("\x00a9 Microsoft Corporation. All rights reserved.")]
-[assembly: AssemblyCompany("Microsoft Corporation")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: AssemblyInformationalVersion("1.0.0.0")]
-[assembly: AssemblyVersion("1.0.0.0")]
-
-[assembly: AssemblyTitle("DeadRegions")]
-[assembly: AssemblyProduct("DeadRegions")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
diff --git a/src/DeadRegions/packages.config b/src/DeadRegions/packages.config
deleted file mode 100644
index 8eec5702..00000000
--- a/src/DeadRegions/packages.config
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.CodeFormatting.Tests/CommandLineParserTests.cs b/src/Microsoft.DotNet.CodeFormatting.Tests/CommandLineParserTests.cs
index 9f5c90ef..12a70a78 100644
--- a/src/Microsoft.DotNet.CodeFormatting.Tests/CommandLineParserTests.cs
+++ b/src/Microsoft.DotNet.CodeFormatting.Tests/CommandLineParserTests.cs
@@ -17,6 +17,15 @@ private CommandLineOptions Parse(params string[] args)
return options;
}
+ private CommandLineOptions FailToParse(params string[] args)
+ {
+ CommandLineOptions options;
+ Assert.False(CommandLineParser.TryParse(args, out options));
+ Assert.Null(options);
+
+ return options;
+ }
+
[Fact]
public void Rules()
{
@@ -83,6 +92,14 @@ public void NoUnicode()
Assert.Equal(new[] { "test.csproj" }, options.FormatTargets);
}
+ [Fact]
+ public void CopyrightDisable()
+ {
+ var options = Parse("/copyright-", "test.csproj");
+ Assert.False(options.RuleMap[FormattingDefaults.CopyrightRuleName]);
+ Assert.Equal(new[] { "test.csproj" }, options.FormatTargets);
+ }
+
[Fact]
public void NoCopyright()
{
@@ -90,5 +107,61 @@ public void NoCopyright()
Assert.False(options.RuleMap[FormattingDefaults.CopyrightRuleName]);
Assert.Equal(new[] { "test.csproj" }, options.FormatTargets);
}
+
+
+ [Fact]
+ public void Help()
+ {
+ var options = Parse("/help");
+ Assert.Equal(Operation.ShowHelp, options.Operation);
+ }
+
+ [Fact]
+ public void HelpShortForm()
+ {
+ var options = Parse("/?");
+ Assert.Equal(Operation.ShowHelp, options.Operation);
+ }
+
+ [Fact]
+ public void HelpWithOtherwiseValidArguments()
+ {
+ var options = Parse("test.csproj", "/nocopyright", "/help");
+ Assert.Equal(Operation.ShowHelp, options.Operation);
+ }
+
+ [Fact]
+ public void CopyrightEnable1()
+ {
+ var options = Parse("/copyright+", "test.csproj");
+ Assert.True(options.RuleMap[FormattingDefaults.CopyrightRuleName]);
+ Assert.Equal(new[] { "test.csproj" }, options.FormatTargets);
+ }
+
+ [Fact]
+ public void CopyrightEnable2()
+ {
+ var options = Parse("/copyright", "test.csproj");
+ Assert.True(options.RuleMap[FormattingDefaults.CopyrightRuleName]);
+ Assert.Equal(new[] { "test.csproj" }, options.FormatTargets);
+ }
+
+ [Fact]
+ public void SingleUnrecognizedOption()
+ {
+ FailToParse("/unrecognized");
+ }
+
+ [Fact]
+ public void UnrecognizedOptionWithFormatTarget()
+ {
+ FailToParse("test.csproj", "/unrecognized");
+ }
+
+ [Fact]
+ public void UnrecognizedOptionWithOtherwiseValidArguments()
+ {
+ FailToParse("test.csproj", "/nocopyright", "/unrecognized");
+ }
}
}
diff --git a/src/Microsoft.DotNet.CodeFormatting.Tests/Microsoft.DotNet.CodeFormatting.Tests.csproj b/src/Microsoft.DotNet.CodeFormatting.Tests/Microsoft.DotNet.CodeFormatting.Tests.csproj
index 0e81ce9e..3f4fc5c8 100644
--- a/src/Microsoft.DotNet.CodeFormatting.Tests/Microsoft.DotNet.CodeFormatting.Tests.csproj
+++ b/src/Microsoft.DotNet.CodeFormatting.Tests/Microsoft.DotNet.CodeFormatting.Tests.csproj
@@ -1,146 +1,17 @@
-
-
-
-
+
- {D4D6FF88-0586-43C7-BDE4-D336EB25E7AA}
- Library
- Properties
- Microsoft.DotNet.CodeFormatting.Tests
- Microsoft.DotNet.CodeFormatting.Tests
- ..\
+ net46
-
-
-
-
-
- ..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll
- True
-
-
-
-
- ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
- True
-
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll
-
-
-
- ..\packages\System.Reflection.Metadata.1.0.21\lib\portable-net45+win8\System.Reflection.Metadata.dll
- True
-
-
-
-
-
-
-
- ..\packages\xunit.1.9.2\lib\net20\xunit.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
IllegalHeaders.md
Always
-
-
- Designer
-
-
-
-
- {b0e1a988-f762-459d-ad0d-56a3cf4fff3f}
- CodeFormatter
-
-
- {d535641f-a2d7-481c-930d-96c02f052b95}
- Microsoft.DotNet.CodeFormatting
-
-
-
-
-
-
+
+
+
+
-
-
-
- This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/CombinationTest.cs b/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/CombinationTest.cs
index 31e217d9..cc90c72e 100644
--- a/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/CombinationTest.cs
+++ b/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/CombinationTest.cs
@@ -66,8 +66,7 @@ void M() {
}
}";
- var expected = @"// header
-
+ var expected = @"
internal class C
{
private int _field;
@@ -123,8 +122,7 @@ void M() {
}
}";
- var expected = @"// header
-
+ var expected = @"
internal class C
{
private int field;
@@ -151,8 +149,7 @@ void M() {
}
}";
- var expected = @"// header
-
+ var expected = @"
internal class C
{
private int _field;
@@ -177,8 +174,7 @@ void M() { }
#endif
}";
- var expected = @"// header
-
+ var expected = @"
internal class C
{
#if DOG
@@ -201,8 +197,7 @@ internal void M() {
#endif
}";
- var expected = @"// header
-
+ var expected = @"
internal class C
{
#if DOG
@@ -232,8 +227,7 @@ void M() {
#endif
}";
- var expected = @"// header
-
+ var expected = @"
internal class C
{
private void G()
@@ -270,8 +264,7 @@ void M() {
#endif
}";
- var expected = @"// header
-
+ var expected = @"
internal class C
{
#if TEST
@@ -310,8 +303,7 @@ private void M()
}
}";
- var expected = @"// header
-
+ var expected = @"
internal class C
{
private void M()
@@ -348,8 +340,7 @@ public void RequiredRuntimeAttribute()
{}
}
}";
- var expected = @"// header
-
+ var expected = @"
using System;
using System.Reflection;
@@ -362,7 +353,73 @@ public void RequiredRuntimeAttribute()
}
}";
+ // Using location rule is off by default.
+ ToggleRule(UsingLocationRule.Name, enabled: true);
Verify(source, expected);
}
+
+ [Fact]
+ public void Issue268()
+ {
+ var text = @"
+using System.Collections.Generic;
+
+internal class C
+{
+ private void M()
+ {
+ Dictionary> dict = new Dictionary>();
+ dict.TryGetValue(""key"", out Stack stack);
+ }
+}";
+
+ Verify(text, expected:text);
+ }
+
+ [Fact]
+ public void Issue272()
+ {
+ var text = @"
+using System.Collections.Generic;
+
+internal class C
+{
+
+ private object myVariable;
+
+ private void M()
+ {
+ Dictionary dict = new Dictionary()
+ {
+ { ""key"", new object() }
+ };
+
+ dict.TryGetValue(""key"", out object myVariable);
+
+ this.myVariable = myVariable;
+ }
+}";
+ var expected = @"
+using System.Collections.Generic;
+
+internal class C
+{
+ private object _myVariable;
+
+ private void M()
+ {
+ Dictionary dict = new Dictionary()
+ {
+ { ""key"", new object() }
+ };
+
+ dict.TryGetValue(""key"", out object myVariable);
+
+ _myVariable = myVariable;
+ }
+}";
+
+ Verify(text, expected);
+ }
}
}
diff --git a/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/ExplicitVisibilityRuleTests.cs b/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/ExplicitVisibilityRuleTests.cs
index b6a431c7..843b1a96 100644
--- a/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/ExplicitVisibilityRuleTests.cs
+++ b/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/ExplicitVisibilityRuleTests.cs
@@ -555,10 +555,11 @@ private unsafe C(int p1, int p2) { }
Verify(text, expected);
}
+ [Fact]
public void CommentAttributeAndMultipleField()
{
var text = @"
-class C
+class C
{
// Hello
[Attr]
@@ -567,7 +568,7 @@ class C
};";
var expected = @"
-internal class C
+internal class C
{
// Hello
[Attr]
@@ -863,6 +864,29 @@ Function F1()
Verify(text, expected, runFormatter: false, languageName: LanguageNames.VisualBasic);
}
+ [Fact]
+ public void Delegates()
+ {
+ var text = @"
+Delegate Function Func1() As Boolean
+
+Friend Class Foo
+
+ Delegate Function Func2() As Boolean
+End Class
+";
+
+ var expected = @"
+Friend Delegate Function Func1() As Boolean
+
+Friend Class Foo
+
+ Public Delegate Function Func2() As Boolean
+End Class
+";
+ Verify(text, expected, runFormatter: false, languageName: LanguageNames.VisualBasic);
+ }
+
///
/// VB.Net can have visibility modifiers + explicit interface implementation unlike C#. The
/// visibility rules for these members is the same as normal members.
diff --git a/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/PrivateFieldNamingRuleTests.cs b/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/PrivateFieldNamingRuleTests.cs
index 7b6a713c..20927d19 100644
--- a/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/PrivateFieldNamingRuleTests.cs
+++ b/src/Microsoft.DotNet.CodeFormatting.Tests/Rules/PrivateFieldNamingRuleTests.cs
@@ -14,7 +14,7 @@ internal override IGlobalSemanticFormattingRule Rule
get { return new Rules.PrivateFieldNamingRule(); }
}
- private sealed class CSharpFields : PrivateFieldNamingRuleTests
+ public sealed class CSharpFields : PrivateFieldNamingRuleTests
{
[Fact]
public void TestUnderScoreInPrivateFields()
@@ -44,10 +44,8 @@ class T
// some trivia
private int _k = 1, _s = 2, _rsk_yz = 3, _y_z;
// some trivia
- [ThreadStatic]
- static int t_r;
- [ThreadStaticAttribute]
- static int t_r;
+ [ThreadStatic] static int t_r;
+ [ThreadStaticAttribute] static int t_r;
}";
Verify(text, expected);
}
@@ -213,9 +211,61 @@ int M(C p)
Verify(text, expected);
}
+
+ [Fact]
+ public void Issue258()
+ {
+ var text = @"
+class C
+{
+ private (string name, string value) myTuple;
+}
+";
+ var expected = @"
+class C
+{
+ private (string name, string value) _myTuple;
+}
+";
+
+ Verify(text, expected, runFormatter: false);
+ }
+
+ [Fact]
+ public void Issue241()
+ {
+ var text = @"
+class C
+{
+ private bool streamObjects;
+
+ ///
+ /// A collection in which objects that are written using the WriteError
+ /// method are accumulated if is false.
+ ///
+ private List errors;
+
+}
+";
+ var expected = @"
+class C
+{
+ private bool _streamObjects;
+
+ ///
+ /// A collection in which objects that are written using the WriteError
+ /// method are accumulated if is false.
+ ///
+ private List _errors;
+
+}
+";
+
+ Verify(text, expected, runFormatter: false);
+ }
}
- private sealed class VisualBasicFields : PrivateFieldNamingRuleTests
+ public sealed class VisualBasicFields : PrivateFieldNamingRuleTests
{
[Fact]
public void Simple()
@@ -314,6 +364,47 @@ End Function
Verify(text, expected, languageName: LanguageNames.VisualBasic);
}
+
+ [Fact]
+ public void FieldMarkedWithEvents()
+ { // See: https://github.com/dotnet/codeformatter/issues/216
+
+ var text = @"
+Class C1
+ Private Field WithEvents As Integer
+End Class";
+
+ var expected = @"
+Class C1
+ Private _field WithEvents As Integer
+End Class";
+
+ Verify(text, expected, languageName: LanguageNames.VisualBasic);
+ }
+
+ [Fact]
+ public void RemoveTwoLetterThreadStaticPrefix()
+ {
+ var text = @"
+class C
+{
+ int ts_instance;
+ static int ts_Static;
+ [System.ThreadStatic]static int ts_ThreadStatic;
+}
+";
+
+ var expected = @"
+class C
+{
+ int _instance;
+ static int s_static;
+ [System.ThreadStatic]static int t_threadStatic;
+}
+";
+
+ Verify(text, expected, runFormatter: false);
+ }
}
}
}
diff --git a/src/Microsoft.DotNet.CodeFormatting.Tests/app.config b/src/Microsoft.DotNet.CodeFormatting.Tests/app.config
deleted file mode 100644
index fdf36b41..00000000
--- a/src/Microsoft.DotNet.CodeFormatting.Tests/app.config
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.CodeFormatting.Tests/packages.config b/src/Microsoft.DotNet.CodeFormatting.Tests/packages.config
deleted file mode 100644
index b3fd47d1..00000000
--- a/src/Microsoft.DotNet.CodeFormatting.Tests/packages.config
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.CodeFormatting/Microsoft.DotNet.CodeFormatting.csproj b/src/Microsoft.DotNet.CodeFormatting/Microsoft.DotNet.CodeFormatting.csproj
index 9ef1dc2a..ad99c8e9 100644
--- a/src/Microsoft.DotNet.CodeFormatting/Microsoft.DotNet.CodeFormatting.csproj
+++ b/src/Microsoft.DotNet.CodeFormatting/Microsoft.DotNet.CodeFormatting.csproj
@@ -1,126 +1,11 @@
-
-
-
+
- {D535641F-A2D7-481C-930D-96C02F052B95}
- Library
- Properties
- Microsoft.DotNet.CodeFormatting
- Microsoft.DotNet.CodeFormatting
+ net46
-
-
-
-
- False
- ..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll
-
-
- False
- ..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll
-
-
- False
- ..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll
-
-
- False
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.dll
-
-
- False
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll
-
-
- False
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll
-
-
-
- False
- ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
-
-
-
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll
-
-
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll
-
-
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll
-
-
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll
-
-
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll
-
-
-
- False
- ..\packages\System.Reflection.Metadata.1.0.21\lib\portable-net45+win8\System.Reflection.Metadata.dll
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.CodeFormatting/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.CodeFormatting/Properties/AssemblyInfo.cs
index 96d80970..50483343 100644
--- a/src/Microsoft.DotNet.CodeFormatting/Properties/AssemblyInfo.cs
+++ b/src/Microsoft.DotNet.CodeFormatting/Properties/AssemblyInfo.cs
@@ -6,17 +6,4 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-[assembly: AssemblyCopyright("\x00a9 Microsoft Corporation. All rights reserved.")]
-[assembly: AssemblyCompany("Microsoft Corporation")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: AssemblyInformationalVersion("1.0.0.0")]
-[assembly: AssemblyVersion("1.0.0.0")]
-
-[assembly: AssemblyTitle("Microsoft.DotNet.CodeFormatting")]
-[assembly: AssemblyProduct("Microsoft.DotNet.CodeFormatting")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
[assembly: InternalsVisibleTo("Microsoft.DotNet.CodeFormatting.Tests")]
diff --git a/src/Microsoft.DotNet.CodeFormatting/Rules/CopyrightHeaderRule.cs b/src/Microsoft.DotNet.CodeFormatting/Rules/CopyrightHeaderRule.cs
index 88fdb1bf..f297bfea 100644
--- a/src/Microsoft.DotNet.CodeFormatting/Rules/CopyrightHeaderRule.cs
+++ b/src/Microsoft.DotNet.CodeFormatting/Rules/CopyrightHeaderRule.cs
@@ -13,7 +13,7 @@
namespace Microsoft.DotNet.CodeFormatting.Rules
{
- [SyntaxRule(CopyrightHeaderRule.Name, CopyrightHeaderRule.Description, SyntaxRuleOrder.CopyrightHeaderRule)]
+ [SyntaxRule(CopyrightHeaderRule.Name, CopyrightHeaderRule.Description, SyntaxRuleOrder.CopyrightHeaderRule, DefaultRule=false)]
internal sealed partial class CopyrightHeaderRule : SyntaxFormattingRule, ISyntaxFormattingRule
{
internal const string Name = FormattingDefaults.CopyrightRuleName;
diff --git a/src/Microsoft.DotNet.CodeFormatting/Rules/ExplicitVisibilityRule.VisualBasic.cs b/src/Microsoft.DotNet.CodeFormatting/Rules/ExplicitVisibilityRule.VisualBasic.cs
index 9fc98a8c..6f5d2f1a 100644
--- a/src/Microsoft.DotNet.CodeFormatting/Rules/ExplicitVisibilityRule.VisualBasic.cs
+++ b/src/Microsoft.DotNet.CodeFormatting/Rules/ExplicitVisibilityRule.VisualBasic.cs
@@ -164,7 +164,7 @@ public override SyntaxNode VisitFieldDeclaration(FieldDeclarationSyntax node)
public override SyntaxNode VisitDelegateStatement(DelegateStatementSyntax node)
{
- return EnsureVisibility(node, node.Modifiers, (x, l) => x.WithModifiers(l), () => SyntaxKind.PublicKeyword);
+ return EnsureVisibility(node, node.Modifiers, (x, l) => x.WithModifiers(l), () => GetDelegateTypeDefaultVisibility(node));
}
public override SyntaxNode VisitPropertyStatement(PropertyStatementSyntax node)
diff --git a/src/Microsoft.DotNet.CodeFormatting/Rules/PrivateFieldNamingRule.cs b/src/Microsoft.DotNet.CodeFormatting/Rules/PrivateFieldNamingRule.cs
index 6c418b6a..949b7a15 100644
--- a/src/Microsoft.DotNet.CodeFormatting/Rules/PrivateFieldNamingRule.cs
+++ b/src/Microsoft.DotNet.CodeFormatting/Rules/PrivateFieldNamingRule.cs
@@ -63,7 +63,10 @@ private async Task RenameFields(Solution solution, DocumentId document
var semanticModel = await solution.GetDocument(documentId).GetSemanticModelAsync(cancellationToken);
var root = await semanticModel.SyntaxTree.GetRootAsync(cancellationToken);
var declaration = root.GetAnnotatedNodes(s_markerAnnotation).ElementAt(i);
- var fieldSymbol = (IFieldSymbol)semanticModel.GetDeclaredSymbol(declaration, cancellationToken);
+
+ // Make note, VB represents "fields" marked as "WithEvents" as properties, so don't be
+ // tempted to treat this as a IFieldSymbol. We only need the name, so ISymbol is enough.
+ var fieldSymbol = semanticModel.GetDeclaredSymbol(declaration, cancellationToken);
var newName = GetNewFieldName(fieldSymbol);
// Can happen with pathologically bad field names like _
@@ -79,7 +82,7 @@ private async Task RenameFields(Solution solution, DocumentId document
return solution;
}
- private static string GetNewFieldName(IFieldSymbol fieldSymbol)
+ private static string GetNewFieldName(ISymbol fieldSymbol)
{
var name = fieldSymbol.Name.Trim('_');
if (name.Length > 2 && char.IsLetter(name[0]) && name[1] == '_')
@@ -87,6 +90,12 @@ private static string GetNewFieldName(IFieldSymbol fieldSymbol)
name = name.Substring(2);
}
+ // Some .NET code uses "ts_" prefix for thread static
+ if (name.Length > 3 && name.StartsWith("ts_", StringComparison.OrdinalIgnoreCase))
+ {
+ name = name.Substring(3);
+ }
+
if (name.Length == 0)
{
return fieldSymbol.Name;
diff --git a/src/Microsoft.DotNet.CodeFormatting/app.config b/src/Microsoft.DotNet.CodeFormatting/app.config
deleted file mode 100644
index fdf36b41..00000000
--- a/src/Microsoft.DotNet.CodeFormatting/app.config
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.CodeFormatting/packages.config b/src/Microsoft.DotNet.CodeFormatting/packages.config
deleted file mode 100644
index b8a805c2..00000000
--- a/src/Microsoft.DotNet.CodeFormatting/packages.config
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/Microsoft.DotNet.DeadRegionAnalysis.Tests.csproj b/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/Microsoft.DotNet.DeadRegionAnalysis.Tests.csproj
index ec931a38..c3d80f90 100644
--- a/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/Microsoft.DotNet.DeadRegionAnalysis.Tests.csproj
+++ b/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/Microsoft.DotNet.DeadRegionAnalysis.Tests.csproj
@@ -1,106 +1,10 @@
-
-
-
-
+
- {7C57FD95-030E-48B2-B369-6694BB922C8C}
- Library
- Properties
- Microsoft.DotNet.DeadRegionAnalysis.Tests
- Microsoft.DotNet.DeadRegionAnalysis.Tests
+ net46
-
-
-
-
- ..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll
- True
-
-
-
- ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
- True
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll
-
-
-
-
- ..\packages\System.Reflection.Metadata.1.0.21\lib\portable-net45+win8\System.Reflection.Metadata.dll
- True
-
-
- ..\packages\xunit.1.9.2\lib\net20\xunit.dll
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {27f04393-37fd-4d02-b574-0084bb7f6a59}
- Microsoft.DotNet.DeadRegionAnalysis
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index 64499e02..00000000
--- a/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Reflection;
-
-[assembly: AssemblyCopyright("\x00a9 Microsoft Corporation. All rights reserved.")]
-[assembly: AssemblyCompany("Microsoft Corporation")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: AssemblyInformationalVersion("1.0.0.0")]
-[assembly: AssemblyVersion("1.0.0.0")]
-
-[assembly: AssemblyTitle("Microsoft.DotNet.DeadRegionAnalysis.Tests")]
-[assembly: AssemblyProduct("Microsoft.DotNet.DeadRegionAnalysis.Tests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
diff --git a/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/app.config b/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/app.config
deleted file mode 100644
index 027d68d2..00000000
--- a/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/app.config
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/packages.config b/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/packages.config
deleted file mode 100644
index b3fd47d1..00000000
--- a/src/Microsoft.DotNet.DeadRegionAnalysis.Tests/packages.config
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.DeadRegionAnalysis/Microsoft.DotNet.DeadRegionAnalysis.csproj b/src/Microsoft.DotNet.DeadRegionAnalysis/Microsoft.DotNet.DeadRegionAnalysis.csproj
index e3cb3603..ad99c8e9 100644
--- a/src/Microsoft.DotNet.DeadRegionAnalysis/Microsoft.DotNet.DeadRegionAnalysis.csproj
+++ b/src/Microsoft.DotNet.DeadRegionAnalysis/Microsoft.DotNet.DeadRegionAnalysis.csproj
@@ -1,98 +1,11 @@
-
-
-
+
- {27F04393-37FD-4D02-B574-0084BB7F6A59}
- Library
- Properties
- Microsoft.DotNet.DeadRegionAnalysis
- Microsoft.DotNet.DeadRegionAnalysis
+ net46
-
-
-
-
- ..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll
- True
-
-
-
- ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
- True
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll
-
-
-
-
- ..\packages\System.Reflection.Metadata.1.0.21\lib\portable-net45+win8\System.Reflection.Metadata.dll
- True
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.DeadRegionAnalysis/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.DeadRegionAnalysis/Properties/AssemblyInfo.cs
index c3616e91..f9db42a9 100644
--- a/src/Microsoft.DotNet.DeadRegionAnalysis/Properties/AssemblyInfo.cs
+++ b/src/Microsoft.DotNet.DeadRegionAnalysis/Properties/AssemblyInfo.cs
@@ -5,17 +5,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyCopyright("\x00a9 Microsoft Corporation. All rights reserved.")]
-[assembly: AssemblyCompany("Microsoft Corporation")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: AssemblyInformationalVersion("1.0.0.0")]
-[assembly: AssemblyVersion("1.0.0.0")]
-
-[assembly: AssemblyTitle("Microsoft.DotNet.DeadRegionAnalysis")]
-[assembly: AssemblyProduct("Microsoft.DotNet.DeadRegionAnalysis")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
[assembly: InternalsVisibleTo("Microsoft.DotNet.DeadRegionAnalysis.Tests")]
diff --git a/src/Microsoft.DotNet.DeadRegionAnalysis/packages.config b/src/Microsoft.DotNet.DeadRegionAnalysis/packages.config
deleted file mode 100644
index 8eec5702..00000000
--- a/src/Microsoft.DotNet.DeadRegionAnalysis/packages.config
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/XUnitConverter.Tests/ConverterTestBase.cs b/src/XUnitConverter.Tests/ConverterTestBase.cs
index 8dd0ad28..8886fbb9 100644
--- a/src/XUnitConverter.Tests/ConverterTestBase.cs
+++ b/src/XUnitConverter.Tests/ConverterTestBase.cs
@@ -5,14 +5,10 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Formatting;
using Microsoft.CodeAnalysis.Text;
-using System;
-using System.Collections.Generic;
using System.Linq;
-using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
-using XUnitConverter;
namespace XUnitConverter.Tests
{
@@ -21,7 +17,8 @@ public abstract class ConverterTestBase
private static readonly MetadataReference s_CorlibReference = MetadataReference.CreateFromFile(typeof(object).Assembly.Location);
private static readonly MetadataReference s_SystemCoreReference = MetadataReference.CreateFromFile(typeof(Enumerable).Assembly.Location);
private static readonly MetadataReference s_MSTestReference = MetadataReference.CreateFromFile(typeof(Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute).Assembly.Location);
- private static readonly MetadataReference s_XunitReference = MetadataReference.CreateFromFile(typeof(FactAttribute).Assembly.Location);
+ private static readonly MetadataReference s_XunitCoreReference = MetadataReference.CreateFromFile(typeof(Xunit.FactAttribute).Assembly.Location);
+ private static readonly MetadataReference s_XunitAssertReference = MetadataReference.CreateFromFile(typeof(Xunit.Assert).Assembly.Location);
protected abstract ConverterBase CreateConverter();
@@ -53,7 +50,8 @@ private Project CreateSolution(string source)
s_CorlibReference,
s_SystemCoreReference,
s_MSTestReference,
- s_XunitReference
+ s_XunitCoreReference,
+ s_XunitAssertReference
};
var solution = new AdhocWorkspace()
diff --git a/src/XUnitConverter.Tests/Properties/AssemblyInfo.cs b/src/XUnitConverter.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index 6407d9f1..00000000
--- a/src/XUnitConverter.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("XUnitConverter.Tests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("XUnitConverter.Tests")]
-[assembly: AssemblyCopyright("Copyright \u00A9 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("53b17378-8f9a-4669-ac68-94b0ae5e4e24")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/XUnitConverter.Tests/XUnitConverter.Tests.csproj b/src/XUnitConverter.Tests/XUnitConverter.Tests.csproj
index 6fb164f7..c4f31f41 100644
--- a/src/XUnitConverter.Tests/XUnitConverter.Tests.csproj
+++ b/src/XUnitConverter.Tests/XUnitConverter.Tests.csproj
@@ -1,103 +1,12 @@
-
-
-
-
+
- {BA4C1700-8A72-4F33-AF67-0E60F324E521}
- Library
- Properties
- XUnitConverter.Tests
- XUnitConverter.Tests
- 2f07db9d
+ net46
-
-
-
-
- ..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll
- True
-
-
-
-
- ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
- True
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll
-
-
-
- ..\packages\System.Reflection.Metadata.1.0.21\lib\portable-net45+win8\System.Reflection.Metadata.dll
- True
-
-
-
-
-
-
-
- ..\packages\xunit.1.9.2\lib\net20\xunit.dll
-
-
-
-
-
-
-
-
-
-
-
- {81b0ff57-c128-4f6b-83c7-94dbaf261582}
- XUnitConverter
-
-
-
-
-
+
+
+
+
@@ -105,25 +14,4 @@
PreserveNewest
-
-
-
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
\ No newline at end of file
diff --git a/src/XUnitConverter.Tests/app.config b/src/XUnitConverter.Tests/app.config
deleted file mode 100644
index 027d68d2..00000000
--- a/src/XUnitConverter.Tests/app.config
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/XUnitConverter.Tests/packages.config b/src/XUnitConverter.Tests/packages.config
deleted file mode 100644
index b3fd47d1..00000000
--- a/src/XUnitConverter.Tests/packages.config
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/XUnitConverter/App.config b/src/XUnitConverter/App.config
deleted file mode 100644
index 72824247..00000000
--- a/src/XUnitConverter/App.config
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/XUnitConverter/Properties/AssemblyInfo.cs b/src/XUnitConverter/Properties/AssemblyInfo.cs
deleted file mode 100644
index 1291a05f..00000000
--- a/src/XUnitConverter/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("XUnitConverter")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("XUnitConverter")]
-[assembly: AssemblyCopyright("Copyright \u00A9 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("3991954a-686f-4ed9-b5c7-b322f2f2e25c")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/XUnitConverter/XUnitConverter.csproj b/src/XUnitConverter/XUnitConverter.csproj
index 3ffab94f..19f37741 100644
--- a/src/XUnitConverter/XUnitConverter.csproj
+++ b/src/XUnitConverter/XUnitConverter.csproj
@@ -1,107 +1,15 @@
-
-
-
+
- {81B0FF57-C128-4F6B-83C7-94DBAF261582}
Exe
- Properties
- XUnitConverter
- XUnitConverter
+ net46
-
-
-
-
-
- ..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll
- True
-
-
- ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll
- True
-
-
-
- ..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
- True
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll
-
-
- False
- ..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll
-
-
-
- ..\packages\System.Reflection.Metadata.1.0.21\lib\portable-net45+win8\System.Reflection.Metadata.dll
- True
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
\ No newline at end of file
diff --git a/src/XUnitConverter/packages.config b/src/XUnitConverter/packages.config
deleted file mode 100644
index 8eec5702..00000000
--- a/src/XUnitConverter/packages.config
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/nuget/CodeFormatter.nuspec b/src/nuget/CodeFormatter.nuspec
deleted file mode 100644
index f0aa3468..00000000
--- a/src/nuget/CodeFormatter.nuspec
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- CodeFormatter
- 1.0.0-prerelease
- CodeFormatter
- Microsoft
- Microsoft
- CodeFormatter tool that enforces default coding guidelines.
- Copyright © Microsoft Corporation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file