Merge pull request #5751 from piotrpMSFT/piotrpMSFT/merge/rel1.0.0
merge rel/1.0.0 into master
This commit is contained in:
commit
c85047cfb3
55 changed files with 486 additions and 156 deletions
10
README.md
10
README.md
|
@ -4,17 +4,17 @@
|
||||||
|
|
||||||
This repo contains the source code for cross-platform [.NET Core](http://github.com/dotnet/core) command line toolchain. It contains the implementation of each command, the native packages for various supported platforms as well as documentation.
|
This repo contains the source code for cross-platform [.NET Core](http://github.com/dotnet/core) command line toolchain. It contains the implementation of each command, the native packages for various supported platforms as well as documentation.
|
||||||
|
|
||||||
Preview 4 release - MSBuild based tools
|
RC 4 release - MSBuild based tools
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
As was outlined in the ["Changes to project.json" blog post](https://blogs.msdn.microsoft.com/dotnet/2016/05/23/changes-to-project-json/), we have started work to move away from project.json to csproj and MSBuild. All the new `latest` releases from this repo (from `rel/1.0.0` branch) are MSBuild-enabled tools.
|
As was outlined in the ["Changes to project.json" blog post](https://blogs.msdn.microsoft.com/dotnet/2016/05/23/changes-to-project-json/), we have started work to move away from project.json to csproj and MSBuild. All the new `latest` releases from this repo (from `rel/1.0.0` branch) are MSBuild-enabled tools.
|
||||||
|
|
||||||
The current official release of the csproj-enabled CLI tools is **CLI Preview 4**.
|
The current official release of the csproj-enabled CLI tools is **CLI RC 4**.
|
||||||
|
|
||||||
There are a couple of things to keep in mind:
|
There are a couple of things to keep in mind:
|
||||||
|
|
||||||
* Preview 4 CLI bits are still **in development** so some rough edges are to be expected.
|
* RC 4 CLI bits are still **in development** so some rough edges are to be expected.
|
||||||
* Preview 4 bits **do not support** project.json so you will have to either keep Preview 2 tools around or migrate your project or add a global.json file to your project to target preview2. You can find more information on this using the [project.json to csproj instructions](https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/ProjectJsonToCSProj.md).
|
* RC 4 bits **do not support** project.json so you will have to either keep Preview 2 tools around or migrate your project or add a global.json file to your project to target preview2. You can find more information on this using the [project.json to csproj instructions](https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/ProjectJsonToCSProj.md).
|
||||||
* Preview 4 refers to the **CLI tools only** and does not cover Visual Studio, VS Code or Visual Studio for Mac.
|
* RC 4 refers to the **CLI tools only** and does not cover Visual Studio, VS Code or Visual Studio for Mac.
|
||||||
* We welcome any and all issues that relate to MSBuild-based tools, so feel free to try them out and leave comments and file any bugs/problems.
|
* We welcome any and all issues that relate to MSBuild-based tools, so feel free to try them out and leave comments and file any bugs/problems.
|
||||||
|
|
||||||
### Download links
|
### Download links
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.0.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.0.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyModel">
|
<PackageReference Include="Microsoft.Extensions.DependencyModel">
|
||||||
<Version>1.0.1-beta-000933</Version>
|
<Version>1.0.1-beta-000933</Version>
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<AssemblyName>dotnet-dependency-tool-invoker</AssemblyName>
|
<AssemblyName>dotnet-dependency-tool-invoker</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45+win8;dnxcore50</PackageTargetFallback>
|
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45+win8;dnxcore50</PackageTargetFallback>
|
||||||
|
<VersionSuffix></VersionSuffix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.0.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NuGet.Frameworks">
|
<PackageReference Include="NuGet.Frameworks">
|
||||||
<Version>$(CLI_NuGet_Version)</Version>
|
<Version>$(CLI_NuGet_Version)</Version>
|
||||||
|
|
|
@ -15,16 +15,10 @@
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.0.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!--The below package ref is added as a workaround to issue : https://github.com/NuGet/Home/issues/4416
|
|
||||||
This should be removed when the issue is fixed-->
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="NewtonSoft.Json" Version="9.0.1" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||||
<AssemblyName>dotnet-portable</AssemblyName>
|
<AssemblyName>dotnet-portable</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<VersionSuffix></VersionSuffix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -13,7 +16,7 @@
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.0.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<VersionSuffix></VersionSuffix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
<DotNetCliToolReference Include="dotnet-portable">
|
<DotNetCliToolReference Include="dotnet-portable">
|
||||||
<Version>1.0.0</Version>
|
<Version>1.0.0</Version>
|
||||||
</DotNetCliToolReference>
|
</DotNetCliToolReference>
|
||||||
|
<DotNetCliToolReference Include="dotnet-PreferCliRuntime">
|
||||||
|
<Version>1.0.0</Version>
|
||||||
|
</DotNetCliToolReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||||
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
|
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
|
||||||
|
|
|
@ -18,11 +18,6 @@
|
||||||
<Version>1.0.0-*</Version>
|
<Version>1.0.0-*</Version>
|
||||||
</DotNetCliToolReference>
|
</DotNetCliToolReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!--The below package ref is added as a workaround to issue : https://github.com/NuGet/Home/issues/4416
|
|
||||||
This should be removed when the issue is fixed-->
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="NewtonSoft.Json" Version="9.0.1" />
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||||
<DefineConstants>$(DefineConstants);RELEASE;TRACE</DefineConstants>
|
<DefineConstants>$(DefineConstants);RELEASE;TRACE</DefineConstants>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
|
|
|
@ -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";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -63,36 +63,6 @@
|
||||||
VersionSuffix="$(CommitCount)"
|
VersionSuffix="$(CommitCount)"
|
||||||
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"
|
|
||||||
SectionName="runtimeTargets"
|
|
||||||
AssetPath="$(BinaryToCorehostifyRelDir)/%(RuntimeTargetsAssetsToRemoveFromDeps.Identity).exe" />
|
|
||||||
|
|
||||||
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
|
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
|
||||||
SectionName="runtime"
|
SectionName="runtime"
|
||||||
AssetPath="%(RuntimeAssetsToRemoveFromDeps.Identity).dll" />
|
AssetPath="%(RuntimeAssetsToRemoveFromDeps.Identity).dll" />
|
||||||
|
@ -178,6 +148,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)" />
|
||||||
|
|
||||||
<!-- Move the "1.0" assemblies back -->
|
<!-- Move the "1.0" assemblies back -->
|
||||||
<Move SourceFiles="@(NETCore10Assemblies->'$(SdkOutputDirectory)/%(Filename)%(Extension).bak')"
|
<Move SourceFiles="@(NETCore10Assemblies->'$(SdkOutputDirectory)/%(Filename)%(Extension).bak')"
|
||||||
DestinationFiles="@(NETCore10Assemblies)" />
|
DestinationFiles="@(NETCore10Assemblies)" />
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<!-- Additional Shared Framework to be installed -->
|
<!-- Additional Shared Framework to be installed -->
|
||||||
<PropertyGroup Condition=" '$(IncludeAdditionalSharedFrameworks)' == 'true' ">
|
<PropertyGroup Condition=" '$(IncludeAdditionalSharedFrameworks)' == 'true' ">
|
||||||
<AdditionalCoreSetupChannel>preview</AdditionalCoreSetupChannel>
|
<AdditionalCoreSetupChannel>preview</AdditionalCoreSetupChannel>
|
||||||
<AdditionalSharedFrameworkVersion>1.0.3</AdditionalSharedFrameworkVersion>
|
<AdditionalSharedFrameworkVersion>1.0.4</AdditionalSharedFrameworkVersion>
|
||||||
<AdditionalSharedHostVersion>1.0.1</AdditionalSharedHostVersion>
|
<AdditionalSharedHostVersion>1.0.1</AdditionalSharedHostVersion>
|
||||||
<AdditionalHostFxrVersion>1.0.1</AdditionalHostFxrVersion>
|
<AdditionalHostFxrVersion>1.0.1</AdditionalHostFxrVersion>
|
||||||
|
|
||||||
|
|
|
@ -43,11 +43,12 @@
|
||||||
<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)' != '' " />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ForPublishing>
|
<ForPublishing>
|
||||||
<RelativeBlobPath>$(Product)/$(NugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
<RelativeBlobPath>$(Product)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
||||||
</ForPublishing>
|
</ForPublishing>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -62,7 +63,7 @@
|
||||||
<SdkInstallerFileItemGroup Include="$(SdkInstallerFile)" />
|
<SdkInstallerFileItemGroup Include="$(SdkInstallerFile)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SdkDebianUploadUrl>$(DotnetBlobRootUrl)/$(Product)/$(NugetVersion)/%(SdkInstallerFileItemGroup.Filename)%(SdkInstallerFileItemGroup.Extension)</SdkDebianUploadUrl>
|
<SdkDebianUploadUrl>$(DotnetBlobRootUrl)/$(Product)/$(FullNugetVersion)/%(SdkInstallerFileItemGroup.Filename)%(SdkInstallerFileItemGroup.Extension)</SdkDebianUploadUrl>
|
||||||
<DebianUploadJsonFile>$(SdkDebianIntermediateDirectory)/package_upload.json</DebianUploadJsonFile>
|
<DebianUploadJsonFile>$(SdkDebianIntermediateDirectory)/package_upload.json</DebianUploadJsonFile>
|
||||||
<DebianRevisionNumber>1</DebianRevisionNumber>
|
<DebianRevisionNumber>1</DebianRevisionNumber>
|
||||||
|
|
||||||
|
@ -89,7 +90,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<CliVersionBadgeToUpload>
|
<CliVersionBadgeToUpload>
|
||||||
<RelativeBlobPath>$(Product)/$(NugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
<RelativeBlobPath>$(Product)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
||||||
</CliVersionBadgeToUpload>
|
</CliVersionBadgeToUpload>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,6 @@
|
||||||
DependsOnTargets="Init;
|
DependsOnTargets="Init;
|
||||||
SetupTestProjectData">
|
SetupTestProjectData">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TestPackageBuildVersionSuffix>$(CommitCount)</TestPackageBuildVersionSuffix>
|
|
||||||
<TestOutputDir>$(RepoRoot)/artifacts/testpackages/</TestOutputDir>
|
<TestOutputDir>$(RepoRoot)/artifacts/testpackages/</TestOutputDir>
|
||||||
<TestPackagesBuildDir>$(TestOutputDir)/packagesBuild/</TestPackagesBuildDir>
|
<TestPackagesBuildDir>$(TestOutputDir)/packagesBuild/</TestPackagesBuildDir>
|
||||||
<TestPackagesDir>$(TestOutputDir)/packages/</TestPackagesDir>
|
<TestPackagesDir>$(TestOutputDir)/packages/</TestPackagesDir>
|
||||||
|
|
|
@ -6,11 +6,17 @@
|
||||||
<ReleaseSuffix>alpha</ReleaseSuffix>
|
<ReleaseSuffix>alpha</ReleaseSuffix>
|
||||||
|
|
||||||
<CliVersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)</CliVersionPrefix>
|
<CliVersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)</CliVersionPrefix>
|
||||||
<SimpleVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion>
|
<SimpleVersion Condition=" '$(DropSuffix)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion>
|
||||||
<VersionSuffix>$(ReleaseSuffix)-$(CommitCount)</VersionSuffix>
|
<SimpleVersion Condition=" '$(SimpleVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</SimpleVersion>
|
||||||
<NugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(VersionSuffix)</NugetVersion>
|
|
||||||
|
<VersionSuffix Condition=" '$(DropSuffix)' == '' ">$(ReleaseSuffix)-$(CommitCount)</VersionSuffix>
|
||||||
|
|
||||||
|
<FullNugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)-$(CommitCount)</FullNugetVersion>
|
||||||
|
|
||||||
|
<NugetVersion Condition=" '$(DropSuffix)' == '' ">$(FullNugetVersion)</NugetVersion>
|
||||||
|
<NugetVersion Condition=" '$(NugetVersion)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch)</NugetVersion>
|
||||||
|
|
||||||
<SdkVersion>$(NugetVersion)</SdkVersion>
|
<SdkVersion>$(NugetVersion)</SdkVersion>
|
||||||
<SdkNugetVersion>$(SdkVersion)</SdkNugetVersion>
|
<SdkNugetVersion>$(NugetVersion)</SdkNugetVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -23,9 +23,15 @@
|
||||||
<SdkInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile>
|
<SdkInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile>
|
||||||
<CombinedFrameworkSdkHostInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile>
|
<CombinedFrameworkSdkHostInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile>
|
||||||
<SdkInstallerNuspecFile>$(RepoRoot)/packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec</SdkInstallerNuspecFile>
|
<SdkInstallerNuspecFile>$(RepoRoot)/packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec</SdkInstallerNuspecFile>
|
||||||
<SdkInstallerNupkgFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(NugetVersion).nupkg</SdkInstallerNupkgFile>
|
<SdkInstallerNupkgFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</SdkInstallerNupkgFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- Generate SDK MSI Inputs -->
|
||||||
|
<ItemGroup>
|
||||||
|
<GenerateSdkMsiInputs Include="$(SdkLayoutOutputDirectory)/**/*;
|
||||||
|
$(SdkGenerateMsiPowershellScript)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Consumed By Publish -->
|
<!-- Consumed By Publish -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
|
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
|
||||||
|
@ -82,7 +88,9 @@
|
||||||
|
|
||||||
<Target Name="GenerateSdkMsi"
|
<Target Name="GenerateSdkMsi"
|
||||||
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs"
|
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs"
|
||||||
Condition=" '$(OS)' == 'Windows_NT'">
|
Condition=" '$(OS)' == 'Windows_NT'"
|
||||||
|
Inputs="@(GenerateSdkMsiInputs)"
|
||||||
|
Outputs="$(SdkInstallerFile)">
|
||||||
|
|
||||||
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript)
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript)
|
||||||
'$(SdkLayoutOutputDirectory)'
|
'$(SdkLayoutOutputDirectory)'
|
||||||
|
@ -134,7 +142,7 @@
|
||||||
|
|
||||||
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript)
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript)
|
||||||
'$(CombinedFrameworkSdkHostInstallerFile)'
|
'$(CombinedFrameworkSdkHostInstallerFile)'
|
||||||
'$(NugetVersion)'
|
'$(FullNugetVersion)'
|
||||||
'$(SdkInstallerNuspecFile)'
|
'$(SdkInstallerNuspecFile)'
|
||||||
'$(SdkInstallerNupkgFile)'" />
|
'$(SdkInstallerNupkgFile)'" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
<Target Name="SetupProjectsToPack"
|
<Target Name="SetupProjectsToPack"
|
||||||
DependsOnTargets="Init">
|
DependsOnTargets="Init">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<NupkgVersionSuffix>$(CommitCount)</NupkgVersionSuffix>
|
|
||||||
<ProjectsSrcDirectory>$(RepoRoot)/src</ProjectsSrcDirectory>
|
<ProjectsSrcDirectory>$(RepoRoot)/src</ProjectsSrcDirectory>
|
||||||
<PackagingBuildBasePath>$(Stage2CompilationDirectory)/forPackaging</PackagingBuildBasePath>
|
<PackagingBuildBasePath>$(Stage2CompilationDirectory)/forPackaging</PackagingBuildBasePath>
|
||||||
<NupkgOutputDirectory>$(PackagesDirectory)</NupkgOutputDirectory>
|
<NupkgOutputDirectory>$(PackagesDirectory)</NupkgOutputDirectory>
|
||||||
|
@ -26,7 +25,7 @@
|
||||||
Output="$(NupkgOutputDirectory)"
|
Output="$(NupkgOutputDirectory)"
|
||||||
ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj"
|
ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj"
|
||||||
ToolPath="$(Stage0Directory)"
|
ToolPath="$(Stage0Directory)"
|
||||||
VersionSuffix="$(ReleaseSuffix)-$(NupkgVersionSuffix)"
|
VersionSuffix="$(VersionSuffix)"
|
||||||
Configuration="$(Configuration)" />
|
Configuration="$(Configuration)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<CheckIfAllBuildsHavePublished AccountKey="$(ArtifactCloudDropAccessToken)"
|
<CheckIfAllBuildsHavePublished AccountKey="$(ArtifactCloudDropAccessToken)"
|
||||||
AccountName="$(ArtifactCloudDropAccountName)"
|
AccountName="$(ArtifactCloudDropAccountName)"
|
||||||
ContainerName="$(ArtifactContainerName)"
|
ContainerName="$(ArtifactContainerName)"
|
||||||
NugetVersion="$(NugetVersion)">
|
NugetVersion="$(FullNugetVersion)">
|
||||||
<Output TaskParameter="HaveAllBuildsPublished" PropertyName="HaveAllBuildsPublished" />
|
<Output TaskParameter="HaveAllBuildsPublished" PropertyName="HaveAllBuildsPublished" />
|
||||||
</CheckIfAllBuildsHavePublished>
|
</CheckIfAllBuildsHavePublished>
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -18,14 +18,14 @@
|
||||||
<CopyBlobsToLatest AccountName="$(ArtifactCloudDropAccountName)"
|
<CopyBlobsToLatest AccountName="$(ArtifactCloudDropAccountName)"
|
||||||
AccountKey="$(ArtifactCloudDropAccessToken)"
|
AccountKey="$(ArtifactCloudDropAccessToken)"
|
||||||
ContainerName="$(ArtifactContainerName)"
|
ContainerName="$(ArtifactContainerName)"
|
||||||
NugetVersion="$(NugetVersion)"
|
NugetVersion="$(FullNugetVersion)"
|
||||||
Channel="$(Channel)"
|
Channel="$(Channel)"
|
||||||
CommitHash="$(CommitHash)" />
|
CommitHash="$(CommitHash)" />
|
||||||
|
|
||||||
<CopyBlobsToLatest AccountName="$(ChecksumCloudDropAccountName)"
|
<CopyBlobsToLatest AccountName="$(ChecksumCloudDropAccountName)"
|
||||||
AccountKey="$(ChecksumCloudDropAccessToken)"
|
AccountKey="$(ChecksumCloudDropAccessToken)"
|
||||||
ContainerName="$(ChecksumContainerName)"
|
ContainerName="$(ChecksumContainerName)"
|
||||||
NugetVersion="$(NugetVersion)"
|
NugetVersion="$(FullNugetVersion)"
|
||||||
Channel="$(Channel)"
|
Channel="$(Channel)"
|
||||||
CommitHash="$(CommitHash)" />
|
CommitHash="$(CommitHash)" />
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
<ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName>
|
<ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName>
|
||||||
<IsTool>True</IsTool>
|
<IsTool>True</IsTool>
|
||||||
<IsApplicable>True</IsApplicable>
|
<IsApplicable>True</IsApplicable>
|
||||||
<VersionPrefix>$(CliVersionPrefix)-</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<VersionSuffix>rc4-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
<Clean>False</Clean>
|
<Clean>False</Clean>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.Cli.Utils"
|
<BaseTestPackageProject Include="src/Microsoft.DotNet.Cli.Utils"
|
||||||
|
@ -32,8 +32,8 @@
|
||||||
<ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName>
|
<ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName>
|
||||||
<IsTool>True</IsTool>
|
<IsTool>True</IsTool>
|
||||||
<IsApplicable>True</IsApplicable>
|
<IsApplicable>True</IsApplicable>
|
||||||
<VersionPrefix>$(CliVersionPrefix)-</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<VersionSuffix>$(ReleaseSuffix)-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
<Clean>False</Clean>
|
<Clean>False</Clean>
|
||||||
<MsbuildArgs>/p:TargetFramework=netstandard1.5</MsbuildArgs>
|
<MsbuildArgs>/p:TargetFramework=netstandard1.5</MsbuildArgs>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
|
@ -42,8 +42,8 @@
|
||||||
<ProjectName>Microsoft.DotNet.InternalAbstractions.csproj</ProjectName>
|
<ProjectName>Microsoft.DotNet.InternalAbstractions.csproj</ProjectName>
|
||||||
<IsTool>True</IsTool>
|
<IsTool>True</IsTool>
|
||||||
<IsApplicable>True</IsApplicable>
|
<IsApplicable>True</IsApplicable>
|
||||||
<VersionPrefix>2.0.0-beta-</VersionPrefix>
|
<VersionPrefix>2.0.0</VersionPrefix>
|
||||||
<VersionSuffix>beta-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
<Clean>False</Clean>
|
<Clean>False</Clean>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/PackageWithFakeNativeDep"
|
<BaseTestPackageProject Include="TestAssets/TestPackages/PackageWithFakeNativeDep"
|
||||||
|
@ -62,8 +62,8 @@
|
||||||
<ProjectName>dotnet-dependency-context-test.csproj</ProjectName>
|
<ProjectName>dotnet-dependency-context-test.csproj</ProjectName>
|
||||||
<IsTool>True</IsTool>
|
<IsTool>True</IsTool>
|
||||||
<IsApplicable>True</IsApplicable>
|
<IsApplicable>True</IsApplicable>
|
||||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-dependency-tool-invoker">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-dependency-tool-invoker">
|
||||||
|
@ -71,8 +71,8 @@
|
||||||
<ProjectName>dotnet-dependency-tool-invoker.csproj</ProjectName>
|
<ProjectName>dotnet-dependency-tool-invoker.csproj</ProjectName>
|
||||||
<IsTool>True</IsTool>
|
<IsTool>True</IsTool>
|
||||||
<IsApplicable>True</IsApplicable>
|
<IsApplicable>True</IsApplicable>
|
||||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-desktop-and-portable"
|
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-desktop-and-portable"
|
||||||
|
@ -81,8 +81,8 @@
|
||||||
<ProjectName>dotnet-desktop-and-portable.csproj</ProjectName>
|
<ProjectName>dotnet-desktop-and-portable.csproj</ProjectName>
|
||||||
<IsTool>True</IsTool>
|
<IsTool>True</IsTool>
|
||||||
<IsApplicable>True</IsApplicable>
|
<IsApplicable>True</IsApplicable>
|
||||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs>
|
<MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
|
@ -93,8 +93,8 @@
|
||||||
<IsTool>True</IsTool>
|
<IsTool>True</IsTool>
|
||||||
<IsMsbuild>True</IsMsbuild>
|
<IsMsbuild>True</IsMsbuild>
|
||||||
<IsApplicable>$(DesktopAvailable)</IsApplicable>
|
<IsApplicable>$(DesktopAvailable)</IsApplicable>
|
||||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs>
|
<MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli.Build
|
namespace Microsoft.DotNet.Cli.Build
|
||||||
{
|
{
|
||||||
public abstract class Version
|
public class Version
|
||||||
{
|
{
|
||||||
public virtual int Major { get; set; }
|
public virtual int Major { get; set; }
|
||||||
public virtual int Minor { get; set; }
|
public virtual int Minor { get; set; }
|
||||||
|
|
|
@ -133,6 +133,8 @@ docker run $INTERACTIVE -t --rm --sig-proxy=true \
|
||||||
-e CHECKSUM_STORAGE_ACCOUNT \
|
-e CHECKSUM_STORAGE_ACCOUNT \
|
||||||
-e CHECKSUM_STORAGE_CONTAINER \
|
-e CHECKSUM_STORAGE_CONTAINER \
|
||||||
-e CLIBUILD_SKIP_TESTS \
|
-e CLIBUILD_SKIP_TESTS \
|
||||||
-e CommitCount \
|
-e COMMITCOUNT \
|
||||||
|
-e DROPSUFFIX \
|
||||||
|
-e RELEASESUFFIX \
|
||||||
$DOTNET_BUILD_CONTAINER_TAG \
|
$DOTNET_BUILD_CONTAINER_TAG \
|
||||||
$BUILD_COMMAND "$@"
|
$BUILD_COMMAND "$@"
|
||||||
|
|
|
@ -274,7 +274,8 @@ namespace Microsoft.DotNet.Cli.Sln.Internal
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_filePath = PathUtility.GetPathWithDirectorySeparator(value);
|
_filePath = PathUtility.RemoveExtraPathSeparators(
|
||||||
|
PathUtility.GetPathWithDirectorySeparator(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,10 +150,9 @@ namespace Microsoft.DotNet.Cli.Utils
|
||||||
toolLockFile.Path));
|
toolLockFile.Path));
|
||||||
|
|
||||||
var toolLibrary = toolLockFile.Targets
|
var toolLibrary = toolLockFile.Targets
|
||||||
.FirstOrDefault(
|
.FirstOrDefault(t => s_toolPackageFramework == t.TargetFramework)
|
||||||
t => t.TargetFramework.GetShortFolderName().Equals(s_toolPackageFramework.GetShortFolderName()))
|
?.Libraries.FirstOrDefault(
|
||||||
?.Libraries.FirstOrDefault(l => l.Name == toolLibraryRange.Name);
|
l => StringComparer.OrdinalIgnoreCase.Equals(l.Name, toolLibraryRange.Name));
|
||||||
|
|
||||||
if (toolLibrary == null)
|
if (toolLibrary == null)
|
||||||
{
|
{
|
||||||
Reporter.Verbose.WriteLine(string.Format(
|
Reporter.Verbose.WriteLine(string.Format(
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<Version>1.0.1-beta-000933</Version>
|
<Version>1.0.1-beta-000933</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
||||||
<Version>1.1.0</Version>
|
<Version>$(PlatformAbstractionsVersion)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NuGet.Versioning">
|
<PackageReference Include="NuGet.Versioning">
|
||||||
<Version>$(CLI_NuGet_Version)</Version>
|
<Version>$(CLI_NuGet_Version)</Version>
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -5,8 +5,8 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
{
|
{
|
||||||
internal class ConstantPackageVersions
|
internal class ConstantPackageVersions
|
||||||
{
|
{
|
||||||
public const string AspNetToolsVersion = "1.0.0-msbuild3-final";
|
public const string AspNetToolsVersion = "1.0.0";
|
||||||
public const string AspNet110ToolsVersion = "1.1.0-msbuild3-final";
|
public const string AspNet110ToolsVersion = "1.1.0";
|
||||||
public const string AspNetLTSPackagesVersion = "1.0.2";
|
public const string AspNetLTSPackagesVersion = "1.0.2";
|
||||||
public const string EntityFrameworkLTSPackagesVersion = "1.0.2";
|
public const string EntityFrameworkLTSPackagesVersion = "1.0.2";
|
||||||
public const string TestSdkPackageVersion = "15.0.0-preview-20170106-08";
|
public const string TestSdkPackageVersion = "15.0.0-preview-20170106-08";
|
||||||
|
@ -15,6 +15,5 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
public const string MstestTestAdapterVersion = "1.1.8-rc";
|
public const string MstestTestAdapterVersion = "1.1.8-rc";
|
||||||
public const string MstestTestFrameworkVersion = "1.0.8-rc";
|
public const string MstestTestFrameworkVersion = "1.0.8-rc";
|
||||||
public const string BundleMinifierToolVersion = "2.2.301";
|
public const string BundleMinifierToolVersion = "2.2.301";
|
||||||
public const string WebSdkPackageVersion = "1.0.0-alpha-20161205-1-154" ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -591,25 +591,10 @@ namespace Microsoft.DotNet.Internal.ProjectModel
|
||||||
var rawOptions = rawObject.Value<JToken>("buildOptions") as JObject;
|
var rawOptions = rawObject.Value<JToken>("buildOptions") as JObject;
|
||||||
if (rawOptions == null)
|
if (rawOptions == null)
|
||||||
{
|
{
|
||||||
rawOptions = rawObject.Value<JToken>("compilationOptions") as JObject;
|
return new CommonCompilerOptions
|
||||||
if (rawOptions == null)
|
|
||||||
{
|
{
|
||||||
return new CommonCompilerOptions
|
CompilerName = compilerName ?? "csc"
|
||||||
{
|
};
|
||||||
CompilerName = compilerName ?? "csc"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
var lineInfo = (IJsonLineInfo)rawOptions;
|
|
||||||
|
|
||||||
project.Diagnostics.Add(
|
|
||||||
new DiagnosticMessage(
|
|
||||||
ErrorCodes.DOTNET1015,
|
|
||||||
$"The 'compilationOptions' option is deprecated. Use 'buildOptions' instead.",
|
|
||||||
project.ProjectFilePath,
|
|
||||||
DiagnosticMessageSeverity.Warning,
|
|
||||||
lineInfo.LineNumber,
|
|
||||||
lineInfo.LinePosition));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var analyzerOptionsJson = rawOptions.Value<JToken>("analyzerOptions") as JObject;
|
var analyzerOptionsJson = rawOptions.Value<JToken>("analyzerOptions") as JObject;
|
||||||
|
@ -814,6 +799,9 @@ namespace Microsoft.DotNet.Internal.ProjectModel
|
||||||
|
|
||||||
private static void AddProjectFilesDeprecationDiagnostics(JObject rawProject, Project project)
|
private static void AddProjectFilesDeprecationDiagnostics(JObject rawProject, Project project)
|
||||||
{
|
{
|
||||||
|
var compilationOptionsWarning = "'buildOptions'";
|
||||||
|
AddDeprecatedDiagnosticMessage(rawProject, project, "compilationOptions", compilationOptionsWarning);
|
||||||
|
|
||||||
var compileWarning = "'compile' in 'buildOptions'";
|
var compileWarning = "'compile' in 'buildOptions'";
|
||||||
AddDeprecatedDiagnosticMessage(rawProject, project, "compile", compileWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "compile", compileWarning);
|
||||||
AddDeprecatedDiagnosticMessage(rawProject, project, "compileExclude", compileWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "compileExclude", compileWarning);
|
||||||
|
@ -870,6 +858,7 @@ namespace Microsoft.DotNet.Internal.ProjectModel
|
||||||
|
|
||||||
private static void ConvertDeprecatedToSupportedFormat(JObject rawProject)
|
private static void ConvertDeprecatedToSupportedFormat(JObject rawProject)
|
||||||
{
|
{
|
||||||
|
ConvertToBuildOptions(rawProject);
|
||||||
ConvertToBuildOptionsCompile(rawProject);
|
ConvertToBuildOptionsCompile(rawProject);
|
||||||
ConvertToBuildOptionsEmbed(rawProject);
|
ConvertToBuildOptionsEmbed(rawProject);
|
||||||
ConvertToBuildOptionsCopyToOutput(rawProject);
|
ConvertToBuildOptionsCopyToOutput(rawProject);
|
||||||
|
@ -877,6 +866,21 @@ namespace Microsoft.DotNet.Internal.ProjectModel
|
||||||
ConvertToPublishOptions(rawProject);
|
ConvertToPublishOptions(rawProject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void ConvertToBuildOptions(JObject rawProject)
|
||||||
|
{
|
||||||
|
var jpath = "buildOptions";
|
||||||
|
if (AreDeprecatedOptionsIgnored(rawProject, jpath))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var deprecatedValue = rawProject.Value<JToken>("compilationOptions");
|
||||||
|
if (deprecatedValue != null)
|
||||||
|
{
|
||||||
|
rawProject["buildOptions"] = deprecatedValue.DeepClone();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void ConvertToBuildOptionsCompile(JObject rawProject)
|
private static void ConvertToBuildOptionsCompile(JObject rawProject)
|
||||||
{
|
{
|
||||||
var jpath = "buildOptions.compile";
|
var jpath = "buildOptions.compile";
|
||||||
|
|
|
@ -53,6 +53,17 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
Version = ConstantPackageVersions.AspNetToolsVersion
|
Version = ConstantPackageVersions.AspNetToolsVersion
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
new PackageDependencyInfo
|
||||||
|
{
|
||||||
|
Name = "Microsoft.EntityFrameworkCore.Tools.DotNet",
|
||||||
|
Version = "[1.0.0-*,)"
|
||||||
|
},
|
||||||
|
new PackageDependencyInfo {
|
||||||
|
Name = "Microsoft.EntityFrameworkCore.Tools.DotNet",
|
||||||
|
Version = ConstantPackageVersions.AspNetToolsVersion
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
new PackageDependencyInfo
|
new PackageDependencyInfo
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
|
||||||
using Microsoft.Build.Execution;
|
using Microsoft.Build.Execution;
|
||||||
|
using Microsoft.DotNet.Cli.Sln.Internal;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
|
@ -37,9 +38,9 @@ namespace Microsoft.DotNet.Tools.Common
|
||||||
//ISSUE: https://github.com/dotnet/sdk/issues/522
|
//ISSUE: https://github.com/dotnet/sdk/issues/522
|
||||||
//The real behavior we want (once DefaultProjectTypeGuid support is in) is to throw
|
//The real behavior we want (once DefaultProjectTypeGuid support is in) is to throw
|
||||||
//when we cannot find ProjectTypeGuid or DefaultProjectTypeGuid. But for now we
|
//when we cannot find ProjectTypeGuid or DefaultProjectTypeGuid. But for now we
|
||||||
//need the same behavior we had before this change.
|
//need to default to the C# one.
|
||||||
//throw new GracefulException(CommonLocalizableStrings.UnsupportedProjectType);
|
//throw new GracefulException(CommonLocalizableStrings.UnsupportedProjectType);
|
||||||
projectTypeGuid = "{13B669BE-BB05-4DDF-9536-439F39A36129}"; // CPS guid
|
projectTypeGuid = ProjectTypeGuids.CSharpProjectTypeGuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
return projectTypeGuid;
|
return projectTypeGuid;
|
||||||
|
|
|
@ -39,19 +39,19 @@ Prints out a short help and a list of current commands.
|
||||||
|
|
||||||
The following commands exist for dotnet:
|
The following commands exist for dotnet:
|
||||||
|
|
||||||
* [dotnet-new](commands/dotnet-new/README.md)
|
* [dotnet-new](https://aka.ms/dotnet-new)
|
||||||
* Initializes a C# or F# console application project.
|
* Initializes a C# or F# console application project.
|
||||||
* [dotnet-restore](commands/dotnet-restore/README.md)
|
* [dotnet-restore](https://aka.ms/dotnet-restore)
|
||||||
* Restores the dependencies for a given application.
|
* Restores the dependencies for a given application.
|
||||||
* [dotnet-build](commands/dotnet-build/README.md)
|
* [dotnet-build](https://aka.ms/dotnet-build)
|
||||||
* Builds a .NET Core application.
|
* Builds a .NET Core application.
|
||||||
* [dotnet-publish](commands/dotnet-publish/README.md)
|
* [dotnet-publish](https://aka.ms/dotnet-publish)
|
||||||
* Publishes a .NET portable or self-contained application.
|
* Publishes a .NET portable or self-contained application.
|
||||||
* [dotnet-run](commands/dotnet-run/README.md)
|
* [dotnet-run](https://aka.ms/dotnet-run)
|
||||||
* Runs the application from source.
|
* Runs the application from source.
|
||||||
* [dotnet-test](commands/dotnet-test/README.md)
|
* [dotnet-test](https://aka.ms/dotnet-test)
|
||||||
* Runs tests using a test runner specified in the project.json.
|
* Runs tests using a test runner specified in the project.json.
|
||||||
* [dotnet-pack](commands/dotnet-pack/README.md)
|
* [dotnet-pack](https://aka.ms/dotnet-pack)
|
||||||
* Creates a NuGet package of your code.
|
* Creates a NuGet package of your code.
|
||||||
|
|
||||||
## EXAMPLES
|
## EXAMPLES
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<Version>$(CLI_MSBuild_Version)</Version>
|
<Version>$(CLI_MSBuild_Version)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
||||||
<Version>1.1.0</Version>
|
<Version>$(PlatformAbstractionsVersion)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.TemplateEngine.Abstractions" Version="$(TemplateEngineVersion)" />
|
<PackageReference Include="Microsoft.TemplateEngine.Abstractions" Version="$(TemplateEngineVersion)" />
|
||||||
<PackageReference Include="Microsoft.TemplateEngine.Cli" Version="$(TemplateEngineVersion)" />
|
<PackageReference Include="Microsoft.TemplateEngine.Cli" Version="$(TemplateEngineVersion)" />
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(CLI_Roslyn_Version)" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(CLI_Roslyn_Version)" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.Build.Tasks" Version="$(CLI_Roslyn_Version)" />
|
<PackageReference Include="Microsoft.CodeAnalysis.Build.Tasks" Version="$(CLI_Roslyn_Version)" />
|
||||||
<PackageReference Include="Microsoft.Net.Compilers.netcore" Version="$(CLI_Roslyn_Version)" />
|
<PackageReference Include="Microsoft.Net.Compilers.netcore" Version="$(CLI_Roslyn_Version)" />
|
||||||
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="1.4.0" />
|
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="1.4.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<Version>2.2.0-beta4-build3444</Version>
|
<Version>2.2.0-beta4-build3444</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
||||||
<Version>1.1.0</Version>
|
<Version>$(PlatformAbstractionsVersion)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<Version>1.0.0-prerelease-00206</Version>
|
<Version>1.0.0-prerelease-00206</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
||||||
<Version>1.1.0</Version>
|
<Version>$(PlatformAbstractionsVersion)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace Microsoft.DotNet.Tests
|
||||||
private const string TestProjectName = "AppWithToolDependency";
|
private const string TestProjectName = "AppWithToolDependency";
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void It_returns_null_when_CommandName_is_null()
|
public void ItReturnsNullWhenCommandNameIsNull()
|
||||||
{
|
{
|
||||||
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ namespace Microsoft.DotNet.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void It_returns_null_when_ProjectDirectory_is_null()
|
public void ItReturnsNullWhenProjectDirectoryIsNull()
|
||||||
{
|
{
|
||||||
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ namespace Microsoft.DotNet.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void It_returns_null_when_ProjectDirectory_does_not_contain_a_project_file()
|
public void ItReturnsNullWhenProjectDirectoryDoesNotContainAProjectFile()
|
||||||
{
|
{
|
||||||
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ namespace Microsoft.DotNet.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void It_returns_null_when_CommandName_does_not_exist_in_ProjectTools()
|
public void ItReturnsNullWhenCommandNameDoesNotExistInProjectTools()
|
||||||
{
|
{
|
||||||
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ namespace Microsoft.DotNet.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void It_returns_a_CommandSpec_with_DOTNET_as_FileName_and_CommandName_in_Args_when_CommandName_exists_in_ProjectTools()
|
public void ItReturnsACommandSpecWithDOTNETAsFileNameAndCommandNameInArgsWhenCommandNameExistsInProjectTools()
|
||||||
{
|
{
|
||||||
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ namespace Microsoft.DotNet.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void It_escapes_CommandArguments_when_returning_a_CommandSpec()
|
public void ItEscapesCommandArgumentsWhenReturningACommandSpec()
|
||||||
{
|
{
|
||||||
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ namespace Microsoft.DotNet.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void It_returns_a_CommandSpec_with_Args_containing_CommandPath_when_returning_a_CommandSpec_and_CommandArguments_are_null()
|
public void ItReturnsACommandSpecWithArgsContainingCommandPathWhenReturningACommandSpecAndCommandArgumentsAreNull()
|
||||||
{
|
{
|
||||||
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
||||||
|
@ -174,7 +174,32 @@ namespace Microsoft.DotNet.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void It_writes_a_deps_json_file_next_to_the_lockfile()
|
public void ItReturnsACommandSpecWithArgsContainingCommandPathWhenInvokingAToolReferencedWithADifferentCasing()
|
||||||
|
{
|
||||||
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
||||||
|
var testInstance = TestAssets.Get(TestProjectName)
|
||||||
|
.CreateInstance()
|
||||||
|
.WithSourceFiles()
|
||||||
|
.WithRestoreFiles();
|
||||||
|
|
||||||
|
var commandResolverArguments = new CommandResolverArguments()
|
||||||
|
{
|
||||||
|
CommandName = "dotnet-prefercliruntime",
|
||||||
|
CommandArguments = null,
|
||||||
|
ProjectDirectory = testInstance.Root.FullName
|
||||||
|
};
|
||||||
|
|
||||||
|
var result = projectToolsCommandResolver.Resolve(commandResolverArguments);
|
||||||
|
|
||||||
|
result.Should().NotBeNull();
|
||||||
|
|
||||||
|
var commandPath = result.Args.Trim('"');
|
||||||
|
commandPath.Should().Contain("dotnet-prefercliruntime.dll");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void ItWritesADepsJsonFileNextToTheLockfile()
|
||||||
{
|
{
|
||||||
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
||||||
|
@ -221,7 +246,7 @@ namespace Microsoft.DotNet.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Generate_deps_json_method_doesnt_overwrite_when_deps_file_already_exists()
|
public void GenerateDepsJsonMethodDoesntOverwriteWhenDepsFileAlreadyExists()
|
||||||
{
|
{
|
||||||
var testInstance = TestAssets.Get(TestProjectName)
|
var testInstance = TestAssets.Get(TestProjectName)
|
||||||
.CreateInstance()
|
.CreateInstance()
|
||||||
|
@ -262,7 +287,7 @@ namespace Microsoft.DotNet.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void It_adds_fx_version_as_a_param_when_the_tool_has_the_prefercliruntime_file()
|
public void ItAddsFxVersionAsAParamWhenTheToolHasThePrefercliruntimeFile()
|
||||||
{
|
{
|
||||||
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
||||||
|
@ -286,7 +311,7 @@ namespace Microsoft.DotNet.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void It_does_not_add_fx_version_as_a_param_when_the_tool_does_not_have_the_prefercliruntime_file()
|
public void ItDoesNotAddFxVersionAsAParamWhenTheToolDoesNotHaveThePrefercliruntimeFile()
|
||||||
{
|
{
|
||||||
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
<Version>2.2.0-beta4-build3444</Version>
|
<Version>2.2.0-beta4-build3444</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
||||||
<Version>1.1.0</Version>
|
<Version>$(PlatformAbstractionsVersion)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Build.Runtime">
|
<PackageReference Include="Microsoft.Build.Runtime">
|
||||||
<Version>$(CLI_MSBuild_Version)</Version>
|
<Version>$(CLI_MSBuild_Version)</Version>
|
||||||
|
|
|
@ -16,6 +16,37 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
||||||
{
|
{
|
||||||
public class GivenThatIWantToMigrateBuildOptions : TestBase
|
public class GivenThatIWantToMigrateBuildOptions : TestBase
|
||||||
{
|
{
|
||||||
|
[Fact]
|
||||||
|
public void MigratingDeprecatedCompilationOptionsWithEmitEntryPointPopulatesOutputTypeField()
|
||||||
|
{
|
||||||
|
var mockProj = RunBuildOptionsRuleOnPj(@"
|
||||||
|
{
|
||||||
|
""compilationOptions"": {
|
||||||
|
""emitEntryPoint"": ""true""
|
||||||
|
},
|
||||||
|
""exclude"": [
|
||||||
|
""node_modules""
|
||||||
|
]
|
||||||
|
}");
|
||||||
|
|
||||||
|
mockProj.Properties.Count(p => p.Name == "OutputType").Should().Be(1);
|
||||||
|
mockProj.Properties.First(p => p.Name == "OutputType").Value.Should().Be("Exe");
|
||||||
|
|
||||||
|
mockProj.Items.Count(i => i.ItemType.Equals("Compile", StringComparison.Ordinal))
|
||||||
|
.Should().Be(1);
|
||||||
|
mockProj.Items.Count(i =>
|
||||||
|
i.ItemType.Equals("Compile", StringComparison.Ordinal) &&
|
||||||
|
i.Remove.Equals("node_modules"))
|
||||||
|
.Should().Be(1);
|
||||||
|
|
||||||
|
mockProj.Items.Count(i => i.ItemType.Equals("EmbeddedResource", StringComparison.Ordinal))
|
||||||
|
.Should().Be(1);
|
||||||
|
mockProj.Items.Count(i =>
|
||||||
|
i.ItemType.Equals("EmbeddedResource", StringComparison.Ordinal) &&
|
||||||
|
i.Remove.Equals("node_modules"))
|
||||||
|
.Should().Be(1);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void SpecifiedDefaultPropertiesAreRemovedWhenTheyExistInTheCsprojTemplate()
|
public void SpecifiedDefaultPropertiesAreRemovedWhenTheyExistInTheCsprojTemplate()
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,6 +59,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
|
[InlineData("Microsoft.EntityFrameworkCore.Tools.DotNet", "Microsoft.EntityFrameworkCore.Tools.DotNet", ConstantPackageVersions.AspNetToolsVersion)]
|
||||||
[InlineData("Microsoft.EntityFrameworkCore.Tools", "Microsoft.EntityFrameworkCore.Tools.DotNet", ConstantPackageVersions.AspNetToolsVersion)]
|
[InlineData("Microsoft.EntityFrameworkCore.Tools", "Microsoft.EntityFrameworkCore.Tools.DotNet", ConstantPackageVersions.AspNetToolsVersion)]
|
||||||
[InlineData("Microsoft.VisualStudio.Web.CodeGeneration.Tools", "Microsoft.VisualStudio.Web.CodeGeneration.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
[InlineData("Microsoft.VisualStudio.Web.CodeGeneration.Tools", "Microsoft.VisualStudio.Web.CodeGeneration.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
||||||
[InlineData("Microsoft.DotNet.Watcher.Tools", "Microsoft.DotNet.Watcher.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
[InlineData("Microsoft.DotNet.Watcher.Tools", "Microsoft.DotNet.Watcher.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
||||||
|
@ -90,5 +91,13 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
||||||
|
|
||||||
var packageRef = mockProj.Items.Where(i => i.ItemType == "DotNetCliToolReference").Should().BeEmpty();
|
var packageRef = mockProj.Items.Where(i => i.ItemType == "DotNetCliToolReference").Should().BeEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void ItMergesEntityFrameworkCoreToolsAndEntityFrameworkCoreToolsDotNet()
|
||||||
|
{
|
||||||
|
var mockProj = RunPackageDependenciesRuleOnPj("{ \"tools\": { \"Microsoft.EntityFrameworkCore.Tools\": \"1.0.0-preview4-final\", \"Microsoft.EntityFrameworkCore.Tools.DotNet\": \"1.0.0-preview4-final\" } }");
|
||||||
|
|
||||||
|
EmitsToolReferences(mockProj, Tuple.Create("Microsoft.EntityFrameworkCore.Tools.DotNet", ConstantPackageVersions.AspNetToolsVersion));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -26,7 +26,7 @@
|
||||||
<Version>2.2.0-beta4-build3444</Version>
|
<Version>2.2.0-beta4-build3444</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
||||||
<Version>1.1.0</Version>
|
<Version>$(PlatformAbstractionsVersion)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -33,7 +33,7 @@
|
||||||
<Version>2.2.0-beta4-build1194</Version>
|
<Version>2.2.0-beta4-build1194</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.1.0</Version>
|
<Version>$(CLI_SharedFrameworkVersion)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Runtime.Serialization.Primitives">
|
<PackageReference Include="System.Runtime.Serialization.Primitives">
|
||||||
<Version>4.3.0</Version>
|
<Version>4.3.0</Version>
|
||||||
|
|
|
@ -17,6 +17,6 @@
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(CLI_TestPlatform_Version)" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(CLI_TestPlatform_Version)" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="1.1.0" />
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<Version>2.2.0-beta4-build3444</Version>
|
<Version>2.2.0-beta4-build3444</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
||||||
<Version>1.1.0</Version>
|
<Version>$(PlatformAbstractionsVersion)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="FluentAssertions">
|
<PackageReference Include="FluentAssertions">
|
||||||
<Version>4.18.0</Version>
|
<Version>4.18.0</Version>
|
||||||
|
|
|
@ -42,7 +42,7 @@ VisualStudioVersion = 15.0.26006.2
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""App"", ""App\App.csproj"", ""{7072A694-548F-4CAE-A58F-12D257D5F486}""
|
Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""App"", ""App\App.csproj"", ""{7072A694-548F-4CAE-A58F-12D257D5F486}""
|
||||||
EndProject
|
EndProject
|
||||||
Project(""{13B669BE-BB05-4DDF-9536-439F39A36129}"") = ""Lib"", ""Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__""
|
Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"") = ""Lib"", ""Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__""
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
@ -90,7 +90,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio 15
|
||||||
VisualStudioVersion = 15.0.26006.2
|
VisualStudioVersion = 15.0.26006.2
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project(""{13B669BE-BB05-4DDF-9536-439F39A36129}"") = ""Lib"", ""Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__""
|
Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"") = ""Lib"", ""Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__""
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
@ -127,7 +127,7 @@ Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""App"", ""App.csproj"", "
|
||||||
EndProject
|
EndProject
|
||||||
Project(""{2150E333-8FDC-42A3-9474-1A3956D46DE8}"") = ""src"", ""src"", ""__SRC_FOLDER_GUID__""
|
Project(""{2150E333-8FDC-42A3-9474-1A3956D46DE8}"") = ""src"", ""src"", ""__SRC_FOLDER_GUID__""
|
||||||
EndProject
|
EndProject
|
||||||
Project(""{13B669BE-BB05-4DDF-9536-439F39A36129}"") = ""Lib"", ""src\Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__""
|
Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"") = ""Lib"", ""src\Lib\Lib.csproj"", ""__LIB_PROJECT_GUID__""
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
@ -515,11 +515,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
|
||||||
|
@ -619,6 +621,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,
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
using Microsoft.DotNet.Cli.Utils;
|
||||||
using Microsoft.DotNet.Cli;
|
using Microsoft.DotNet.Cli;
|
||||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||||
|
@ -18,14 +17,28 @@ namespace Microsoft.DotNet.Tests
|
||||||
[Fact]
|
[Fact]
|
||||||
public void VersionCommandDisplaysCorrectVersion()
|
public void VersionCommandDisplaysCorrectVersion()
|
||||||
{
|
{
|
||||||
|
var versionFilePath = Path.Combine(AppContext.BaseDirectory, ".version");
|
||||||
|
var version = GetVersionFromFile(versionFilePath);
|
||||||
|
|
||||||
CommandResult result = new DotnetCommand()
|
CommandResult result = new DotnetCommand()
|
||||||
.ExecuteWithCapturedOutput("--version");
|
.ExecuteWithCapturedOutput("--version");
|
||||||
|
|
||||||
result.Should().Pass();
|
result.Should().Pass();
|
||||||
|
result.StdOut.Trim().Should().Be(version);
|
||||||
|
}
|
||||||
|
|
||||||
Regex.IsMatch(result.StdOut.Trim(), @"[0-9]{1}\.[0-9]{1}\.[0-9]{1}-[a-zA-Z0-9]+-[0-9]{6}$").Should()
|
private string GetVersionFromFile(string versionFilePath)
|
||||||
.BeTrue($"Unexpected dotnet sdk version - {result.StdOut}");
|
{
|
||||||
|
using (var reader = new StreamReader(File.OpenRead(versionFilePath)))
|
||||||
|
{
|
||||||
|
SkipCommit(reader);
|
||||||
|
return reader.ReadLine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SkipCommit(StreamReader reader)
|
||||||
|
{
|
||||||
|
reader.ReadLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="..\..\artifacts\*\stage2\sdk\*\.version">
|
||||||
|
<Link>.version</Link>
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -61,7 +65,7 @@
|
||||||
<Version>1.0.0-prerelease-00206</Version>
|
<Version>1.0.0-prerelease-00206</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
||||||
<Version>1.1.0</Version>
|
<Version>$(PlatformAbstractionsVersion)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Reference in a new issue