forked from dotnet/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
isolate MSBuild, MSBuildExtensions, and Roslyn directories
- Loading branch information
1 parent
6568113
commit b31b461
Showing
40 changed files
with
542 additions
and
120 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
...s/TestPackages/Other.Microsoft.DotNet.Cli.Utils/ClassThatIsntInMicrosoftDotNetCliUtils.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,8 @@ | ||
|
||
namespace Microsoft.DotNet.Cli.Utils | ||
{ | ||
public static class ClassThatIsntInMicrosoftDotNetCliUtils | ||
{ | ||
public static string GetValue() => "Hello there!"; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...ets/TestPackages/Other.Microsoft.DotNet.Cli.Utils/Other.Microsoft.DotNet.Cli.Utils.csproj
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,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Library</OutputType> | ||
<TargetFramework>netcoreapp1.0</TargetFramework> | ||
<AssemblyName>Microsoft.DotNet.Cli.Utils</AssemblyName> | ||
<Version>123.0.0.0</Version> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.3" /> | ||
</ItemGroup> | ||
|
||
</Project> |
45 changes: 45 additions & 0 deletions
45
...ckages/PackagedTaskWithCliDependencyConflict/PackagedTaskWithCliDependencyConflict.csproj
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,45 @@ | ||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Library</OutputType> | ||
<TargetFramework>netcoreapp1.0</TargetFramework> | ||
<AssemblyName>DependsOn.Other.Microsoft.DotNet.Cli.Utils</AssemblyName> | ||
<PackageId>PackagedTaskWithCliDependencyConflict</PackageId> | ||
<Version>1.0.0-preview</Version> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference | ||
Include="..\Other.Microsoft.DotNet.Cli.Utils\Other.Microsoft.DotNet.Cli.Utils.csproj" | ||
TreatAsPackageReference="false" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="build\PackagedTaskWithCliDependencyConflict.targets" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="build\*.targets"> | ||
<Pack>true</Pack> | ||
<PackagePath>build\</PackagePath> | ||
</Content> | ||
<Content Include="..\Other.Microsoft.DotNet.Cli.Utils\bin\Debug\netcoreapp1.0\Microsoft.DotNet.Cli.Utils.dll"> | ||
<Pack>true</Pack> | ||
<PackagePath>lib\$(TargetFramework)</PackagePath> | ||
</Content> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NETCore.App" | ||
Version="1.0.3" /> | ||
<PackageReference Include="Microsoft.Build.Framework" | ||
Version="15.1.0-preview-000458-02" /> | ||
<PackageReference Include="Microsoft.Build.Utilities.Core" | ||
Version="15.1.0-preview-000458-02" /> | ||
</ItemGroup> | ||
|
||
<Target Name="PackNuspec" AfterTargets="Pack"> | ||
<Exec Command="dotnet nuget pack PackagedTaskWithCliDependencyConflict.nuspec" /> | ||
</Target> | ||
|
||
</Project> |
17 changes: 17 additions & 0 deletions
17
...ckages/PackagedTaskWithCliDependencyConflict/PackagedTaskWithCliDependencyConflict.nuspec
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,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> | ||
<metadata> | ||
<id>PackagedTaskWithCliDependencyConflict</id> | ||
<version>1.0.0-preview</version> | ||
<authors>DependsOn.Other.Microsoft.DotNet.Cli.Utils</authors> | ||
<owners>DependsOn.Other.Microsoft.DotNet.Cli.Utils</owners> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>Package Description</description> | ||
<files> | ||
<file src="bin/$configuration$/netcoreapp1.0/*.dll" target="lib" /> | ||
<file src="build/PackagedTaskWithCliDependencyConflict.targets" /> | ||
</files> | ||
</metadata> | ||
</package> | ||
|
||
|
17 changes: 17 additions & 0 deletions
17
TestAssets/TestPackages/PackagedTaskWithCliDependencyConflict/TaskFoundOnlyInOneVersion.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,17 @@ | ||
using Microsoft.Build.Framework; | ||
using Microsoft.DotNet.Cli.Utils; | ||
|
||
namespace TaskFoundOnlyInOneVersion.Task | ||
{ | ||
public class TaskFoundOnlyInOneVersion : Microsoft.Build.Utilities.Task | ||
{ | ||
[Output] | ||
public string TaskOutput { get; private set; } | ||
|
||
public override bool Execute() | ||
{ | ||
TaskOutput = ClassThatIsntInMicrosoftDotNetCliUtils.GetValue(); | ||
return true; | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...PackagedTaskWithCliDependencyConflict/build/PackagedTaskWithCliDependencyConflict.targets
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,13 @@ | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<UsingTask TaskName="TaskFoundOnlyInOneVersion" | ||
AssemblyFile="$(MSBuildThisFileDirectory)/../bin/Debug/netcoreapp1.0/DependsOn.Other.Microsoft.DotNet.Cli.Utils.dll" /> | ||
|
||
<PropertyGroup> | ||
<ApplicationName>$(AssemblyName)</ApplicationName> | ||
<ApplicationName Condition="'$(AssemblyName)' == ''">$(MsBuildProjectName)</ApplicationName> | ||
</PropertyGroup> | ||
|
||
<Target Name="TaskFoundOnlyInOneVersion"> | ||
<TaskFoundOnlyInOneVersion /> | ||
</Target> | ||
</Project> |
15 changes: 15 additions & 0 deletions
15
...ssets/TestProjects/AppWithCliConflictingDependency/AppWithCliConflictingDependency.csproj
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,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp1.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NETCore.App" | ||
Version="1.0.3" /> | ||
<PackageReference Include="PackagedTaskWithCliDependencyConflict" | ||
Version="1.0.0-preview" /> | ||
</ItemGroup> | ||
|
||
</Project> |
6 changes: 6 additions & 0 deletions
6
TestAssets/TestProjects/AppWithCliConflictingDependency/NuGet.Config
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="test-packages" value="../../../artifacts/testpackages" /> | ||
</packageSources> | ||
</configuration> |
9 changes: 9 additions & 0 deletions
9
TestAssets/TestProjects/AppWithCliConflictingDependency/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,9 @@ | ||
using System; | ||
|
||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
Console.WriteLine("Here I am!"); | ||
} | ||
} |
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
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
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
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 |
---|---|---|
@@ -1,21 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTarget="RunTest" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<!-- workaround for https://github.com/Microsoft/msbuild/issues/885 --> | ||
<!-- renaming the property because the original property is a global property and therefore | ||
cannot be redefined at runtime. --> | ||
<PropertyGroup> | ||
<CLIBuildDllPath>$([MSBuild]::Unescape($(CLIBuildDll)))</CLIBuildDllPath> | ||
</PropertyGroup> | ||
|
||
<UsingTask TaskName="DotNetTest" AssemblyFile="$(CLIBuildDllPath)" /> | ||
<!-- workaround for https://github.com/Microsoft/msbuild/issues/885 --> | ||
<!-- renaming the property because the original property is a global property and therefore | ||
cannot be redefined at runtime. --> | ||
<PropertyGroup> | ||
<CLIBuildDllPath>$([MSBuild]::Unescape($(CLIBuildDll)))</CLIBuildDllPath> | ||
</PropertyGroup> | ||
|
||
<UsingTask TaskName="DotNetTest" AssemblyFile="$(CLIBuildDllPath)" /> | ||
<UsingTask TaskName="SetEnvVar" AssemblyFile="$(CLIBuildDll)" /> | ||
|
||
<Target Name="RunTest"> | ||
|
||
<SetEnvVar Name="CscToolExe" | ||
Value="" /> | ||
<SetEnvVar Name="MSBuildExtensionsPath" | ||
Value="" /> | ||
<SetEnvVar Name="MSBuildSDKsPath" | ||
Value="" /> | ||
<SetEnvVar Name="MSBuildToolsPath" | ||
Value="" /> | ||
|
||
<Message Text="AfterSetEnvVar MSBuildExtensionsPath: $(MSBuildExtensionsPath)" Importance="High" /> | ||
|
||
<DotNetTest EnvironmentVariables="$(EnvironmentVariables)" | ||
ToolPath="$(ToolPath)" | ||
Configuration="$(Configuration)" | ||
NoBuild="True" | ||
Logger="trx" | ||
ProjectPath="$(TestProject)" /> | ||
</Target> | ||
</Project> | ||
</Project> |
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
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
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
Oops, something went wrong.