nuke-build / nuke

🏗 The AKEless Build System for C#/.NET
https://nuke.build
MIT License
2.9k stars 355 forks source link

Assertion failed on GitVersion for .Net Framework target platform #18

Closed martin211 closed 5 years ago

martin211 commented 6 years ago

I've created build project with folowing settings: Target Framework as .Net Framework, Project format is Legacy format and other settings by default. If uncomment [GitVersion] readonly GitVersion GitVersion; at Buils.cs and then run powershell -ExecutionPolicy ByPass -File ./build.ps1 -help you will get Assertaion failed error.

Stack trace: Assertion failed: !IncludesDependencies(Z:\Code\AIMP\aimp_DiskCover\build\packages.config) || includeDependencies at Nuke.Core.ControlFlow.Assert(Boolean condition, String text) at Nuke.Common.Tools.NuGetPackageResolver.d__2.MoveNext() at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable'1 source, Func'2 predicate) at Nuke.Common.Tools.NuGetPackageResolver.GetLocalInstalledPackage(String packageId, String packagesConfigFile) at Nuke.Common.Tools.ToolPathResolver.GetPackageExecutable(String packageId, String packageExecutable) at Nuke.Common.Tools.GitVersion.GitVersionSettings.get_ToolPath() at Nuke.Core.Tooling.ProcessManager.StartProcess(ToolSettings toolSettings, ProcessSettings processSettings) at Nuke.Common.Tools.GitVersion.GitVersionTasks.GitVersion(Configure'1 configurator, ProcessSettings processSettings) at Nuke.Common.Tools.GitVersion.GitVersionAttribute.GetStaticValue() at Nuke.Core.Injection.StaticInjectionAttributeBase.GetValue(String memberName, Type memberType) at Nuke.Core.Execution.InjectionService.InjectValues(NukeBuild build) at Nuke.Core.Execution.BuildExecutor.Setup[T](Expression'1 defaultTargetExpression) at Nuke.Core.Execution.BuildExecutor.Execute[T](Expression'1 defaultTargetExpression) The following call failed with exit code 199475893. ' & $BuildExeFile $BuildArguments ' At Z:\Code\AIMP\aimp_DiskCover\build.ps1:32 char:32

matkoch commented 6 years ago

@martin211 I will look into this asap. Is there any reason you're not using the SDK-based format? I.e., don't you have VS2017 installed?

martin211 commented 6 years ago

@matkoch I used Legacy format because other projects is in legacy format too. I tried to switch in SDK-based format and it works! In any case, it would be nice to fix the error for the Legacy format.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.