Updating the version of msbuild to 15.1.0-preview-000516-03 (#5266)
* Updating the version of msbuild to 15.1.0-preview-000516-03 * Remove test that assumes props/targets imports The test ItAddsRefBetweenImports validated that the MSBuild XML model contained new project references between the props and targets imports. While useful be fore the SDK attribute, the test no longer adds value since the SDK is added implicitly, guaranteeing it wraps the remaining project contents. * Move MSBuild to 15.1.0-preview-000509-03 This is the last msbuild version prior to the change of MSBuild's dependencies to include .NET 1.1 components. * Move MSBuild invocations to use dirs.props/dirs.tasks * Put back the test targets. We'll unify later. * Remove dirs.props props from templates msbuild invocation
This commit is contained in:
parent
ad6fab0a15
commit
4b82852d56
7 changed files with 15 additions and 64 deletions
|
@ -1,9 +1,6 @@
|
|||
<Project ToolsVersion="15.0" DefaultTargets="CopyTemplateToOutput">
|
||||
<!-- 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. -->
|
||||
|
||||
<Import Project="Microsoft.DotNet.Cli.tasks" />
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
|
||||
|
||||
<Target Name="CopyTemplateToOutput"
|
||||
DependsOnTargets="PrepareBundledTemplateProps;
|
||||
|
|
|
@ -270,8 +270,6 @@
|
|||
<ItemGroup>
|
||||
<TemplatesToBundle Include="build/Microsoft.DotNet.Cli.BundledTemplates.proj">
|
||||
<Properties>
|
||||
CLIBuildDll=$(CLIBuildDll);
|
||||
NuGetPackagesDir=$(NuGetPackagesDir);
|
||||
TemplateLayoutDirectory=$(SdkOutputDirectory)/Templates;
|
||||
TemplatePackageName=%(BundledTemplate.Identity);
|
||||
TemplatePackageVersion=%(BundledTemplate.Version);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CLI_MSBuild_Version>15.1.0-preview-000503-01</CLI_MSBuild_Version>
|
||||
<CLI_MSBuild_Version>15.1.0-preview-000509-03</CLI_MSBuild_Version>
|
||||
<CLI_Roslyn_Version>2.0.0-rc3-61212-03</CLI_Roslyn_Version>
|
||||
<CLI_NETSDK_Version>1.0.0-alpha-20170111-1</CLI_NETSDK_Version>
|
||||
<CLI_WEBSDK_Version>1.0.0-alpha-20170106-1-203</CLI_WEBSDK_Version>
|
||||
|
|
|
@ -132,5 +132,6 @@ docker run $INTERACTIVE -t --rm --sig-proxy=true \
|
|||
-e CHECKSUM_STORAGE_KEY \
|
||||
-e CHECKSUM_STORAGE_ACCOUNT \
|
||||
-e CHECKSUM_STORAGE_CONTAINER \
|
||||
-e CLIBUILD_SKIP_TESTS \
|
||||
$DOTNET_BUILD_CONTAINER_TAG \
|
||||
$BUILD_COMMAND "$@"
|
||||
|
|
|
@ -536,51 +536,6 @@ Reference `DotnetAddP2PProjects\ValidRef\ValidRef.csproj` added to the project."
|
|||
csproj.NumberOfProjectReferencesWithIncludeContaining(setup.ValidRefCsprojName).Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ItAddsRefBetweenImports()
|
||||
{
|
||||
var lib = NewLibWithFrameworks();
|
||||
var setup = Setup();
|
||||
|
||||
var cmd = new AddReferenceCommand()
|
||||
.WithWorkingDirectory(lib.Path)
|
||||
.WithProject(lib.CsProjName)
|
||||
.Execute($"\"{setup.ValidRefCsprojPath}\"");
|
||||
cmd.Should().Pass();
|
||||
cmd.StdOut.Should().Be("Reference `DotnetAddP2PProjects\\ValidRef\\ValidRef.csproj` added to the project.");
|
||||
cmd.StdErr.Should().BeEmpty();
|
||||
|
||||
int state = 0;
|
||||
foreach (var el in lib.CsProj().AllChildren)
|
||||
{
|
||||
var import = el as ProjectImportElement;
|
||||
var projRef = el as ProjectItemElement;
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
if (import != null && import.Project.EndsWith(".props"))
|
||||
{
|
||||
state++;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (projRef != null && projRef.ItemType == "ProjectReference" && projRef.Include.Contains(setup.ValidRefCsprojName))
|
||||
{
|
||||
state++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (import != null && import.Project.EndsWith(".targets"))
|
||||
{
|
||||
state++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
state.Should().Be(3);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WhenPassedReferenceDoesNotExistItShowsAnError()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue