You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using GitVersion 4.0.0 in our CI Jenkins environment, where we build our VS 2017 solution using devenv.com from command line in order to build all our projects including installers.
When building we consistently get the following error:
MSBUILD : error : Error occurred: System.Exception: Warning logger not defined. Attempted to log: Could not determine assembly version: System.Exception: Warning logger not defined. Attempted to log: Failed to check build server 'Jenkins': Info logger not defined. Attempted to log: Applicable build agent found: 'Jenkins'. MSBUILD : error : at GitVersion.Logger.<>c.<Reset>b__24_2(String s) MSBUILD : error : at GitVersion.BuildServerList.GetApplicableBuildServers() MSBUILD : error : at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig, Boolean noCache)
I've reproduced the error on my machine (rather than Jenkins build slave) by defining the registry key and getting the Logger error on this other tracing instead:
MSBUILD : error : Error occurred: System.Exception: Warning logger not defined. Attempted to log: Could not determine assembly version: System.Exception: Info logger not defined. Attempted to log: IsDynamicGitRepository: False MSBUILD : error : at GitVersion.Logger.<>c.<Reset>b__24_1(String s) MSBUILD : error : at GitVersion.GitPreparer.GetProjectRootDirectory() MSBUILD : error : at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig, Boolean noCache) MSBUILD : error : at GitVersion.ExecuteCore.TryGetVersion(String directory, VersionVariables& versionVariables, Boolean noFetch, Authentication authentication) MSBUILD : error : at GitVersion.Logger.<>c.<Reset>b__24_2(String s) MSBUILD : error : at GitVersion.ExecuteCore.TryGetVersion(String directory, VersionVariables& versionVariables, Boolean noFetch, Authentication authentication) MSBUILD : error : at GitVersionTask.WriteVersionInfoToBuildLog.InnerExecute() in C:\projects\gitversion\src\GitVersionTask\WriteVersionInfoToBuildLog.cs:line 50 MSBUILD : error : at GitVersionTask.WriteVersionInfoToBuildLog.Execute() in C:\projects\gitversion\src\GitVersionTask\WriteVersionInfoToBuildLog.cs:line 28
(Or, as alternative by defining the JENKINS_URL env variable and getting the first error)
The text was updated successfully, but these errors were encountered:
Ran into the same problem with attempting to add GitVersionTask to a wixproj
It appears that visual studio devenv IDE actually loads the non C#/VB projects in its own process space and reuses the Task to build the wixproj (unlike C# and VB projects which are delegated to children). It appears that the core issue is that the GitVersion tasks assume they will never be reused; the task constructors calls Logger.SetLoggers to set the loggers, but they are subsequently reset in the finally clause of the Execute() call. Not quite sure why that is, I would have assumed that the loggers should be set at the beginning of the Execute() call if they are going to be reset at the end of the call.
Hi,
We are using GitVersion 4.0.0 in our CI Jenkins environment, where we build our VS 2017 solution using devenv.com from command line in order to build all our projects including installers.
For the installers to be built we have defined the registry key EnableOutProcBuild:
(it3xl/MSBuild-DevEnv-Build-Server-Workarounds#1)
(https://www.kunal-chowdhury.com/2016/07/visual-studio-error-code-8000000A.html)
When building we consistently get the following error:
MSBUILD : error : Error occurred: System.Exception: Warning logger not defined. Attempted to log: Could not determine assembly version: System.Exception: Warning logger not defined. Attempted to log: Failed to check build server 'Jenkins': Info logger not defined. Attempted to log: Applicable build agent found: 'Jenkins'. MSBUILD : error : at GitVersion.Logger.<>c.<Reset>b__24_2(String s) MSBUILD : error : at GitVersion.BuildServerList.GetApplicableBuildServers() MSBUILD : error : at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig, Boolean noCache)
I've reproduced the error on my machine (rather than Jenkins build slave) by defining the registry key and getting the Logger error on this other tracing instead:
MSBUILD : error : Error occurred: System.Exception: Warning logger not defined. Attempted to log: Could not determine assembly version: System.Exception: Info logger not defined. Attempted to log: IsDynamicGitRepository: False MSBUILD : error : at GitVersion.Logger.<>c.<Reset>b__24_1(String s) MSBUILD : error : at GitVersion.GitPreparer.GetProjectRootDirectory() MSBUILD : error : at GitVersion.ExecuteCore.ExecuteGitVersion(String targetUrl, String dynamicRepositoryLocation, Authentication authentication, String targetBranch, Boolean noFetch, String workingDirectory, String commitId, Config overrideConfig, Boolean noCache) MSBUILD : error : at GitVersion.ExecuteCore.TryGetVersion(String directory, VersionVariables& versionVariables, Boolean noFetch, Authentication authentication) MSBUILD : error : at GitVersion.Logger.<>c.<Reset>b__24_2(String s) MSBUILD : error : at GitVersion.ExecuteCore.TryGetVersion(String directory, VersionVariables& versionVariables, Boolean noFetch, Authentication authentication) MSBUILD : error : at GitVersionTask.WriteVersionInfoToBuildLog.InnerExecute() in C:\projects\gitversion\src\GitVersionTask\WriteVersionInfoToBuildLog.cs:line 50 MSBUILD : error : at GitVersionTask.WriteVersionInfoToBuildLog.Execute() in C:\projects\gitversion\src\GitVersionTask\WriteVersionInfoToBuildLog.cs:line 28
(Or, as alternative by defining the JENKINS_URL env variable and getting the first error)
The text was updated successfully, but these errors were encountered: