Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions BuildTools.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27121.1
MinimumVisualStudioVersion = 15.0.26730.03
# Visual Studio Version 16
VisualStudioVersion = 16.0.0.0
MinimumVisualStudioVersion = 16.0.0.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A4F4353B-C3D2-40B0-909A-5B48A748EA76}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "files", "files", "{BF3E9C90-F129-4CE6-8F3B-F96831E4429B}"
Expand Down Expand Up @@ -82,10 +82,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGetPackageVerifier", "NuG
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KoreBuild.Tasks.Tests", "test\KoreBuild.Tasks.Tests\KoreBuild.Tasks.Tests.csproj", "{A3A81E93-0157-406F-A43C-C163F7F781A9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{B16B5072-3A0B-4527-8AB5-1C73A51684F7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KoreBuild.Console", "tools\KoreBuild.Console\KoreBuild.Console.csproj", "{02F548A6-B0E9-4F09-BC03-812FC3C8F0D2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiCheckForwardDestination", "test\ApiCheckForwardDestination\ApiCheckForwardDestination.csproj", "{605F0478-A9D2-4A8A-BB38-9D5DC132FBB5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NuGetPackageVerifier.Tests", "test\NuGetPackageVerifier.Tests\NuGetPackageVerifier.Tests.csproj", "{439CC7A3-F6E6-46B8-B6A0-05E22E558FC2}"
Expand Down Expand Up @@ -148,10 +144,6 @@ Global
{A3A81E93-0157-406F-A43C-C163F7F781A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A3A81E93-0157-406F-A43C-C163F7F781A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A3A81E93-0157-406F-A43C-C163F7F781A9}.Release|Any CPU.Build.0 = Release|Any CPU
{02F548A6-B0E9-4F09-BC03-812FC3C8F0D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02F548A6-B0E9-4F09-BC03-812FC3C8F0D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02F548A6-B0E9-4F09-BC03-812FC3C8F0D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02F548A6-B0E9-4F09-BC03-812FC3C8F0D2}.Release|Any CPU.Build.0 = Release|Any CPU
{605F0478-A9D2-4A8A-BB38-9D5DC132FBB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{605F0478-A9D2-4A8A-BB38-9D5DC132FBB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{605F0478-A9D2-4A8A-BB38-9D5DC132FBB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -179,7 +171,6 @@ Global
{020ED083-4076-4711-A52B-2F89EA884F9B} = {BD3545FB-5520-43DF-B4F9-83BEA3A38ECA}
{C0E43505-F8EB-4B7F-B84D-5961F9763945} = {BD3545FB-5520-43DF-B4F9-83BEA3A38ECA}
{A3A81E93-0157-406F-A43C-C163F7F781A9} = {60A938B2-D95A-403C-AA7A-3683AD64DFA0}
{02F548A6-B0E9-4F09-BC03-812FC3C8F0D2} = {B16B5072-3A0B-4527-8AB5-1C73A51684F7}
{605F0478-A9D2-4A8A-BB38-9D5DC132FBB5} = {60A938B2-D95A-403C-AA7A-3683AD64DFA0}
{439CC7A3-F6E6-46B8-B6A0-05E22E558FC2} = {60A938B2-D95A-403C-AA7A-3683AD64DFA0}
EndGlobalSection
Expand Down
12 changes: 6 additions & 6 deletions build/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@
<MonoCecilPackageVersion>0.10.0-beta6</MonoCecilPackageVersion>
<MoqPackageVersion>4.7.99</MoqPackageVersion>
<!-- This one is OK for console tools that bundle their own version of JSON.NET -->
<NewtonsoftJsonPackageVersion>10.0.1</NewtonsoftJsonPackageVersion>
<NewtonsoftJsonPackageVersion>12.0.1</NewtonsoftJsonPackageVersion>
<NuGetPackagingPackageVersion>4.7.0-rtm.5148</NuGetPackagingPackageVersion>
<NuGetProjectModelPackageVersion>4.7.0-rtm.5148</NuGetProjectModelPackageVersion>
<VSWherePackageVersion>2.2.7</VSWherePackageVersion>
<XunitPackageVersion>2.3.1</XunitPackageVersion>
<XunitRunnerVisualStudioPackageVersion>2.3.1</XunitRunnerVisualStudioPackageVersion>
<XunitPackageVersion>2.4.1</XunitPackageVersion>
<XunitRunnerVisualStudioPackageVersion>2.4.1</XunitRunnerVisualStudioPackageVersion>
</PropertyGroup>

<!--
Attempt to keep these mostly aligned with https://github.com/dotnet/toolset/blob/master/build/DependencyVersions.props
Attempt to keep these mostly aligned with https://github.com/dotnet/toolset/blob/master/env/Versions.props
and with the version of MSBuild used by KoreBuild.
MSBuild will prefer the assemblies that ship in the .NET Core SDK and MSbuild. The dependency versions here don't matter
as long as the version we compile for is binary compatible with what the .NET Core SDK uses.
-->
<PropertyGroup>
<MicrosoftBuildPackageVersion>15.9.19</MicrosoftBuildPackageVersion>
<MicrosoftBuildPackageVersion>16.0.0-preview.383</MicrosoftBuildPackageVersion>
<MicrosoftBuildFrameworkPackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildFrameworkPackageVersion>
<MicrosoftBuildUtilitiesCorePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildUtilitiesCorePackageVersion>
<MicrosoftBuildTasksCorePackageVersion>$(MicrosoftBuildPackageVersion)</MicrosoftBuildTasksCorePackageVersion>
<Tooling_NewtonsoftJsonPackageVersion>9.0.1</Tooling_NewtonsoftJsonPackageVersion>
<Tooling_NuGetBuildTasksPackageVersion>4.9.0-preview3.5473</Tooling_NuGetBuildTasksPackageVersion>
<Tooling_NuGetBuildTasksPackageVersion>5.0.0-preview1.5663</Tooling_NuGetBuildTasksPackageVersion>
</PropertyGroup>

<!-- These are set to flow into RepoTasks.csproj -->
Expand Down
1 change: 0 additions & 1 deletion build/repo.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

<ItemGroup>
<KoreBuildModule Include="BuildTools.Tasks" />
<KoreBuildModule Include="BundledPackages" />
<KoreBuildModule Include="KoreBuild.Tasks" />
<KoreBuildModule Include="NuGetPackageVerifier" />
</ItemGroup>
Expand Down
11 changes: 0 additions & 11 deletions build/repo.targets
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,6 @@
<Error Text="Missing property: KoreBuildChannel" Condition="'$(KoreBuildChannel)' == ''" />
<Error Text="Missing property: Version" Condition="'$(Version)' == ''" />

<ItemGroup>
<_ToolsProjects Include="$(RepositoryRoot)tools\KoreBuild.Console\KoreBuild.Console.csproj">
<AdditionalProperties>PublishDir=$(_KoreBuildIntermediateDir)\tools\%(Identity)\</AdditionalProperties>
</_ToolsProjects>
</ItemGroup>

<MSBuild Targets="Publish"
Projects="@(_ToolsProjects)"
Properties="$(BuildProperties)"
BuildInParallel="true" />

<ItemGroup>
<Content Include="$(RepositoryRoot)files\KoreBuild\**\*" />
<VersionFileLines Include="version:$(Version)" />
Expand Down
1 change: 0 additions & 1 deletion build/tasks/RepoTasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<Compile Include="..\..\modules\BuildTools.Tasks\GenerateSvgBadge.cs" />
<Compile Include="..\..\modules\BuildTools.Tasks\RunBase.cs" />
<Compile Include="..\..\modules\BuildTools.Tasks\RunDotNet.cs" />
<Compile Include="..\..\modules\BuildTools.Tasks\ZipArchive.cs" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), version.props))\build\sdk.targets" />
Expand Down
File renamed without changes.
10 changes: 0 additions & 10 deletions docs/Logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,3 @@ KoreBuild produces log files to $(RepositoryRoot)/artifacts/logs. The following
Using `build.cmd -Verbose` will produce a binary log file to artifacts/logs/msbuild.binlog.

See <http://msbuildlog.com> for details.

## TeamCity Logger

KoreBuild can produce log messages for TeamCity by using <https://github.com/JetBrains/TeamCity.MSBuild.Logger>.

To configure this,

1. Download the logger from JetBrains. https://github.com/JetBrains/TeamCity.MSBuild.Logger#download
2. Install this on CI agents.
3. Set the environment variable `KOREBUILD_TEAMCITY_LOGGER` to the file path of TeamCity.MSBuild.Logger.dll on CI agents.
87 changes: 0 additions & 87 deletions docs/PackageReferenceManagement.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/Sdk.md

This file was deleted.

4 changes: 2 additions & 2 deletions files/KoreBuild/KoreBuild.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Default layout and configuration.
<RepositoryRoot>$([MSBuild]::NormalizeDirectory('$(RepositoryRoot)'))</RepositoryRoot>
<ArtifactsDir>$([MSBuild]::NormalizeDirectory('$(RepositoryRoot)'))artifacts\</ArtifactsDir>
<BuildDir>$(ArtifactsDir)build\</BuildDir>
<LogOutputDir>$(ArtifactsDir)logs\</LogOutputDir>
<IntermediateDir>$([MSBuild]::NormalizeDirectory('$(RepositoryRoot)'))obj\</IntermediateDir>
<LogOutputDir Condition="'$(LogOutputDir)' == ''">$(ArtifactsDir)logs\</LogOutputDir>
<IntermediateDir Condition="'$(IntermediateDir)' == ''">$([MSBuild]::NormalizeDirectory('$(RepositoryRoot)'))obj\</IntermediateDir>

<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(NUGET_PACKAGES)</NuGetPackageRoot>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' AND '$(USERPROFILE)' != '' ">$(USERPROFILE)\.nuget\packages\</NuGetPackageRoot>
Expand Down
23 changes: 2 additions & 21 deletions files/KoreBuild/KoreBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,8 @@ invoke_korebuild_command(){
elif [ "$command" = "install-tools" ]; then
__install_tools "$tools_source" "$dot_net_home"
else
__ensure_dotnet

kore_build_console_dll="$__korebuild_dir/tools/KoreBuild.Console.dll"

__exec dotnet "$kore_build_console_dll" "$command" \
--tools-source "$tools_source" \
--dotnet-home "$dot_net_home" \
--repo-path "$repo_path" \
"$@"
__error "Unrecognized command '$command'"
exit 1
fi
}

Expand Down Expand Up @@ -129,18 +122,6 @@ __install_tools() {

# Set environment variables
export PATH="$install_dir:$PATH"

# This is a workaround for https://github.com/Microsoft/msbuild/issues/2914.
# Currently, the only way to configure the NuGetSdkResolver is with NuGet.config, which is not generally used in aspnet org projects.
# This project is restored so that it pre-populates the NuGet cache with SDK packages.
local restorerfile="$__korebuild_dir/modules/BundledPackages/BundledPackageRestorer.csproj"
local restorerfilelock="$NUGET_PACKAGES/internal.aspnetcore.sdk/$(__get_korebuild_version)/korebuild.sentinel"
if [[ -e "$restorerfile" ]] && [[ ! -e "$restorerfilelock" ]]; then
mkdir -p "$(dirname $restorerfilelock)"
touch "$restorerfilelock"
__exec dotnet msbuild -t:restore -v:q "$restorerfile"
fi
# end workaround
}

__show_version_info() {
Expand Down
2 changes: 1 addition & 1 deletion files/KoreBuild/config/sdk.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.100-preview-009750
3.0.100-preview-010184
22 changes: 8 additions & 14 deletions files/KoreBuild/scripts/KoreBuild.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,6 @@ function Install-Tools(
else {
Write-Host -ForegroundColor DarkGray ".NET Core SDK $version is already installed. Skipping installation."
}

# This is a workaround for https://github.com/Microsoft/msbuild/issues/2914.
# Currently, the only way to configure the NuGetSdkResolver is with NuGet.config, which is not generally used in aspnet org projects.
# This project is restored so that it pre-populates the NuGet cache with SDK packages.
$restorerfile = "$PSScriptRoot/../modules/BundledPackages/BundledPackageRestorer.csproj"
$restorerfilelock="$env:NUGET_PACKAGES/internal.aspnetcore.sdk/$(Get-KoreBuildVersion)/korebuild.sentinel"
if ((Test-Path $restorerfile) -and -not (Test-Path $restorerfilelock)) {
New-Item -ItemType Directory $(Split-Path -Parent $restorerfilelock) -ErrorAction Ignore | Out-Null
New-Item -ItemType File $restorerfilelock -ErrorAction Ignore | Out-Null
__exec $global:dotnet msbuild '-t:restore' '-v:q' "$restorerfile"
}
# end workaround
}

<#
Expand Down Expand Up @@ -492,8 +480,14 @@ function Get-MSBuildPath() {
}

Write-Verbose "vswhere = $vswherePath $vswhereArgs"

$installations = & $vswherePath @vswhereArgs | Out-String | ConvertFrom-Json
$vswhereOut = & $vswherePath @vswhereArgs | Out-String
try {
$installations = $vswhereOut | ConvertFrom-Json
}
catch {
Write-Host -f Red "vswhere output = $vswhereOut"
throw $_
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious (only): What changed that requires this try / catch now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing changed. I added this to improve console output when something goes wrong. I was making testing changes to the vswhere code which had a bug and the error was hidden. I added this so I could see the problem, and figured it might be generally useful for the future.


$latest = $null
if ($installations) {
Expand Down
5 changes: 0 additions & 5 deletions modules/BuildTools.Tasks/BuildTools.Tasks.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
<UsingTask TaskName="Microsoft.AspNetCore.BuildTools.$(_BuildTasksPrefix)GenerateFileFromTemplate" AssemblyFile="$(_BuildToolsAssembly)" />
<UsingTask TaskName="Microsoft.AspNetCore.BuildTools.$(_BuildTasksPrefix)GetAssemblyFileVersion" AssemblyFile="$(_BuildToolsAssembly)" />
<UsingTask TaskName="Microsoft.AspNetCore.BuildTools.$(_BuildTasksPrefix)GenerateSvgBadge" AssemblyFile="$(_BuildToolsAssembly)" />
<UsingTask TaskName="Microsoft.AspNetCore.BuildTools.$(_BuildTasksPrefix)SetEnvironmentVariable" AssemblyFile="$(_BuildToolsAssembly)" />
<UsingTask TaskName="Microsoft.AspNetCore.BuildTools.$(_BuildTasksPrefix)UpdatePackageSource" AssemblyFile="$(_BuildToolsAssembly)" />
<UsingTask TaskName="Microsoft.AspNetCore.BuildTools.$(_BuildTasksPrefix)WaitForDebugger" AssemblyFile="$(_BuildToolsAssembly)" />
<UsingTask TaskName="Microsoft.AspNetCore.BuildTools.$(_BuildTasksPrefix)ZipArchive" AssemblyFile="$(_BuildToolsAssembly)" />
<UsingTask TaskName="Microsoft.AspNetCore.BuildTools.$(_BuildTasksPrefix)UnzipArchive" AssemblyFile="$(_BuildToolsAssembly)" />
<UsingTask TaskName="Microsoft.AspNetCore.BuildTools.$(_BuildTasksPrefix)Run" AssemblyFile="$(_BuildToolsAssembly)" />
<UsingTask TaskName="Microsoft.AspNetCore.BuildTools.$(_BuildTasksPrefix)RunDotNet" AssemblyFile="$(_BuildToolsAssembly)" />

Expand Down
41 changes: 0 additions & 41 deletions modules/BuildTools.Tasks/SetEnvironmentVariable.cs

This file was deleted.

Loading