Skip to content

Building and running project for net462 runtime #2045

@multiarc

Description

@multiarc

Issue might be related to #1488
There are several reproductions of the issue. The test package for the issue is cloudscribe.Web.Pagination https://www.nuget.org/packages/cloudscribe.Web.Pagination/1.1.4, which is targeting netstandard1.6 only; startup project A target is net462 as well as referenced project B.

The issue might be due to screwed up package, wrong target (why if so?) but it's not clear by error messages or behavior.

https://github.com/multiarc/SDKRepro/branches

global.json used to specify SDK version 1.1.8

build_fail -- not able to build.
Error messages is not clear what to do, all packages including framework assemblies appeared with warning mark.

  • MSB4062 The "NETBuildExtensionsError" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\\tools\net46\Microsoft.NET.Build.Extensions.Tasks.dll. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. A C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets 65
  • Cannot find project info for 'C:\Docs\Work\SDKRepro\src\B\B.csproj'. This can indicate a missing project reference. A C:\Program Files\dotnet\sdk\1.1.8\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets 92

run_fail -- able to build using <DependsOnNETStandard>netstandard1.6</DependsOnNETStandard>, cannot start (System.Linq 4.1.0.0 assembly cannot load)

master -- completely fine project, builds and starts up no problem, just an example without package reference

global.json is removed

no_global_run_fail -- same as run_fail

no_global_another_run_fail -- magically able to build, cannot start due to Microsoft.CSharp assembly cannot load

SDK Versions

.NET Command Line Tools (2.1.101)

Product Information:
 Version:            2.1.101
 Commit SHA-1 hash:  6c22303bf0

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.101\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.6
  Build    : 74b1c703813c8910df5b96f304b0f2b78cdf194d
.NET Command Line Tools (1.1.8)

Product Information:
 Version:            1.1.8
 Commit SHA-1 hash:  227be613d2

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.1.8

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.6
  Build    : 74b1c703813c8910df5b96f304b0f2b78cdf194d

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