How can we help you today? How can we help you today?
BrendonM
Hi It looks like a similar issue might have occurred again? TeamCity server version is 2022.10.2 (build 117025) RedGate SQL Change Automation Plugin: 5.0.7 [15:38:05] :     [Step 1/6] Invoke-DatabaseBuild, SQL Change Automation 4.5.23032.654, Copyright ¸ Red Gate Software Ltd 2014-2023 ... [15:38:05] :     [Step 1/6] SqlCmdVariables: System.Collections.Hashtable [15:38:07] :     [Step 1/6] WARNING: Microsoft.Build.Exceptions.InvalidProjectFileException: The expression [15:38:07] :     [Step 1/6] "[Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries(.NETFramework, v4.5.2, '', '', '', '')" [15:38:07] :     [Step 1/6] cannot be evaluated. Could not load type 'Microsoft.Build.Framework.NativeMethods' from assembly [15:38:07] :     [Step 1/6] 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.  C:\Program Files [15:38:07] :     [Step 1/6] (x86)\Microsoft Visual Studio\2017\SQL\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, [15:38:07] :     [Step 1/6] IElementLocation elementLocation, String resourceName, Object[] args) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1,T2](IElementLocation elementLocation, String [15:38:07] :     [Step 1/6] resourceName, T1 arg0, T2 arg1) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Expander`2.Function`1.Execute(Object objectInstance, IPropertyProvider`1 properties, [15:38:07] :     [Step 1/6] ExpanderOptions options, IElementLocation elementLocation) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Expander`2.PropertyExpander`1.ExpandPropertyBody(String propertyBody, Object [15:38:07] :     [Step 1/6] propertyValue, IPropertyProvider`1 properties, ExpanderOptions options, IElementLocation elementLocation, [15:38:07] :     [Step 1/6] UsedUninitializedProperties usedUninitializedProperties, IFileSystem fileSystem) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Expander`2.PropertyExpander`1.ExpandPropertiesLeaveTypedAndEscaped(String expression, [15:38:07] :     [Step 1/6] IPropertyProvider`1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties [15:38:07] :     [Step 1/6] usedUninitializedProperties, IFileSystem fileSystem) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Expander`2.PropertyExpander`1.ExpandPropertiesLeaveEscaped(String expression, [15:38:07] :     [Step 1/6] IPropertyProvider`1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties [15:38:07] :     [Step 1/6] usedUninitializedProperties, IFileSystem fileSystem) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Expander`2.ExpandIntoStringLeaveEscaped(String expression, ExpanderOptions options, [15:38:07] :     [Step 1/6] IElementLocation elementLocation) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluatePropertyElement(ProjectPropertyElement propertyElement) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluatePropertyGroupElement(ProjectPropertyGroupElement [15:38:07] :     [Step 1/6] propertyGroupElement) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:07] :     [Step 1/6] ProjectImportElement importElement) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:07] :     [Step 1/6] ProjectImportElement importElement) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:07] :     [Step 1/6] ProjectImportElement importElement) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:07] :     [Step 1/6] ProjectImportElement importElement) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:07] :     [Step 1/6] ProjectImportElement importElement) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:07] :     [Step 1/6] ProjectImportElement importElement) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(ILoggingService loggingService, BuildEventContext [15:38:07] :     [Step 1/6] buildEventContext) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Project.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings [15:38:07] :     [Step 1/6] loadSettings, EvaluationContext evaluationContext) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, [15:38:07] :     [Step 1/6] ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Project.Initialize(IDictionary`2 globalProperties, String toolsVersion, String [15:38:07] :     [Step 1/6] subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, [15:38:07] :     [Step 1/6]  String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext [15:38:07] :     [Step 1/6] evaluationContext) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary`2 globalProperties, String [15:38:07] :     [Step 1/6] toolsVersion) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at RedGate.Versioning.Automation.EngineFacade.Settings.PowerShellSettingStrategy..ctor(String filePath, [15:38:07] :     [Step 1/6] IDictionary`2 properties) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at RedGate.Versioning.Automation.EngineFacade.Settings.PowerShellSettingStrategyFactory.GetSettingsStrategy(String [15:38:07] :     [Step 1/6] filePath) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at RedGate.Versioning.Engine.Projects.ProjectSettings.SqlProj.ObjectMapping.MsBuildProjectMapper.MapTo(String [15:38:07] :     [Step 1/6] filePath, IMsBuildSettingsRepresentation msBuildDatabaseProjectSettings) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at [15:38:07] :     [Step 1/6] RedGate.Versioning.Engine.Projects.ProjectSettings.SqlProj.ObjectMapping.MsBuildSettingsLoader`2.LoadSettings(String [15:38:07] :     [Step 1/6] filePath, IProgressLogger progress) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at RedGate.Versioning.Automation.Compare.Projects.ProjectFactory.HasScaProperty(String sqlProjFilePath) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at RedGate.Versioning.Automation.Compare.Projects.ProjectFactory.GetScaProject(String path) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at RedGate.Versioning.Automation.Compare.Projects.ProjectFactory.CreateProjectPathFromPath(String path) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at RedGate.Versioning.Automation.Compare.Projects.ProjectFactory.CreateFromPath(String path) [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at RedGate.Versioning.Automation.PowerShell.Commands.InvokeDatabaseBuildCommandImpl.Process() [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at RedGate.Versioning.Automation.PowerShell.DlmAutomationCommandImpl`1.ProcessRecord() [15:38:07] :     [Step 1/6] [15:38:07] :     [Step 1/6]    at RedGate.PowerShell.CommandBase`2.DelegateTo(Action doImplementation) [15:38:08] :     [Step 1/6] Invoke-DatabaseBuild : An unhandled error occurred: Microsoft.Build.Exceptions.InvalidProjectFileException: The [15:38:08] :     [Step 1/6] expression "[Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries(.NETFramework, v4.5.2, '', '', [15:38:08] :     [Step 1/6] '', '')" cannot be evaluated. Could not load type 'Microsoft.Build.Framework.NativeMethods' from assembly [15:38:08] :     [Step 1/6] 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.  C:\Program Files [15:38:08] :     [Step 1/6] (x86)\Microsoft Visual Studio\2017\SQL\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets [15:38:08] :     [Step 1/6]    at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, [15:38:08] :     [Step 1/6] IElementLocation elementLocation, String resourceName, Object[] args) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1,T2](IElementLocation elementLocation, String [15:38:08] :     [Step 1/6] resourceName, T1 arg0, T2 arg1) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Expander`2.Function`1.Execute(Object objectInstance, IPropertyProvider`1 properties, [15:38:08] :     [Step 1/6] ExpanderOptions options, IElementLocation elementLocation) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Expander`2.PropertyExpander`1.ExpandPropertyBody(String propertyBody, Object [15:38:08] :     [Step 1/6] propertyValue, IPropertyProvider`1 properties, ExpanderOptions options, IElementLocation elementLocation, [15:38:08] :     [Step 1/6] UsedUninitializedProperties usedUninitializedProperties, IFileSystem fileSystem) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Expander`2.PropertyExpander`1.ExpandPropertiesLeaveTypedAndEscaped(String expression, [15:38:08] :     [Step 1/6] IPropertyProvider`1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties [15:38:08] :     [Step 1/6] usedUninitializedProperties, IFileSystem fileSystem) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Expander`2.PropertyExpander`1.ExpandPropertiesLeaveEscaped(String expression, [15:38:08] :     [Step 1/6] IPropertyProvider`1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties [15:38:08] :     [Step 1/6] usedUninitializedProperties, IFileSystem fileSystem) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Expander`2.ExpandIntoStringLeaveEscaped(String expression, ExpanderOptions options, [15:38:08] :     [Step 1/6] IElementLocation elementLocation) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluatePropertyElement(ProjectPropertyElement propertyElement) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluatePropertyGroupElement(ProjectPropertyGroupElement [15:38:08] :     [Step 1/6] propertyGroupElement) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:08] :     [Step 1/6] ProjectImportElement importElement) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:08] :     [Step 1/6] ProjectImportElement importElement) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:08] :     [Step 1/6] ProjectImportElement importElement) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:08] :     [Step 1/6] ProjectImportElement importElement) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:08] :     [Step 1/6] ProjectImportElement importElement) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, [15:38:08] :     [Step 1/6] ProjectImportElement importElement) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(ILoggingService loggingService, BuildEventContext [15:38:08] :     [Step 1/6] buildEventContext) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Project.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings [15:38:08] :     [Step 1/6] loadSettings, EvaluationContext evaluationContext) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, [15:38:08] :     [Step 1/6] ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Project.Initialize(IDictionary`2 globalProperties, String toolsVersion, String [15:38:08] :     [Step 1/6] subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String [15:38:08] :     [Step 1/6] toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, [15:38:08] :     [Step 1/6] EvaluationContext evaluationContext) [15:38:08] :     [Step 1/6]    at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary`2 globalProperties, String [15:38:08] :     [Step 1/6] toolsVersion) [15:38:08] :     [Step 1/6]    at RedGate.Versioning.Automation.EngineFacade.Settings.PowerShellSettingStrategy..ctor(String filePath, [15:38:08] :     [Step 1/6] IDictionary`2 properties) [15:38:08] :     [Step 1/6]    at RedGate.Versioning.Automation.EngineFacade.Settings.PowerShellSettingStrategyFactory.GetSettingsStrategy(String [15:38:08] :     [Step 1/6] filePath) [15:38:08] :     [Step 1/6]    at RedGate.Versioning.Engine.Projects.ProjectSettings.SqlProj.ObjectMapping.MsBuildProjectMapper.MapTo(String [15:38:08] :     [Step 1/6] filePath, IMsBuildSettingsRepresentation msBuildDatabaseProjectSettings) [15:38:08] :     [Step 1/6]    at [15:38:08] :     [Step 1/6] RedGate.Versioning.Engine.Projects.ProjectSettings.SqlProj.ObjectMapping.MsBuildSettingsLoader`2.LoadSettings(String [15:38:08] :     [Step 1/6] filePath, IProgressLogger progress) [15:38:08] :     [Step 1/6]    at RedGate.Versioning.Automation.Compare.Projects.ProjectFactory.HasScaProperty(String sqlProjFilePath) [15:38:08] :     [Step 1/6]    at RedGate.Versioning.Automation.Compare.Projects.ProjectFactory.GetScaProject(String path) [15:38:08] :     [Step 1/6]    at RedGate.Versioning.Automation.Compare.Projects.ProjectFactory.CreateProjectPathFromPath(String path) [15:38:08] :     [Step 1/6]    at RedGate.Versioning.Automation.Compare.Projects.ProjectFactory.CreateFromPath(String path) [15:38:08] :     [Step 1/6]    at RedGate.Versioning.Automation.PowerShell.Commands.InvokeDatabaseBuildCommandImpl.Process() [15:38:08] :     [Step 1/6]    at RedGate.Versioning.Automation.PowerShell.DlmAutomationCommandImpl`1.ProcessRecord() [15:38:08] :     [Step 1/6]    at RedGate.PowerShell.CommandBase`2.DelegateTo(Action doImplementation) [15:38:08] :     [Step 1/6] At C:\TeamCity\buildAgent\plugins\sqlchangeautomation-teamcity-agent\SqlCi.ps1:193 char:39 [15:38:08] :     [Step 1/6] + ... ptsFolder | Invoke-DatabaseBuild @temporaryConnection @queryBatchTime ... [15:38:08] :     [Step 1/6] +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [15:38:08] :     [Step 1/6]     + CategoryInfo          : NotSpecified: (:) [Invoke-DatabaseBuild], InvalidProjectFileException [15:38:08] :     [Step 1/6]     + FullyQualifiedErrorId : UnhandledException,RedGate.Versioning.Automation.PowerShell.Commands.InvokeDatabaseBuild [15:38:08] :     [Step 1/6]    Command [15:38:08]W:     [Step 1/6] C:\TeamCity\buildAgent\plugins\sqlchangeautomation-teamcity-agent\SqlChangeAutomationRunner.ps1 : Error running SQL [15:38:08]W:     [Step 1/6] Change Automation action: see build log for error details [15:38:08]W:     [Step 1/6]     + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException [15:38:08]W:     [Step 1/6]     + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,SqlChangeAutomationRunner.ps1 / comments
HiIt looks like a similar issue might have occurred again? TeamCity server version is 2022.10.2 (build 117025)RedGate SQL Change Automation Plugin: 5.0.7[15:38:05] :     [Step 1/6] Invoke-DatabaseB...
0 votes
In the process of moving over to VS2022, was surprised that SCA is not available and found this thread. @StephanieHerr any update on this? / comments
In the process of moving over to VS2022, was surprised that SCA is not available and found this thread. @StephanieHerr any update on this?
0 votes