-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet build
command always fails with GitVersionTask 4.0.0-beta
#1399
Comments
I found some related issues from other repositories:
It seems that we should change our way to write UsingTask following .NET Core MSBuild hint. That means we should multitargeting the |
Is there a workaround or must I look for another library if I've run into this? I'm going to build it CLI in a docker container in my CI environment and msbuild does not exist there |
What version of dotnet sdk are you building under? Please add a global.json file to lock to sdk version 2.0.0 or below. Support for building under > 2 has not bren merged yet. Please also try latest beta15 package from appveyor project nuget feed or failing that, beta14 from nuget.org |
P.s we do multitarget and you should see netstandard1.5 compiled gitversiontask assembly in the nuget package. |
@dazinator This issue was posted four months ago and .NET Core 2.0 was the latest version at that time. Maybe I can try the newest version now. |
@walterlv Sure. I think there is still an issue at present though when using the latest update of VS2017 (15.8.X). I uninstalled VS2017 15.8.2 and installed VS2017 15.7.6 and that seems to work. Also regardless of VS Version, dotnet build works for me as long as its pinned to SDK version 2.0 with a global.json. I have just created an issue using VS's send feedback to report the VS issue. Also I have reported here in case its a utilpack thing: stazz/UtilPack#30 |
@dazinator Actually, it's not the bug of MSBuild or Visual Studio. I've written my own NuGet package which is used to generate git version and it works both on |
@dazinator I've tested the latest versions of Visual Studio, .NET Core and GitVersionTask, and I find all works fine. Maybe I can close this issue. |
@walterlv It's Chinese blog. |
Have you tried building from within VS 2017 (version 15.8.2) ?
|
@dazinator |
@dazinator OK! |
@walterlv when you build from vs2017 15.8.1 - did you check the "output" tab in.VS for an error - because the error only seems to show up there, it does not show up on the build errors tab so that might lead you to think gitversiontask ran successfully from VS when it didn't. |
@dazinator I've updated to vs 2017 15.8.2 and the build still succeeds but with a warning.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitVersion" Version="4.0.0-beta0012" />
</ItemGroup>
</Project> |
When a totally new .NET Standard project is created and GitVersionTask is installed on it,
dotnet build
command certainly fails with this message below:The raw error message is here:
Fortunately, if I build it using msbuild.exe or Visual Studio 2017, it succeeds.
My environment:
The text was updated successfully, but these errors were encountered: