diff --git a/appveyor.yml b/.appveyor.yml similarity index 100% rename from appveyor.yml rename to .appveyor.yml diff --git a/build/common.props b/Directory.Build.props similarity index 65% rename from build/common.props rename to Directory.Build.props index 2d638b0045..267a97877a 100644 --- a/build/common.props +++ b/Directory.Build.props @@ -1,23 +1,19 @@ - - + + Microsoft .NET https://github.com/aspnet/DotNetTools git - $(MSBuildThisFileDirectory)Key.snk + $(MSBuildThisFileDirectory)build\Key.snk true true $(VersionSuffix)-$(BuildNumber) true - + false - - - - diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 0000000000..8c119d5413 --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,2 @@ + + diff --git a/DotNetTools.sln b/DotNetTools.sln index 8af718e399..caea9174df 100644 --- a/DotNetTools.sln +++ b/DotNetTools.sln @@ -1,18 +1,38 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26510.0 +VisualStudioVersion = 15.0.26815.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{66517987-2A5A-4330-B130-207039378FD4}" + ProjectSection(SolutionItems) = preProject + src\Directory.Build.props = src\Directory.Build.props + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Watcher.Tools", "src\Microsoft.DotNet.Watcher.Tools\Microsoft.DotNet.Watcher.Tools.csproj", "{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8321E0D1-9A47-4D2F-AED8-3AE636D44E35}" ProjectSection(SolutionItems) = preProject + .appveyor.yml = .appveyor.yml .editorconfig = .editorconfig - NuGet.Config = NuGet.Config + .gitattributes = .gitattributes + .gitignore = .gitignore + .travis.yml = .travis.yml + build.cmd = build.cmd + build.ps1 = build.ps1 + build.sh = build.sh + CONTRIBUTING.md = CONTRIBUTING.md + Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets + LICENSE.txt = LICENSE.txt + NuGet.config = NuGet.config + NuGetPackageVerifier.json = NuGetPackageVerifier.json + README.md = README.md + version.xml = version.xml EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F5B382BC-258F-46E1-AC3D-10E5CCD55134}" + ProjectSection(SolutionItems) = preProject + test\Directory.Build.props = test\Directory.Build.props + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Watcher.Tools.FunctionalTests", "test\Microsoft.DotNet.Watcher.Tools.FunctionalTests\Microsoft.DotNet.Watcher.Tools.FunctionalTests.csproj", "{16BADE2F-1184-4518-8A70-B68A19D0805B}" EndProject @@ -80,4 +100,7 @@ Global {7B293291-26F4-47F0-9C2F-E396F35A4280} = {66517987-2A5A-4330-B130-207039378FD4} {3A7EF01A-073B-4123-850D-DFA4701EBE5B} = {F5B382BC-258F-46E1-AC3D-10E5CCD55134} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {57C07F14-2EAC-44FF-A277-B9221B4B2BF7} + EndGlobalSection EndGlobal diff --git a/build/dependencies.props b/build/dependencies.props index 2734d91184..9946d7ccab 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -6,7 +6,8 @@ 15.3.409 2.0.0-* 2.0.0-* - 15.3.0-* - 2.3.0-beta2-* + 15.3.0 + 2.3.0-beta4-build3742 + 0.6.1 diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 0000000000..e150035ea9 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Microsoft.AspNetCore.CertificateGeneration.Task/Microsoft.AspNetCore.CertificateGeneration.Task.csproj b/src/Microsoft.AspNetCore.CertificateGeneration.Task/Microsoft.AspNetCore.CertificateGeneration.Task.csproj index e4ff13938a..33922b9ab1 100644 --- a/src/Microsoft.AspNetCore.CertificateGeneration.Task/Microsoft.AspNetCore.CertificateGeneration.Task.csproj +++ b/src/Microsoft.AspNetCore.CertificateGeneration.Task/Microsoft.AspNetCore.CertificateGeneration.Task.csproj @@ -1,7 +1,5 @@  - - netcoreapp2.0 MSBuild target for generating HTTPS certificates for development cross-platform. @@ -16,5 +14,5 @@ - + diff --git a/src/Microsoft.DotNet.Watcher.Tools/Microsoft.DotNet.Watcher.Tools.csproj b/src/Microsoft.DotNet.Watcher.Tools/Microsoft.DotNet.Watcher.Tools.csproj index ee16dd6429..f8860e118f 100644 --- a/src/Microsoft.DotNet.Watcher.Tools/Microsoft.DotNet.Watcher.Tools.csproj +++ b/src/Microsoft.DotNet.Watcher.Tools/Microsoft.DotNet.Watcher.Tools.csproj @@ -1,9 +1,7 @@  - - - 7.1 + latest netcoreapp2.0 dotnet-watch exe diff --git a/src/Microsoft.Extensions.Caching.SqlConfig.Tools/Microsoft.Extensions.Caching.SqlConfig.Tools.csproj b/src/Microsoft.Extensions.Caching.SqlConfig.Tools/Microsoft.Extensions.Caching.SqlConfig.Tools.csproj index 2d9e0cfb74..62243363fa 100644 --- a/src/Microsoft.Extensions.Caching.SqlConfig.Tools/Microsoft.Extensions.Caching.SqlConfig.Tools.csproj +++ b/src/Microsoft.Extensions.Caching.SqlConfig.Tools/Microsoft.Extensions.Caching.SqlConfig.Tools.csproj @@ -1,7 +1,5 @@  - - netcoreapp2.0 dotnet-sql-cache diff --git a/src/Microsoft.Extensions.SecretManager.Tools/Microsoft.Extensions.SecretManager.Tools.csproj b/src/Microsoft.Extensions.SecretManager.Tools/Microsoft.Extensions.SecretManager.Tools.csproj index b73f1f8838..3dc5343a79 100644 --- a/src/Microsoft.Extensions.SecretManager.Tools/Microsoft.Extensions.SecretManager.Tools.csproj +++ b/src/Microsoft.Extensions.SecretManager.Tools/Microsoft.Extensions.SecretManager.Tools.csproj @@ -1,7 +1,5 @@  - - netcoreapp2.0 dotnet-user-secrets diff --git a/test/Directory.Build.props b/test/Directory.Build.props new file mode 100644 index 0000000000..607b54f498 --- /dev/null +++ b/test/Directory.Build.props @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/test/Microsoft.AspNetcore.CertificateGeneration.Task.Tests/GenerateSSLCertificateTaskTest.cs b/test/Microsoft.AspNetcore.CertificateGeneration.Task.Tests/GenerateSSLCertificateTaskTest.cs index 245333a84e..3ed7ef69db 100644 --- a/test/Microsoft.AspNetcore.CertificateGeneration.Task.Tests/GenerateSSLCertificateTaskTest.cs +++ b/test/Microsoft.AspNetcore.CertificateGeneration.Task.Tests/GenerateSSLCertificateTaskTest.cs @@ -27,8 +27,8 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task // Assert Assert.True(result); var certificates = GetTestCertificates(); - Assert.Equal(1, certificates.Count); - Assert.Equal(1, task.Messages.Count); + Assert.Single(certificates); + Assert.Single(task.Messages); Assert.StartsWith($"Generated certificate {TestSubject}", task.Messages[0]); } @@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task Assert.True(result); var certificates = GetTestCertificates(); Assert.Equal(2, certificates.Count); - Assert.Equal(1, task.Messages.Count); + Assert.Single(task.Messages); Assert.StartsWith($"Generated certificate {TestSubject}", task.Messages[0]); } @@ -87,7 +87,7 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task Assert.True(result); var certificates = GetTestCertificates(); Assert.Equal(2, certificates.Count); - Assert.Equal(1, task.Messages.Count); + Assert.Single(task.Messages); Assert.StartsWith($"Generated certificate {TestSubject}", task.Messages[0]); } @@ -105,8 +105,8 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task // Assert Assert.True(result); var certificates = GetTestCertificates(); - Assert.Equal(1, certificates.Count); - Assert.Equal(1, task.Messages.Count); + Assert.Single(certificates); + Assert.Single(task.Messages); Assert.Equal($"A certificate with subject name '{TestSubject}' already exists. Skipping certificate generation.", task.Messages[0]); } @@ -125,7 +125,7 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task Assert.True(result); var certificates = GetTestCertificates(); Assert.Equal(2, certificates.Count); - Assert.Equal(1, task.Messages.Count); + Assert.Single(task.Messages); Assert.StartsWith($"Generated certificate {TestSubject}", task.Messages[0]); } @@ -167,8 +167,10 @@ namespace Microsoft.AspNetCore.CertificateGeneration.Task var signingRequest = new CertificateRequest( new X500DistinguishedName(TestSubject), rsa, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1); - var enhancedKeyUsage = new OidCollection(); - enhancedKeyUsage.Add(new Oid("1.3.6.1.5.5.7.3.1", "Server Authentication")); + var enhancedKeyUsage = new OidCollection + { + new Oid("1.3.6.1.5.5.7.3.1", "Server Authentication") + }; signingRequest.CertificateExtensions.Add(new X509EnhancedKeyUsageExtension(enhancedKeyUsage, critical: true)); signingRequest.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.KeyEncipherment, critical: true)); signingRequest.CertificateExtensions.Add( diff --git a/test/Microsoft.AspNetcore.CertificateGeneration.Task.Tests/Microsoft.AspNetCore.CertificateGeneration.Task.Tests.csproj b/test/Microsoft.AspNetcore.CertificateGeneration.Task.Tests/Microsoft.AspNetCore.CertificateGeneration.Task.Tests.csproj index d7920e7b39..41303778f3 100644 --- a/test/Microsoft.AspNetcore.CertificateGeneration.Task.Tests/Microsoft.AspNetCore.CertificateGeneration.Task.Tests.csproj +++ b/test/Microsoft.AspNetcore.CertificateGeneration.Task.Tests/Microsoft.AspNetCore.CertificateGeneration.Task.Tests.csproj @@ -1,7 +1,5 @@ - - netcoreapp2.0 @@ -10,11 +8,4 @@ - - - - - - - diff --git a/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/FileWatcherTests.cs b/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/FileWatcherTests.cs index f627a5bd0d..4df16166a0 100644 --- a/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/FileWatcherTests.cs +++ b/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/FileWatcherTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -120,8 +120,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests File.Move(srcFile, dstFile); Assert.True(changedEv.WaitOne(DefaultTimeout)); - Assert.True(filesChanged.Contains(srcFile)); - Assert.True(filesChanged.Contains(dstFile)); + Assert.Contains(srcFile, filesChanged); + Assert.Contains(dstFile, filesChanged); } }); } @@ -165,8 +165,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests File.WriteAllText(testFileFullPath, string.Empty); Assert.True(changedEv.WaitOne(DefaultTimeout)); - Assert.True(filesChanged.Contains(subdir)); - Assert.True(filesChanged.Contains(testFileFullPath)); + Assert.Contains(subdir, filesChanged); + Assert.Contains(testFileFullPath, filesChanged); } }); } @@ -399,10 +399,10 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests Assert.True(changedEv.WaitOne(DefaultTimeout)); - Assert.True(filesChanged.Contains(f1)); - Assert.True(filesChanged.Contains(f2)); - Assert.True(filesChanged.Contains(f3)); - Assert.True(filesChanged.Contains(subdir)); + Assert.Contains(f1, filesChanged); + Assert.Contains(f2, filesChanged); + Assert.Contains(f3, filesChanged); + Assert.Contains(subdir, filesChanged); } }); } diff --git a/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/GlobbingAppTests.cs b/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/GlobbingAppTests.cs index be3bcef66a..e5b83b1112 100644 --- a/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/GlobbingAppTests.cs +++ b/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/GlobbingAppTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -27,6 +27,7 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests [InlineData(false)] public async Task ChangeCompiledFile(bool usePollingWatcher) { + _app.UsePollingWatcher = usePollingWatcher; await _app.StartWatcherAsync(); var types = await _app.GetCompiledAppDefinedTypes().TimeoutAfter(DefaultTimeout); diff --git a/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/Microsoft.DotNet.Watcher.Tools.FunctionalTests.csproj b/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/Microsoft.DotNet.Watcher.Tools.FunctionalTests.csproj index 05ec2a8723..c00a30bc00 100644 --- a/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/Microsoft.DotNet.Watcher.Tools.FunctionalTests.csproj +++ b/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/Microsoft.DotNet.Watcher.Tools.FunctionalTests.csproj @@ -1,7 +1,5 @@  - - netcoreapp2.0 $(DefaultItemExcludes);TestProjects\**\* @@ -23,9 +21,6 @@ - - - diff --git a/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/Scenario/WatchableApp.cs b/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/Scenario/WatchableApp.cs index 2b60ef9a17..8fad2e5486 100644 --- a/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/Scenario/WatchableApp.cs +++ b/test/Microsoft.DotNet.Watcher.Tools.FunctionalTests/Scenario/WatchableApp.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -78,7 +78,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests WorkingDirectory = SourceDirectory, EnvironmentVariables = { - ["DOTNET_CLI_CONTEXT_VERBOSE"] = bool.TrueString + ["DOTNET_CLI_CONTEXT_VERBOSE"] = bool.TrueString, + ["DOTNET_USE_POLLING_FILE_WATCHER"] = UsePollingWatcher.ToString(), }, }; diff --git a/test/Microsoft.DotNet.Watcher.Tools.Tests/Microsoft.DotNet.Watcher.Tools.Tests.csproj b/test/Microsoft.DotNet.Watcher.Tools.Tests/Microsoft.DotNet.Watcher.Tools.Tests.csproj index 55bc572749..14920c0f1e 100644 --- a/test/Microsoft.DotNet.Watcher.Tools.Tests/Microsoft.DotNet.Watcher.Tools.Tests.csproj +++ b/test/Microsoft.DotNet.Watcher.Tools.Tests/Microsoft.DotNet.Watcher.Tools.Tests.csproj @@ -1,7 +1,5 @@  - - netcoreapp2.0 @@ -19,9 +17,6 @@ - - - diff --git a/test/Microsoft.Extensions.SecretManager.Tools.Tests/Microsoft.Extensions.SecretManager.Tools.Tests.csproj b/test/Microsoft.Extensions.SecretManager.Tools.Tests/Microsoft.Extensions.SecretManager.Tools.Tests.csproj index 4f3a3bb12a..5ac356aa2e 100644 --- a/test/Microsoft.Extensions.SecretManager.Tools.Tests/Microsoft.Extensions.SecretManager.Tools.Tests.csproj +++ b/test/Microsoft.Extensions.SecretManager.Tools.Tests/Microsoft.Extensions.SecretManager.Tools.Tests.csproj @@ -1,7 +1,5 @@  - - netcoreapp2.0 @@ -12,9 +10,6 @@ - - -