Skip to content

Commit cf68b37

Browse files
[FSSDK-11731] different approach
1 parent c7d24b8 commit cf68b37

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

.github/workflows/csharp.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,19 @@ jobs:
4646
uses: NuGet/setup-nuget@v1
4747
- name: Install .NET Framework Developer Packs
4848
run: |
49+
# Install .NET 4.5.2 developer pack (this works reliably)
4950
choco install netfx-4.5.2-devpack -y
50-
choco install windows-sdk-7.1 -y
51-
choco install netfx-4.0.3-devpack -y
51+
52+
# Check what targeting packs are already available
53+
echo "Checking available targeting packs..."
54+
dir "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools" || echo "No .NET 4.0 tools found"
55+
dir "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework" || echo "No reference assemblies found"
56+
57+
# Try to install .NET 4.0 targeting pack from a different source
58+
echo "Attempting to download .NET 4.0 targeting pack..."
59+
Invoke-WebRequest -Uri "https://download.microsoft.com/download/1/B/E/1BE39E79-7E39-46A3-96FF-047F95396215/dotNetFx40_Full_setup.exe" -OutFile "dotnet40.exe"
60+
.\dotnet40.exe /quiet /norestart || echo "Installation failed or already installed"
61+
continue-on-error: true
5262
- name: Restore NuGet packages
5363
run: nuget restore ./OptimizelySDK.NETFramework.sln
5464
- name: Build & strongly name assemblies

.github/workflows/csharp_release.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,19 @@ jobs:
4343
uses: nuget/setup-nuget@v2
4444
- name: Install .NET Framework Developer Packs
4545
run: |
46+
# Install .NET 4.5.2 developer pack (this works reliably)
4647
choco install netfx-4.5.2-devpack -y
47-
choco install windows-sdk-7.1 -y
48-
choco install netfx-4.0.3-devpack -y
48+
49+
# Check what targeting packs are already available
50+
echo "Checking available targeting packs..."
51+
dir "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools" || echo "No .NET 4.0 tools found"
52+
dir "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework" || echo "No reference assemblies found"
53+
54+
# Try to install .NET 4.0 targeting pack from a different source
55+
echo "Attempting to download .NET 4.0 targeting pack..."
56+
Invoke-WebRequest -Uri "https://download.microsoft.com/download/1/B/E/1BE39E79-7E39-46A3-96FF-047F95396215/dotNetFx40_Full_setup.exe" -OutFile "dotnet40.exe"
57+
.\dotnet40.exe /quiet /norestart || echo "Installation failed or already installed"
58+
continue-on-error: true
4959
- name: Restore NuGet packages
5060
run: nuget restore ./OptimizelySDK.NETFramework.sln
5161
- name: Build and strongly name assemblies

0 commit comments

Comments
 (0)