Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrates to RepoToolset infrastructure #2606

Merged
merged 25 commits into from
Aug 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c19a9b9
Delete translated .resx, .xaml, .vsct files
tmat Jul 11, 2017
9bb50ee
Delete untranslated xlf files.
tmat Jul 11, 2017
d3757d9
Update xlf files
tmat Jul 18, 2017
21b5cf5
Add missing xlf files
tmat Jul 18, 2017
eb8c67c
Add missing xlf files (ApplicationDefinition, Page)
tmat Aug 4, 2017
1ae451e
Update ProjectItemsSchema xlf files
tmat Aug 4, 2017
9072022
Delete Microsoft.VisualStudio.Editor.UnitTests
tmat Jul 11, 2017
bc1a1c4
Delete obsolete infrastructure files
tmat Jul 25, 2017
89e7a57
New build infrastructure (RepoToolset v34)
tmat Jul 25, 2017
b24125e
Delete nuspecs.
tmat Jul 11, 2017
792bb69
Refactor template projects.
tmat Jul 11, 2017
998bb30
Add missing binding redirects to test App.config, enable AppDomains s…
tmat Jul 19, 2017
864a1ce
Set Experimental flag in vsixmanifest files
tmat Jul 19, 2017
fcca201
Update projects
tmat Jul 27, 2017
1aec2be
Refactor Willow components
tmat Jul 11, 2017
892c973
Delete Targets.csproj
tmat Jul 11, 2017
2d25a31
Delete unit test assembly attributes and dependency resolver
tmat Jul 11, 2017
c8b7adb
Move Design Time targets under Microsoft.VisualStudio.ProjectSystem.M…
tmat Jul 15, 2017
639ec0d
Fix error xUnit1024: Test method 'Move' on test class has the same na…
tmat Jul 11, 2017
aa28a1f
Fix xunit error: Test class must be public
tmat Jul 27, 2017
ffaf77d
Delete duplicate entries in Designer.resx
tmat Jul 11, 2017
6d60a9a
Integration tests: set design time templates env variables
tmat Jul 12, 2017
50213aa
Set paths to design time targets in launch settings
tmat Jul 19, 2017
365ddc0
Enable automatic restore from VS
tmat Jul 21, 2017
7bae1dd
Build dlls to a common output directory.
tmat Aug 18, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
*.sln.docstates
.vs/
.vscode/
.tools/

# Build results, but not the debug folder under projectsystem
[Bb]inaries/
[Dd]ebug/*
[Aa]rtifacts/
![Pp]roject[Ss]ystem/[Dd]ebug
[Rr]elease/
x64/
Expand Down
46 changes: 46 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project>
<Import Project="build\NuGet.props"/>
<Import Project="build\Versions.props"/>

<ItemGroup>
<PackageReference Include="RoslynTools.Microsoft.RepoToolset" Version="$(RoslynToolsMicrosoftRepoToolsetVersion)" />
</ItemGroup>

<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>

<RepoRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\'))</RepoRoot>
<SignToolDataPath>$(RepoRoot)build\SignToolData.json</SignToolDataPath>
<VersionsPropsPath>$(RepoRoot)build\Versions.props</VersionsPropsPath>

<!--
RepoToolset props and targets are conditionally imported based on whether RepoToolsetDir is set or not
to allow VS to load packages and perform automatic package restore.
TODO: Remove once we can use a custom SDK (https://github.com/Microsoft/msbuild/issues/1493)
-->
<_RepoToolsetDir>$(NuGetPackageRoot)RoslynTools.Microsoft.RepoToolset\$(RoslynToolsMicrosoftRepoToolsetVersion)\tools\</_RepoToolsetDir>
<RepoToolsetDir Condition="'$(BuildingInsideVisualStudio)' != 'true' or Exists('$(_RepoToolsetDir)')">$(_RepoToolsetDir)</RepoToolsetDir>

<RepositoryUrl>https://github.com/dotnet/roslyn-project-system</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>

<!-- Enables workaround for https://github.com/NuGet/Home/issues/4695. -->
<RepoToolsetQuietRestore>true</RepoToolsetQuietRestore>

<!-- All projects in this repository target the same framework -->
<TargetFramework>net46</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>

<VSSDKTargetPlatformRegRootSuffix Condition="'$(RootSuffix)' != ''">$(RootSuffix)</VSSDKTargetPlatformRegRootSuffix>
<VSSDKTargetPlatformRegRootSuffix Condition="'$(VSSDKTargetPlatformRegRootSuffix)' == ''">ProjectSystem</VSSDKTargetPlatformRegRootSuffix>

<MoqPublicKey>0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7</MoqPublicKey>
</PropertyGroup>

<!--
TODO: Import layout props so that design-time build executed before package restore is finished doesn't
product artifacts into wrong obj directories. Remove once we can use a custom SDK (https://github.com/Microsoft/msbuild/issues/1493)
-->
<Import Project="build\RepoToolset\ProjectLayout.props"/>
</Project>
File renamed without changes.
252 changes: 252 additions & 0 deletions ProjectSystem.sln

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Test.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
powershell -ExecutionPolicy ByPass %~dp0build\Build.ps1 -test %*
exit /b %ErrorLevel%
122 changes: 24 additions & 98 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,103 +3,38 @@ setlocal enabledelayedexpansion

set BatchFile=%0
set Root=%~dp0

set BuildConfiguration=Debug
set MSBuildBuildTarget=Build
set NodeReuse=true
set DeveloperCommandPrompt=%VS150COMNTOOLS%\VsDevCmd.bat
set MSBuildAdditionalArguments=/m
set RunTests=true
set RunIntegrationTests=false
set DeployVsixExtension=true
set FileLoggerVerbosity=detailed
REM Turn on MSBuild async logging to speed up builds
set MSBUILDLOGASYNC=1
set PropRootSuffix=
set OptBuild=$true
set OptRebuild=$false
set OptDeploy=$true
set OptDeployDeps=$false
set OptTest=$true
set OptIntegrationTest=$false
set OptLog=$false

:ParseArguments
if "%1" == "" goto :DoneParsing
if /I "%1" == "/?" call :Usage && exit /b 1
if /I "%1" == "/build" set MSBuildBuildTarget=Build&&shift&& goto :ParseArguments
if /I "%1" == "/rebuild" set MSBuildBuildTarget=Rebuild&&shift&& goto :ParseArguments
if /I "%1" == "/copy-artifacts" set CopyOutputArtifacts=true&&shift&& goto :ParseArguments
if /I "%1" == "/build" set OptBuild=$true&&set OptRebuild=$false&&shift&& goto :ParseArguments
if /I "%1" == "/rebuild" set OptBuild=$false&&set OptRebuild=$true&&shift&& goto :ParseArguments
if /I "%1" == "/debug" set BuildConfiguration=Debug&&shift&& goto :ParseArguments
if /I "%1" == "/release" set BuildConfiguration=Release&&shift&& goto :ParseArguments
if /I "%1" == "/signbuild" set ShouldSignBuild=true&&shift&& goto :ParseArguments
if /I "%1" == "/skiptests" set RunTests=false&&shift&& goto :ParseArguments
if /I "%1" == "/no-deploy-extension" set DeployVsixExtension=false&&shift&& goto :ParseArguments
if /I "%1" == "/no-node-reuse" set NodeReuse=false&&shift&& goto :ParseArguments
if /I "%1" == "/diagnostic" set FileLoggerVerbosity=diagnostic&&set MSBuildAdditionalArguments=&&shift&& goto :ParseArguments
if /I "%1" == "/integrationtests" set RunIntegrationTests=true&&shift&& goto :ParseArguments
if /I "%1" == "/skiptests" set OptTest=$false&&shift&& goto :ParseArguments
if /I "%1" == "/restore-only" set OptBuild=$false&&set OptDeploy=$false&&set OptTest=$false&&shift&& goto :ParseArguments
if /I "%1" == "/no-deploy-extension" set OptDeploy=$false&&shift&& goto :ParseArguments
if /I "%1" == "/diagnostic" set OptLog=$true&&shift&& goto :ParseArguments
if /I "%1" == "/integrationtests" set OptDeployDeps=$true&&set OptIntegrationTest=$true&&shift&& goto :ParseArguments
if /I "%1" == "/rootsuffix" set PropRootSuffix=/p:RootSuffix=%2&&shift&&shift&& goto :ParseArguments
call :Usage && exit /b 1
:DoneParsing

if not exist "%VS150COMNTOOLS%" (
echo To build this repository, this script needs to be run from a Visual Studio 2017 developer command prompt.
echo.
echo If Visual Studio is not installed, visit this page to download:
echo.
echo https://www.visualstudio.com/downloads/
exit /b 1
)

if not exist "%VSSDK150Install%" (
echo To build this repository, you need to modify your Visual Studio installation to include the "Visual Studio extension development" workload.
exit /b 1
)

if "%VisualStudioVersion%" == "" (
REM In Jenkins and MicroBuild, we set VS150COMNTOOLS and VSSDK150Install to point to where VS is installed but don't launch in a developer prompt
call "%DeveloperCommandPrompt%" || goto :BuildFailed
)

set BinariesDirectory=%Root%bin\%BuildConfiguration%\
set LogsDirectory=%BinariesDirectory%Logs\
if not exist "%LogsDirectory%" mkdir "%LogsDirectory%" || goto :BuildFailed

REM We build Restore, Build and BuildModernVsixPackages in different MSBuild processes.
REM Restore because we want to control the verbosity due to https://github.com/NuGet/Home/issues/4695.
REM BuildModernVsixPackages because under MicroBuild, it has a dependency on a dll with the same
REM version but different contents than the legacy VSIX projects.
for %%T IN (Restore, %MSBuildBuildTarget%, %MSBuildBuildTarget%NuGetPackages, BuildModernVsixPackages, Test, TestIntegration) do (

set LogFile=%LogsDirectory%%%T.log

echo.

if "%%T" == "Restore" (
set ConsoleLoggerVerbosity=quiet
echo Restoring packages for ProjectSystem (this may take some time^)
) else (
set ConsoleLoggerVerbosity=minimal
)

set BuildCommand=msbuild /nologo /warnaserror /nodeReuse:%NodeReuse% /consoleloggerparameters:Verbosity=!ConsoleLoggerVerbosity! /fileLogger /fileloggerparameters:LogFile="!LogFile!";verbosity=%FileLoggerVerbosity% /t:"%%T" /p:Configuration="%BuildConfiguration%" /p:RunTests="%RunTests%" /p:RunIntegrationTests="%RunIntegrationTests%" /p:ShouldSignBuild="%ShouldSignBuild%" /p:DeployVsixExtension="%DeployVsixExtension%" "%Root%build\build.proj" %MSBuildAdditionalArguments%
if "%FileLoggerVerbosity%" == "diagnostic" (
echo !BuildCommand!
)

!BuildCommand!

if ERRORLEVEL 1 (
echo.
call :PrintColor Red "Build failed, for full log see !LogFile!."
exit /b 1
)
)

REM Run copy as a final step after all the product components are built
if /I "%CopyOutputArtifacts%" == "true" (
call %ROOT%build\Scripts\CopyOutput.cmd %BinariesDirectory%

REM Robocopy has a return code 0 - 7 on success
if %ERRORLEVEL% gtr 7 goto BuildFailed
)

echo.
call :PrintColor Green "Build completed successfully, for full logs see %LogsDirectory%."
exit /b 0
powershell -ExecutionPolicy ByPass %Root%build\Build.ps1 -configuration %BuildConfiguration% -restore -deployDeps:%OptDeployDeps% -build:%OptBuild% -rebuild:%OptRebuild% -deploy:%OptDeploy% -test:%OptTest% -integrationTest:%OptIntegrationTest% -log:%OptLog% %PropRootSuffix%
exit /b %ERRORLEVEL%

:Usage
echo Usage: %BatchFile% [/build^|/rebuild] [/debug^|/release] [/no-node-reuse] [/no-multi-proc] [/skiptests] [/no-deploy-extension]
echo Usage: %BatchFile% [/build^|/rebuild] [/debug^|/release] [/skiptests] [/no-deploy-extension] [/diagnostic] [/integrationtests] [/rootsuffix hive]
echo.
echo Build targets:
echo /build Perform a build (default)
Expand All @@ -110,19 +45,10 @@ echo /debug Perform debug build (default)
echo /release Perform release build
echo.
echo Build options:
echo /copy-artifacts Copy the nugets to CoreXT Nuget share and VS manifests to separate folder to enable vsdrop upload
echo /diagnostic Turns on diagnostic logging and turns off multi-proc build, useful for diagnosing build logs
echo /no-node-reuse Prevents MSBuild from reusing existing MSBuild instances,
echo useful for avoiding unexpected behavior on build machines
echo /no-deploy-extension Does not deploy the VSIX extension when building the solution
echo /signbuild Produce signed build
echo /restore-only Restore dependencies only
echo /skiptests Does not run unit tests
echo /diagnostic Turns on logging to a binlog
echo /rootsuffix Visual Studio hive to deploy VSIX extensions to (default is ProjectSystem)
echo /no-deploy-extension Does not deploy VSIX extensions when building the solution
echo /integrationtests Runs integration tests
goto :eof

:BuildFailed
call :PrintColor Red "Build failed with ERRORLEVEL %ERRORLEVEL%."
exit /b 1

:PrintColor
"%Windir%\System32\WindowsPowerShell\v1.0\Powershell.exe" write-host -foregroundcolor %1 "'%2'"
3 changes: 3 additions & 0 deletions build/CIBuild.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
powershell -ExecutionPolicy ByPass %~dp0Build.ps1 -restore -build -test -sign -pack -ci %*
exit /b %ErrorLevel%
File renamed without changes.
4 changes: 4 additions & 0 deletions build/Internal/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project>
<!-- Empty - to avoid importing Directory.Build.props in root -->
</Project>
10 changes: 10 additions & 0 deletions build/Internal/Toolset.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Versions.props" />
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.IBCMerge" Version="[$(MicrosoftDotNetIBCMergeVersion)]" />
</ItemGroup>
</Project>
10 changes: 10 additions & 0 deletions build/NuGet.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project>
<PropertyGroup>
<!-- Respect environment variable for the NuGet Packages Root if set; otherwise, use the current default location -->
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == ''">$(NUGET_PACKAGES)</NuGetPackageRoot>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' AND '$(OS)' == 'Windows_NT'">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == '' AND '$(OS)' != 'Windows_NT'">$([System.Environment]::GetFolderPath(SpecialFolder.Personal))\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageRoot Condition="!HasTrailingSlash('$(NuGetPackageRoot)')">$(NuGetPackageRoot)\</NuGetPackageRoot>
</PropertyGroup>
</Project>
16 changes: 16 additions & 0 deletions build/RepoToolset/ProjectLayout.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project>
<!--
Properties describing the layout of the repo specific to the current project.
-->

<Import Project="RepoLayout.props"/>

<PropertyGroup>
<OutDirName Condition="'$(OutDirName)' == ''">$(MSBuildProjectName)</OutDirName>
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">$([System.IO.Path]::GetFullPath('$(ArtifactsBinDir)$(OutDirName)\'))</BaseOutputPath>
<OutputPath>$(BaseOutputPath)</OutputPath>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$([System.IO.Path]::GetFullPath('$(ArtifactsObjDir)$(MSBuildProjectName)\'))</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>
</PropertyGroup>
</Project>
21 changes: 21 additions & 0 deletions build/RepoToolset/RepoLayout.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project>
<!--
Properties describing the layout of the repo.
-->

<PropertyGroup>
<DotNetRoot>$(RepoRoot).dotnet\</DotNetRoot>
<DotNetTool>$(DotNetRoot)dotnet.exe</DotNetTool>
<ArtifactsDir>$(RepoRoot)artifacts\</ArtifactsDir>
<ArtifactsConfigurationDir>$(ArtifactsDir)$(Configuration)\</ArtifactsConfigurationDir>
<ArtifactsBinDir>$(ArtifactsConfigurationDir)bin\</ArtifactsBinDir>
<ArtifactsObjDir>$(ArtifactsConfigurationDir)obj\</ArtifactsObjDir>
<ArtifactsToolsetDir>$(ArtifactsDir)toolset\</ArtifactsToolsetDir>
<ArtifactsTestResultsDir>$(ArtifactsConfigurationDir)TestResults\</ArtifactsTestResultsDir>
<PackageOutputPath>$(ArtifactsConfigurationDir)packages\</PackageOutputPath>
<VisualStudioSetupOutputPath>$(ArtifactsConfigurationDir)VSSetup\</VisualStudioSetupOutputPath>
<VisualStudioSetupInsertionPath>$(VisualStudioSetupOutputPath)Insertion\</VisualStudioSetupInsertionPath>
<VisualStudioSetupIntermediateOutputPath>$(ArtifactsConfigurationDir)VSSetup.obj\</VisualStudioSetupIntermediateOutputPath>
</PropertyGroup>
</Project>
30 changes: 0 additions & 30 deletions build/Rulesets/NonShippingProjectRules.ruleset

This file was deleted.

7 changes: 0 additions & 7 deletions build/Scripts/copyOutput.cmd

This file was deleted.

44 changes: 44 additions & 0 deletions build/SignToolData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"sign": [
{
"certificate": "MicrosoftSHA2",
"strongName": "MsSharedLib72",
"values": [
"bin/Dlls/Microsoft.VisualStudio.AppDesigner.dll",
"bin/Dlls/*/Microsoft.VisualStudio.AppDesigner.resources.dll",
"bin/Dlls/Microsoft.VisualStudio.Editors.dll",
"bin/Dlls/*/Microsoft.VisualStudio.Editors.resources.dll",
"bin/Dlls/Microsoft.VisualStudio.ProjectSystem.CSharp.dll",
"bin/Dlls/Microsoft.VisualStudio.ProjectSystem.CSharp.VS.dll",
"bin/Dlls/*/Microsoft.VisualStudio.ProjectSystem.CSharp.VS.resources.dll",
"bin/Dlls/Microsoft.VisualStudio.ProjectSystem.FSharp.dll",
"bin/Dlls/Microsoft.VisualStudio.ProjectSystem.FSharp.VS.dll",
"bin/Dlls/*/Microsoft.VisualStudio.ProjectSystem.FSharp.VS.resources.dll",
"bin/Dlls/Microsoft.VisualStudio.ProjectSystem.Managed.dll",
"bin/Dlls/*/Microsoft.VisualStudio.ProjectSystem.Managed.resources.dll",
"bin/Dlls/Microsoft.VisualStudio.ProjectSystem.Managed.VS.dll",
"bin/Dlls/*/Microsoft.VisualStudio.ProjectSystem.Managed.VS.resources.dll",
"bin/Dlls/Microsoft.VisualStudio.ProjectSystem.VisualBasic.dll",
"bin/Dlls/Microsoft.VisualStudio.ProjectSystem.VisualBasic.VS.dll",
"bin/Dlls/*/Microsoft.VisualStudio.ProjectSystem.VisualBasic.VS.resources.dll"
]
},
{
"certificate": "VsixSHA2",
"strongName": null,
"values": [
"VSSetup/Microsoft.NetCore.CSharp.ProjectTemplates.Test.vsix",
"VSSetup/Microsoft.NetCore.CSharp.ProjectTemplates.vsix",
"VSSetup/Microsoft.NetCore.FSharp.ProjectTemplates.Test.vsix",
"VSSetup/Microsoft.NetCore.FSharp.ProjectTemplates.vsix",
"VSSetup/Microsoft.NetCore.VB.ProjectTemplates.Test.vsix",
"VSSetup/Microsoft.NetCore.VB.ProjectTemplates.vsix",
"VSSetup/Microsoft.NetStandard.CSharp.ProjectTemplates.vsix",
"VSSetup/Microsoft.NetStandard.FSharp.ProjectTemplates.vsix",
"VSSetup/Microsoft.NetStandard.VB.ProjectTemplates.vsix",
"VSSetup/ProjectSystem.vsix",
"VSSetup/VisualStudioEditorsSetup.vsix"
]
}
]
}
Binary file removed build/Strong Name Keys/35MSSharedLib1024.snk
Binary file not shown.
Binary file removed build/Strong Name Keys/MSFT.snk
Binary file not shown.
Binary file removed build/Strong Name Keys/RoslynInternalKey.Private.snk
Binary file not shown.
Binary file removed build/Strong Name Keys/RoslynInternalKey.Public.snk
Binary file not shown.
Loading