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
13 changes: 7 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PackageOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\NuGet\</PackageOutputPath>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<AnalysisLevel>latest</AnalysisLevel>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<Company>Microsoft</Company>
Expand All @@ -19,17 +20,17 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<MicroBuildVersion>2.0.61</MicroBuildVersion>
<MicroBuildVersion>2.0.65</MicroBuildVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="all" Condition=" '$(MSBuildProjectName)' != 'SosThreadingTools' " />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.2.31" PrivateAssets="all" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.7.0" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.164" PrivateAssets="all" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.9.0-3.final" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.261" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/Convert-PDB.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[string]$OutputPath
)

$version = '1.1.0-beta2-20115-01'
$version = '1.1.0-beta2-21101-01'
$baseDir = "$PSScriptRoot\..\obj\tools"
$pdb2pdbpath = "$baseDir\Microsoft.DiaSymReader.Pdb2Pdb.$version\tools\Pdb2Pdb.exe"
if (-not (Test-Path $pdb2pdbpath)) {
Expand Down
3 changes: 2 additions & 1 deletion azure-pipelines/official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ stages:
inputs:
SymbolsFeatureName: $(SymbolsFeatureName)
SymbolsSymwebProject: VS
SymbolsUncPath: \\cpvsbuild\drops\$(TeamName)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\Symbols.Archival
SymbolsUncPath: \\cpvsbuild\drops\$(TeamName)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildId)\Symbols.Archival
SymbolsEmailContacts: vsidemicrobuild
SymbolsAgentPath: $(Pipeline.Workspace)/symbols-Windows
- task: MicroBuildCleanup@1
Expand Down Expand Up @@ -102,3 +102,4 @@ stages:
packagesToPush: $(Pipeline.Workspace)/deployables-Windows/NuGet/*.nupkg
nuGetFeedType: external
publishFeedCredentials: azure-public/vssdk
continueOnError: true # until "skip on conflict" is offered as a task input.
2 changes: 1 addition & 1 deletion azure-pipelines/publish-codecoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ steps:
displayName: Download macOS code coverage results
continueOnError: true
- powershell: |
dotnet tool install --tool-path obj dotnet-reportgenerator-globaltool --version 4.2.2 --configfile azure-pipelines/justnugetorg.nuget.config
dotnet tool install --tool-path obj dotnet-reportgenerator-globaltool --version 4.8.5 --configfile azure-pipelines/justnugetorg.nuget.config
Copy-Item -Recurse $(Pipeline.Workspace)/coverageResults-Windows/obj/* $(System.DefaultWorkingDirectory)/obj
Write-Host "Substituting {reporoot} with $(System.DefaultWorkingDirectory)"
$reports = Get-ChildItem -Recurse "$(Pipeline.Workspace)/coverage.*.cobertura.xml"
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"sdk": {
"version": "3.1.302",
"version": "5.0.102",
"rollForward": "patch",
"allowPrerelease": false
},
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "2.0.54"
"MSBuild.Sdk.Extras": "3.0.23"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.8.2" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.0.0" PrivateAssets="all" />
<PackageReference Include="MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" />
<PackageReference Include="XliffTasks" Version="1.0.0-beta.19503.1" PrivateAssets="all" />
<PackageReference Include="XliffTasks" Version="1.0.0-beta.19505.1" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.VisualStudio.Threading.Analyzers\Microsoft.VisualStudio.Threading.Analyzers.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis" Version="2.8.2" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.0.0" PrivateAssets="all" />
<PackageReference Include="MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="2.8.2" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.0.0" PrivateAssets="all" />
<PackageReference Include="MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" />
<PackageReference Include="XliffTasks" Version="1.0.0-beta.19503.1" PrivateAssets="all" />
<PackageReference Include="XliffTasks" Version="1.0.0-beta.19505.1" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.VisualStudio.Threading.Analyzers\Microsoft.VisualStudio.Threading.Analyzers.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="2.8.2" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.0.0" PrivateAssets="all" />
<PackageReference Include="MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" />
<PackageReference Include="Nullable" Version="1.2.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="XliffTasks" Version="1.0.0-beta.19503.1" PrivateAssets="all" />
<PackageReference Include="XliffTasks" Version="1.0.0-beta.19505.1" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net472</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>

<Summary>Async synchronization primitives, async collections, TPL and dataflow extensions.</Summary>
<Description>Async synchronization primitives, async collections, TPL and dataflow extensions. The JoinableTaskFactory allows synchronously blocking the UI thread for async work. This package is applicable to any .NET application (not just Visual Studio).</Description>
Expand Down Expand Up @@ -40,14 +41,12 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslyn.Diagnostics.Analyzers" Version="3.3.0-beta2.final" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.0-beta2.final" PrivateAssets="all" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Validation" Version="16.8.33" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0" PrivateAssets="all" />
<PackageReference Include="XliffTasks" Version="1.0.0-beta.19503.1" PrivateAssets="all" />
<PackageReference Include="XliffTasks" Version="1.0.0-beta.19505.1" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<!-- We don't consume the analyzers in this library itself,
Expand Down
1 change: 0 additions & 1 deletion src/SosThreadingTools/SosThreadingTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="2.0.145301" />
<PackageReference Include="Microsoft.Diagnostics.Runtime.Utilities" Version="2.0.0-rc.20303.3" />
<PackageReference Include="DllExport" Version="1.5.2" />
<PackageReference Include="MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" PrivateAssets="all" />
</ItemGroup>
<Import Project="$(PkgDllExport)\tools\net.r_eg.DllExport.targets" Condition="Exists('$(PkgDllExport)\tools\net.r_eg.DllExport.targets')" />
<Import Project="SosThreadingTools.targets" />
Expand Down
2 changes: 1 addition & 1 deletion test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MicroBuild.NonShipping" Version="$(MicroBuildVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Internal.MicroBuild.NonShipping" Version="$(MicroBuildVersion)" PrivateAssets="all" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MicroBuild.Nonshipping" Version="$(MicroBuildVersion)" />
<PackageReference Include="MicroBuild.VisualStudio" Version="$(MicroBuildVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.0.1-beta1.20374.2" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.CodeFix.Testing.XUnit" Version="1.0.1-beta1.20374.2" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="2.8.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers.Tests
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Testing;
using Xunit;
using static VSTHRD010MainThreadUsageAnalyzer;
using static Microsoft.VisualStudio.Threading.Analyzers.VSTHRD010MainThreadUsageAnalyzer;
using Verify = CSharpCodeFixVerifier<VSTHRD010MainThreadUsageAnalyzer, VSTHRD010MainThreadUsageCodeFix>;

public class VSTHRD010MainThreadUsageAnalyzerTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers.Tests
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Testing;
using Xunit;
using static VSTHRD103UseAsyncOptionAnalyzer;
using static Microsoft.VisualStudio.Threading.Analyzers.VSTHRD103UseAsyncOptionAnalyzer;
using Verify = CSharpCodeFixVerifier<VSTHRD103UseAsyncOptionAnalyzer, VSTHRD103UseAsyncOptionCodeFix>;

public class VSTHRD103UseAsyncOptionAnalyzerTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.VisualStudio.Threading\Microsoft.VisualStudio.Threading.csproj" />
<PackageReference Include="MicroBuild.Nonshipping" Version="$(MicroBuildVersion)" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2620,7 +2620,8 @@ async delegate
},
null);
await delegateExecuted;
}).Wait(TestTimeout), "Timed out waiting for completion.");
}).Wait(TestTimeout),
"Timed out waiting for completion.");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="2.9.0" />
<PackageReference Include="MicroBuild.Nonshipping" Version="$(MicroBuildVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Nullable" Version="1.2.1">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ await this.semaphore.ExecuteAsync(
Assert.Equal(originalThreadId, Environment.CurrentManagedThreadId);
executed = true;
return Task.CompletedTask;
}, this.TimeoutToken);
},
this.TimeoutToken);
Assert.True(executed);
});
}
Expand All @@ -115,7 +116,8 @@ public void ExecuteAsync_InvokesDelegateInOriginalContext_WithContention(Reentra
Assert.Equal(originalThreadId, Environment.CurrentManagedThreadId);
executed = true;
return Task.CompletedTask;
}, this.TimeoutToken);
},
this.TimeoutToken);

releaseHolder.Set();
await waiter.WithCancellation(this.TimeoutToken);
Expand All @@ -138,7 +140,8 @@ public void ExecuteAsync_OfT_InvokesDelegateInOriginalContext_NoContention(Reent
Assert.Equal(originalThreadId, Environment.CurrentManagedThreadId);
executed = true;
return new ValueTask<int>(5);
}, this.TimeoutToken);
},
this.TimeoutToken);
Assert.Equal(5, result);
Assert.True(executed);
});
Expand All @@ -162,7 +165,8 @@ public void ExecuteAsync_OfT_InvokesDelegateInOriginalContext_WithContention(Ree
Assert.Equal(originalThreadId, Environment.CurrentManagedThreadId);
executed = true;
return new ValueTask<int>(5);
}, this.TimeoutToken);
},
this.TimeoutToken);

releaseHolder.Set();
int result = await waiter.AsTask().WithCancellation(this.TimeoutToken);
Expand Down
15 changes: 13 additions & 2 deletions tools/Install-DotNetSdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ if ($DotNetInstallDir) {
}

if ($IsMacOS -or $IsLinux) {
$DownloadUri = "https://dot.net/v1/dotnet-install.sh"
$DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/1ebb108764c092e7a314ff3fe1388f582cbcf89a/src/dotnet-install.sh"
$DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.sh"
} else {
$DownloadUri = "https://dot.net/v1/dotnet-install.ps1"
$DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/1ebb108764c092e7a314ff3fe1388f582cbcf89a/src/dotnet-install.ps1"
$DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.ps1"
}

Expand All @@ -149,10 +149,16 @@ if (-not (Test-Path $DotNetInstallScriptPath)) {
}

$anythingInstalled = $false
$global:LASTEXITCODE = 0

if ($PSCmdlet.ShouldProcess(".NET Core SDK $sdkVersion", "Install")) {
$anythingInstalled = $true
Invoke-Expression -Command "$DotNetInstallScriptPath -Version $sdkVersion $switches"

if ($LASTEXITCODE -ne 0) {
Write-Error ".NET SDK installation failure: $LASTEXITCODE"
exit $LASTEXITCODE
}
} else {
Invoke-Expression -Command "$DotNetInstallScriptPath -Version $sdkVersion $switches -DryRun"
}
Expand All @@ -163,6 +169,11 @@ $runtimeVersions | Get-Unique |% {
if ($PSCmdlet.ShouldProcess(".NET Core runtime $_", "Install")) {
$anythingInstalled = $true
Invoke-Expression -Command "$DotNetInstallScriptPath -Channel $_ $switches"

if ($LASTEXITCODE -ne 0) {
Write-Error ".NET SDK installation failure: $LASTEXITCODE"
exit $LASTEXITCODE
}
} else {
Invoke-Expression -Command "$DotNetInstallScriptPath -Channel $_ $switches -DryRun"
}
Expand Down