diff --git a/README.md b/README.md index f3763bad5..4fa918d76 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ This project has adopted the code of conduct defined by the [Contributor Covenan Build Status ------------ -|Ubuntu 14.04 |Debian 8.2 |Windows x64 |Windows x86 |Mac OS X |CentOS 7.1 |RHEL 7.2 | -|:------:|:------:|:------:|:------:|:------:|:------:|:------:| -|[![](https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3132/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3132)|[![](https://mseng.visualstudio.com/DefaultCollection/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3271/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3271)|[![](https://mseng.visualstudio.com/DefaultCollection/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3022/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3022)|[![](https://mseng.visualstudio.com/DefaultCollection/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3071/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3071)|[![](https://devdiv.visualstudio.com/DefaultCollection/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/600/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3397)|[![](https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3257/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3257)|[![](https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3256/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3256)| +|Ubuntu 14.04 / Linux Mint 17 |Ubuntu 16.04 |Debian 8.2 |Windows x64 |Windows x86 |Mac OS X |CentOS 7.1 / Oracle Linux 7.1 |RHEL 7.2 |OpenSUSE 13.2 |Fedora 23| +|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:| +|[![](https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3132/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3132)|[![](https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3620/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3620)|[![](https://mseng.visualstudio.com/DefaultCollection/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3271/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3271)|[![](https://mseng.visualstudio.com/DefaultCollection/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3022/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3022)|[![](https://mseng.visualstudio.com/DefaultCollection/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3071/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3071)|[![](https://devdiv.visualstudio.com/DefaultCollection/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/600/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3397)|[![](https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3257/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3257)|[![](https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3256/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3256)|[![](https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3625/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3625)|[![](https://mseng.visualstudio.com/_apis/public/build/definitions/d09b7a4d-0a51-4c0e-a15a-07921d5b558f/3622/badge)](https://mseng.visualstudio.com/dotnetcore/_build?_a=completed&definitionId=3622)| Installers and Binaries ----------------------- @@ -47,11 +47,14 @@ You can download .NET Core as either an installer (MSI, PKG) or a zip (zip, gzip |---------|:------:|:------:|:------:|:------:|:------:| |**Windows x64**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/Windows_x64_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.win.x64.version)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-win-x64.latest.exe)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-dev-win-x64.latest.exe)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-win-x64.latest.zip)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-win-x64.latest.zip)| |**Windows x86**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/Windows_x86_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.win.x86.version)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-win-x86.latest.exe)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-dev-win-x86.latest.exe)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-win-x86.latest.zip)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-win-x86.latest.zip)| -|**Ubuntu 14.04**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/Ubuntu_x64_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.ubuntu.x64.version)|*See Below*|*See Below*|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-ubuntu-x64.latest.tar.gz)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-ubuntu-x64.latest.tar.gz)| +|**Ubuntu 14.04 / Linux Mint 17**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/Ubuntu_x64_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.ubuntu.x64.version)|*See Below*|*See Below*|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-ubuntu-x64.latest.tar.gz)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-ubuntu-x64.latest.tar.gz)| +|**Ubuntu 16.04**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/Ubuntu_16_04_x64_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.ubuntu.16.04.x64.version)|N/A |N/A |[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-ubuntu.16.04-x64.latest.tar.gz)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-ubuntu.16.04-x64.latest.tar.gz) | |**Debian 8.2**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/Debian_x64_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.debian.x64.version)|N/A|N/A|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-debian-x64.latest.tar.gz)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-debian-x64.latest.tar.gz)| |**Mac OS X**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/OSX_x64_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.osx.x64.version)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-osx-x64.latest.pkg)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-dev-osx-x64.latest.pkg)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-osx-x64.latest.tar.gz)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-osx-x64.latest.tar.gz)| -|**CentOS 7.1**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/CentOS_x64_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.centos.x64.version)|N/A |N/A |[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-centos-x64.latest.tar.gz)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-centos-x64.latest.tar.gz)| +|**CentOS 7.1 / Oracle Linux 7**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/CentOS_x64_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.centos.x64.version)|N/A |N/A |[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-centos-x64.latest.tar.gz)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-centos-x64.latest.tar.gz)| |**RHEL 7.2**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/RHEL_x64_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.rhel.x64.version)|N/A |N/A |[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-rhel-x64.latest.tar.gz)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-rhel-x64.latest.tar.gz) | +|**openSUSE 13.2**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/openSUSE_13_2_x64_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.opensuse.13.2.x64.version)|N/A |N/A |[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-opensuse.13.2-x64.latest.tar.gz)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-opensuse.13.2-x64.latest.tar.gz) | +|**Fedora 23**|[![](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/Fedora_23_x64_Release_version_badge.svg)](https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.fedora.23.x64.version)|N/A |N/A |[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-fedora.23-x64.latest.tar.gz)|[Download](https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/dotnet-dev-fedora.23-x64.latest.tar.gz) | Ubuntu Installers ---------- diff --git a/build_projects/dotnet-cli-build/PackageTargets.cs b/build_projects/dotnet-cli-build/PackageTargets.cs index af80d1f0e..7514c78ae 100644 --- a/build_projects/dotnet-cli-build/PackageTargets.cs +++ b/build_projects/dotnet-cli-build/PackageTargets.cs @@ -230,6 +230,7 @@ namespace Microsoft.DotNet.Cli.Build dotnet.Pack( projectFile, "--no-build", + "--serviceable", "--build-base-path", packagingBuildBasePath, "--output", Dirs.Packages, "--configuration", configuration, diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index a6f721fdb..9e53e7303 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -668,4 +668,4 @@ else say "Binaries of dotnet can be found in $bin_path" fi -say "Installation finished successfuly." +say "Installation finished successfully." diff --git a/src/Microsoft.DotNet.Archive/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.Archive/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..bd44bced5 --- /dev/null +++ b/src/Microsoft.DotNet.Archive/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Reflection; + +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] diff --git a/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs index 7766a7151..29547d803 100644 --- a/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs +++ b/src/Microsoft.DotNet.Cli.Utils/Properties/AssemblyInfo.cs @@ -1,3 +1,5 @@ +using System.Reflection; using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.DotNet.Cli.Utils.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] \ No newline at end of file +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] +[assembly: InternalsVisibleTo("Microsoft.DotNet.Cli.Utils.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Microsoft.DotNet.Compiler.Common/Properties/Properties.cs b/src/Microsoft.DotNet.Compiler.Common/Properties/Properties.cs index 233d59e67..046cd5ad1 100644 --- a/src/Microsoft.DotNet.Compiler.Common/Properties/Properties.cs +++ b/src/Microsoft.DotNet.Compiler.Common/Properties/Properties.cs @@ -1,3 +1,5 @@ -using System.Runtime.CompilerServices; +using System.Reflection; +using System.Runtime.CompilerServices; +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] [assembly: InternalsVisibleTo("dotnet-compile.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] \ No newline at end of file diff --git a/src/Microsoft.DotNet.Configurer/Properties/Properties.cs b/src/Microsoft.DotNet.Configurer/Properties/Properties.cs index a568b652e..54a364c16 100644 --- a/src/Microsoft.DotNet.Configurer/Properties/Properties.cs +++ b/src/Microsoft.DotNet.Configurer/Properties/Properties.cs @@ -1,3 +1,5 @@ +using System.Reflection; using System.Runtime.CompilerServices; +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] [assembly: InternalsVisibleTo("Microsoft.DotNet.Configurer.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] \ No newline at end of file diff --git a/src/Microsoft.DotNet.Files/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.Files/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..bd44bced5 --- /dev/null +++ b/src/Microsoft.DotNet.Files/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Reflection; + +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] diff --git a/src/Microsoft.DotNet.InternalAbstractions/Properties/Properties.cs b/src/Microsoft.DotNet.InternalAbstractions/Properties/Properties.cs index b88d8953c..ceccc63e7 100644 --- a/src/Microsoft.DotNet.InternalAbstractions/Properties/Properties.cs +++ b/src/Microsoft.DotNet.InternalAbstractions/Properties/Properties.cs @@ -1,5 +1,7 @@ -using System.Runtime.CompilerServices; +using System.Reflection; +using System.Runtime.CompilerServices; +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] [assembly: InternalsVisibleTo("Microsoft.Extensions.DependencyModel, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.DotNet.Tools.Tests.Utilities, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.Extensions.DependencyModel.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Microsoft.DotNet.ProjectModel.Loader/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.ProjectModel.Loader/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..bd44bced5 --- /dev/null +++ b/src/Microsoft.DotNet.ProjectModel.Loader/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Reflection; + +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] diff --git a/src/Microsoft.DotNet.ProjectModel.Workspaces/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.ProjectModel.Workspaces/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..bd44bced5 --- /dev/null +++ b/src/Microsoft.DotNet.ProjectModel.Workspaces/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Reflection; + +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] diff --git a/src/Microsoft.DotNet.ProjectModel/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.ProjectModel/Properties/AssemblyInfo.cs index c058faec1..736765643 100644 --- a/src/Microsoft.DotNet.ProjectModel/Properties/AssemblyInfo.cs +++ b/src/Microsoft.DotNet.ProjectModel/Properties/AssemblyInfo.cs @@ -25,4 +25,5 @@ using System.Runtime.InteropServices; // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("303677d5-7312-4c3f-baee-beb1a9bd9fe6")] +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] [assembly: InternalsVisibleTo("Microsoft.DotNet.ProjectModel.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100039ac461fa5c82c7dd2557400c4fd4e9dcdf7ac47e3d572548c04cd4673e004916610f4ea5cbf86f2b1ca1cb824f2a7b3976afecfcf4eb72d9a899aa6786effa10c30399e6580ed848231fec48374e41b3acf8811931343fc2f73acf72dae745adbcb7063cc4b50550618383202875223fc75401351cd89c44bf9b50e7fa3796")] diff --git a/src/Microsoft.DotNet.TestFramework/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.TestFramework/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..bd44bced5 --- /dev/null +++ b/src/Microsoft.DotNet.TestFramework/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Reflection; + +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] diff --git a/src/Microsoft.Extensions.DependencyModel/Properties/Properties.cs b/src/Microsoft.Extensions.DependencyModel/Properties/Properties.cs index db059877f..b8c122eba 100644 --- a/src/Microsoft.Extensions.DependencyModel/Properties/Properties.cs +++ b/src/Microsoft.Extensions.DependencyModel/Properties/Properties.cs @@ -1,3 +1,5 @@ -using System.Runtime.CompilerServices; +using System.Reflection; +using System.Runtime.CompilerServices; +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] [assembly: InternalsVisibleTo("Microsoft.Extensions.DependencyModel.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] \ No newline at end of file diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs index 7aeb94c89..7164727c8 100644 --- a/src/dotnet/Program.cs +++ b/src/dotnet/Program.cs @@ -55,11 +55,9 @@ namespace Microsoft.DotNet.Cli try { - ConfigureDotNetForFirstTimeUse(); - using (PerfTrace.Current.CaptureTiming()) { - return ProcessArgs(args, new Telemetry()); + return ProcessArgs(args); } } catch (GracefulException e) @@ -78,7 +76,7 @@ namespace Microsoft.DotNet.Cli } } - internal static int ProcessArgs(string[] args, ITelemetry telemetryClient) + internal static int ProcessArgs(string[] args, ITelemetry telemetryClient = null) { // CommandLineApplication is a bit restrictive, so we parse things ourselves here. Individual apps should use CLA. @@ -86,43 +84,53 @@ namespace Microsoft.DotNet.Cli var success = true; var command = string.Empty; var lastArg = 0; - for (; lastArg < args.Length; lastArg++) + using (INuGetCacheSentinel nugetCacheSentinel = new NuGetCacheSentinel()) { - if (IsArg(args[lastArg], "v", "verbose")) + for (; lastArg < args.Length; lastArg++) { - verbose = true; + if (IsArg(args[lastArg], "v", "verbose")) + { + verbose = true; + } + else if (IsArg(args[lastArg], "version")) + { + PrintVersion(); + return 0; + } + else if (IsArg(args[lastArg], "info")) + { + PrintInfo(); + return 0; + } + else if (IsArg(args[lastArg], "h", "help")) + { + HelpCommand.PrintHelp(); + return 0; + } + else if (args[lastArg].StartsWith("-")) + { + Reporter.Error.WriteLine($"Unknown option: {args[lastArg]}"); + success = false; + } + else + { + ConfigureDotNetForFirstTimeUse(nugetCacheSentinel); + + // It's the command, and we're done! + command = args[lastArg]; + break; + } } - else if (IsArg(args[lastArg], "version")) - { - PrintVersion(); - return 0; - } - else if (IsArg(args[lastArg], "info")) - { - PrintInfo(); - return 0; - } - else if (IsArg(args[lastArg], "h", "help")) + if (!success) { HelpCommand.PrintHelp(); - return 0; + return 1; } - else if (args[lastArg].StartsWith("-")) + + if (telemetryClient == null) { - Reporter.Error.WriteLine($"Unknown option: {args[lastArg]}"); - success = false; + telemetryClient = new Telemetry(nugetCacheSentinel); } - else - { - // It's the command, and we're done! - command = args[lastArg]; - break; - } - } - if (!success) - { - HelpCommand.PrintHelp(); - return 1; } var appArgs = (lastArg + 1) >= args.Length ? Enumerable.Empty() : args.Skip(lastArg + 1).ToArray(); @@ -160,25 +168,22 @@ namespace Microsoft.DotNet.Cli } - private static void ConfigureDotNetForFirstTimeUse() + private static void ConfigureDotNetForFirstTimeUse(INuGetCacheSentinel nugetCacheSentinel) { using (PerfTrace.Current.CaptureTiming()) { using (var nugetPackagesArchiver = new NuGetPackagesArchiver()) { - using (var nugetCacheSentinel = new NuGetCacheSentinel()) - { - var environmentProvider = new EnvironmentProvider(); - var commandFactory = new DotNetCommandFactory(); - var nugetCachePrimer = - new NuGetCachePrimer(commandFactory, nugetPackagesArchiver, nugetCacheSentinel); - var dotnetConfigurer = new DotnetFirstTimeUseConfigurer( - nugetCachePrimer, - nugetCacheSentinel, - environmentProvider); + var environmentProvider = new EnvironmentProvider(); + var commandFactory = new DotNetCommandFactory(); + var nugetCachePrimer = + new NuGetCachePrimer(commandFactory, nugetPackagesArchiver, nugetCacheSentinel); + var dotnetConfigurer = new DotnetFirstTimeUseConfigurer( + nugetCachePrimer, + nugetCacheSentinel, + environmentProvider); - dotnetConfigurer.Configure(); - } + dotnetConfigurer.Configure(); } } } diff --git a/src/dotnet/Properties/AssemblyInfo.cs b/src/dotnet/Properties/AssemblyInfo.cs index 07c3005ab..ffdc13024 100644 --- a/src/dotnet/Properties/AssemblyInfo.cs +++ b/src/dotnet/Properties/AssemblyInfo.cs @@ -1,3 +1,5 @@ +using System.Reflection; using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("dotnet.Tests")] \ No newline at end of file +[assembly: AssemblyMetadataAttribute("Serviceable", "True")] +[assembly: InternalsVisibleTo("dotnet.Tests")] diff --git a/src/dotnet/Telemetry.cs b/src/dotnet/Telemetry.cs index 838139b50..01cf8801c 100644 --- a/src/dotnet/Telemetry.cs +++ b/src/dotnet/Telemetry.cs @@ -4,9 +4,11 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Threading.Tasks; using Microsoft.ApplicationInsights; using Microsoft.DotNet.Cli.Utils; +using Microsoft.DotNet.Configurer; using Microsoft.DotNet.InternalAbstractions; namespace Microsoft.DotNet.Cli @@ -30,9 +32,11 @@ namespace Microsoft.DotNet.Cli public bool Enabled { get; } - public Telemetry() + public Telemetry () : this(null) { } + + public Telemetry(INuGetCacheSentinel sentinel) { - Enabled = !Env.GetEnvironmentVariableAsBool(TelemetryOptout); + Enabled = !Env.GetEnvironmentVariableAsBool(TelemetryOptout) && PermissionExists(sentinel); if (!Enabled) { @@ -43,6 +47,16 @@ namespace Microsoft.DotNet.Cli _trackEventTask = Task.Factory.StartNew(() => InitializeTelemetry()); } + private bool PermissionExists(INuGetCacheSentinel sentinel) + { + if (sentinel == null) + { + return false; + } + + return sentinel.Exists(); + } + public void TrackEvent(string eventName, IDictionary properties, IDictionary measurements) { if (!Enabled) diff --git a/test/dotnet.Tests/GivenThatTheUserIsRunningDoNetForTheFirstTime.cs b/test/dotnet.Tests/GivenThatTheUserIsRunningDoNetForTheFirstTime.cs index 5df9c2c8b..b2df620d2 100644 --- a/test/dotnet.Tests/GivenThatTheUserIsRunningDoNetForTheFirstTime.cs +++ b/test/dotnet.Tests/GivenThatTheUserIsRunningDoNetForTheFirstTime.cs @@ -15,7 +15,8 @@ namespace Microsoft.DotNet.Tests { public class GivenThatTheUserIsRunningDotNetForTheFirstTime : TestBase { - private static CommandResult _firstDotnetUseCommandResult; + private static CommandResult _firstDotnetNonVerbUseCommandResult; + private static CommandResult _firstDotnetVerbUseCommandResult; private static DirectoryInfo _nugetCacheFolder; static GivenThatTheUserIsRunningDotNetForTheFirstTime() @@ -28,7 +29,8 @@ namespace Microsoft.DotNet.Tests command.Environment["NUGET_PACKAGES"] = testNugetCache; command.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = ""; - _firstDotnetUseCommandResult = command.ExecuteWithCapturedOutput("new"); + _firstDotnetNonVerbUseCommandResult = command.ExecuteWithCapturedOutput("--info"); + _firstDotnetVerbUseCommandResult = command.ExecuteWithCapturedOutput("new"); _nugetCacheFolder = new DirectoryInfo(testNugetCache); } @@ -36,7 +38,15 @@ namespace Microsoft.DotNet.Tests [Fact] public void Using_dotnet_for_the_first_time_succeeds() { - _firstDotnetUseCommandResult.Should().Pass(); + _firstDotnetVerbUseCommandResult.Should().Pass(); + } + + [Fact] + public void Using_dotnet_for_the_first_time_with_non_verbs_doesnt_print_eula() + { + const string firstTimeNonVerbUseMessage = @".NET Command Line Tools"; + + _firstDotnetNonVerbUseCommandResult.StdOut.Should().StartWith(firstTimeNonVerbUseMessage); } [Fact] @@ -54,12 +64,12 @@ Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once."; - _firstDotnetUseCommandResult.StdOut.Should().StartWith(firstTimeUseWelcomeMessage); + _firstDotnetVerbUseCommandResult.StdOut.Should().StartWith(firstTimeUseWelcomeMessage); } [Fact] public void It_restores_the_nuget_packages_to_the_nuget_cache_folder() - { + { _nugetCacheFolder.Should().HaveFile($"{GetDotnetVersion()}.dotnetSentinel"); }