Skip to content

Question about Microsoft.NET.Build.Tasks references in preview SDKs #2108

@daveaglick

Description

@daveaglick

I noticed the preview SDK doesn't include the assemblies that Microsoft.NET.Build.Tasks.dll depends on in the tools folder any more. At least they're not there in 2.1.300-preview1-008174, though it does look like they were there in 2.1.200-preview-007474.

2018-04-03_15h44_18

I also noticed the target for the SDK tools in 2.1.300-preview1-008174 switched to netcoreapp2.0 from netcoreapp1.0 which might have something to do with it.

I curious, but also this is causing some problems for me. When building with the MSBuild APIs, builds are failing whenever the preview is installed with:

C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(337,5): error MSB4018: The "ReportAssetsLogMessages" task failed unexpectedly.
    C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(337,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'NuGet.Common, Version=4.7.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
    C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(337,5): error MSB4018: File name: 'NuGet.Common, Version=4.7.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
    C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(337,5): error MSB4018:    at Microsoft.NET.Build.Tasks.LockFileCache.LoadLockFile
    C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(337,5): error MSB4018:    at Microsoft.NET.Build.Tasks.LockFileCache.GetLockFile
    C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(337,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ReportAssetsLogMessages.get_LockFile
    C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(337,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ReportAssetsLogMessages.ExecuteCore()
    C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(337,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute()
    C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(337,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() in E:\A\_work\82\s\src\Build\BackEnd\TaskExecutionHost\TaskExecutionHost.cs:line 631
    C:\Program Files\dotnet\sdk\2.1.300-preview1-008174\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(337,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext() in E:\A\_work\82\s\src\Build\BackEnd\Components\RequestBuilder\TaskBuilder.cs:line 787

I suspect that's because Microsoft.NET.Build.Tasks.dll can no longer find NuGet.Common.dll next to it. Builds do succeed when not using the MSBuild API and instead using dotnet build or VS directly, which makes me wonder if there's an extra MSBuild property or something I should be setting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions