This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
504 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...PackageCompilationAssemblyResolverTestApp/PackageCompilationAssemblyResolverTestApp.xproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0.25123" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25123</VisualStudioVersion> | ||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" /> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>e484fcd8-e438-4559-a745-e58574263abd</ProjectGuid> | ||
<RootNamespace>PackageCompilationAssemblyResolverTestApp</RootNamespace> | ||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath> | ||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" /> | ||
</Project> |
36 changes: 36 additions & 0 deletions
36
TestAssets/TestProjects/PackageCompilationAssemblyResolverTestApp/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
|
||
using System; | ||
using System.IO; | ||
using System.Collections.Generic; | ||
using Microsoft.Extensions.DependencyModel; | ||
using Microsoft.Extensions.DependencyModel.Resolution; | ||
|
||
namespace PackageCompilationAssemblyResolverTest | ||
{ | ||
public static class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
|
||
var resolver = new PackageCompilationAssemblyResolver(); | ||
var assemblies = new List<string>(); | ||
|
||
var assembly = new CompilationLibrary( | ||
"package", | ||
"microsoft.csharp", | ||
"4.3.0", | ||
"null", | ||
new string[] { Path.Combine("ref", "netstandard1.0", "Microsoft.CSharp.dll") }, | ||
new Dependency[] { }, | ||
true, | ||
null, | ||
null); | ||
if (resolver.TryResolveAssemblyPaths(assembly, assemblies)) | ||
{ | ||
Console.WriteLine("Succesfully resolved the assembly"); | ||
} | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.