Skip to content

Do not avoid best-match TF checks for ReferenceOutputAssembly=false - #2935

Merged
AndyGerlicher merged 1 commit into
dotnet:vs15.6from
rainersigwald:keep-finding-tf-match
Feb 1, 2018
Merged

AndyGerlicher merged 1 commit into
dotnet:vs15.6from
rainersigwald:keep-finding-tf-match

Conversation

@rainersigwald

Copy link
Copy Markdown
Member

This reverts commit 91c86a7.

Fixes #2922 but undoes the fix for #2661.

Details as to why in #2923 (comment) and #2867 (comment).

@rainersigwald rainersigwald added this to the MSBuild 15.6 milestone Jan 31, 2018
@rainersigwald

Copy link
Copy Markdown
Member Author

@cdmihai You did this in master with afccbb1. Why was it needed there?

@cdmihai

cdmihai commented Jan 31, 2018 •

Copy link
Copy Markdown
Contributor

@rainersigwald
Because it caused our new build logic to fail due to these lines:

In this way:

Build FAILED.

E:\projects\msbuild_4\artifacts\.dotnet\2.1.1-preview-007216\sdk\2.1.1-preview-007216\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'E:\projects\msbuild_4\artifacts\2\Debug\obj\Po
rtableTask\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v2.0'. Ensure that restore has run and that you have included 'netcoreapp2.0' in the TargetFrameworks for your project. [E:\projects\msbuild_4\src\Samples\Po
rtableTask\PortableTask.csproj]
E:\projects\msbuild_4\artifacts\.dotnet\2.1.1-preview-007216\sdk\2.1.1-preview-007216\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'E:\projects\msbuild_4\artifacts\2\Debug\obj\Po
rtableTask\project.assets.json' doesn't have a target for '.NETFramework,Version=v4.6'. Ensure that restore has run and that you have included 'net46' in the TargetFrameworks for your project. [E:\projects\msbuild_4\src\Samples\Portable
Task\PortableTask.csproj]
E:\projects\msbuild_4\artifacts\.dotnet\2.1.1-preview-007216\sdk\2.1.1-preview-007216\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'E:\projects\msbuild_4\artifacts\2\Debug\obj\Ta
skWithDependency\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v2.0'. Ensure that restore has run and that you have included 'netcoreapp2.0' in the TargetFrameworks for your project. [E:\projects\msbuild_4\src\Samp
les\TaskWithDependency\TaskWithDependency.csproj]
E:\projects\msbuild_4\artifacts\.dotnet\2.1.1-preview-007216\sdk\2.1.1-preview-007216\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'E:\projects\msbuild_4\artifacts\2\Debug\obj\Nu
Get.MSBuildSdkResolver\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v2.0'. Ensure that restore has run and that you have included 'netcoreapp2.0' in the TargetFrameworks for your project. [E:\projects\msbuild_4\sr
c\NuGetSdkResolver\NuGet.MSBuildSdkResolver.csproj]
    0 Warning(s)
    4 Error(s)

Our repo was using ReferenceOutputAssembly="false" with the intent of: I do not have compile time references to these projects, but I want them in my output directory (in various subdirectories like "sdkresolvers") and in the output directories of everyone who references me. Also, they are managed projects and would want to build them with the closest TFM to my TFM.

dsplaisted added a commit to dsplaisted/msbuild that referenced this pull request Feb 1, 2018
This was fixed in dotnet@afccbb1 and
dotnet#2935, but if your stage 0 MSBuild has the bug, you will still fail to build.  This works around it.
@dsplaisted dsplaisted mentioned this pull request Feb 1, 2018
AndyGerlicher pushed a commit that referenced this pull request Feb 1, 2018
This was fixed in afccbb1 and
#2935, but if your stage 0 MSBuild has the bug, you will still fail to build.  This works around it.

@AndyGerlicher AndyGerlicher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for 15.6.

@AndyGerlicher
AndyGerlicher merged commit 5f2e0ee into dotnet:vs15.6 Feb 1, 2018
@rainersigwald
rainersigwald deleted the keep-finding-tf-match branch February 1, 2018 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants