Skip to content
Closed
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
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" />
<PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageVersion Include="McMaster.Extensions.Hosting.CommandLine" Version="4.1.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0-2.25413.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic" Version="5.0.0-2.25413.1" />
<PackageVersion Include="Microsoft.DiaSymReader.Converter.Xml" Version="1.1.0-beta2-22171-02" />
<PackageVersion Include="Microsoft.DiaSymReader" Version="1.4.0" />
<PackageVersion Include="Microsoft.DiaSymReader.Native" Version="17.0.0-beta1.21524.1" />
Expand Down
32 changes: 25 additions & 7 deletions ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,18 @@ abstract class AbstractToolset
readonly SourceCacheContext cache;
readonly SourceRepository repository;
readonly FindPackageByIdResource resource;
readonly SourceRepository repository5;
readonly FindPackageByIdResource resource5;

protected readonly string baseDir;

public AbstractToolset(string baseDir)
{
this.cache = new SourceCacheContext();
this.repository = Repository.Factory.GetCoreV3("https://api.nuget.org/v3/index.json");
this.resource = repository.GetResource<FindPackageByIdResource>();
this.repository5 = Repository.Factory.GetCoreV3("https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json");
this.resource5 = repository5.GetResource<FindPackageByIdResource>();
this.baseDir = baseDir;
}

Expand All @@ -68,13 +73,26 @@ protected async Task FetchPackage(string packageName, string version, string sou
{
packageStream = new MemoryStream();

await resource.CopyNupkgToStreamAsync(
packageName,
NuGetVersion.Parse(version),
packageStream,
cache,
logger,
cancellationToken).ConfigureAwait(false);
if (version.StartsWith("5"))
{
await resource5.CopyNupkgToStreamAsync(
packageName,
NuGetVersion.Parse(version),
packageStream,
cache,
logger,
cancellationToken).ConfigureAwait(false);
}
else
{
await resource.CopyNupkgToStreamAsync(
packageName,
NuGetVersion.Parse(version),
packageStream,
cache,
logger,
cancellationToken).ConfigureAwait(false);
}

packageStream.Position = 0;
}
Expand Down
1 change: 1 addition & 0 deletions ILSpy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
global.json = global.json
NuGet.config = NuGet.config
EndProjectSection
EndProject
Global
Expand Down
2 changes: 2 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
<package pattern="*" />
<package pattern="Microsoft.DiaSymReader.Native" />
<package pattern="Microsoft.DiaSymReader" />
<package pattern="Microsoft.CodeAnalysis.Analyzers" />
</packageSource>
<packageSource key="dotnet10-transport">
<package pattern="ILCompiler.Reflection.ReadyToRun.Experimental" />
</packageSource>
<packageSource key="dotnet-tools">
<package pattern="Microsoft.DiaSymReader.Converter.Xml" />
<package pattern="Microsoft.DiaSymReader.PortablePdb" />
<package pattern="Microsoft.CodeAnalysis.*" />
</packageSource>
</packageSourceMapping>
</configuration>
Loading