Skip to content

Commit

Permalink
repro of issue #4214
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsequitur committed Dec 23, 2016
1 parent b4ef34b commit e19f72f
Show file tree
Hide file tree
Showing 11 changed files with 168 additions and 1 deletion.
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!";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<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>
<Compile Include="**\*.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.Build.Framework;
using Microsoft.DotNet.Cli.Utils;

namespace Banana.Task
{
public class Banana : Microsoft.Build.Utilities.Task
{
[Output]
public string TaskOutput { get; private set; }

public override bool Execute()
{
TaskOutput = ClassThatIsntInMicrosoftDotNetCliUtils.GetValue();
return true;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<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>
<Compile Include="**\*.cs" />
</ItemGroup>

<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.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.Build.Framework">
<Version>15.1.0-preview-000458-02</Version>
</PackageReference>
<PackageReference Include="Microsoft.Build.Utilities.Core">
<Version>15.1.0-preview-000458-02</Version>
</PackageReference>
</ItemGroup>

<Target Name="PackNuspec" AfterTargets="Pack">
<Exec Command="dotnet nuget pack PackagedTaskWithCliDependencyConflict.nuspec" />
</Target>

</Project>
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>


Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Banana" 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="Banana">
<Banana />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Include="**\*.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
<PackageReference Include="PackagedTaskWithCliDependencyConflict" Version="1.0.0-preview" />
</ItemGroup>

</Project>
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>
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!");
}
}
11 changes: 11 additions & 0 deletions build/test/TestPackageProjects.targets
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,17 @@
<Clean>True</Clean>
<Frameworks>netcoreapp1.0</Frameworks>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/PackagedTaskWithCliDependencyConflict">
<Name>PackagedTaskWithCliDependencyConflict</Name>
<ProjectName>PackagedTaskWithCliDependencyConflict.csproj</ProjectName>
<NuPkgName>PackagedTaskWithCliDependencyConflict</NuPkgName>
<IsTool>False</IsTool>
<IsApplicable>True</IsApplicable>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>preview</VersionSuffix>
<Clean>True</Clean>
<Frameworks>netcoreapp1.0</Frameworks>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/ToolWithOutputName">
<Name>dotnet-tool-with-output-name</Name>
<ProjectName>ToolWithOutputName.csproj</ProjectName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Microsoft.DotNet.ProjectJsonMigration.Tests
{
public partial class MigrationBackupPlanTests
public class MigrationBackupPlanTests
{
[Fact]
public void TheRootBackupDirectoryIsASiblingOfTheRootProject()
Expand Down

0 comments on commit e19f72f

Please sign in to comment.