Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dotnetcore / netstandard projects not working if .net 5.0 (dotnet 5) is installed #40

Closed
@lytico

Description

@lytico

working with
dotnetcore / netstandard projects (any version)
fails if .net 5.0 (dotnet 5) is installed

errors:

build:

/usr/share/dotnet/sdk/5.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(5,5): Error MSB4186: Invalid static method invocation syntax: "[MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')". Method '[MSBuild]::GetTargetFrameworkIdentifier' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). Check that all parameters are defined, are of the correct type, and are specified in the right order. (MSB4186) (md_test_dotnetcore)

nuget:

Getting restore information for project /home/data/Work/Programming/dotdevelop/TestProjects/md_test_dotnetcore/md_test_dotnetcore/md_test_dotnetcore.csproj
/usr/share/dotnet/sdk/5.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(54,5) : error MSB4186: Invalid static method invocation syntax: "[MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')". Method '[MSBuild]::GetTargetFrameworkIdentifier' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). Check that all parameters are defined, are of the correct type, and are specified in the right order.
Unable to create package spec for project. '/home/data/Work/Programming/dotdevelop/TestProjects/md_test_dotnetcore/md_test_dotnetcore/md_test_dotnetcore.csproj'

project options:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions