Skip to content

Commit

Permalink
Merge pull request #278 from microsoft/users/tevinstanley/updatepackages
Browse files Browse the repository at this point in the history
updating some packages and fixing warnings that come with it.
  • Loading branch information
ttstanley committed May 25, 2023
2 parents df18290 + a7b5dd5 commit 6640e45
Show file tree
Hide file tree
Showing 49 changed files with 363 additions and 336 deletions.
6 changes: 5 additions & 1 deletion nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
</packageSources>
<trustedSigners>
<repository name="nuget" serviceIndex="https://api.nuget.org/v3/index.json">
<owners>Microsoft;xunit;aarnott;jkeech;sharwell;jamesnk</owners>
<owners>Microsoft;xunit;aarnott;jkeech;sharwell;jamesnk;Nerdbank</owners>
<certificate fingerprint="0e5f38f57dc1bcc806d8494f4f90fbcedd988b46760709cbeec6f4219aa6157d" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
<certificate fingerprint="5A2901D6ADA3D18260B9C6DFE2133C95D74B9EEF6AE0E5DC334C8454D1477DF4" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
</repository>
<author name="Microsoft">
<certificate fingerprint="aa12da22a49bce7d5c1ae64cc1f3d892f150da76140f210abd2cbffca2c18a27" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
</author>
<author name="newtonsoft">
<certificate fingerprint="a3af7af11ebb8ef729d2d91548509717e7e0ff55a129abc3aeaa8a6940267641" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
</author>
<author name="Nerdbank">
<certificate fingerprint="C7F4E1BE32288920ABE2263ABE1AC4FC4FE6781C2D64D04C807557A023B5B6FA" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
</author>
</trustedSigners>
</configuration>
2 changes: 1 addition & 1 deletion src/Microsoft.VisualStudio.SlowCheetah.Tests/BaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Microsoft.VisualStudio.SlowCheetah.Tests
public class BaseTest : IDisposable
{
/// <summary>
/// Gets the list of temporary files to delete after test
/// Gets the list of temporary files to delete after test.
/// </summary>
protected IList<string> FilesToDeleteAfterTest { get; } = new List<string>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@ namespace Microsoft.VisualStudio.SlowCheetah.Tests.BuildTests
public abstract class ConfigTransformTestsBase : IDisposable
{
/// <summary>
/// Gets the test solution directory
/// Gets the test solution directory.
/// </summary>
public string SolutionDir
{
get { return Path.Combine(Environment.CurrentDirectory, @"..\..\..\src"); }
}

/// <summary>
/// Gets the output path of the test project
/// Gets the output path of the test project.
/// </summary>
public string OutputPath
{
get { return Path.Combine(Environment.CurrentDirectory, @"ProjectOutput"); }
}

/// <summary>
/// Gets the test projects directory
/// Gets the test projects directory.
/// </summary>
public string TestProjectsDir
{
get { return Path.Combine(this.SolutionDir, @"Microsoft.VisualStudio.SlowCheetah.Tests\BuildTests\TestProjects"); }
}

/// <summary>
/// Gets the msbuild exe path that was cached during build
/// Gets the msbuild exe path that was cached during build.
/// </summary>
private static string MSBuildExePath
{
Expand All @@ -57,10 +57,10 @@ private static string MSBuildExePath
}

/// <summary>
/// Builds the project of the given name from the <see cref="TestProjectsDir"/>
/// Builds the project of the given name from the <see cref="TestProjectsDir"/>.
/// </summary>
/// <param name="projectName">Name of the project to be built.
/// Must correspond to a folder name in the test projects directory</param>
/// Must correspond to a folder name in the test projects directory.</param>
public void BuildProject(string projectName)
{
var globalProperties = new Dictionary<string, string>()
Expand Down Expand Up @@ -93,11 +93,11 @@ public void BuildProject(string projectName)
}

/// <summary>
/// Gets a app setting from a configuration file
/// Gets a app setting from a configuration file.
/// </summary>
/// <param name="configFilePath">Path to the configuration file</param>
/// <param name="appSettingKey">Setting key</param>
/// <returns>Value of the setting</returns>
/// <param name="configFilePath">Path to the configuration file.</param>
/// <param name="appSettingKey">Setting key.</param>
/// <returns>Value of the setting.</returns>
public string GetAppSettingValue(string configFilePath, string appSettingKey)
{
var configFile = XDocument.Load(configFilePath);
Expand All @@ -108,19 +108,19 @@ where settingEl.Attribute("key").Value == appSettingKey
}

/// <summary>
/// Gets the value of a node within a configuration file
/// Gets the value of a node within a configuration file.
/// </summary>
/// <param name="configFilePath">Path to the configuration file</param>
/// <param name="nodeName">Name of the node</param>
/// <returns>Value of the node</returns>
/// <param name="configFilePath">Path to the configuration file.</param>
/// <param name="nodeName">Name of the node.</param>
/// <returns>Value of the node.</returns>
public string GetConfigNodeValue(string configFilePath, string nodeName)
{
var configFile = XDocument.Load(configFilePath);
return configFile.Descendants(nodeName).Single().Value;
}

/// <summary>
/// At the end of tests, delete the output path for the tested projects
/// At the end of tests, delete the output path for the tested projects.
/// </summary>
public void Dispose()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ namespace Microsoft.VisualStudio.SlowCheetah.Tests.BuildTests
using Xunit;

/// <summary>
/// Tests build time transformations for a test console app
/// Tests build time transformations for a test console app.
/// </summary>
[Collection("BuildTests")]
public class ConsoleAppTests : ConfigTransformTestsBase
{
/// <summary>
/// Tests if app.config is transformed on build
/// Tests if app.config is transformed on build.
/// </summary>
[Fact]
public void ConsoleApp_AppConfig_IsTransformed()
Expand All @@ -34,7 +34,7 @@ public void ConsoleApp_AppConfig_IsTransformed()
}

/// <summary>
/// Tests if other.config is transformed on build
/// Tests if other.config is transformed on build.
/// </summary>
[Fact]
public void ConsoleApp_OtherConfig_IsTransformed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ namespace Microsoft.VisualStudio.SlowCheetah.Tests.BuildTests
using Xunit;

/// <summary>
/// Tests build time transformations for a test web app
/// Tests build time transformations for a test web app.
/// </summary>
[Collection("BuildTests")]
public class WebAppTests : ConfigTransformTestsBase
{
/// <summary>
/// Tests if other.config is transformed on build
/// Tests if other.config is transformed on build.
/// </summary>
[Fact]
public void WebApp_OtherConfig_IsTransformed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.NonShipping" Version="2.0.66" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Nerdbank.GitVersioning" Version="1.6.30" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.132">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.VisualStudio.SlowCheetah.Tests/TransformTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ namespace Microsoft.VisualStudio.SlowCheetah.Tests
using Xunit;

/// <summary>
/// Tests for <see cref="ITransformer"/>
/// Tests for <see cref="ITransformer"/>.
/// </summary>
public class TransformTest : BaseTest
{
/// <summary>
/// Tests for <see cref="XmlTransformer"/>
/// Tests for <see cref="XmlTransformer"/>.
/// </summary>
[Fact]
public void TestXmlTransform()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.NonShipping" Version="2.0.66" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Nerdbank.GitVersioning" Version="1.6.30" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.132">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ namespace Microsoft.VisualStudio.SlowCheetah.VS.Tests
using Xunit;

/// <summary>
/// Test class for <see cref="PackageUtilities"/>
/// Test class for <see cref="PackageUtilities"/>.
/// </summary>
public class PackageUtilitiesTest
{
private IEnumerable<string> baseTestProjectConfigs = new List<string>(new string[] { "Debug", "Release" });
private IEnumerable<string> testProjectConfigsWithDots = new List<string>(new string[] { "Debug", "Debug.Test", "Release", "Test.Release", "Test.Rel" });

/// <summary>
/// Tests <see cref="PackageUtilities.IsFileTransformForBuildConfiguration(string, string, IEnumerable{string})"/> returns on arguments that are null or empty strings
/// Tests <see cref="PackageUtilities.IsFileTransformForBuildConfiguration(string, string, IEnumerable{string})"/> returns on arguments that are null or empty strings.
/// </summary>
/// <param name="docName">Document name</param>
/// <param name="trnName">Transform file name</param>
/// <param name="docName">Document name.</param>
/// <param name="trnName">Transform file name.</param>
[Theory]
[InlineData(null, null)]
[InlineData("", "")]
Expand All @@ -34,8 +34,8 @@ public void IsFileTransformWithNullArguments(string docName, string trnName)
/// <summary>
/// Tests <see cref="PackageUtilities.IsFileTransformForBuildConfiguration(string, string, IEnumerable{string})"/> with valid arguments normally found in projects.
/// </summary>
/// <param name="docName">Document name</param>
/// <param name="trnName">Transform file name</param>
/// <param name="docName">Document name.</param>
/// <param name="trnName">Transform file name.</param>
[Theory]
[InlineData("App.config", "App.Debug.config")]
[InlineData("App.config", "app.release.config")]
Expand All @@ -47,10 +47,10 @@ public void IsFileTransformWithValidArguments(string docName, string trnName)
}

/// <summary>
/// Tests <see cref="PackageUtilities.IsFileTransformForBuildConfiguration(string, string, IEnumerable{string})"/> with invalid arguments
/// Tests <see cref="PackageUtilities.IsFileTransformForBuildConfiguration(string, string, IEnumerable{string})"/> with invalid arguments.
/// </summary>
/// <param name="docName">Document name</param>
/// <param name="trnName">Transform file name</param>
/// <param name="docName">Document name.</param>
/// <param name="trnName">Transform file name.</param>
[Theory]
[InlineData("App.config", "App.Test.Debug.config")]
[InlineData("App.Debug.config", "App.Debug.config")]
Expand All @@ -62,10 +62,10 @@ public void IsFileTransformWithInvalidArguments(string docName, string trnName)

/// <summary>
/// Tests <see cref="PackageUtilities.IsFileTransformForBuildConfiguration(string, string, IEnumerable{string})"/> with project configurations containing dots
/// and file names with similar structures. Tests valid names
/// and file names with similar structures. Tests valid names.
/// </summary>
/// <param name="docName">Document name</param>
/// <param name="trnName">Transform file name</param>
/// <param name="docName">Document name.</param>
/// <param name="trnName">Transform file name.</param>
[Theory]
[InlineData("App.config", "App.Debug.Test.config")]
[InlineData("App.System.config", "App.System.Debug.Test.config")]
Expand All @@ -80,10 +80,10 @@ public void IsFileTransformWithDottedConfigsAndValidNames(string docName, string

/// <summary>
/// Tests <see cref="PackageUtilities.IsFileTransformForBuildConfiguration(string, string, IEnumerable{string})"/> with project configurations containing dots
/// and file names with similar structures. Tests invalid names
/// and file names with similar structures. Tests invalid names.
/// </summary>
/// <param name="docName">Document name</param>
/// <param name="trnName">Transform file name</param>
/// <param name="docName">Document name.</param>
/// <param name="trnName">Transform file name.</param>
[Theory]
[InlineData("App.config", "App.Release.Test.config")]
[InlineData("App.config", "App.Rel.Test.config")]
Expand All @@ -98,10 +98,10 @@ public void IsFileTransformWithDottedConfigsAndInvalidNames(string docName, stri
}

/// <summary>
/// Tests <see cref="PackageUtilities.IsGenericFileTransform(string, string)"/> with invalid arguments
/// Tests <see cref="PackageUtilities.IsGenericFileTransform(string, string)"/> with invalid arguments.
/// </summary>
/// <param name="docName">Document name</param>
/// <param name="trnName">Transform file name</param>
/// <param name="docName">Document name.</param>
/// <param name="trnName">Transform file name.</param>
[Theory]
[InlineData("App.config", "App.config")]
[InlineData("App.Debug.config", "App.Debug.config")]
Expand All @@ -114,10 +114,10 @@ public void IsFileGenericTransformWithInvalidArguments(string docName, string tr
}

/// <summary>
/// Tests <see cref="PackageUtilities.IsGenericFileTransform(string, string)"/> with valid arguments
/// Tests <see cref="PackageUtilities.IsGenericFileTransform(string, string)"/> with valid arguments.
/// </summary>
/// <param name="docName">Document name</param>
/// <param name="trnName">Transform file name</param>
/// <param name="docName">Document name.</param>
/// <param name="trnName">Transform file name.</param>
[Theory]
[InlineData("App.config", "App.Debug.config")]
[InlineData("App.config", "App.Test.Debug.config")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EnvDTE" Version="17.0.31902.203" />
<PackageReference Include="EnvDTE" Version="17.6.36389" />

<PackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.VisualStudio" Version="2.0.66" />
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.0.5232" />
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.0.31902.203" />
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="17.6.2164">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.6.36389" />
<PackageReference Include="Microsoft.Web.Xdt" Version="3.1.0" />
<PackageReference Include="Microsoft.VisualStudio.Jdt" Version="0.9.63" />
<PackageReference Include="NuGet.VisualStudio" Version="5.11.0" />
<PackageReference Include="Nerdbank.GitVersioning" Version="1.6.30" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.0" PrivateAssets="all" />
<PackageReference Include="NuGet.VisualStudio" Version="17.6.0" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.132" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 6640e45

Please sign in to comment.