-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Unhandled Exception #6
Comments
Hi @tysonsearls, |
Yes, via the installer the msi file and windows server 2016 Update: I was able to get it to work/run by github cloning the older version to VS 1.0.5.8 and doing a nuget update to Newtonsoft.json and RestSharp to the newest versions. I am running the exe from the build bin folder without the installer. It looks like RestSharp was looking to the older version of Newtonsoft.json |
Thanks for that! - I will look into it, what have been made and in the installer - looks like some mismatch 🫣 |
Hey, this is a side question. What good are the zip files? if you open them up it doesn't contain the code folder structure but guid files that have random characters. How do you restore the zip files to the code folder structure? |
Hi @tysonsearls, Good question :) The RAW data from the Azure DevOps API is the .zip files containing the guid/metadata from it. To get the files name and the correct content, you will need to set the --unzip argument - it will unsip it and mark the guid/metadata together to the files. |
Ok, We have a lot of projects with many branches, so unzipped the disk could get full very fast, I was wanting to have your tool download them as a zip and unzip them manually when needed for disaster preparedness. Do you know of a way to do that? to have your tool download them as a zip then unzip them to something I can use? if not what is the point of downloading them zipped? |
At the moment the tool can´t that ( unzip them manually when needed for disaster preparedness). There is the --unzip argument to unzip the files when it got it from the API (.zip files, Microsoft decision as that the raw data retuned form the API), and then set the --cleanup argument to cleanup the .zip files when downloaded and unzipped. |
I see the bug in the new installer - strange, as it was tested.. I see the code refer to some v. of assembly not here. But I have now tested it, and I can fine run the files compiled in the bin folder - but not if installing it via the installer. Looking into it. |
Tested it - the file "AzureDevOpsBackup.exe.config" is missing in the installer. I will fix. |
Hi @tysonsearls , Fixed installer and some small other changes. Get it here: https://github.com/michaelmsonne/AzureDevOpsBackupTool/releases/tag/1.0.6.0 Will look into a small tool aside to match the guid data to files for restore repos on-demand. Will update you. Thanks for the feedback! :) EDIT: Fixed wrong link |
Thanks for you help Michael! |
Allways @tysonsearls - sitting right now in Visual Studio and are in the makeing of a "AzureDevOpsBackupUnzipTool.exe" :) |
Hi @tysonsearls , For a tool to unzip single repos based on .zip content and .json metadata - take a look here in development: https://github.com/michaelmsonne/AzureDevOpsBackupTool/tree/Add-toolToUnzipSingleBackup :) |
Thanks Michael! |
I will close this one as the bug is fixed with a new installer (missing .config file). I will update the rest when it´s tested and a new v. is out :) |
Bug Report
1.0.5.9
Current behavior:
While running it the app crashes "Unhandled Exception" with System.text.json version 8.0.0.3
Expected behavior:
it would complete the backup
Steps to reproduce:
every time I run it on the command line
Related code:
Welcome to Azure DevOps Backup, v.1.0.5.9 by Michael Morten Sonne
Checking if the 7 required arguments is present (--token, --org, --backup, --server, --port, --from, --to)...
Checked if the 7 required arguments is present (--token, --org, --backup, --server, --port, --from, --to) - all is fine!
Email report priority arguments is set to: Low
Starting connection to Azure DevOps API from data provided from arguments
Base URL is for Organization is: 'https://dev.azure.com/neocioweb/'
Output folder is: 'D:\NeociowebCodeBackups\07-08-2024-(11-49)'
Output folder does not exists - trying to create 'D:\NeociowebCodeBackups\07-08-2024-(11-49)'...
Output folder is created: 'D:\NeociowebCodeBackups\07-08-2024-(11-49)'
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Text.Json, Version=8.0.0.3, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
d__1.MoveNext()at RestSharp.Serializers.Json.SystemTextJsonSerializer..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstanceT
at RestSharp.Serializers.SerializerConfig.<>c__5
1.<UseSerializer>b__5_0() at RestSharp.Serializers.SerializerConfig.UseSerializer(Func
1 serializerFactory)at RestSharp.RestClient.ConfigureSerializers(ConfigureSerialization configureSerialization)
at RestSharp.RestClient..ctor(RestClientOptions options, ConfigureHeaders configureDefaultHeaders, ConfigureSerialization configureSerialization, Boolean useClientFactory)
at RestSharp.RestClient..ctor(String baseUrl, ConfigureRestClient configureRestClient, ConfigureHeaders configureDefaultHeaders, ConfigureSerialization configureSerialization)
at AzureDevOpsBackup.Program.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at AzureDevOpsBackup.Program.(String[] args)
Other information:
Thanks! Really looking forward to backing up my devops code with your app.
The text was updated successfully, but these errors were encountered: