Skip to content

.NET Standard 2.0: dotnet build fails #1307

@roeb

Description

@roeb

Hi all,

I have a problem to use GitVersionTask (Version="4.0.0-beta0012") in a new simple and clean .netstandard2.0 library. The project has only a User class with some properties and a nuget reference to GitversionTask in version 4.0.0-beta0012.

If i run the rebuild command from Visual Studio 2017, it works fine. But when I try to run "dotnet build" in the console, it throws the following error:

C:\Users\rme\.nuget\packages\gitversiontask\4.0.0-beta0012\build\GitVersionTask.targets(49,5): error MSB4062: The "GitVersionTask.WriteVersionInfoToBuildLog" task could not be loaded from the assembly C:\Users\rme\.nuget\packages\gitversiontask\4.0.0-beta0012\build\GitVersionTask.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL'. The system cannot find the file specified. 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. [C:\Learning\GitHub\GitVersionTaskBuildIssue\GitVersionTaskBuildIssue\GitVersionTaskBuildIssue.csproj]

You can find the simple project on GitHub. Has anyone any idea or solution for the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions