Open pvandervelde opened 9 years ago
What version of the extension are you using?
I have the same problem with version 2.12.0.18.
Sorry, TFS version is 2012. Visual Studio version is 2013.
could you download the template you are using and attach it here. I only have 2013 at hand, it may be the same but I may as well debug it with exactly what you are using...
thanks!
,Mike
Hi Mike, No problem. Attached.
Thanks! Michael
On Wed, Mar 18, 2015 at 6:05 PM, Mike Fourie notifications@github.com wrote:
could you download the template you are using and attach it here. I only have 2013 at hand, it may be the same but I may as well debug it with exactly what you are using...
thanks!
,Mike
— Reply to this email directly or view it on GitHub https://github.com/tfsbuildextensions/BuildManager/issues/8#issuecomment-83203087 . DefaultTemplate.11.1.xaml
Mike, I copied and pasted the template in the comment above.
Thanks I have a repro. Will try get a fix in for you soon.
Looking forward. Thank you.
@mduberstein let me know if that works for you
@mikefourie It didn't, no errors are produced, but the entire Automated Test entry becomes empty I have downloaded the .zip code Suppressed analyzer errors
MSBUILD : error CA2227: Microsoft.Usage : Change 'ExportedBuildDefinition.AgileTestSpecs' to be read-only by removing the property setter. 2>MSBUILD : error CA1002: Microsoft.Design : Change 'List
' in 'ExportedBuildDefinition.AgileTestSpecs' to use Collection , ReadOnlyCollection or KeyedCollection<K,V> 2> Code Analysis Complete -- 3 error(s), 0 warning(s) 2>MSBUILD : error : Code Analysis detected errors. See Code Analysis results window or log file for details.
built the entire solution's Release Built, uninstalled version 2.12.0.18 installed 2.12.0.19 TFSBuildManager.Package.vsix.
As you could see the entire Automated Test section is stripped.
@mikefourie I attach the old and new .json, The only difference is "AgileTestSpecs": [] added in 2.12.0.19. No data is exported though :-(. Thanks.
{ "Name": "DeployLab3", "Description": "Clone of DeployLab2 with logging straight to TFS, not log files\r\nCreated to experiment with build definition to make web.config transform work and packages find msdeploy on target servers.\r\n", "ContinuousIntegrationType": 1, "BuildController": "Default Controller - ritfsbldt1",h "ProjectsToBuild": [ "$/Study Baseline/Main/Build/Deploy3.proj" ], "ConfigurationsToBuild": null, "QueueStatus": 0, "ProcessTemplate": "$/Study Baseline/BuildProcessTemplates/DefaultTemplate.11.1.xaml", "DefaultDropLocation": "", "TfvcAgentSettings": null, "GitAgentSettings": null, "Schedules": [], "ContinuousIntegrationQuietPeriod": 0, "SourceProviders": [ { "Name": "TFVC", "SupportedTriggerTypes": 127, "Fields": {} } ], "Mappings": [ { "MappingType": 0, "LocalItem": "$(SourceDir)", "ServerItem": "$/Study Baseline/Main/Build", "Depth": 120 }, { "MappingType": 0, "LocalItem": "$(SourceDir)\ROME Central Setup", "ServerItem": "$/Study Baseline/Main/Build/ROME Central Setup", "Depth": 120 }, { "MappingType": 0, "LocalItem": "$(SourceDir)_Data", "ServerItem": "$/Study Baseline/Main/Databases/RomeDatabase/_Data", "Depth": 120 }, { "MappingType": 0, "LocalItem": "$(SourceDir)_Scripts", "ServerItem": "$/Study Baseline/Main/Databases/RomeDatabase/Scripts", "Depth": 120 } ], "TestParameters": null, "RetentionPolicyList": [ { "BuildDefinition": null, "BuildReason": 64, "BuildStatus": 2, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 64, "BuildStatus": 4, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 64, "BuildStatus": 8, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 64, "BuildStatus": 16, "NumberToKeep": 1, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 191, "BuildStatus": 2, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 191, "BuildStatus": 4, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 191, "BuildStatus": 8, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 191, "BuildStatus": 16, "NumberToKeep": 1, "DeleteOptions": 29 } ], "ProcessParameters": { "BuildSettings": "Build $/Study Baseline/Main/Build/Deploy3.proj with default platform and configuration", "TestSpecs": [ "From Test Settings - Run tests in assemblies matching *_test*.dll using settings from $/Study Baseline/Main/Windows7_Chrome.testsettings" ], "MSBuildArguments": "/p:WebServer=ritfslab01t1;SqlServer=ritfslab01t1;Environment=testing", "DisableTests": true, "Verbosity": 3 }, "BuildReasons": {}, "IntegerParameters": {}, "BuildVerbosities": { "Verbosity": 3 }
{ "Name": "DeployLab3_clone", "Description": "Clone of DeployLab2 with logging straight to TFS, not log files\r\nCreated to experiment with build definition to make web.config transform work and packages find msdeploy on target servers.\r\n", "ContinuousIntegrationType": 1, "BuildController": "Default Controller - ritfsbldt1", "AgileTestSpecs": [], "ProjectsToBuild": [ "$/Study Baseline/Main/Build/Deploy3.proj" ], "ConfigurationsToBuild": null, "QueueStatus": 0, "ProcessTemplate": "$/Study Baseline/BuildProcessTemplates/DefaultTemplate.11.1.xaml", "DefaultDropLocation": "", "TfvcAgentSettings": null, "GitAgentSettings": null, "Schedules": [], "ContinuousIntegrationQuietPeriod": 0, "SourceProviders": [ { "Name": "TFVC", "SupportedTriggerTypes": 127, "Fields": {} } ], "Mappings": [ { "MappingType": 0, "LocalItem": "$(SourceDir)", "ServerItem": "$/Study Baseline/Main/Build", "Depth": 120 }, { "MappingType": 0, "LocalItem": "$(SourceDir)\ROME Central Setup", "ServerItem": "$/Study Baseline/Main/Build/ROME Central Setup", "Depth": 120 }, { "MappingType": 0, "LocalItem": "$(SourceDir)_Data", "ServerItem": "$/Study Baseline/Main/Databases/RomeDatabase/_Data", "Depth": 120 }, { "MappingType": 0, "LocalItem": "$(SourceDir)_Scripts", "ServerItem": "$/Study Baseline/Main/Databases/RomeDatabase/Scripts", "Depth": 120 } ], "TestParameters": null, "RetentionPolicyList": [ { "BuildDefinition": null, "BuildReason": 64, "BuildStatus": 2, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 64, "BuildStatus": 4, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 64, "BuildStatus": 8, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 64, "BuildStatus": 16, "NumberToKeep": 1, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 191, "BuildStatus": 2, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 191, "BuildStatus": 4, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 191, "BuildStatus": 8, "NumberToKeep": 10, "DeleteOptions": 29 }, { "BuildDefinition": null, "BuildReason": 191, "BuildStatus": 16, "NumberToKeep": 1, "DeleteOptions": 29 } ], "ProcessParameters": { "BuildSettings": "Build $/Study Baseline/Main/Build/Deploy3.proj with default platform and configuration", "TestSpecs": [ "From Test Settings - Run tests in assemblies matching *_test*.dll using settings from $/Study Baseline/Main/Windows7_Chrome.testsettings" ], "MSBuildArguments": "/p:WebServer=ritfslab01t1;SqlServer=ritfslab01t1;Environment=testing", "DisableTests": true, "Verbosity": 3 }, "BuildReasons": {}, "IntegerParameters": {}, "BuildVerbosities": { "Verbosity": 3 } }
if you break on line 452 in TFSBuildManager.Views\ViewModels\BuildManagerViewModel.cs I suspect you will be using MSTestSpec rather than agiletestspec. I'll try add support for MSTestSpec soon.
Hi,
Trying to export/import some build definitions from one TFS to VSO. In general it works (y) greate job.
But seems Advanced builds settings are exported incorrectly. They are missing [ ] around the Json array. The export is
"AdvancedBuildSettings": {
"Json": "{\"MSBuildArguments\":\"\",\"MSBuildMultiProc\":true,\"MSBuildPlatform\":\"Auto\",\"PreActionScriptPath\............"\",\"MSBuildVersion\":\"\"}"
},
So when I try to import the same exported Json I get a error. "Specified cast is not valid." If I add [] around it (like the other similar values it works.
"AdvancedBuildSettings":[ {
"Json": "{\"MSBuildArguments\":\"\",\"MSBuildMultiProc\":true,\"MSBuildPlatform\":\"Auto\",\"PreActionScriptPath\............"\",\"MSBuildVersion\":\"\"}"
}],
Hi, Found the problem with my templates when doing a Import/Export. Needed to tweak the code a little since we have custom templates.
Our Unit test section is a BuildParameter array so needed to add some "special cases. For Import else if (param.Key == "AutomatedTests") { BuildParameter[] paramItem = new BuildParameter[1]{new Microsoft.TeamFoundation.Build.Common.BuildParameter(param.Value.ToString())}; process.Add(param.Key, paramItem); }
For Export. if (item.Key == "AutomatedTests") { BuildParameter[] avalue = (BuildParameter[])item.Value; buildToExport.ProcessParameters[item.Key] = JsonConvert.DeserializeObject(avalue[0].ToString()); }
After that my templates where imported/exported successfully.
When exporting and importing a TFS2013 standard build definition the test section of the build information is not written out to the json correctly which means that the import fails to import any of the test information.