Skip to content

Commit

Permalink
Merge pull request #28505 from dotnet/darc-release/7.0.2xx-4b2dda65-3…
Browse files Browse the repository at this point in the history
…59b-4520-8c35-e053d1e8a811

[release/7.0.2xx] Update dependencies from dotnet/templating
  • Loading branch information
nagilson authored Oct 26, 2022
2 parents f866505 + dd792bb commit a8d0f4e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 36 deletions.
8 changes: 4 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.TemplateEngine.Abstractions" Version="7.0.100-rtm.22507.5">
<Dependency Name="Microsoft.TemplateEngine.Abstractions" Version="7.0.200-alpha.1.22524.8">
<Uri>https://github.com/dotnet/templating</Uri>
<Sha>90b4ea928260c3265949f957d9be506289d8462f</Sha>
<Sha>a3f714f94e3bdd206eb64d89771e4fbf30c9640f</Sha>
</Dependency>
<Dependency Name="Microsoft.TemplateEngine.Mocks" Version="7.0.100-rtm.22507.5">
<Dependency Name="Microsoft.TemplateEngine.Mocks" Version="7.0.200-alpha.1.22524.8">
<Uri>https://github.com/dotnet/templating</Uri>
<Sha>90b4ea928260c3265949f957d9be506289d8462f</Sha>
<Sha>a3f714f94e3bdd206eb64d89771e4fbf30c9640f</Sha>
<SourceBuild RepoName="templating" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.0">
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependencies from https://github.com/dotnet/templating -->
<MicrosoftTemplateEngineAbstractionsPackageVersion>7.0.100-rtm.22507.5</MicrosoftTemplateEngineAbstractionsPackageVersion>
<MicrosoftTemplateEngineAbstractionsPackageVersion>7.0.200-alpha.1.22524.8</MicrosoftTemplateEngineAbstractionsPackageVersion>
<MicrosoftTemplateEngineEdgePackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineEdgePackageVersion>
<MicrosoftTemplateEngineOrchestratorRunnableProjectsPackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineOrchestratorRunnableProjectsPackageVersion>
<MicrosoftTemplateEngineUtilsPackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineUtilsPackageVersion>
<MicrosoftTemplateSearchCommonPackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateSearchCommonPackageVersion>
<!-- test dependencies -->
<MicrosoftTemplateEngineMocksPackageVersion>7.0.100-rtm.22507.5</MicrosoftTemplateEngineMocksPackageVersion>
<MicrosoftTemplateEngineMocksPackageVersion>7.0.200-alpha.1.22524.8</MicrosoftTemplateEngineMocksPackageVersion>
<MicrosoftTemplateEngineTestHelperPackageVersion>$(MicrosoftTemplateEngineAbstractionsPackageVersion)</MicrosoftTemplateEngineTestHelperPackageVersion>
</PropertyGroup>
<PropertyGroup>
Expand Down Expand Up @@ -185,7 +185,7 @@
</PropertyGroup>
<!-- Test Dependencies -->
<PropertyGroup>
<FluentAssertionsVersion>6.7.0</FluentAssertionsVersion>
<FluentAssertionsVersion>6.8.0</FluentAssertionsVersion>
<FluentAssertionsJsonVersion>6.1.0</FluentAssertionsJsonVersion>
<MicrosoftDotNetXUnitExtensionsVersion>7.0.0-beta.22511.2</MicrosoftDotNetXUnitExtensionsVersion>
<MoqPackageVersion>4.8.2</MoqPackageVersion>
Expand Down
7 changes: 1 addition & 6 deletions src/Tests/dotnet-new.Tests/DotnetNewInstallTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -563,19 +563,14 @@ public void CannotInstallTemplateWithoutMandatoryConfig()
string home = CreateTemporaryFolder(folderName: "Home");
string invalidTemplatePath = GetTestTemplateLocation("Invalid/MissingMandatoryConfig");
new DotnetNewCommand(_log, "-i", invalidTemplatePath)
.WithDebug()
.WithCustomHive(home)
.WithWorkingDirectory(CreateTemporaryFolder())
.Execute()
.Should()
.ExitWith(0)
.And.NotHaveStdErr()
.And.HaveStdOutContaining($"Error: Failed to load template from {invalidTemplatePath}")
.And.HaveStdOutContaining($" Missing 'identity'.")
.And.HaveStdOutContaining($" Missing 'name'.")
.And.HaveStdOutContaining($" Missing 'shortName'.")
.And.HaveStdOutContaining($" The template root is outside the specified install source location.")
.And.HaveStdOutContaining($" Source location './' is outside the specified install source location.")
.And.HaveStdOutContaining($"Details: The template root is outside the specified install source location.")
.And.HaveStdOutContaining($"No templates were found in the package {invalidTemplatePath}.");
}

Expand Down
22 changes: 11 additions & 11 deletions src/Tests/dotnet.Tests/dotnet-new/DotnetAddPostActionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static string TestCsprojFile
[Fact(DisplayName = nameof(AddRefFindsOneDefaultProjFileInOutputDirectory))]
public void AddRefFindsOneDefaultProjFileInOutputDirectory()
{
string targetBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.proj");
_engineEnvironmentSettings.Host.FileSystem.WriteAllText(projFileFullPath, TestCsprojFile);

Expand All @@ -54,7 +54,7 @@ public void AddRefFindsOneDefaultProjFileInOutputDirectory()
[Fact(DisplayName = nameof(AddRefFindsOneNameConfiguredProjFileInOutputDirectory))]
public void AddRefFindsOneNameConfiguredProjFileInOutputDirectory()
{
string targetBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string fooprojFileFullPath = Path.Combine(targetBasePath, "MyApp.fooproj");
_engineEnvironmentSettings.Host.FileSystem.WriteAllText(fooprojFileFullPath, TestCsprojFile);

Expand All @@ -69,7 +69,7 @@ public void AddRefFindsOneNameConfiguredProjFileInOutputDirectory()
[Fact(DisplayName = nameof(AddRefFindsOneNameConfiguredProjFileWhenMultipleExtensionsAreAllowed))]
public void AddRefFindsOneNameConfiguredProjFileWhenMultipleExtensionsAreAllowed()
{
string targetBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string fooprojFileFullPath = Path.Combine(targetBasePath, "MyApp.fooproj");
_engineEnvironmentSettings.Host.FileSystem.WriteAllText(fooprojFileFullPath, TestCsprojFile);

Expand All @@ -84,7 +84,7 @@ public void AddRefFindsOneNameConfiguredProjFileWhenMultipleExtensionsAreAllowed
[Fact(DisplayName = nameof(AddRefIgnoresOtherProjectTypesWhenMultipleTypesAreAllowed))]
public void AddRefIgnoresOtherProjectTypesWhenMultipleTypesAreAllowed()
{
string targetBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string fooprojFileFullPath = Path.Combine(targetBasePath, "MyApp.fooproj");
_engineEnvironmentSettings.Host.FileSystem.WriteAllText(fooprojFileFullPath, TestCsprojFile);

Expand All @@ -108,7 +108,7 @@ public void AddRefIgnoresOtherProjectTypesWhenMultipleTypesAreAllowed()
[Fact(DisplayName = nameof(AddRefFindsOneDefaultProjFileInAncestorOfOutputDirectory))]
public void AddRefFindsOneDefaultProjFileInAncestorOfOutputDirectory()
{
string targetBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.xproj");
_engineEnvironmentSettings.Host.FileSystem.WriteAllText(projFileFullPath, TestCsprojFile);

Expand All @@ -124,7 +124,7 @@ public void AddRefFindsOneDefaultProjFileInAncestorOfOutputDirectory()
public void AddRefFindsMultipleDefaultProjFilesInOutputDirectory()
{
string projFilesOriginalContent = TestCsprojFile;
string targetBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string projFileFullPathOne = Path.Combine(targetBasePath, "MyApp.anysproj");
_engineEnvironmentSettings.Host.FileSystem.WriteAllText(projFileFullPathOne, projFilesOriginalContent);

Expand All @@ -141,7 +141,7 @@ public void AddRefFindsMultipleDefaultProjFilesInOutputDirectory()
public void AddRefFindsMultipleDefaultProjFilesInAncestorOfOutputDirectory()
{
string projFilesOriginalContent = TestCsprojFile;
string targetBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string projFileFullPathOne = Path.Combine(targetBasePath, "MyApp.fooproj");
_engineEnvironmentSettings.Host.FileSystem.WriteAllText(projFileFullPathOne, projFilesOriginalContent);

Expand All @@ -161,7 +161,7 @@ public void AddRefCanHandleProjectFileRenames()
var callback = new MockAddProjectReferenceCallback();
DotnetAddPostActionProcessor actionProcessor = new(callback.AddPackageReference, callback.AddProjectReference);

string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath();
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
string referencedProjFileFullPath = Path.Combine(targetBasePath, "NewName.csproj");

Expand Down Expand Up @@ -189,7 +189,7 @@ public void AddRefCanHandleProjectFilesWithoutRenames()
var callback = new MockAddProjectReferenceCallback();
DotnetAddPostActionProcessor actionProcessor = new(callback.AddPackageReference, callback.AddProjectReference);

string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath();
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
string referencedProjFileFullPath = Path.Combine(targetBasePath, "Reference.csproj");

Expand All @@ -216,7 +216,7 @@ public void AddRefCanTargetASingleProjectWithAJsonArray()
var callback = new MockAddProjectReferenceCallback();
DotnetAddPostActionProcessor actionProcessor = new(callback.AddPackageReference, callback.AddProjectReference);

string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath();
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");

var args = new Dictionary<string, string>() { { "targetFiles", "[\"MyApp.csproj\"]" }, { "referenceType", "package" }, { "reference", "System.Net.Json" } };
Expand All @@ -242,7 +242,7 @@ public void AddRefCanTargetASingleProjectWithTheProjectName()
var callback = new MockAddProjectReferenceCallback();
DotnetAddPostActionProcessor actionProcessor = new(callback.AddPackageReference, callback.AddProjectReference);

string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath();
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");

var args = new Dictionary<string, string>() { { "targetFiles", "MyApp.csproj" }, { "referenceType", "package" }, { "reference", "System.Net.Json" } };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void DotnetRestoreCanTargetASingleProjectWithAJsonArray()
var callback = new MockDotnetRestoreCallback();
DotnetRestorePostActionProcessor actionProcessor = new(callback.RestoreProject);

string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath();
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");

var args = new Dictionary<string, string>() { { "files", "[\"MyApp.csproj\"]" } };
Expand All @@ -53,7 +53,7 @@ public void DotnetRestoreCanTargetASingleProjectWithTheProjectName()
var callback = new MockDotnetRestoreCallback();
DotnetRestorePostActionProcessor actionProcessor = new(callback.RestoreProject);

string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath();
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");

var args = new Dictionary<string, string>() { { "files", "MyApp.csproj" } };
Expand Down
20 changes: 10 additions & 10 deletions src/Tests/dotnet.Tests/dotnet-new/DotnetSlnPostActionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public DotnetSlnPostActionTests(EnvironmentSettingsHelper environmentSettingsHel
[Fact(DisplayName = nameof(AddProjectToSolutionPostActionFindSolutionFileAtOutputPath))]
public void AddProjectToSolutionPostActionFindSolutionFileAtOutputPath()
{
string targetBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string solutionFileFullPath = Path.Combine(targetBasePath, "MySln.sln");
_engineEnvironmentSettings.Host.FileSystem.WriteAllText(solutionFileFullPath, string.Empty);

Expand All @@ -38,7 +38,7 @@ public void AddProjectToSolutionPostActionFindSolutionFileAtOutputPath()
[Fact(DisplayName = nameof(AddProjectToSolutionPostActionFindsOneProjectToAdd))]
public void AddProjectToSolutionPostActionFindsOneProjectToAdd()
{
string outputBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string outputBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
IPostAction postAction = new MockPostAction()
{
ActionId = DotnetSlnPostActionProcessor.ActionProcessorId,
Expand All @@ -58,7 +58,7 @@ public void AddProjectToSolutionPostActionFindsOneProjectToAdd()
[Fact(DisplayName = nameof(AddProjectToSolutionPostActionFindsMultipleProjectsToAdd))]
public void AddProjectToSolutionPostActionFindsMultipleProjectsToAdd()
{
string outputBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string outputBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
IPostAction postAction = new MockPostAction()
{
ActionId = DotnetSlnPostActionProcessor.ActionProcessorId,
Expand Down Expand Up @@ -106,7 +106,7 @@ public void AddProjectToSolutionPostActionDoesntFindProjectOutOfRange()
[Fact(DisplayName = nameof(AddProjectToSolutionPostActionFindsMultipleProjectsToAddWithOutputBasePath))]
public void AddProjectToSolutionPostActionFindsMultipleProjectsToAddWithOutputBasePath()
{
string outputBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string outputBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();

IPostAction postAction = new MockPostAction()
{
Expand Down Expand Up @@ -140,7 +140,7 @@ public void AddProjectToSolutionPostActionFindsMultipleProjectsToAddWithOutputBa
[Fact(DisplayName = nameof(AddProjectToSolutionPostActionWithoutPrimaryOutputIndexesWithOutputBasePath))]
public void AddProjectToSolutionPostActionWithoutPrimaryOutputIndexesWithOutputBasePath()
{
string outputBasePath = FileSystemHelpers.GetNewVirtualizedPath(_engineEnvironmentSettings);
string outputBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();

IPostAction postAction = new MockPostAction()
{
Expand Down Expand Up @@ -170,7 +170,7 @@ public void AddProjectToSolutionCanTargetASingleProjectWithAJsonArray()
var callback = new MockAddProjectToSolutionCallback();
var actionProcessor = new DotnetSlnPostActionProcessor(callback.AddProjectToSolution);

string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath();
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln");
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");

Expand Down Expand Up @@ -199,7 +199,7 @@ public void AddProjectToSolutionCanTargetASingleProjectWithTheProjectName()
var callback = new MockAddProjectToSolutionCallback();
var actionProcessor = new DotnetSlnPostActionProcessor(callback.AddProjectToSolution);

string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath();
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln");
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");

Expand Down Expand Up @@ -228,7 +228,7 @@ public void AddProjectToSolutionCanPlaceProjectInSolutionRoot()
var callback = new MockAddProjectToSolutionCallback();
var actionProcessor = new DotnetSlnPostActionProcessor(callback.AddProjectToSolution);

string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath();
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln");
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");

Expand Down Expand Up @@ -260,7 +260,7 @@ public void AddProjectToSolutionCanPlaceProjectInSolutionFolder()
var callback = new MockAddProjectToSolutionCallback();
var actionProcessor = new DotnetSlnPostActionProcessor(callback.AddProjectToSolution);

string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath();
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln");
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");

Expand Down Expand Up @@ -292,7 +292,7 @@ public void AddProjectToSolutionFailsWhenSolutionFolderAndInRootSpecified()
var callback = new MockAddProjectToSolutionCallback();
var actionProcessor = new DotnetSlnPostActionProcessor(callback.AddProjectToSolution);

string targetBasePath = _engineEnvironmentSettings.GetNewVirtualizedPath();
string targetBasePath = _engineEnvironmentSettings.GetTempVirtualizedPath();
string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln");
string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");

Expand Down

0 comments on commit a8d0f4e

Please sign in to comment.