barrett777 / Heroes.ReplayParser

A C# library for parsing Heroes of the Storm replay files (.StormReplay)
MIT License
223 stars 95 forks source link

Building v1.2.3 fails #97

Closed martijnhoekstra closed 4 years ago

martijnhoekstra commented 4 years ago

Trying to build v1.2.3 fails for me with the following error:

"C:\Users\marti\source\hots\Heroes.ReplayParser\Heroes.ReplayParser.ConsoleApplication\ConsoleApplication.csproj" (default target) (1) ->
"C:\Users\marti\source\hots\Heroes.ReplayParser\Heroes.ReplayParser\Heroes.ReplayParser.csproj" (default target) (2:2) ->
(GetAssemblyVersion target) ->
  C:\Program Files\dotnet\sdk\3.1.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.GenerateAssemblyInfo.targets(160,5): error MSB4044: The "GetAssemblyVersion" task was not given a value for the required parameter "NuGetVersion". [C:\Users\marti\source\hots\Heroes.ReplayParser\Heroes.ReplayParser\Heroes.ReplayParser.csproj]

    4 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.55

I build using MSBuild.exe Heroes.ReplayParser.ConsoleApplication/ConsoleApplication.csproj

barrett777 commented 4 years ago

GitVersionTask automates versioning by using tags in the Git repo

Your specific error looks like this: https://github.com/GitTools/GitVersion/issues/1557

I'm not sure why it's happening :( It works on my machine heh

barrett777 commented 4 years ago

It may not yet support dotnet build

https://gitversion.net/docs/usage/msbuild-task

martijnhoekstra commented 4 years ago

I'm not using dotnet build, I'm using MSBuild.exe Heroes.ReplayParser.ConsoleApplication/ConsoleApplication.csproj

How are you building locally?

It seems that the state of the local git repo is of influence of the build, but I'm not sure how to make that reproducible. It would require checking in your .git, but I suspect that'll break git.

barrett777 commented 4 years ago

I just open the solution in Visual Studio and build the project there

I set up a Github Action that just checks out the repo and uses dotnet build, and that is passing, so I'm sure there's a way to get dotnet build to work for you as well

martijnhoekstra commented 4 years ago

I suspect the problem happens when checking out the tag. I receive multiple warnings that it can't find the branch to pull the version number from.

barrett777 commented 4 years ago

Ah try checking out master branch, or any other branch

barrett777 commented 4 years ago

Did you upgrade .net core recently?

https://stackoverflow.com/questions/59875784/fsharpcoreshippedpackageversion-is-not-a-valid-version-string

Looks like the very latest .net core version 3.1.200-preview-014883 is failing to build (for me as well)

martijnhoekstra commented 4 years ago

Master builds fine. The problem was with trying to build the tag, when trying to see if I could reproduce the problem I was having with the uploader on the console application of the same version as well.

martijnhoekstra commented 4 years ago

Note that despite this issue being closed, I am still unable to build v1.2.3

Zemill commented 4 years ago

How about the latest build, v1.2.6?

When I download the package as a zip package, it fails to build. But if I pull it down through git, it builds fine. Not a huge issue, just found it interesting

martijnhoekstra commented 4 years ago

1.2.4 to 1.2.6 build correctly for me.