Merge branch 'rel/1.0.0' into dev/jgoshi/dotnetAddDefaultProjectTypeGuid
This commit is contained in:
commit
d1a844da2c
17 changed files with 260 additions and 34 deletions
|
@ -0,0 +1,39 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.26006.2
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "src\App\App.csproj", "{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{72BFCA87-B033-4721-8712-4D12166B4A39}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x64.Build.0 = Release|x64
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{DDF3765C-59FB-4AA6-BE83-779ED13AA64A} = {72BFCA87-B033-4721-8712-4D12166B4A39}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
|
@ -0,0 +1,15 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\src\Lib\Lib.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Hello from the main app");
|
||||||
|
Console.WriteLine(Lib.Library.GetMessage());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netstandard1.4</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="NETStandard.Library" Version="1.6" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Lib
|
||||||
|
{
|
||||||
|
public class Library
|
||||||
|
{
|
||||||
|
public static string GetMessage()
|
||||||
|
{
|
||||||
|
return "Message from Lib";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.26006.2
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App\App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lib", "Lib\\Lib.csproj", "{B38B1FA5-B4C9-456A-8B71-8FCD62ACF400}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
|
@ -0,0 +1,19 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="**\*.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Lib\Lib.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Hello from the main app");
|
||||||
|
Console.WriteLine(Lib.Library.GetMessage());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netstandard1.4</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="NETStandard.Library" Version="1.6" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Lib
|
||||||
|
{
|
||||||
|
public class Library
|
||||||
|
{
|
||||||
|
public static string GetMessage()
|
||||||
|
{
|
||||||
|
return "Message from Lib";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -126,32 +126,6 @@
|
||||||
VersionSuffix="$(VersionSuffix)"
|
VersionSuffix="$(VersionSuffix)"
|
||||||
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
|
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
|
||||||
|
|
||||||
<!-- Corehostify Binaries -->
|
|
||||||
<ItemGroup Condition=" '$(OSName)' != 'win' ">
|
|
||||||
<SdkOutputChmodTargets Remove="*" />
|
|
||||||
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.exe;
|
|
||||||
$(SdkOutputDirectory)/**/*.dll" >
|
|
||||||
<!-- Managed assemblies do not need execute -->
|
|
||||||
<Mode>u=rw,g=r,o=r</Mode>
|
|
||||||
</SdkOutputChmodTargets>
|
|
||||||
|
|
||||||
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.dylib;
|
|
||||||
$(SdkOutputDirectory)/**/*.so" >
|
|
||||||
<!-- Generally, dylibs and sos have 'x' -->
|
|
||||||
<Mode>u=rwx,g=rx,o=rx</Mode>
|
|
||||||
</SdkOutputChmodTargets>
|
|
||||||
|
|
||||||
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*"
|
|
||||||
Exclude="$(SdkOutputDirectory)/**/*.*" >
|
|
||||||
<!-- Executables need x -->
|
|
||||||
<Mode>u=rwx,g=rx,o=rx</Mode>
|
|
||||||
</SdkOutputChmodTargets>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<Chmod Condition=" '$(OSName)' != 'win' "
|
|
||||||
File="%(SdkOutputChModTargets.FullPath)"
|
|
||||||
Mode="%(SdkOutputChModTargets.Mode)" />
|
|
||||||
|
|
||||||
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
|
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
|
||||||
SectionName="runtimeTargets"
|
SectionName="runtimeTargets"
|
||||||
AssetPath="$(BinaryToCorehostifyRelDir)/%(RuntimeTargetsAssetsToRemoveFromDeps.Identity).exe" />
|
AssetPath="$(BinaryToCorehostifyRelDir)/%(RuntimeTargetsAssetsToRemoveFromDeps.Identity).exe" />
|
||||||
|
@ -224,6 +198,32 @@
|
||||||
@(CompileStageSdkDirectories);
|
@(CompileStageSdkDirectories);
|
||||||
$(SharedFrameworkNameVersionPath)" />
|
$(SharedFrameworkNameVersionPath)" />
|
||||||
|
|
||||||
|
<!-- Corehostify Binaries -->
|
||||||
|
<ItemGroup Condition=" '$(OSName)' != 'win' ">
|
||||||
|
<SdkOutputChmodTargets Remove="*" />
|
||||||
|
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.exe;
|
||||||
|
$(SdkOutputDirectory)/**/*.dll" >
|
||||||
|
<!-- Managed assemblies do not need execute -->
|
||||||
|
<Mode>u=rw,g=r,o=r</Mode>
|
||||||
|
</SdkOutputChmodTargets>
|
||||||
|
|
||||||
|
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.dylib;
|
||||||
|
$(SdkOutputDirectory)/**/*.so" >
|
||||||
|
<!-- Generally, dylibs and sos have 'x' -->
|
||||||
|
<Mode>u=rwx,g=rx,o=rx</Mode>
|
||||||
|
</SdkOutputChmodTargets>
|
||||||
|
|
||||||
|
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*"
|
||||||
|
Exclude="$(SdkOutputDirectory)/**/*.*" >
|
||||||
|
<!-- Executables need x -->
|
||||||
|
<Mode>u=rwx,g=rx,o=rx</Mode>
|
||||||
|
</SdkOutputChmodTargets>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Chmod Condition=" '$(OSName)' != 'win' "
|
||||||
|
File="%(SdkOutputChModTargets.FullPath)"
|
||||||
|
Mode="%(SdkOutputChModTargets.Mode)" />
|
||||||
|
|
||||||
<!-- Generate .version file -->
|
<!-- Generate .version file -->
|
||||||
<WriteLinesToFile File="$(SdkOutputDirectory)/.version"
|
<WriteLinesToFile File="$(SdkOutputDirectory)/.version"
|
||||||
Lines="$(CommitHash);$(SdkVersion);$(Rid)"
|
Lines="$(CommitHash);$(SdkVersion);$(Rid)"
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CLI_SharedFrameworkVersion>1.1.1</CLI_SharedFrameworkVersion>
|
<CLI_SharedFrameworkVersion>1.1.1</CLI_SharedFrameworkVersion>
|
||||||
<CLI_MSBuild_Version>15.1.546</CLI_MSBuild_Version>
|
<CLI_MSBuild_Version>15.1.548</CLI_MSBuild_Version>
|
||||||
<CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version>
|
<CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version>
|
||||||
<CLI_NETSDK_Version>1.0.0-alpha-20170213-1</CLI_NETSDK_Version>
|
<CLI_NETSDK_Version>1.0.0-alpha-20170213-1</CLI_NETSDK_Version>
|
||||||
<CLI_NuGet_Version>4.0.0-rtm-2283</CLI_NuGet_Version>
|
<CLI_NuGet_Version>4.0.0-rtm-2283</CLI_NuGet_Version>
|
||||||
<CLI_WEBSDK_Version>1.0.0-alpha-20170130-3-281</CLI_WEBSDK_Version>
|
<CLI_WEBSDK_Version>1.0.0-alpha-20170130-3-281</CLI_WEBSDK_Version>
|
||||||
<CLI_TestPlatform_Version>15.0.0-preview-20170125-04</CLI_TestPlatform_Version>
|
<CLI_TestPlatform_Version>15.0.0-preview-20170210-02</CLI_TestPlatform_Version>
|
||||||
<TemplateEngineVersion>1.0.0-beta1-20170202-111</TemplateEngineVersion>
|
<TemplateEngineVersion>1.0.0-beta1-20170202-111</TemplateEngineVersion>
|
||||||
<TemplateEngineTemplateVersion>1.0.0-beta1-20170206-112</TemplateEngineTemplateVersion>
|
<TemplateEngineTemplateVersion>1.0.0-beta1-20170206-112</TemplateEngineTemplateVersion>
|
||||||
<PlatformAbstractionsVersion>1.1.1</PlatformAbstractionsVersion>
|
<PlatformAbstractionsVersion>1.1.1</PlatformAbstractionsVersion>
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ForPublishing Include="@(GeneratedInstallers)" />
|
<ForPublishing Include="@(GeneratedInstallers)" />
|
||||||
<ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)" />
|
<ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)" />
|
||||||
<ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg" Condition=" 'PUBLISH_NUPKG_TO_AZURE_BLOB' != '' " />
|
<ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg" Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' != '' " />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -274,7 +274,8 @@ namespace Microsoft.DotNet.Cli.Sln.Internal
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_filePath = PathUtility.GetPathWithDirectorySeparator(value);
|
_filePath = PathUtility.RemoveExtraPathSeparators(
|
||||||
|
PathUtility.GetPathWithDirectorySeparator(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,6 +261,32 @@ namespace Microsoft.DotNet.Tools.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string RemoveExtraPathSeparators(string path)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(path))
|
||||||
|
{
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
var components = path.Split(Path.DirectorySeparatorChar);
|
||||||
|
var result = string.Empty;
|
||||||
|
|
||||||
|
foreach (var component in components)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(component))
|
||||||
|
{
|
||||||
|
result = Path.Combine(result, component);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (path[path.Length-1] == Path.DirectorySeparatorChar)
|
||||||
|
{
|
||||||
|
result += Path.DirectorySeparatorChar;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public static bool HasExtension(string filePath, string extension)
|
public static bool HasExtension(string filePath, string extension)
|
||||||
{
|
{
|
||||||
var comparison = StringComparison.Ordinal;
|
var comparison = StringComparison.Ordinal;
|
||||||
|
|
|
@ -172,7 +172,7 @@ namespace Microsoft.DotNet.Tools.Common
|
||||||
this SlnFile slnFile,
|
this SlnFile slnFile,
|
||||||
SlnPropertySet nestedProjects)
|
SlnPropertySet nestedProjects)
|
||||||
{
|
{
|
||||||
var solutionFolderPaths = new Dictionary<string, string>();
|
var solutionFolderPaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
var solutionFolderProjects = slnFile.Projects.GetProjectsByType(ProjectTypeGuids.SolutionFolderGuid);
|
var solutionFolderProjects = slnFile.Projects.GetProjectsByType(ProjectTypeGuids.SolutionFolderGuid);
|
||||||
foreach (var slnProject in solutionFolderProjects)
|
foreach (var slnProject in solutionFolderProjects)
|
||||||
|
|
|
@ -502,11 +502,13 @@ EndGlobal
|
||||||
.Count().Should().Be(1, $"Lib {reasonString}");
|
.Count().Should().Be(1, $"Lib {reasonString}");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Theory]
|
||||||
public void WhenSolutionAlreadyContainsProjectItDoesntDuplicate()
|
[InlineData("TestAppWithSlnAndExistingCsprojReferences")]
|
||||||
|
[InlineData("TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep")]
|
||||||
|
public void WhenSolutionAlreadyContainsProjectItDoesntDuplicate(string testAsset)
|
||||||
{
|
{
|
||||||
var projectDirectory = TestAssets
|
var projectDirectory = TestAssets
|
||||||
.Get("TestAppWithSlnAndExistingCsprojReferences")
|
.Get(testAsset)
|
||||||
.CreateInstance()
|
.CreateInstance()
|
||||||
.WithSourceFiles()
|
.WithSourceFiles()
|
||||||
.Root
|
.Root
|
||||||
|
@ -606,6 +608,28 @@ EndGlobal
|
||||||
nonSolutionFolderProjects.Single().TypeGuid.Should().Be(expectedTypeGuid);
|
nonSolutionFolderProjects.Single().TypeGuid.Should().Be(expectedTypeGuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
private void WhenSlnContainsSolutionFolderWithDifferentCasingItDoesNotCreateDuplicate()
|
||||||
|
{
|
||||||
|
var projectDirectory = TestAssets
|
||||||
|
.Get("TestAppWithSlnAndCaseSensitiveSolutionFolders")
|
||||||
|
.CreateInstance()
|
||||||
|
.WithSourceFiles()
|
||||||
|
.Root
|
||||||
|
.FullName;
|
||||||
|
|
||||||
|
var projectToAdd = Path.Combine("src", "Lib", "Lib.csproj");
|
||||||
|
var cmd = new DotnetCommand()
|
||||||
|
.WithWorkingDirectory(projectDirectory)
|
||||||
|
.Execute($"sln App.sln add {projectToAdd}");
|
||||||
|
cmd.Should().Pass();
|
||||||
|
|
||||||
|
var slnFile = SlnFile.Read(Path.Combine(projectDirectory, "App.sln"));
|
||||||
|
var solutionFolderProjects = slnFile.Projects.Where(
|
||||||
|
p => p.TypeGuid == ProjectTypeGuids.SolutionFolderGuid);
|
||||||
|
solutionFolderProjects.Count().Should().Be(1);
|
||||||
|
}
|
||||||
|
|
||||||
private string GetExpectedSlnContents(
|
private string GetExpectedSlnContents(
|
||||||
string slnPath,
|
string slnPath,
|
||||||
string slnTemplate,
|
string slnTemplate,
|
||||||
|
|
Loading…
Reference in a new issue