alessandro-avila / project-oagents

Experimental AI Agents Framework
Creative Commons Attribution 4.0 International
0 stars 0 forks source link

Developer.Implement chain for #82 #86

Open project-oagent-gh-app[bot] opened 1 month ago

project-oagent-gh-app[bot] commented 1 month ago

Write a script to install the latest version of Visual Studio for C# development on a Windows machine.

project-oagent-gh-app[bot] commented 1 month ago

Based on the guidelines provided, we need to create a bash script to install Visual Studio for C# development on a Windows machine and then integrate it with Git for version control. However, bash scripts are not natively supported on Windows machines. We can use PowerShell instead.

Here's the PowerShell script that will download and install the latest Visual Studio Professional edition and Git:

# The PowerShell script
# This script installs the latest version of Visual Studio for C# development on a Windows machine and Git for version control

# Download Visual Studio Professional edition
Write-Host "Downloading Visual Studio Professional..."
$vs_url = "https://aka.ms/vs/16/release/vs_professional.exe"
$vs_exe = "vs_professional.exe"
Invoke-WebRequest -Uri $vs_url -OutFile $vs_exe

# Install Visual Studio with the .Net desktop development workload and English language pack
# The --wait argument ensures that the Visual Studio installer will wait for the installation to finish before exiting
Write-Host "Installing Visual Studio Professional with .NET desktop development..."
Start-Process -FilePath $vs_exe -ArgumentList "--add Microsoft.VisualStudio.Workload.NetDesktop", "--add Microsoft.VisualStudio.Workload.NetCoreTools", "--add Microsoft.VisualStudio.Workload.NetWeb", "--addComponent Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions", "--add Microsoft.VisualStudio.Component.TestTools.WebLoadTest", "--add Microsoft.VisualStudio.Component.Windows10SDK.18362", "--lang en-US", "--wait", "--quiet" -Wait

# Clean up the Visual Studio installer
Remove-Item $vs_exe

# Download Git
Write-Host "Downloading Git..."
$git_url = "https://github.com/git-for-windows/git/releases/download/v2.26.2.windows.1/Git-2.26.2-64-bit.exe"
$git_exe = "Git-2.26.2-64-bit.exe"
Invoke-WebRequest -Uri $git_url -OutFile $git_exe 

# Install Git with default options
Write-Host "Installing Git..."
Start-Process -FilePath $git_exe -ArgumentList "/VERYSILENT" -Wait

# Clean up the Git installer
Remove-Item $git_exe

# Confirm installation
Write-Host "Visual Studio Professional and Git have been installed."

Note: The URLs used in this script for both Visual Studio and Git are subject to change based on the latest versions available from Microsoft and Git's websites respectively. The script requires the system to have internet access and sufficient permissions to install software. Also, this script doesn't handle any kind of error checking or recovery, so it should be used as a base and expanded upon to suit your specific needs.