Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Functional test for DependencyModel
Browse files Browse the repository at this point in the history
  • Loading branch information
ramarag committed Apr 14, 2017
1 parent 4ce6a65 commit bef8155
Show file tree
Hide file tree
Showing 4 changed files with 504 additions and 0 deletions.
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>
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");
}

}
}
}
Loading

0 comments on commit bef8155

Please sign in to comment.