diff --git a/.vsts-ci.yml b/.vsts-ci.yml index b692711af11f0..54d5fffebe4ac 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -65,6 +65,7 @@ steps: logProjectEvents: false - task: PublishBuildArtifacts@1 + displayName: Publish Logs inputs: PathtoPublish: '$(Build.SourcesDirectory)\Binaries\$(BuildConfiguration)\Logs' ArtifactName: 'Build Diagnostic Files' @@ -73,6 +74,7 @@ steps: condition: succeededOrFailed() - task: PublishTestResults@1 + displayName: Publish Test Results inputs: testRunner: XUnit testResultsFiles: '**/xUnitResults/*.xml' @@ -83,7 +85,7 @@ steps: - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1 displayName: Upload VSTS Drop inputs: - DropFolder: 'Binaries\$(BuildConfiguration)\Insertion' + DropFolder: 'Binaries\VSSetup\$(BuildConfiguration)\Insertion' condition: and(succeeded(), contains(variables['PB_PublishType'], 'vsts')) - task: NuGetCommand@2 @@ -96,8 +98,10 @@ steps: allowPackageConflicts: true condition: and(succeeded(), contains(variables['PB_PublishType'], 'vsts')) +# Publish VSTS artifact that the RoslynInsertionTool is able to find by its name. +# The backing storage of the artifact is a file share. - task: PublishBuildArtifacts@1 - displayName: Publish Drop (parallel) + displayName: Publish Drop - Binaries inputs: PathtoPublish: 'Binaries\$(BuildConfiguration)' ArtifactName: '$(Build.BuildNumber)' @@ -107,6 +111,14 @@ steps: ParallelCount: 64 condition: succeededOrFailed() +# Copy additional files to the drop directory +- task: PowerShell@2 + displayName: Publish Drop - VSSetup + inputs: + arguments: '-Source Binaries\VSSetup\$(BuildConfiguration)\Insertion -Target $(DropRoot)\Roslyn-Signed\$(Build.SourceBranchName)\$(BuildConfiguration)\$(Build.BuildNumber)\Insertion -ParallelCount 8' + filePath: 'build\scripts\vsts-robocopy.ps1' + condition: succeededOrFailed() + - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 displayName: Perform Cleanup Tasks condition: succeededOrFailed() diff --git a/Build.cmd b/Build.cmd index 5bc7a808e6010..ac384244199b5 100644 --- a/Build.cmd +++ b/Build.cmd @@ -1,2 +1,2 @@ @echo off -powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0\build\scripts\build.ps1" -build -skipBuildExtras %* +powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0\build\scripts\build.ps1" -build %* diff --git a/Roslyn.sln b/Roslyn.sln index 0d40fbc44e395..5e4b0a304742e 100644 --- a/Roslyn.sln +++ b/Roslyn.sln @@ -389,6 +389,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VS.Tools.Roslyn.Package", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Package", "src\NuGet\Microsoft.CodeAnalysis.Package.csproj", "{B9843F65-262E-4F40-A0BC-2CBEF7563A44}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PortableFacades.Setup", "src\Setup\DevDivVsix\PortableFacades\PortableFacades.Setup.csproj", "{952808C5-799A-4CAA-964C-2AA78458CEC7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Compilers.Setup", "src\Setup\DevDivVsix\CompilersPackage\Microsoft.CodeAnalysis.Compilers.Setup.csproj", "{03607817-6800-40B6-BEAA-D6F437CD62B7}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.projitems*{2523d0e6-df32-4a3e-8ae0-a19bffae2ef6}*SharedItemsImports = 4 @@ -1038,6 +1042,14 @@ Global {B9843F65-262E-4F40-A0BC-2CBEF7563A44}.Debug|Any CPU.Build.0 = Debug|Any CPU {B9843F65-262E-4F40-A0BC-2CBEF7563A44}.Release|Any CPU.ActiveCfg = Release|Any CPU {B9843F65-262E-4F40-A0BC-2CBEF7563A44}.Release|Any CPU.Build.0 = Release|Any CPU + {952808C5-799A-4CAA-964C-2AA78458CEC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {952808C5-799A-4CAA-964C-2AA78458CEC7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {952808C5-799A-4CAA-964C-2AA78458CEC7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {952808C5-799A-4CAA-964C-2AA78458CEC7}.Release|Any CPU.Build.0 = Release|Any CPU + {03607817-6800-40B6-BEAA-D6F437CD62B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03607817-6800-40B6-BEAA-D6F437CD62B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03607817-6800-40B6-BEAA-D6F437CD62B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03607817-6800-40B6-BEAA-D6F437CD62B7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1223,6 +1235,8 @@ Global {0EB22BD1-B8B1-417D-8276-F475C2E190FF} = {BE25E872-1667-4649-9D19-96B83E75A44E} {3636D3E2-E3EF-4815-B020-819F382204CD} = {BE25E872-1667-4649-9D19-96B83E75A44E} {B9843F65-262E-4F40-A0BC-2CBEF7563A44} = {C52D8057-43AF-40E6-A01B-6CDBB7301985} + {952808C5-799A-4CAA-964C-2AA78458CEC7} = {BE25E872-1667-4649-9D19-96B83E75A44E} + {03607817-6800-40B6-BEAA-D6F437CD62B7} = {BE25E872-1667-4649-9D19-96B83E75A44E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {604E6B91-7BC0-4126-AE07-D4D2FEFC3D29} diff --git a/build/Targets/DisableVsixManifestTargets.targets b/build/Targets/DisableVsixManifestTargets.targets deleted file mode 100644 index 5f02c50bc4fb8..0000000000000 --- a/build/Targets/DisableVsixManifestTargets.targets +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - - diff --git a/build/Targets/Imports.targets b/build/Targets/Imports.targets index c85d57b1945e4..ef352fe2e102d 100644 --- a/build/Targets/Imports.targets +++ b/build/Targets/Imports.targets @@ -18,7 +18,7 @@ false - $(ArtifactsPackagesDir)VS\ + $(ArtifactsConfigurationDir)DevDivPackages\Roslyn\ diff --git a/build/Targets/Packages.props b/build/Targets/Packages.props index 73a8ed85a7f73..db3c268be2e56 100644 --- a/build/Targets/Packages.props +++ b/build/Targets/Packages.props @@ -161,6 +161,7 @@ $(RoslynDiagnosticsNugetPackageVersion) 0.2.4-beta 1.0.0-beta2-63222-01 + 1.0.0-beta2-63222-01 0.5.0-alpha 1.0.0-beta2-63223-01 0.1.3 @@ -184,6 +185,7 @@ 4.3.0 4.5.0 4.3.0 + 4.3.0 5.0.0 4.3.0 4.3.0 @@ -218,6 +220,7 @@ 4.3.0 4.3.0 4.3.0 + 4.3.0 4.3.0 4.3.0 4.3.0 @@ -239,6 +242,7 @@ 4.3.0 4.3.0 4.3.0 + 4.3.0 4.3.0 1.1.2 1.1.0.14 @@ -327,6 +331,7 @@ true true true + true diff --git a/build/Targets/RepoToolset/AfterSigning.proj b/build/Targets/RepoToolset/AfterSigning.proj new file mode 100644 index 0000000000000..47b274f3ac6b7 --- /dev/null +++ b/build/Targets/RepoToolset/AfterSigning.proj @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + diff --git a/build/Targets/RepoToolset/Imports.targets b/build/Targets/RepoToolset/Imports.targets index d990627f439b7..3ddd52c47b153 100644 --- a/build/Targets/RepoToolset/Imports.targets +++ b/build/Targets/RepoToolset/Imports.targets @@ -31,6 +31,7 @@ + diff --git a/build/Targets/RepoToolset/RepoLayout.props b/build/Targets/RepoToolset/RepoLayout.props index c797835a90f85..886def152d5e0 100644 --- a/build/Targets/RepoToolset/RepoLayout.props +++ b/build/Targets/RepoToolset/RepoLayout.props @@ -38,6 +38,8 @@ $(ArtifactsConfigurationDir)NuGet\ $(ArtifactsPackagesDir)Shipping\ $(ArtifactsPackagesDir)NonShipping\ - $(ArtifactsConfigurationDir)Vsix\ + $(ArtifactsDir)VSSetup\$(Configuration)\ + $(VisualStudioSetupOutputPath)Insertion\ + $(ArtifactsDir)VSSetup.obj\$(Configuration)\ diff --git a/build/Targets/RepoToolset/VisualStudio.DesignTimeBuild.targets b/build/Targets/RepoToolset/VisualStudio.DesignTimeBuild.targets new file mode 100644 index 0000000000000..9977977bea263 --- /dev/null +++ b/build/Targets/RepoToolset/VisualStudio.DesignTimeBuild.targets @@ -0,0 +1,18 @@ + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + + + + \ No newline at end of file diff --git a/build/Targets/RepoToolset/VisualStudio.ImportSdk.targets b/build/Targets/RepoToolset/VisualStudio.ImportSdk.targets new file mode 100644 index 0000000000000..0d42f352ebc22 --- /dev/null +++ b/build/Targets/RepoToolset/VisualStudio.ImportSdk.targets @@ -0,0 +1,11 @@ + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + + \ No newline at end of file diff --git a/build/Targets/RepoToolset/VisualStudio.InsertionManifests.targets b/build/Targets/RepoToolset/VisualStudio.InsertionManifests.targets new file mode 100644 index 0000000000000..46e4b0ad70842 --- /dev/null +++ b/build/Targets/RepoToolset/VisualStudio.InsertionManifests.targets @@ -0,0 +1,39 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + <_StubFiles Include="$(VisualStudioSetupIntermediateOutputPath)**\*.stub"/> + <_StubDirs Include="@(_StubFiles->'%(RecursiveDir)')"/> + + + + + + <_ComponentDir>%(_StubDirs.Identity) + <_ComponentName>$(_ComponentDir.TrimEnd('\')) + + + + <_Args Include="OfficialBuild=$(OfficialBuild)" /> + <_Args Include="ComponentName=$(_ComponentName)"/> + <_Args Include="SetupOutputPath=$(VisualStudioSetupInsertionPath)"/> + <_Args Include="ComponentIntermediateOutputPath=$(VisualStudioSetupIntermediateOutputPath)$(_ComponentName)\"/> + <_Args Include="SwixBuildPath=$(NuGetPackageRoot)microbuild.plugins.swixbuild\$(MicroBuildPluginsSwixBuildVersion)\"/> + <_Args Include="ManifestBuildVersion=$(VsixVersion)" /> + + + + + + + + diff --git a/build/Targets/RepoToolset/VisualStudio.SetupPackage.swixproj b/build/Targets/RepoToolset/VisualStudio.SetupPackage.swixproj new file mode 100644 index 0000000000000..bf6553cf87673 --- /dev/null +++ b/build/Targets/RepoToolset/VisualStudio.SetupPackage.swixproj @@ -0,0 +1,36 @@ + + + + + + neutral + false + vsix + true + $(SwrPackageName) + + + + + + <_SwrProperties Include="$([MSBuild]::Unescape($(SwrProperties)))" /> + + + + $(PackagePreprocessorDefinitions);@(_SwrProperties) + $(IntermediateOutputPath) + + + + + + + + \ No newline at end of file diff --git a/build/Targets/RepoToolset/VisualStudio.SetupPackage.vsmanproj b/build/Targets/RepoToolset/VisualStudio.SetupPackage.vsmanproj new file mode 100644 index 0000000000000..ac44819cd0542 --- /dev/null +++ b/build/Targets/RepoToolset/VisualStudio.SetupPackage.vsmanproj @@ -0,0 +1,37 @@ + + + + + + false + false + false + + + + + + false + true + + true + true + $(ComponentName) + $(SetupOutputPath) + $(ComponentIntermediateOutputPath) + + + + <_PackageStubFiles Include="$(ComponentIntermediateOutputPath)*.stub"/> + + + + + diff --git a/build/Targets/RepoToolset/VisualStudio.props b/build/Targets/RepoToolset/VisualStudio.props index 6a289379783de..5be0fb66f5aba 100644 --- a/build/Targets/RepoToolset/VisualStudio.props +++ b/build/Targets/RepoToolset/VisualStudio.props @@ -10,4 +10,23 @@ $(VersionPrefix).$(VersionSuffixDateStamp)$(VersionSuffixBuildOfTheDayPadded) 42.42.42.4242424 + + + + $(MSBuildProjectDirectory)\source.extension.vsixmanifest + false + true + + + + + + + + false + + Program + $(DevEnvDir)devenv.exe + /rootsuffix $(VSSDKTargetPlatformRegRootSuffix) /log + \ No newline at end of file diff --git a/build/Targets/RepoToolset/VisualStudio.targets b/build/Targets/RepoToolset/VisualStudio.targets new file mode 100644 index 0000000000000..fe7989453e1a3 --- /dev/null +++ b/build/Targets/RepoToolset/VisualStudio.targets @@ -0,0 +1,267 @@ + + + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + + <_TargetVsixContainerDir>$(VisualStudioSetupOutputPath) + + $(TargetName).vsix + $(_TargetVsixContainerDir)$(TargetVsixContainerName) + + + + <_ComponentIntermediateDir>$(VisualStudioSetupIntermediateOutputPath)$(VisualStudioInsertionComponent)\ + + true + + true + All + 3 + + + + + true + All + 3 + + + + + + + <_VsxXmlNamespace><Namespace Prefix='vsx' Uri='http://schemas.microsoft.com/developer/vsx-schema/2011'/> + + + + + + + + + + + + + + + <_PackageStubFile>$(_ComponentIntermediateDir)$(_VsixPackageId).stub + + + + + + + + + + + + + + + + + + + + + + + + + + <_JsonFileName>$(_VsixPackageId).json + + + + <_FinalizeInsertionVsixFilesInputs Include="$(VisualStudioSetupOutputPath)$(TargetVsixContainerName)" /> + <_FinalizeInsertionVsixFilesInputs Include="$(VisualStudioSetupOutputPath)$(_JsonFileName)" /> + + <_FinalizeInsertionVsixFilesOutputs Include="$(VisualStudioSetupInsertionPath)$(TargetVsixContainerName)" /> + <_FinalizeInsertionVsixFilesOutputs Include="$(VisualStudioSetupInsertionPath)$(_JsonFileName)" /> + + + + + + + + + + + <_ModifyVsixManifestToolExe>$(NuGetPackageRoot)roslyntools.modifyvsixmanifest\$(RoslynToolsModifyVsixManifestVersion)\tools\ModifyVsixManifest.exe + <_ModifyVsixManifestArgs>--remove=//x:PackageManifest/x:Installation/@Experimental --add-attribute=//x:PackageManifest/x:Installation;SystemComponent;true + + + + + + + + + + + + + + <_SwrProperties>@(SwrProperty) + <_SwrFiles>@(SwrFile->'%(FullPath)') + + + <_SwixArgs Include="SwrProperties=$([MSBuild]::Escape($(_SwrProperties)))"/> + <_SwixArgs Include="SwrFiles=$([MSBuild]::Escape($(_SwrFiles)))"/> + <_SwixArgs Include="SwrPackageName=$(_VsixPackageId)"/> + <_SwixArgs Include="IntermediateOutputPath=$(IntermediateOutputPath)"/> + <_SwixArgs Include="SwixBuildPath=$(NuGetPackageRoot)microbuild.plugins.swixbuild\$(MicroBuildPluginsSwixBuildVersion)\"/> + + + + + + + + + + + + + + <_VsixPackageId>$([System.IO.Path]::GetFileNameWithoutExtension($(TargetVsixContainerName))) + <_PackageStubFile>$(_ComponentIntermediateDir)$(_VsixPackageId).stub + <_JsonFileName>$(_VsixPackageId).json + + + + <_SwixBuildOutputs Include="$(VisualStudioSetupInsertionPath)$(TargetVsixContainerName)" /> + <_SwixBuildOutputs Include="$(VisualStudioSetupInsertionPath)$(_JsonFileName)" /> + + + + + + + <_GeneratedCTOFilesWithCulture Include="@(_GeneratedCTOFilesWithNoCulture)"> + en + true + + <_GeneratedCTOFilesWithNoCulture Remove="@(_GeneratedCTOFilesWithNoCulture)" /> + <_ResourcesToMergeWithCTOWithCultureMetadata Condition="'%(WithCulture)' != 'true'"> + en + true + + + + + + + + + + + + + + + %(IntermediateZipItem.Filename)\%(IntermediateZipItem.Language)\%(IntermediateZipItem.OutputSubPath)\%(IntermediateZipItem.Culture) + + + %(IntermediateZipProject.Filename)\%(IntermediateZipProject.Language)\%(IntermediateZipProject.OutputSubPath)\%(IntermediateZipProject.Culture) + + + + + $(GetVsixSourceItemsDependsOn);_GetVsixTemplateItems + + + + + + + \ No newline at end of file diff --git a/build/Targets/Settings.props b/build/Targets/Settings.props index 287dccbb4e264..b428b2b84272c 100644 --- a/build/Targets/Settings.props +++ b/build/Targets/Settings.props @@ -12,6 +12,7 @@ https://raw.githubusercontent.com/dotnet/roslyn https://github.com/dotnet/roslyn Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics + RoslynDev @@ -133,12 +134,6 @@ - - - - diff --git a/build/Targets/VisualStudio.targets b/build/Targets/VisualStudio.targets index 0d553c772b3ff..f6337738168f9 100644 --- a/build/Targets/VisualStudio.targets +++ b/build/Targets/VisualStudio.targets @@ -7,8 +7,6 @@ - true - $(GetVsixSourceItemsDependsOn);IncludeVsixLocalOnlyItems $(GetVsixSourceItemsDependsOn);IncludeNuGetResolvedAssets @@ -24,15 +22,6 @@ false - - - - - - - - - @@ -114,37 +103,4 @@ - - - - - <_GeneratedCTOFilesWithCulture Include="@(_GeneratedCTOFilesWithNoCulture)"> - en - true - - <_GeneratedCTOFilesWithNoCulture Remove="@(_GeneratedCTOFilesWithNoCulture)" /> - <_ResourcesToMergeWithCTOWithCultureMetadata Condition="'%(WithCulture)' != 'true'"> - en - true - - - - - - - - \ No newline at end of file diff --git a/build/ToolsetPackages/RoslynToolset.csproj b/build/ToolsetPackages/RoslynToolset.csproj index 4c2d5d298b761..a5ee6d650c826 100644 --- a/build/ToolsetPackages/RoslynToolset.csproj +++ b/build/ToolsetPackages/RoslynToolset.csproj @@ -31,6 +31,7 @@ + diff --git a/build/config/myget_org-extensions.config b/build/config/myget_org-extensions.config new file mode 100644 index 0000000000000..fc267789f5c3f --- /dev/null +++ b/build/config/myget_org-extensions.config @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/build/scripts/build.ps1 b/build/scripts/build.ps1 index a66d07e65b428..f891b3975c37f 100644 --- a/build/scripts/build.ps1 +++ b/build/scripts/build.ps1 @@ -31,7 +31,6 @@ param ( [switch]$launch = $false, [switch]$procdump = $false, [string]$signType = "", - [switch]$skipBuildExtras = $false, [switch]$skipAnalyzers = $false, [switch]$checkLoc = $false, @@ -61,12 +60,11 @@ function Print-Usage() { Write-Host " -bootstrap Build using a bootstrap Roslyn" Write-Host " -sign Sign our binaries" Write-Host " -signType Type of sign: real, test, verify" - Write-Host " -pack Create our NuGet packages" + Write-Host " -pack Build NuGet packages, VS insertion manifests and installer" Write-Host " -deployExtensions Deploy built vsixes" Write-Host " -binaryLog Create binary log for every MSBuild invocation" Write-Host " -procdump Monitor test runs with procdump" Write-Host " -skipAnalyzers Do not run analyzers during build operations" - Write-Host " -skipBuildExtras Do not build insertion items" Write-Host " -checkLoc Check that all resources are localized" Write-Host "" Write-Host "Test options" @@ -123,8 +121,6 @@ function Process-Arguments() { exit 1 } - $script:pack = $pack - if ($buildCoreClr) { $script:build = $true } @@ -239,10 +235,6 @@ function Build-Artifacts() { } elseif ($build) { Run-MSBuild "Roslyn.sln" $args - - if (-not $skipBuildExtras) { - Build-ExtraSignArtifacts - } } if ($pack) { @@ -253,39 +245,20 @@ function Build-Artifacts() { Run-MSBuild "build\Targets\RepoToolset\Sign.proj" "/p:DotNetSignType=$signType" } + if ($pack) { + Run-MSBuild "build\Targets\RepoToolset\AfterSigning.proj" "/t:Pack" + } + if ($pack -and $cibuild) { Build-DeployToSymStore } - if ($build -and $pack -and (-not $skipBuildExtras) -and (-not $buildCoreClr)) { + if ($build -and $pack -and (-not $buildCoreClr)) { Build-InsertionItems Build-Installer } } -# Not all of our artifacts needed for signing are included inside Roslyn.sln. Need to -# finish building these before we can run signing. -function Build-ExtraSignArtifacts() { - - Push-Location (Join-Path $repoDir "src\Setup") - try { - Write-Host "Building PortableFacades Swix" - Run-MSBuild "DevDivVsix\PortableFacades\PortableFacades.swixproj" - Write-Host "Building CompilersCodeAnalysis Swix" - Run-MSBuild "DevDivVsix\CompilersPackage\Microsoft.CodeAnalysis.Compilers.swixproj" - - $dest = @($configDir) - foreach ($dir in $dest) { - Copy-Item "PowerShell\*.ps1" $dir - } - - Copy-Item -Force "Vsix\myget_org-extensions.config" $configDir - } - finally { - Pop-Location - } -} - function Build-InsertionItems() { $setupDir = Join-Path $repoDir "src\Setup" @@ -293,17 +266,6 @@ function Build-InsertionItems() { try { Write-Host "Building VS Insertion artifacts" Exec-Console (Join-Path $configDir "Exes\Roslyn.BuildDevDivInsertionFiles\Roslyn.BuildDevDivInsertionFiles.exe") "$configDir $(Get-PackagesDir)" - - # In non-official builds need to supply values for a few MSBuild properties. The actual value doesn't - # matter, just that it's provided some value. - $extraArgs = "" - if ($cibuild -and -not $official) { - $extraArgs = " /p:FinalizeValidate=false /p:ManifestPublishUrl=https://vsdrop.corp.microsoft.com/file/v1/Products/DevDiv/dotnet/roslyn/master/20160729.6" - } - - Run-MSBuild "DevDivVsix\PortableFacades\PortableFacades.vsmanproj" -buildArgs $extraArgs - Run-MSBuild "DevDivVsix\CompilersPackage\Microsoft.CodeAnalysis.Compilers.vsmanproj" -buildArgs $extraArgs - Run-MSBuild "DevDivVsix\MicrosoftCodeAnalysisLanguageServices\Microsoft.CodeAnalysis.LanguageServices.vsmanproj" -buildArgs "$extraArgs" } finally { Pop-Location @@ -346,12 +308,11 @@ function Build-Installer () { Copy-Item $installerScriptsFolder -Destination $intermidatePowershellScriptsDirectory -Recurse ## Copying VSIXes - $vsixDir = Join-Path $configDir "Vsix" $vsixDirDestination = Join-Path $intermidateDirectory "vsix" if (-not (Test-Path $vsixDirDestination)) { New-Item -ItemType Directory -Force -Path $vsixDirDestination } - $RoslynDeploymentVsix = Join-Path $vsixDir "RoslynDeployment\RoslynDeployment.vsix" + $RoslynDeploymentVsix = Join-Path $vsSetupDir "RoslynDeployment.vsix" Copy-Item $RoslynDeploymentVsix -Destination $vsixDirDestination # Zip Folder @@ -518,14 +479,6 @@ function Deploy-VsixViaTool() { $hive = "RoslynDev" Write-Host "Using VS Instance $vsId at `"$vsDir`"" $baseArgs = "/rootSuffix:$hive /vsInstallDir:`"$vsDir`"" - $all = @( - "Vsix\Roslyn.Compilers.Extension\Roslyn.Compilers.Extension.vsix", - "Vsix\Roslyn.VisualStudio.Setup\Roslyn.VisualStudio.Setup.vsix", - "Vsix\Roslyn.VisualStudio.Setup.Dependencies\Roslyn.VisualStudio.Setup.Dependencies.vsix", - "Vsix\Roslyn.VisualStudio.InteractiveComponents\Roslyn.VisualStudio.InteractiveComponents.vsix", - "Vsix\ExpressionEvaluatorPackage\ExpressionEvaluatorPackage.vsix", - "Vsix\Roslyn.VisualStudio.DiagnosticsWindow\Roslyn.VisualStudio.DiagnosticsWindow.vsix", - "Vsix\Microsoft.VisualStudio.IntegrationTest.Setup\Microsoft.VisualStudio.IntegrationTest.Setup.vsix") Write-Host "Uninstalling old Roslyn VSIX" @@ -541,11 +494,21 @@ function Deploy-VsixViaTool() { } Write-Host "Installing all Roslyn VSIX" - foreach ($e in $all) { - $name = Split-Path -leaf $e - $filePath = Join-Path $configDir $e - $fullArg = "$baseArgs $filePath" - Write-Host "`tInstalling $name" + + # VSIX files need to be installed in this specific order: + $orderedVsixFileNames = @( + "Roslyn.Compilers.Extension.vsix", + "Roslyn.VisualStudio.Setup.vsix", + "Roslyn.VisualStudio.Setup.Dependencies.vsix", + "Roslyn.VisualStudio.InteractiveComponents.vsix", + "ExpressionEvaluatorPackage.vsix", + "Roslyn.VisualStudio.DiagnosticsWindow.vsix", + "Microsoft.VisualStudio.IntegrationTest.Setup.vsix") + + foreach ($vsixFileName in $orderedVsixFileNames) { + $vsixFile = Join-Path $vsSetupDir $vsixFileName + $fullArg = "$baseArgs $vsixFile" + Write-Host "`tInstalling $vsixFileName" Exec-Console $vsixExe $fullArg } } @@ -635,6 +598,7 @@ try { $dotnet = Ensure-DotnetSdk $buildConfiguration = if ($release) { "Release" } else { "Debug" } $configDir = Join-Path $binariesDir $buildConfiguration + $vsSetupDir = Join-Path $binariesDir (Join-Path "VSSetup" $buildConfiguration) $logsDir = Join-Path $configDir "Logs" $bootstrapDir = "" diff --git a/build/scripts/vsts-robocopy.ps1 b/build/scripts/vsts-robocopy.ps1 new file mode 100644 index 0000000000000..60c35603329bf --- /dev/null +++ b/build/scripts/vsts-robocopy.ps1 @@ -0,0 +1,107 @@ +# See https://raw.githubusercontent.com/Microsoft/vsts-tasks/master/Tasks/PublishBuildArtifactsV1/Invoke-Robocopy.ps1 + +[CmdletBinding()] +param( + [Parameter(Mandatory = $true)] + [string]$Source, + + [Parameter(Mandatory = $true)] + [string]$Target, + + [Parameter(Mandatory = $true)] + [int]$ParallelCount, + + [Parameter(Mandatory = $false)] + [string]$File) + +# This script translates the output from robocopy into UTF8. Node has limited +# built-in support for encodings. +# +# Robocopy uses the system default code page. The system default code page varies +# depending on the locale configuration. On an en-US box, the system default code +# page is Windows-1252. +# +# Note, on a typical en-US box, testing with the 'ç' character is a good way to +# determine whether data is passed correctly between processes. This is because +# the 'ç' character has a different code point across each of the common encodings +# on a typical en-US box, i.e. +# 1) the default console-output code page (IBM437) +# 2) the system default code page (i.e. CP_ACP) (Windows-1252) +# 3) UTF8 + +$ErrorActionPreference = 'Stop' + +# Redefine the wrapper over STDOUT to use UTF8. Node expects UTF8 by default. +$stdout = [System.Console]::OpenStandardOutput() +$utf8 = New-Object System.Text.UTF8Encoding($false) # do not emit BOM +$writer = New-Object System.IO.StreamWriter($stdout, $utf8) +[System.Console]::SetOut($writer) + +# All subsequent output must be written using [System.Console]::WriteLine(). In +# PowerShell 4, Write-Host and Out-Default do not consider the updated stream writer. + +if (!$File) { + $File = "*"; +} + +# Print the ##command. The /MT parameter is only supported on 2008 R2 and higher. +if ($ParallelCount -gt 1) { + [System.Console]::WriteLine("##[command]robocopy.exe /E /COPY:DA /NP /R:3 /MT:$ParallelCount `"$Source`" `"$Target`" `"$File`"") +} +else { + [System.Console]::WriteLine("##[command]robocopy.exe /E /COPY:DA /NP /R:3 `"$Source`" `"$Target`" `"$File`"") +} + +# The $OutputEncoding variable instructs PowerShell how to interpret the output +# from the external command. +$OutputEncoding = [System.Text.Encoding]::Default + +# Usage :: ROBOCOPY source destination [file [file]...] [options] +# source :: Source Directory (drive:\path or \\server\share\path). +# destination :: Destination Dir (drive:\path or \\server\share\path). +# file :: File(s) to copy (names/wildcards: default is "*.*"). +# /E :: copy subdirectories, including Empty ones. +# /COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT). +# (copyflags : D=Data, A=Attributes, T=Timestamps). +# (S=Security=NTFS ACLs, O=Owner info, U=aUditing info). +# /NP :: No Progress - don't display percentage copied. +# /MT[:n] :: Do multi-threaded copies with n threads (default 8). +# n must be at least 1 and not greater than 128. +# This option is incompatible with the /IPG and /EFSRAW options. +# Redirect output using /LOG option for better performance. +# /R:n :: number of Retries on failed copies: default 1 million. +# +# Note, the output from robocopy needs to be iterated over. Otherwise PowerShell.exe +# will launch the external command in such a way that it inherits the streams. +# +# Note, the /MT parameter is only supported on 2008 R2 and higher. +if ($ParallelCount -gt 1) { + & robocopy.exe /E /COPY:DA /NP /R:3 /MT:$ParallelCount $Source $Target $File 2>&1 | + ForEach-Object { + if ($_ -is [System.Management.Automation.ErrorRecord]) { + [System.Console]::WriteLine($_.Exception.Message) + } + else { + [System.Console]::WriteLine($_) + } + } +} +else { + & robocopy.exe /E /COPY:DA /NP /R:3 $Source $Target $File 2>&1 | + ForEach-Object { + if ($_ -is [System.Management.Automation.ErrorRecord]) { + [System.Console]::WriteLine($_.Exception.Message) + } + else { + [System.Console]::WriteLine($_) + } + } +} + +[System.Console]::WriteLine("##[debug]robocopy exit code '$LASTEXITCODE'") +[System.Console]::Out.Flush() +if ($LASTEXITCODE -ge 8) { + exit $LASTEXITCODE +} + +exit 0 \ No newline at end of file diff --git a/src/Compilers/Extension/Roslyn.Compilers.Extension.csproj b/src/Compilers/Extension/Roslyn.Compilers.Extension.csproj index 4c2dd4932b5c7..943ea5ba6ef9e 100644 --- a/src/Compilers/Extension/Roslyn.Compilers.Extension.csproj +++ b/src/Compilers/Extension/Roslyn.Compilers.Extension.csproj @@ -7,16 +7,13 @@ Library Roslyn.Compilers.Extension net46 - $(RoslynDesktopRuntimeIdentifier) - True + Vsix + + true true true true - true - true - RoslynDev - Vsix false diff --git a/src/Compilers/Extension/source.extension.vsixmanifest b/src/Compilers/Extension/source.extension.vsixmanifest index c6e7dbc6afff5..f94cbe5c42f90 100644 --- a/src/Compilers/Extension/source.extension.vsixmanifest +++ b/src/Compilers/Extension/source.extension.vsixmanifest @@ -1,7 +1,7 @@ - + Roslyn Compilers Package of the Roslyn compilers that enables them for Visual Studio builds. diff --git a/src/Deployment/RoslynDeployment.csproj b/src/Deployment/RoslynDeployment.csproj index cbc9beaad7f18..af66351f8841c 100644 --- a/src/Deployment/RoslynDeployment.csproj +++ b/src/Deployment/RoslynDeployment.csproj @@ -6,17 +6,16 @@ AnyCPU Library net46 - $(RoslynDesktopRuntimeIdentifier) + Vsix + false + + + true false - RoslynDev + false false false false - true - True - False - Vsix - false diff --git a/src/Deployment/source.extension.vsixmanifest b/src/Deployment/source.extension.vsixmanifest index 17e09e2775e7f..adfb736ff92c4 100644 --- a/src/Deployment/source.extension.vsixmanifest +++ b/src/Deployment/source.extension.vsixmanifest @@ -1,7 +1,7 @@ - + Roslyn Insiders (Without Tool Window) Pre-release build of Roslyn compilers and language services. @@ -11,7 +11,7 @@ AnyCPU AnyCPU Library + Vsix + net46 + + true false false false - RoslynDev - true - ExpressionEvaluatorPackage.vsix - net46 - $(RoslynDesktopRuntimeIdentifier) - Vsix - true CommonExtensions Microsoft\ManagedLanguages\VBCSharp\ExpressionEvaluators + + + Microsoft.CodeAnalysis.LanguageServices @@ -30,63 +30,42 @@ BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 FunctionResolver BuiltProjectOutputGroup%3bVsdConfigOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 ResultProvider.Portable BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 CSharpExpressionCompiler BuiltProjectOutputGroup%3bVsdConfigOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 CSharpResultProvider.Portable BuiltProjectOutputGroup%3bVsdConfigOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 BasicExpressionCompiler BuiltProjectOutputGroup%3bVsdConfigOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 BasicResultProvider.Portable BuiltProjectOutputGroup%3bVsdConfigOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 diff --git a/src/ExpressionEvaluator/Package/source.extension.vsixmanifest b/src/ExpressionEvaluator/Package/source.extension.vsixmanifest index 3f9c2de4f0cce..023c91312d499 100644 --- a/src/ExpressionEvaluator/Package/source.extension.vsixmanifest +++ b/src/ExpressionEvaluator/Package/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Roslyn Expression Evaluators Roslyn Expression Evaluators Microsoft.CodeAnalysis.ExpressionEvaluator @@ -13,7 +13,7 @@ - + diff --git a/src/NuGet/Microsoft.Net.Compilers/CompilerArtifacts.props b/src/NuGet/Microsoft.Net.Compilers/CompilerArtifacts.props index c490ef611879b..d5ecb874e4f12 100644 --- a/src/NuGet/Microsoft.Net.Compilers/CompilerArtifacts.props +++ b/src/NuGet/Microsoft.Net.Compilers/CompilerArtifacts.props @@ -11,40 +11,57 @@ <_Exes>$(ArtifactsConfigurationDir)Exes\ + + - + - - - - - + + + + + - + - + - + - + - - - - + + + + + + + + \ No newline at end of file diff --git a/src/Setup/DevDivInsertionFiles/BuildDevDivInsertionFiles.vb b/src/Setup/DevDivInsertionFiles/BuildDevDivInsertionFiles.vb index 91fc040baf39b..1c33664472068 100644 --- a/src/Setup/DevDivInsertionFiles/BuildDevDivInsertionFiles.vb +++ b/src/Setup/DevDivInsertionFiles/BuildDevDivInsertionFiles.vb @@ -53,7 +53,8 @@ Public Class BuildDevDivInsertionFiles Public Sub Execute() Retry(Sub() DeleteDirContents(_outputDirectory) - DeleteDirContents(_outputPackageDirectory) + DeleteDirContents(Path.Combine(_outputPackageDirectory, "NativeDependencies")) + DeleteDirContents(Path.Combine(_outputPackageDirectory, "ManagedDependencies")) End Sub) ' Build a dependency map @@ -97,12 +98,18 @@ Public Class BuildDevDivInsertionFiles files.Add(Path.Combine(objDir, "Roslyn.VisualStudio.Setup.Dependencies\project.assets.json")) For Each projectLockJson In files - Dim items = JsonConvert.DeserializeObject(File.ReadAllText(projectLockJson)) - Const targetFx = ".NETFramework,Version=v4.6/win" + Dim items = DirectCast(JsonConvert.DeserializeObject(File.ReadAllText(projectLockJson)), JObject) + Const targetFx = ".NETFramework,Version=v4.6" - Dim targetObj = DirectCast(DirectCast(DirectCast(items, JObject).Property("targets")?.Value, JObject).Property(targetFx)?.Value, JObject) + Dim targets = DirectCast(items.Property("targets")?.Value, JObject) + If targets Is Nothing Then + Throw New InvalidDataException($"Invalid format for '{projectLockJson}': missing 'targets' property") + End If + + Dim targetObj = DirectCast(targets.Property(targetFx)?.Value, JObject) If targetObj Is Nothing Then - Throw New InvalidDataException($"Expected platform Not found in '{projectLockJson}': '{targetFx}'") + Dim availablePlatforms = String.Join(",", targets.Properties.Select(Function(p) $"'{p.Name}'")) + Throw New InvalidDataException($"Expected platform not found in '{projectLockJson}': '{targetFx}'. Available platforms: {availablePlatforms}") End If For Each targetProperty In targetObj.Properties diff --git a/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.Setup.csproj b/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.Setup.csproj new file mode 100644 index 0000000000000..b5745812afd02 --- /dev/null +++ b/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.Setup.csproj @@ -0,0 +1,75 @@ + + + + net46 + Custom + + + Microsoft.CodeAnalysis.Compilers.vsix + Microsoft.CodeAnalysis.Compilers + + + + + + + + + + + + + + + <_SwrFilePath>$(IntermediateOutputPath)Microsoft.CodeAnalysis.Compilers.swr + + + + + + + <_File Include="@(CompilerArtifact)"> + vs.file.ngenArchitecture=%(CompilerArtifact.NgenArchitecture) + vs.file.ngenPriority=%(CompilerArtifact.NGenPriority) + vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\%(CompilerArtifact.NGenApplication)" + + + + + <_FileEntries Include='file source="%(_File.Identity)"%(_File.NGenArchitectureString)%(_File.NGenPriorityString)%(_File.NGenApplicationString)'/> + + + + <_Lines> + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.swixproj b/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.swixproj deleted file mode 100644 index eb695447d709d..0000000000000 --- a/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.swixproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - neutral - false - $(OutputPath) - $(OutputPath)Vsix\CodeAnalysisCompilers - true - vsix - false - false - - - - - - $(PackagePreprocessorDefinitions);Version=$(VsixVersion);OutputPath=$(RoslynOutputPath);RepoRoot=$(RepoRoot) - $(BaseIntermediateOutputPath)$(Configuration)\ - - - - - - - - diff --git a/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.swr b/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.swr deleted file mode 100644 index 3ffaed089796d..0000000000000 --- a/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.swr +++ /dev/null @@ -1,71 +0,0 @@ -use vs - -package name=Microsoft.CodeAnalysis.Compilers - version=$(Version) - -vs.dependencies - vs.dependency id=Microsoft.Net.PackageGroup.4.6.1.Redist - -vs.nonCriticalProcesses - vs.nonCriticalProcess name="VBCSCompiler" - -folder InstallDir:\MSBuild\15.0\Bin\Roslyn - file source=$(OutputPath)\Exes\VBCSCompiler\net46\VBCSCompiler.exe vs.file.ngenArchitecture=all vs.file.ngenPriority=1 vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Exes\csc\net46\csc.exe vs.file.ngenArchitecture=all vs.file.ngenPriority=1 vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\csc.exe" - file source=$(OutputPath)\Exes\csi\net46\csi.exe vs.file.ngenArchitecture=all vs.file.ngenPriority=1 vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\csi.exe" - file source=$(OutputPath)\Exes\vbc\net46\vbc.exe vs.file.ngenArchitecture=all vs.file.ngenPriority=1 vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\vbc.exe" - - file source=$(OutputPath)\Exes\VBCSCompiler\net46\VBCSCompiler.exe.config - file source=$(OutputPath)\Exes\csc\net46\csc.exe.config - file source=$(OutputPath)\Exes\csi\net46\csi.exe.config - file source=$(OutputPath)\Exes\vbc\net46\vbc.exe.config - - file source=$(OutputPath)\Exes\csc\net46\csc.rsp - file source=$(OutputPath)\Exes\csi\net46\csi.rsp - file source=$(OutputPath)\Exes\vbc\net46\vbc.rsp - - file source=$(OutputPath)\Dlls\Microsoft.Build.Tasks.CodeAnalysis\net46\Microsoft.Managed.Core.targets - file source=$(OutputPath)\Dlls\Microsoft.Build.Tasks.CodeAnalysis\net46\Microsoft.VisualBasic.Core.targets - file source=$(OutputPath)\Dlls\Microsoft.Build.Tasks.CodeAnalysis\net46\Microsoft.CSharp.Core.targets - file source=$(OutputPath)\Dlls\Microsoft.Build.Tasks.CodeAnalysis\net46\Microsoft.Build.Tasks.CodeAnalysis.dll vs.file.ngenArchitecture=all - - file source=$(OutputPath)\Dlls\Microsoft.CodeAnalysis.Scripting\Microsoft.CodeAnalysis.Scripting.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\csi.exe" - file source=$(OutputPath)\Dlls\Microsoft.CodeAnalysis.CSharp.Scripting\Microsoft.CodeAnalysis.CSharp.Scripting.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\csi.exe" - - file source=$(OutputPath)\Dlls\Microsoft.CodeAnalysis.CSharp\Microsoft.CodeAnalysis.CSharp.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Dlls\Microsoft.CodeAnalysis.VisualBasic\Microsoft.CodeAnalysis.VisualBasic.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Dlls\Microsoft.CodeAnalysis\Microsoft.CodeAnalysis.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Collections.Immutable.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Reflection.Metadata.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Exes\csi\net46\System.ValueTuple.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\Microsoft.Win32.Primitives.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.AppContext.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Console.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Diagnostics.FileVersionInfo.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Diagnostics.StackTrace.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Globalization.Calendars.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.IO.Compression.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.IO.Compression.ZipFile.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.IO.FileSystem.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.IO.FileSystem.Primitives.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Net.Sockets.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Runtime.InteropServices.RuntimeInformation.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Security.Cryptography.Algorithms.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Security.Cryptography.Encoding.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Security.Cryptography.Primitives.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Security.Cryptography.X509Certificates.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Text.Encoding.CodePages.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Threading.Tasks.Extensions.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Xml.ReaderWriter.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Xml.XmlDocument.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Xml.XPath.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Xml.XPath.XDocument.dll vs.file.ngenArchitecture=all vs.file.ngenApplication="[installDir]\MSBuild\15.0\Bin\Roslyn\VBCSCompiler.exe" - -# We never load these binaries, and it does not generate the correct binding redirects, so do not NGEN them -# https://github.com/dotnet/roslyn/pull/27537 - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Net.Http.dll - file source=$(OutputPath)\Vsix\Roslyn.Compilers.Extension\System.Diagnostics.DiagnosticSource.dll - -folder InstallDir:\Common7\Tools\vsdevcmd\ext - file source=$(RepoRoot)\src\Setup\MSBuildScripts\roslyn.bat \ No newline at end of file diff --git a/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.vsmanproj b/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.vsmanproj deleted file mode 100644 index b136223547465..0000000000000 --- a/src/Setup/DevDivVsix/CompilersPackage/Microsoft.CodeAnalysis.Compilers.vsmanproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - true - true - $(OutputPath)Vsix\CodeAnalysisCompilers - true - false - false - false - false - - - - - - - - - - - - - - - diff --git a/src/Setup/MSBuildScripts/roslyn.bat b/src/Setup/DevDivVsix/CompilersPackage/roslyn.bat similarity index 100% rename from src/Setup/MSBuildScripts/roslyn.bat rename to src/Setup/DevDivVsix/CompilersPackage/roslyn.bat diff --git a/src/Setup/DevDivVsix/Directory.Build.targets b/src/Setup/DevDivVsix/Directory.Build.targets new file mode 100644 index 0000000000000..633ccc41c604f --- /dev/null +++ b/src/Setup/DevDivVsix/Directory.Build.targets @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/Setup/DevDivVsix/MicrosoftCodeAnalysisLanguageServices/Microsoft.CodeAnalysis.LanguageServices.vsmanproj b/src/Setup/DevDivVsix/MicrosoftCodeAnalysisLanguageServices/Microsoft.CodeAnalysis.LanguageServices.vsmanproj deleted file mode 100644 index 4e5c2d17eec64..0000000000000 --- a/src/Setup/DevDivVsix/MicrosoftCodeAnalysisLanguageServices/Microsoft.CodeAnalysis.LanguageServices.vsmanproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - true - true - $(OutputPath)\Vsix\CodeAnalysisLanguageServices - true - false - false - false - false - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Setup/DevDivVsix/PortableFacades/PortableFacades.Setup.csproj b/src/Setup/DevDivVsix/PortableFacades/PortableFacades.Setup.csproj new file mode 100644 index 0000000000000..2fecd0ab79ff2 --- /dev/null +++ b/src/Setup/DevDivVsix/PortableFacades/PortableFacades.Setup.csproj @@ -0,0 +1,81 @@ + + + + net46 + Custom + 1.11.0.0 + + + PortableFacades.vsix + PortableFacades + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_SwrFilePath>$(IntermediateOutputPath)$(TargetVsixContainerName).swr + + + + + + + <_FileEntries Include='file source="%(RuntimeCopyLocalItems.Identity)" vs.file.ngen=yes'/> + + + + <_Lines> + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Setup/DevDivVsix/PortableFacades/PortableFacades.swixproj b/src/Setup/DevDivVsix/PortableFacades/PortableFacades.swixproj deleted file mode 100644 index a5a6a6b676cc3..0000000000000 --- a/src/Setup/DevDivVsix/PortableFacades/PortableFacades.swixproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - neutral - false - $(OutputPath)\Vsix\PortableFacades - true - vsix - false - false - - - - - - $(PackagePreprocessorDefinitions);NuGetPackageRoot=$(NuGetPackageRoot) - $(BaseIntermediateOutputPath)$(Configuration)\ - - - - - - - - diff --git a/src/Setup/DevDivVsix/PortableFacades/PortableFacades.swr b/src/Setup/DevDivVsix/PortableFacades/PortableFacades.swr deleted file mode 100644 index 732f19849008a..0000000000000 --- a/src/Setup/DevDivVsix/PortableFacades/PortableFacades.swr +++ /dev/null @@ -1,35 +0,0 @@ -use vs - -package name=PortableFacades - version=1.11.0.0 - -folder InstallDir:\Common7\IDE\PrivateAssemblies - file source="$(NuGetPackageRoot)\Microsoft.Win32.Primitives\4.3.0\lib\net46\Microsoft.Win32.Primitives.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.AppContext\4.3.0\lib\net46\System.AppContext.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Console\4.3.0\lib\net46\System.Console.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Diagnostics.FileVersionInfo\4.3.0\runtimes\win\lib\net46\System.Diagnostics.FileVersionInfo.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Diagnostics.Process\4.3.0\runtimes\win\lib\net46\System.Diagnostics.Process.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Diagnostics.StackTrace\4.3.0\lib\net46\System.Diagnostics.StackTrace.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Globalization.Calendars\4.3.0\lib\net46\System.Globalization.Calendars.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.IO.Compression\4.3.0\runtimes\win\lib\net46\System.IO.Compression.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.IO.Compression.ZipFile\4.3.0\lib\net46\System.IO.Compression.ZipFile.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.IO.FileSystem\4.3.0\lib\net46\System.IO.FileSystem.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.IO.FileSystem.Primitives\4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.IO.Pipes\4.3.0\runtimes\win\lib\net46\System.IO.Pipes.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Net.Security\4.3.0\runtimes\win\lib\net46\System.Net.Security.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Net.Sockets\4.3.0\lib\net46\System.Net.Sockets.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Reflection.TypeExtensions\4.3.0\lib\net46\System.Reflection.TypeExtensions.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Runtime.Serialization.Primitives\4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Security.AccessControl\4.3.0\runtimes\win\lib\net46\System.Security.AccessControl.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Security.Claims\4.3.0\lib\net46\System.Security.Claims.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Security.Cryptography.Algorithms\4.3.0\runtimes\win\lib\net46\System.Security.Cryptography.Algorithms.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Security.Cryptography.Csp\4.3.0\runtimes\win\lib\net46\System.Security.Cryptography.Csp.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Security.Cryptography.Encoding\4.3.0\runtimes\win\lib\net46\System.Security.Cryptography.Encoding.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Security.Cryptography.Primitives\4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Security.Cryptography.X509Certificates\4.3.0\runtimes\win\lib\net46\System.Security.Cryptography.X509Certificates.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Security.Principal.Windows\4.3.0\runtimes\win\lib\net46\System.Security.Principal.Windows.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Threading.Thread\4.3.0\lib\net46\System.Threading.Thread.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Xml.ReaderWriter\4.3.0\lib\net46\System.Xml.ReaderWriter.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Xml.XmlDocument\4.3.0\lib\net46\System.Xml.XmlDocument.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Xml.XPath\4.3.0\lib\net46\System.Xml.XPath.dll" vs.file.ngen=yes - file source="$(NuGetPackageRoot)\System.Xml.XPath.XDocument\4.3.0\lib\net46\System.Xml.XPath.XDocument.dll" vs.file.ngen=yes diff --git a/src/Setup/DevDivVsix/PortableFacades/PortableFacades.vsmanproj b/src/Setup/DevDivVsix/PortableFacades/PortableFacades.vsmanproj deleted file mode 100644 index 5e2d40d55fa65..0000000000000 --- a/src/Setup/DevDivVsix/PortableFacades/PortableFacades.vsmanproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - true - true - $(OutputPath)\Vsix\PortableFacades - true - false - false - false - false - - - - - - - - - - - - - - - diff --git a/src/Setup/DevDivVsix/Settings.props b/src/Setup/DevDivVsix/Settings.props deleted file mode 100644 index 1ce3bafcc078a..0000000000000 --- a/src/Setup/DevDivVsix/Settings.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - - $(NuGetPackageRoot)\microbuild.plugins.swixbuild\$(MicroBuildPluginsSwixBuildVersion)\ - - diff --git a/src/Setup/Vsix/myget_org-extensions.config b/src/Setup/Vsix/myget_org-extensions.config deleted file mode 100644 index 9ca9a198d55f0..0000000000000 --- a/src/Setup/Vsix/myget_org-extensions.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/src/Tools/BuildBoss/BuildBoss.sln b/src/Tools/BuildBoss/BuildBoss.sln index 7d039620f12b3..6859842bcca66 100644 --- a/src/Tools/BuildBoss/BuildBoss.sln +++ b/src/Tools/BuildBoss/BuildBoss.sln @@ -1,7 +1,6 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27110.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildBoss", "BuildBoss.csproj", "{9C0660D9-48CA-40E1-BABA-8F6A1F11FE10}" EndProject diff --git a/src/Tools/BuildBoss/CompilerNuGetCheckerUtil.cs b/src/Tools/BuildBoss/CompilerNuGetCheckerUtil.cs index 83ccbdca1a609..d1f0e3c95f8e3 100644 --- a/src/Tools/BuildBoss/CompilerNuGetCheckerUtil.cs +++ b/src/Tools/BuildBoss/CompilerNuGetCheckerUtil.cs @@ -20,7 +20,6 @@ namespace BuildBoss /// - The dependencies can change based on subtle changes to the code /// - There is no project which is guaranteed to have a superset of dependencies /// - There is no syntax for using the union of DLLs in a NuSpec file - /// - There is no way to use a NuSpec file as input to a SWR file /// /// The least crazy solution that could be decided on was to manage the list of dependencies /// by hand in the NuSpec file and then rigorously verify the solution here. @@ -45,7 +44,6 @@ public bool Check(TextWriter textWriter) { var allGood = CheckDesktop(textWriter); allGood &= CheckCoreClr(textWriter); - allGood &= CheckPortableFacades(textWriter); return allGood; } catch (Exception ex) @@ -83,18 +81,6 @@ private bool CheckDesktop(TextWriter textWriter) "Microsoft.Build.Tasks.Core.dll", "Microsoft.Build.Utilities.Core.dll").ToList(); - // The SWR files don't ship the native dia libraries as they are shipped by a different - // team in Visual Studio. - var swrRelativeFileNames = FilterRelativeFileNames( - dllRelativeNames, - "Microsoft.DiaSymReader.Native.amd64.dll", - "Microsoft.DiaSymReader.Native.x86.dll").ToList(); - - // The Microsoft.CodeAnalysis.Compilers.swr file is used in part to ensure NGEN is run on the set of - // facades / implementation DLLs the compiler depends on. This set of DLLs is the same as what is - // included in our NuGet package. Need to make sure all the necessary managed DLLs are included here. - allGood &= VerifySwrFile(textWriter, @"src\Setup\DevDivVsix\CompilersPackage\Microsoft.CodeAnalysis.Compilers.swr", swrRelativeFileNames); - allGood &= VerifyNuPackage( textWriter, FindNuGetPackage(@"NuGet\PreRelease", "Microsoft.Net.Compilers"), @@ -103,7 +89,7 @@ private bool CheckDesktop(TextWriter textWriter) allGood &= VerifyNuPackage( textWriter, - FindNuGetPackage(@"NuGet\VS", "VS.Tools.Roslyn"), + FindNuGetPackage(@"DevDivPackages\Roslyn", "VS.Tools.Roslyn"), string.Empty, dllRelativeNames); return allGood; @@ -138,80 +124,6 @@ private bool CheckCoreClr(TextWriter textWriter) dllRelativeNames); } - private bool CheckPortableFacades(TextWriter textWriter) - { - var (allGood, dllRelativeNames) = GetDllRelativeNames( - textWriter, - @"Vsix\Roslyn.Compilers.Extension", - @"Vsix\Roslyn.VisualStudio.Setup.Dependencies"); - if (!allGood) - { - return false; - } - - dllRelativeNames = removeItemsNotNeededToDelpoy(dllRelativeNames).ToList(); - allGood &= VerifySwrFile(textWriter, @"src\Setup\DevDivVsix\PortableFacades\PortableFacades.swr", dllRelativeNames); - - return allGood; - - // This package is meant to deploy all of the .NET facades necessary for us to execute. This - // will remove all of the binaries that we know to be unnecessary for deployment or already - // deployed by Visual Studio. - IEnumerable removeItemsNotNeededToDelpoy(List relativeNames) - { - foreach (var itemRelativeName in dllRelativeNames) - { - var item = Path.GetFileName(itemRelativeName); - - // Items which are deployed by other teams inside of Visual Studio - if (item.StartsWith("Microsoft.Build.", PathComparison) || - item.StartsWith("Microsoft.VisualStudio.", PathComparison) || - item.StartsWith("System.Composition.", PathComparison) || - PathComparer.Equals("stdole.dll", item) || - PathComparer.Equals("EnvDTE.dll", item) || - PathComparer.Equals("Microsoft.Composition", item) || - PathComparer.Equals("System.Threading.Tasks.Dataflow.dll", item) || - PathComparer.Equals("System.Runtime.InteropServices.RuntimeInformation.dll", item) || - PathComparer.Equals("Newtonsoft.Json.dll", item) || - PathComparer.Equals("StreamJsonRpc.dll", item)) - { - continue; - } - - // Items which we deploy in another VSIX - if (item.StartsWith("Microsoft.Build.", PathComparison) || - item.StartsWith("Microsoft.CodeAnalysis.", PathComparison) || - item.StartsWith("Microsoft.DiaSymReader.", PathComparison) || - PathComparer.Equals("System.Collections.Immutable.dll", item) || - PathComparer.Equals("System.Reflection.Metadata.dll", item) || - PathComparer.Equals("System.ValueTuple.dll", item) || - PathComparer.Equals("System.Threading.Tasks.Extensions.dll", item)) - { - continue; - } - - // Items which we have specifically chosen not to deploy because at the moment it causes - // issues in VS and is not required for us to execute. - // - https://github.com/dotnet/roslyn/pull/27537 - if (PathComparer.Equals("System.Net.Http.dll", item) || - PathComparer.Equals("System.Diagnostics.DiagnosticSource.dll", item) || - PathComparer.Equals("System.Text.Encoding.CodePages.dll", item)) - { - continue; - } - - // These don't actually ship, it's just a build artifact to create a deployment layout - if (PathComparer.Equals("Roslyn.Compilers.Extension.dll", item) || - PathComparer.Equals("Roslyn.VisualStudio.Setup.Dependencies.dll", item)) - { - continue; - } - - yield return itemRelativeName; - } - } - } - /// /// Get all of the dependencies in the specified directory set. /// @@ -394,60 +306,6 @@ IEnumerable getPartsInFolder() return allGood; } - private bool VerifySwrFile(TextWriter textWriter, string swrRelativeFilePath, List dllFileNames) - { - var map = dllFileNames - .ToDictionary( - keySelector: x => x, - elementSelector: _ => false, - comparer: PathComparer); - var swrFilePath = Path.Combine(RepositoryDirectory, swrRelativeFilePath); - - textWriter.WriteLine($"Verifying {Path.GetFileName(swrRelativeFilePath)}"); - string[] allLines; - try - { - allLines = File.ReadAllLines(swrFilePath); - } - catch (Exception ex) - { - textWriter.WriteLine($"\tUnable to read the SWR file: {ex.Message}"); - return false; - } - - var allGood = true; - var regex = new Regex(@"^\s*file source=""?([^"" ]*).*""?\s*$", RegexOptions.IgnoreCase); - foreach (var line in allLines) - { - var match = regex.Match(line); - if (match.Success) - { - var filePath = match.Groups[1].Value.Replace('$', '_').Replace('(', '_').Replace(')', '_'); - var fileName = Path.GetFileName(filePath); - if (map.ContainsKey(fileName)) - { - map[fileName] = true; - } - else if (fileName.EndsWith(".dll", PathComparison)) - { - textWriter.WriteLine($"Unexpected dll {fileName}"); - allGood = false; - } - } - } - - foreach (var pair in map.OrderBy(x => x.Key)) - { - if (!pair.Value) - { - textWriter.WriteLine($"\tDll {pair.Key} is missing"); - allGood = false; - } - } - - return allGood; - } - private string FindNuGetPackage(string directory, string partialName) { var file = Directory diff --git a/src/Tools/MicroBuild/microbuild.ps1 b/src/Tools/MicroBuild/microbuild.ps1 index 5f2015a98f254..2f673302bb51b 100644 --- a/src/Tools/MicroBuild/microbuild.ps1 +++ b/src/Tools/MicroBuild/microbuild.ps1 @@ -33,41 +33,6 @@ function Print-Usage() { Write-Host " -help Print this message" } -# Create the Insertion folder. This is where the insertion tool pulls all of its -# binaries from. -function Copy-InsertionItems() { - $insertionDir = Join-Path $configDir "Insertion" - Create-Directory $insertionDir - - $items = @( - "Vsix\ExpressionEvaluatorPackage\Microsoft.CodeAnalysis.ExpressionEvaluator.json", - "Vsix\ExpressionEvaluatorPackage\ExpressionEvaluatorPackage.vsix", - "Vsix\Roslyn.VisualStudio.InteractiveComponents\Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents.json", - "Vsix\Roslyn.VisualStudio.InteractiveComponents\Roslyn.VisualStudio.InteractiveComponents.vsix", - "Vsix\Roslyn.VisualStudio.Setup\Microsoft.CodeAnalysis.VisualStudio.Setup.json", - "Vsix\Roslyn.VisualStudio.Setup\Roslyn.VisualStudio.Setup.vsix", - "Vsix\CodeAnalysisLanguageServices\Microsoft.CodeAnalysis.LanguageServices.vsman", - "Vsix\PortableFacades\PortableFacades.vsix", - "Vsix\PortableFacades\PortableFacades.vsman", - "Vsix\PortableFacades\PortableFacades.vsmand", - "Vsix\PortableFacades\PortableFacades.json", - "Vsix\CodeAnalysisCompilers\Microsoft.CodeAnalysis.Compilers.vsix", - "Vsix\CodeAnalysisCompilers\Microsoft.CodeAnalysis.Compilers.vsman", - "Vsix\CodeAnalysisCompilers\Microsoft.CodeAnalysis.Compilers.vsmand", - "Vsix\CodeAnalysisCompilers\Microsoft.CodeAnalysis.Compilers.json") - - - foreach ($item in $items) { - $itemPath = Join-Path $configDir $item - Copy-Item $itemPath $insertionDir - } - - $devDivPackagesDir = Join-Path $configDir "DevDivPackages\Roslyn" - Create-Directory $devDivPackagesDir - - Copy-Item (Join-Path $configDir "NuGet\VS\*.nupkg") $devDivPackagesDir -} - Push-Location $PSScriptRoot try { . (Join-Path $PSScriptRoot "..\..\..\build\scripts\build-utils.ps1") @@ -95,18 +60,12 @@ try { $setupDir = Join-Path $repoDir "src\Setup" Exec-Block { & (Join-Path $scriptDir "build.ps1") -restore:$true -build -cibuild:$true -official:$official -release:$release -sign -signType $signType -pack -testDesktop:$testDesktop -binaryLog -procdump } - Copy-InsertionItems - - # Insertion scripts currently look for a sentinel file on the drop share to determine that the build was green - # and ready to be inserted - $sentinelFile = Join-Path $configDir AllTestsPassed.sentinel - New-Item -Force $sentinelFile -type file Get-Process vbcscompiler -ErrorAction SilentlyContinue | Stop-Process switch ($publishType) { "vsts" { - Exec-Block { & .\publish-assets.ps1 -configDir $configDir -branchName $branchName -mygetApiKey $mygetApiKey -nugetApiKey $nugetApiKey -gitHubUserName $githubUserName -gitHubToken $gitHubToken -gitHubEmail $gitHubEmail -test:$(-not $official) } + Exec-Block { & .\publish-assets.ps1 -config $config -branchName $branchName -mygetApiKey $mygetApiKey -nugetApiKey $nugetApiKey -gitHubUserName $githubUserName -gitHubToken $gitHubToken -gitHubEmail $gitHubEmail -test:$(-not $official) } break; } "blob" { diff --git a/src/Tools/MicroBuild/publish-assets.ps1 b/src/Tools/MicroBuild/publish-assets.ps1 index 59925be23a6fd..85903ac11a004 100644 --- a/src/Tools/MicroBuild/publish-assets.ps1 +++ b/src/Tools/MicroBuild/publish-assets.ps1 @@ -9,7 +9,7 @@ [CmdletBinding(PositionalBinding=$false)] Param( # Standard options - [string]$configDir = "", + [string]$config = "", [string]$branchName = "", [string]$releaseName = "", [switch]$test, @@ -58,29 +58,23 @@ function Publish-NuGet([string]$packageDir, [string]$uploadUrl) { } function Publish-Vsix([string]$uploadUrl) { - Push-Location $configDir - try { - Write-Host "Publishing VSIX to $uploadUrl" - $apiKey = Get-PublishKey $uploadUrl - $extensions = [xml](Get-Content (Join-Path $configDir "myget_org-extensions.config")) - foreach ($extension in $extensions.extensions.extension) { - $vsix = Join-Path $extension.path ($extension.id + ".vsix") - if (-not (Test-Path $vsix)) { - throw "VSIX $vsix does not exist" - } - - Write-Host " Publishing '$vsix'" - if (-not $test) { - $response = Invoke-WebRequest -Uri $uploadUrl -Headers @{"X-NuGet-ApiKey"=$apiKey} -ContentType 'multipart/form-data' -InFile $vsix -Method Post -UseBasicParsing - if ($response.StatusCode -ne 201) { - throw "Failed to upload VSIX extension: $vsix. Upload failed with Status code: $response.StatusCode" - } + Write-Host "Publishing VSIX to $uploadUrl" + $apiKey = Get-PublishKey $uploadUrl + $extensions = [xml](Get-Content (Join-Path $repoDir "build\config\myget_org-extensions.config")) + foreach ($extension in $extensions.extensions.extension) { + $vsix = Join-Path $vsSetupDir ($extension.id + ".vsix") + if (-not (Test-Path $vsix)) { + throw "VSIX $vsix does not exist" + } + + Write-Host " Publishing '$vsix'" + if (-not $test) { + $response = Invoke-WebRequest -Uri $uploadUrl -Headers @{"X-NuGet-ApiKey"=$apiKey} -ContentType 'multipart/form-data' -InFile $vsix -Method Post -UseBasicParsing + if ($response.StatusCode -ne 201) { + throw "Failed to upload VSIX extension: $vsix. Upload failed with Status code: $response.StatusCode" } } } - finally { - Pop-Location - } } function Publish-Channel([string]$packageDir, [string]$name) { @@ -151,10 +145,12 @@ function Normalize-BranchName([string]$branchName) { try { . (Join-Path $PSScriptRoot "..\..\..\build\scripts\build-utils.ps1") $dotnet = Ensure-DotnetSdk + $configDir = Join-Path $binariesDir $config $nugetDir = Join-Path $configDir "NuGet" + $vsSetupDir = Join-Path $binariesDir "VSSetup\$config" - if ($configDir -eq "") { - Write-Host "Must provide the build output with -configDir" + if ($config -eq "") { + Write-Host "Must provide the build configuration with -config" exit 1 } diff --git a/src/VisualStudio/CSharp/Impl/Microsoft.VisualStudio.LanguageServices.CSharp.csproj b/src/VisualStudio/CSharp/Impl/Microsoft.VisualStudio.LanguageServices.CSharp.csproj index 6b415022b52b1..4b3a5542e846b 100644 --- a/src/VisualStudio/CSharp/Impl/Microsoft.VisualStudio.LanguageServices.CSharp.csproj +++ b/src/VisualStudio/CSharp/Impl/Microsoft.VisualStudio.LanguageServices.CSharp.csproj @@ -20,10 +20,9 @@ AnyCPU Library Microsoft.VisualStudio.LanguageServices.CSharp - false + true false - true net46 true @@ -54,6 +53,10 @@ + + + + diff --git a/src/VisualStudio/CSharp/Repl/Microsoft.VisualStudio.CSharp.Repl.csproj b/src/VisualStudio/CSharp/Repl/Microsoft.VisualStudio.CSharp.Repl.csproj index d667481eee4d6..5d38d09088224 100644 --- a/src/VisualStudio/CSharp/Repl/Microsoft.VisualStudio.CSharp.Repl.csproj +++ b/src/VisualStudio/CSharp/Repl/Microsoft.VisualStudio.CSharp.Repl.csproj @@ -6,10 +6,9 @@ AnyCPU Library Microsoft.VisualStudio.LanguageServices.CSharp.Interactive - false + true false - true net46 @@ -41,6 +40,9 @@ + + + diff --git a/src/VisualStudio/Core/Def/Microsoft.VisualStudio.LanguageServices.csproj b/src/VisualStudio/Core/Def/Microsoft.VisualStudio.LanguageServices.csproj index 59ae1c88444ba..86bdbb73d54c2 100644 --- a/src/VisualStudio/Core/Def/Microsoft.VisualStudio.LanguageServices.csproj +++ b/src/VisualStudio/Core/Def/Microsoft.VisualStudio.LanguageServices.csproj @@ -8,9 +8,8 @@ Microsoft.VisualStudio.LanguageServices true net46 - - true false + true false None @@ -193,6 +192,9 @@ + + + diff --git a/src/VisualStudio/IntegrationTest/TestSetup/Microsoft.VisualStudio.IntegrationTest.Setup.csproj b/src/VisualStudio/IntegrationTest/TestSetup/Microsoft.VisualStudio.IntegrationTest.Setup.csproj index ddc29e924640d..e77fe2437c894 100644 --- a/src/VisualStudio/IntegrationTest/TestSetup/Microsoft.VisualStudio.IntegrationTest.Setup.csproj +++ b/src/VisualStudio/IntegrationTest/TestSetup/Microsoft.VisualStudio.IntegrationTest.Setup.csproj @@ -8,16 +8,14 @@ Microsoft.VisualStudio.IntegrationTest.Setup net46 Vsix - true + false + + true + true true false true - true - true - RoslynDev - true - false diff --git a/src/VisualStudio/IntegrationTest/TestSetup/source.extension.vsixmanifest b/src/VisualStudio/IntegrationTest/TestSetup/source.extension.vsixmanifest index 61cf4fc50475b..218c75b96d0fc 100644 --- a/src/VisualStudio/IntegrationTest/TestSetup/source.extension.vsixmanifest +++ b/src/VisualStudio/IntegrationTest/TestSetup/source.extension.vsixmanifest @@ -3,7 +3,7 @@ - + Visual Studio Integration Test Support Support for running Visual Studio integration tests. @@ -11,7 +11,7 @@ - + diff --git a/src/VisualStudio/RemoteHostClientMock/Roslyn.VisualStudio.RemoteHostClientMock.csproj b/src/VisualStudio/RemoteHostClientMock/Roslyn.VisualStudio.RemoteHostClientMock.csproj index cfff3bab82b2a..da67ce75f58f8 100644 --- a/src/VisualStudio/RemoteHostClientMock/Roslyn.VisualStudio.RemoteHostClientMock.csproj +++ b/src/VisualStudio/RemoteHostClientMock/Roslyn.VisualStudio.RemoteHostClientMock.csproj @@ -6,20 +6,16 @@ AnyCPU Library Roslyn.VisualStudio.RemoteHostClientMock + net46 + Vsix + false + + true false true false false - true - true - RoslynDev - true - Roslyn.VisualStudio.RemoteHostClientMock.vsix - net46 - $(RoslynDesktopRuntimeIdentifier) - Vsix - false diff --git a/src/VisualStudio/RemoteHostClientMock/source.extension.vsixmanifest b/src/VisualStudio/RemoteHostClientMock/source.extension.vsixmanifest index 11ab35b631c81..61743fc29bc86 100644 --- a/src/VisualStudio/RemoteHostClientMock/source.extension.vsixmanifest +++ b/src/VisualStudio/RemoteHostClientMock/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Roslyn RemoteHostClient Mock Roslyn RemoteHostClient Mock diff --git a/src/VisualStudio/Setup.Dependencies/Roslyn.VisualStudio.Setup.Dependencies.csproj b/src/VisualStudio/Setup.Dependencies/Roslyn.VisualStudio.Setup.Dependencies.csproj index ac766f0c1f7d0..4eec5befecaa4 100644 --- a/src/VisualStudio/Setup.Dependencies/Roslyn.VisualStudio.Setup.Dependencies.csproj +++ b/src/VisualStudio/Setup.Dependencies/Roslyn.VisualStudio.Setup.Dependencies.csproj @@ -6,19 +6,18 @@ AnyCPU Library Roslyn.VisualStudio.Setup.Dependencies - true - RoslynDev - false - false - false - true net46 $(RoslynDesktopRuntimeIdentifier) Vsix - true - All - 3 true + + + true + false + false + false + CommonExtensions + Microsoft\ManagedLanguages\VBCSharp\Dependencies diff --git a/src/VisualStudio/Setup.Dependencies/source.extension.vsixmanifest b/src/VisualStudio/Setup.Dependencies/source.extension.vsixmanifest index 666fc61aa2a6d..72926e50b8de5 100644 --- a/src/VisualStudio/Setup.Dependencies/source.extension.vsixmanifest +++ b/src/VisualStudio/Setup.Dependencies/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Roslyn Dependencies Roslyn dependencies for developer deployment. Microsoft.CodeAnalysis.VisualStudio.Setup.Dependencies diff --git a/src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj b/src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj index b44a5ee28d015..369473a0fc63c 100644 --- a/src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj +++ b/src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj @@ -6,202 +6,136 @@ AnyCPU Library Roslyn.VisualStudio.Setup + net46 + Vsix + + true - RoslynDev false false false - true - net46 - $(RoslynDesktopRuntimeIdentifier) - Vsix - true CommonExtensions Microsoft\ManagedLanguages\VBCSharp\LanguageServices - true - All - 3 + + + Microsoft.CodeAnalysis.LanguageServices CodeAnalysis BuiltProjectOutputGroup true - true - All - 3 CSharpCodeAnalysis BuiltProjectOutputGroup true - true - All - 3 BasicCodeAnalysis BuiltProjectOutputGroup true - true - All - 3 Workspaces.Desktop BuiltProjectOutputGroup true - true - All - 3 BasicFeatures BuiltProjectOutputGroup true - true - All - 3 CSharpFeatures BuiltProjectOutputGroup true - true - All - 3 CSharpEditorFeatures BuiltProjectOutputGroup true - true - All - 3 EditorFeatures BuiltProjectOutputGroup true - true - All - 3 EditorFeatures.Wpf BuiltProjectOutputGroup true - true - All - 3 Features BuiltProjectOutputGroup true - true - All - 3 TextEditorFeatures BuiltProjectOutputGroup true - true - All - 3 BasicEditorFeatures BuiltProjectOutputGroup true - true - All - 3 Workspaces BuiltProjectOutputGroup true - true - All - 3 Workspaces.MSBuild BuiltProjectOutputGroup true - true - All - 3 CSharpWorkspace BuiltProjectOutputGroup true - true - All - 3 BasicWorkspace BuiltProjectOutputGroup true - true - All - 3 ServicesVisualStudio BuiltProjectOutputGroup;PkgDefProjectOutputGroup;VsdConfigOutputGroup true - true - All - 3 ServicesVisualStudioImpl BuiltProjectOutputGroup true - true - All - 3 SolutionExplorerShim BuiltProjectOutputGroup true - true - All - 3 CSharpVisualStudio BuiltProjectOutputGroup%3bPkgDefProjectOutputGroup%3bContentFilesProjectOutputGroup true - true - All - 3 BasicVisualStudio BuiltProjectOutputGroup%3bPkgDefProjectOutputGroup%3bContentFilesProjectOutputGroup true - true - All - 3 VisualStudioSetup.Dependencies + false + false XamlVisualStudio BuiltProjectOutputGroup%3b - true - All - 3 RemoteWorkspaces @@ -222,9 +156,6 @@ RazorVisualStudio BuiltProjectOutputGroup%3b true - true - All - 3 diff --git a/src/VisualStudio/Setup/source.extension.vsixmanifest b/src/VisualStudio/Setup/source.extension.vsixmanifest index 6b5e33163df65..21d459ca38c31 100644 --- a/src/VisualStudio/Setup/source.extension.vsixmanifest +++ b/src/VisualStudio/Setup/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Roslyn Language Services C# and VB.NET language services for Visual Studio. Microsoft.CodeAnalysis.VisualStudio.Setup diff --git a/src/VisualStudio/VisualBasic/Impl/Microsoft.VisualStudio.LanguageServices.VisualBasic.vbproj b/src/VisualStudio/VisualBasic/Impl/Microsoft.VisualStudio.LanguageServices.VisualBasic.vbproj index f7dd403d97443..6ea174bcf600b 100644 --- a/src/VisualStudio/VisualBasic/Impl/Microsoft.VisualStudio.LanguageServices.VisualBasic.vbproj +++ b/src/VisualStudio/VisualBasic/Impl/Microsoft.VisualStudio.LanguageServices.VisualBasic.vbproj @@ -6,8 +6,8 @@ AnyCPU Library false + true false - true net46 @@ -58,6 +58,9 @@ + + + diff --git a/src/VisualStudio/VisualBasic/Repl/Microsoft.VisualStudio.VisualBasic.Repl.vbproj b/src/VisualStudio/VisualBasic/Repl/Microsoft.VisualStudio.VisualBasic.Repl.vbproj index 504b20abc3516..764805f5ff5d7 100644 --- a/src/VisualStudio/VisualBasic/Repl/Microsoft.VisualStudio.VisualBasic.Repl.vbproj +++ b/src/VisualStudio/VisualBasic/Repl/Microsoft.VisualStudio.VisualBasic.Repl.vbproj @@ -5,10 +5,9 @@ AnyCPU AnyCPU Library - false + true false - true net46 @@ -43,6 +42,9 @@ + + + diff --git a/src/VisualStudio/VisualStudioDiagnosticsToolWindow/Roslyn.VisualStudio.DiagnosticsWindow.csproj b/src/VisualStudio/VisualStudioDiagnosticsToolWindow/Roslyn.VisualStudio.DiagnosticsWindow.csproj index f628bc8b3f12c..8df04b3c232c1 100644 --- a/src/VisualStudio/VisualStudioDiagnosticsToolWindow/Roslyn.VisualStudio.DiagnosticsWindow.csproj +++ b/src/VisualStudio/VisualStudioDiagnosticsToolWindow/Roslyn.VisualStudio.DiagnosticsWindow.csproj @@ -4,21 +4,17 @@ AnyCPU AnyCPU + net46 + Vsix Library Roslyn.VisualStudio.DiagnosticsWindow - true + + true true false false - true - true - RoslynDev - true - Roslyn.VisualStudio.DiagnosticsWindow.vsix - net46 - $(RoslynDesktopRuntimeIdentifier) - Vsix + true diff --git a/src/VisualStudio/VisualStudioDiagnosticsToolWindow/source.extension.vsixmanifest b/src/VisualStudio/VisualStudioDiagnosticsToolWindow/source.extension.vsixmanifest index 098dfb2a0b892..990c7425d395f 100644 --- a/src/VisualStudio/VisualStudioDiagnosticsToolWindow/source.extension.vsixmanifest +++ b/src/VisualStudio/VisualStudioDiagnosticsToolWindow/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Roslyn Diagnostics Roslyn Diagnostics Window diff --git a/src/VisualStudio/VisualStudioInteractiveComponents/Roslyn.VisualStudio.InteractiveComponents.csproj b/src/VisualStudio/VisualStudioInteractiveComponents/Roslyn.VisualStudio.InteractiveComponents.csproj index 16288553915ba..87089b3b31363 100644 --- a/src/VisualStudio/VisualStudioInteractiveComponents/Roslyn.VisualStudio.InteractiveComponents.csproj +++ b/src/VisualStudio/VisualStudioInteractiveComponents/Roslyn.VisualStudio.InteractiveComponents.csproj @@ -6,130 +6,99 @@ AnyCPU Library Roslyn.VisualStudio.InteractiveComponents + Vsix + net46 + + true - RoslynDev true false false $(VisualStudioVersion) - true - net46 - $(RoslynDesktopRuntimeIdentifier) - Vsix - true CommonExtensions Microsoft\ManagedLanguages\VBCSharp\InteractiveComponents + + + Microsoft.CodeAnalysis.LanguageServices - - + + false + + + false + CSharpVisualStudioRepl BuiltProjectOutputGroup;PkgDefProjectOutputGroup;ContentFilesProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 CodeAnalysis BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 CSharpCodeAnalysis BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 InteractiveEditorFeatures BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 CSharpInteractiveEditorFeatures BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 Scripting BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 CSharpScripting BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 InteractiveFeatures BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 VisualStudioInteractiveServices BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 Features BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 Workspaces.Desktop BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 Workspaces BuiltProjectOutputGroup DebugSymbolsProjectOutputGroup true - true - All - 3 VisualStudioSetup diff --git a/src/VisualStudio/VisualStudioInteractiveComponents/source.extension.vsixmanifest b/src/VisualStudio/VisualStudioInteractiveComponents/source.extension.vsixmanifest index 19ceb34eff5cf..005827653a796 100644 --- a/src/VisualStudio/VisualStudioInteractiveComponents/source.extension.vsixmanifest +++ b/src/VisualStudio/VisualStudioInteractiveComponents/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Roslyn Interactive Components Interactive Roslyn components for Visual Studio. Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents @@ -14,7 +14,7 @@ - +