This commit is contained in:
Tomas Matousek 2017-07-24 13:38:21 -07:00
Родитель 3a8aa7a588
Коммит 7c0287b96d
12 изменённых файлов: 44 добавлений и 57 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -16,6 +16,7 @@ x64/
[Bb]in/
[Oo]bj/
.dotnet/
.tools/
# Per-user project properties
launchSettings.json

Просмотреть файл

@ -13,9 +13,5 @@
<RepositoryUrl>https://github.com/dotnet/symreader-converter</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
<!-- SourceLink: Generate source link when building in microbuild. -->
<SourceLinkCreate Condition="'$(BUILD_BUILDNUMBER)' != ''">true</SourceLinkCreate>
<SourceLinkRepo>$(RepoRoot)</SourceLinkRepo>
</PropertyGroup>
</Project>

Просмотреть файл

@ -4,11 +4,11 @@
"certificate": "MicrosoftSHA2",
"strongName": "MsSharedLib72",
"values": [
"Microsoft.DiaSymReader.Converter/netstandard1.3/Microsoft.DiaSymReader.Converter.dll",
"Microsoft.DiaSymReader.Converter/net45/Microsoft.DiaSymReader.Converter.dll",
"Microsoft.DiaSymReader.Converter.Xml/netstandard1.3/Microsoft.DiaSymReader.Converter.Xml.dll",
"Pdb2Xml/net46/Pdb2Xml.exe",
"Pdb2Pdb/net46/Pdb2Pdb.exe"
"bin/Microsoft.DiaSymReader.Converter/netstandard1.3/Microsoft.DiaSymReader.Converter.dll",
"bin/Microsoft.DiaSymReader.Converter/net45/Microsoft.DiaSymReader.Converter.dll",
"bin/Microsoft.DiaSymReader.Converter.Xml/netstandard1.3/Microsoft.DiaSymReader.Converter.Xml.dll",
"bin/Pdb2Xml/net46/Pdb2Xml.exe",
"bin/Pdb2Pdb/net46/Pdb2Pdb.exe"
]
}
]

Просмотреть файл

@ -1,19 +1,9 @@
<!-- 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>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<!-- Output dir for restore artifacts -->
<BaseIntermediateOutputPath>$(MSBuildThisProjectDirectory)..\..\artifacts\Toolset</BaseIntermediateOutputPath>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<ItemGroup>
<PackageReference Include="RoslynTools.Microsoft.RepoToolset" Version="$(RoslynToolsMicrosoftRepoToolsetVersion)" />
<PackageReference Include="RoslynTools.Microsoft.XUnitLogger" Version="$(RoslynToolsMicrosoftXUnitLoggerVersion)" />
<PackageReference Include="RoslynTools.Microsoft.SignTool" Version="$(RoslynToolsMicrosoftSignToolVersion)" />
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildCoreVersion)" />
<PackageReference Include="MicroBuild.Core.Sentinel" Version="1.0.0" />
<PackageReference Include="Microsoft.Net.Compilers" Version="$(MicrosoftNetCompilersVersion)" />
<PackageReference Include="SourceLink.Create.CommandLine" Version="$(SourceLinkCreateCommandLineVersion)" PrivateAssets="all" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

Просмотреть файл

@ -5,20 +5,11 @@
<VersionBase>1.1.0</VersionBase>
<PreReleaseVersionLabel>beta1</PreReleaseVersionLabel>
<!-- Toolset -->
<RoslynToolsMicrosoftRepoToolsetVersion>1.0.0-alpha14</RoslynToolsMicrosoftRepoToolsetVersion>
<RoslynToolsMicrosoftXUnitLoggerVersion>1.0.0-alpha1</RoslynToolsMicrosoftXUnitLoggerVersion>
<RoslynToolsMicrosoftSignToolVersion>0.3.2-beta</RoslynToolsMicrosoftSignToolVersion>
<DotNetCliVersion>2.0.0-preview3-006841</DotNetCliVersion>
<MicroBuildCoreVersion>0.2.0</MicroBuildCoreVersion>
<MicroBuildPluginsSwixBuildVersion>1.0.101</MicroBuildPluginsSwixBuildVersion>
<MicrosoftNetCompilersVersion>2.0.1</MicrosoftNetCompilersVersion>
<SourceLinkCreateCommandLineVersion>2.1.0</SourceLinkCreateCommandLineVersion>
<UsingToolXliff>false</UsingToolXliff>
<!-- Tests -->
<MicrosoftNETTestSdkVersion>15.0.0-preview-20170125-04</MicrosoftNETTestSdkVersion>
<XUnitVersion>2.2.0-beta4-build3444</XUnitVersion>
<XUnitRunnerVisualStudioVersion>2.2.0-beta4-build1194</XUnitRunnerVisualStudioVersion>
<!-- Toolset -->
<DotNetCliVersion>2.0.0-preview3-006770</DotNetCliVersion>
<RoslynToolsMicrosoftRepoToolsetVersion>1.0.0-alpha29</RoslynToolsMicrosoftRepoToolsetVersion>
<!-- libs -->
<MicrosoftDiaSymReaderVersion>1.2.0-beta1-61723-01</MicrosoftDiaSymReaderVersion>

Просмотреть файл

@ -6,9 +6,11 @@
CIBuild "true" if building on CI server
Restore "true" to restore toolset and solution
Build "true" to build solution
Rebuild "true" to rebuild solution
Test "true" to run tests
Sign "true" to sign built binaries
Pack "true" to build NuGet packages
Properties List of properties to pass to each build phase ("Name=Value;Name=Value;...")
-->
<PropertyGroup>
<SolutionPath Condition="'$(SolutionPath)' == ''">$(MSBuildThisFileDirectory)..\SymReaderConverter.sln</SolutionPath>
@ -17,9 +19,12 @@
<Import Project="..\Directory.build.props"/>
<Target Name="Build">
<MSBuild Projects="Toolset.proj" Targets="Restore" Condition="'$(Restore)' == 'true'"/>
<MSBuild Projects="Toolset.proj"
Targets="Restore"
Properties="BaseIntermediateOutputPath=$(MSBuildThisFileDirectory)..\artifacts\toolset\;ExcludeRestorePackageImports=true;DeployDeps=$(DeployDeps)"
Condition="'$(Restore)' == 'true'"/>
<MSBuild Projects="$(RepoToolsetDir)Build.proj"
Properties="SolutionPath=$(SolutionPath);Configuration=$(Configuration);CIBuild=$(CIBuild);Restore=$(Restore);Build=$(Build);Test=$(Test);Sign=$(Sign);Pack=$(Pack)" />
Properties="SolutionPath=$(SolutionPath);Configuration=$(Configuration);CIBuild=$(CIBuild);Restore=$(Restore);Build=$(Build);Rebuild=$(Rebuild);Test=$(Test);Sign=$(Sign);Pack=$(Pack);Properties=$(Properties)" />
</Target>
</Project>

Просмотреть файл

@ -2,13 +2,16 @@
Param(
[string] $configuration = "Debug",
[string] $solution = "",
[string] $verbosity = "normal",
[string] $verbosity = "minimal",
[switch] $restore,
[switch] $build,
[switch] $rebuild,
[switch] $test,
[switch] $sign,
[switch] $pack,
[switch] $ci
[switch] $ci,
[switch] $clearCaches,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)
set-strictmode -version 2.0
@ -20,7 +23,7 @@ $DotNetExe = Join-Path $DotNetRoot "dotnet.exe"
$BuildProj = Join-Path $PSScriptRoot "build.proj"
$DependenciesProps = Join-Path $PSScriptRoot "Versions.props"
$ArtifactsDir = Join-Path $RepoRoot "artifacts"
$LogDir = Join-Path $ArtifactsDir "log"
$LogDir = Join-Path (Join-Path $ArtifactsDir $configuration) "log"
$TempDir = Join-Path (Join-Path $ArtifactsDir $configuration) "tmp"
function Create-Directory([string[]] $path) {
@ -49,13 +52,14 @@ function InstallDotNetCli {
}
function Build {
$summaryLog = Join-Path $LogDir "Build.log"
$warningLog = Join-Path $LogDir "Build.wrn"
$errorLog = Join-Path $LogDir "Build.err"
if ($ci) {
Create-Directory($logDir)
$binlog = "/bl:" + (Join-Path $LogDir "Build.binlog")
} else {
$binlog = ""
}
& $DotNetExe msbuild $BuildProj /p:Configuration=$configuration /p:SolutionPath=$solution /p:Restore=$restore /p:Build=$build /p:Test=$test /p:Sign=$sign /p:Pack=$pack /p:CIBuild=$ci /v:$verbosity /flp1:Summary`;Verbosity=diagnostic`;Encoding=UTF-8`;LogFile=$summaryLog /flp2:WarningsOnly`;Verbosity=diagnostic`;Encoding=UTF-8`;LogFile=$warningLog /flp3:ErrorsOnly`;Verbosity=diagnostic`;Encoding=UTF-8`;LogFile=$errorLog
& $DotNetExe msbuild $BuildProj /m /v:$verbosity $binlog /p:Configuration=$configuration /p:SolutionPath=$solution /p:Restore=$restore /p:Build=$build /p:Rebuild=$rebuild /p:Test=$test /p:Sign=$sign /p:Pack=$pack /p:CIBuild=$ci $properties
if ($lastExitCode -ne 0) {
throw "Build failed (exit code '$lastExitCode')."
@ -68,6 +72,12 @@ if ($ci) {
$env:TMP = $TempDir
}
# clean nuget packages -- necessary to avoid mismatching versions of swix microbuild build plugin and VSSDK on Jenkins
$nugetRoot = (Join-Path $env:USERPROFILE ".nuget\packages")
if ($clearCaches -and (Test-Path $nugetRoot)) {
Remove-Item $nugetRoot -Recurse -Force
}
if ($restore) {
InstallDotNetCli
}

Просмотреть файл

@ -2,6 +2,4 @@
<Project>
<!-- This file is imported by all projects at the end of the project files -->
<Import Project="$(RepoToolsetDir)Imports.targets" />
<!-- Source link -->
<Import Project="$(NuGetPackageRoot)SourceLink.Create.CommandLine\$(SourceLinkCreateCommandLineVersion)\build\SourceLink.Create.CommandLine.targets" />
</Project>

Просмотреть файл

@ -8,7 +8,7 @@ using Xunit;
namespace Microsoft.DiaSymReader.Tools.UnitTests
{
internal class MetadataUtilitiesTests
public class MetadataUtilitiesTests
{
[Fact]
public void SerializeDynamicInfo()

Просмотреть файл

@ -1,3 +0,0 @@
{
"shadowCopy": false
}

Просмотреть файл

@ -600,7 +600,6 @@ namespace Microsoft.DiaSymReader.Tools
}
declaredExternAliases.Clear();
aliasedAssemblyRefs.Clear();
}
private static void AddExternAliases(HashSet<string> externAliases, MetadataReader pdbReader, ImportScopeHandle importScopeHandle)
@ -734,6 +733,9 @@ namespace Microsoft.DiaSymReader.Tools
case ImportDefinitionKind.AliasAssemblyNamespace:
case ImportDefinitionKind.ImportAssemblyNamespace:
// C#
// The import string uses extern alias to represent an assembly reference.
// Find one that is declared within the current scope.
string assemblyRefAlias = TryGetAssemblyReferenceAlias(import.TargetAssembly, declaredExternAliases, aliasedAssemblyRefs);
if (assemblyRefAlias == null)
{

Просмотреть файл

@ -1,3 +0,0 @@
{
"shadowCopy": false
}