Skip to content

Commit b6631d5

Browse files
committed
Fix duplicate dlls for InstallScript
1 parent c7bb335 commit b6631d5

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

Sdk/Sdk.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.1.2" />
4242
<PackageReference Include="Skyline.DataMiner.CICD.DMApp.Common" Version="2.0.14" />
4343
<PackageReference Include="Skyline.DataMiner.CICD.Assemblers.Automation" Version="1.1.0" />
44-
<PackageReference Include="Skyline.DataMiner.Core.AppPackageCreator" Version="2.0.3-alpha" />
44+
<PackageReference Include="Skyline.DataMiner.Core.AppPackageCreator" Version="2.0.3" />
4545
<PackageReference Include="System.Text.Json" Version="9.0.1" />
4646
</ItemGroup>
4747

Sdk/SubTasks/DmappCreation_AutomationScriptStyle.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ public static async Task<InstallPackageResult> TryCreateInstallPackage(PackageCr
3131
string filePath = ConvertToInstallScript(data, buildResultItems);
3232

3333
List<string> assemblies = new List<string>();
34+
35+
IEnumerable<string> nugetAssemblies = buildResultItems.Assemblies.Select(reference => reference.AssemblyPath);
36+
IEnumerable<(string assemblyFilePath, string destinationFolderPath)> extractAssemblies = AppPackageAutomationScriptBuilderHelper.ExtractAssembliesFromScript(buildResultItems.Document, nugetAssemblies);
37+
assemblies.AddRange(extractAssemblies.Select(reference => reference.assemblyFilePath));
38+
3439
assemblies.AddRange(buildResultItems.DllAssemblies.Select(reference => reference.AssemblyPath));
35-
assemblies.AddRange(buildResultItems.Assemblies.Select(reference => reference.AssemblyPath));
36-
40+
3741
result.Script = new AppPackageScript(filePath, assemblies);
3842
result.IsSuccess = true;
3943
}

SdkTests/SdkTests.csproj

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>net4.8;net8.0</TargetFrameworks>
@@ -10,7 +10,13 @@
1010
<ItemGroup>
1111
<PackageReference Include="FluentAssertions" Version="7.1.0" />
1212
<PackageReference Include="MSTest" Version="3.7.3" />
13+
<PackageReference Include="Microsoft.Build.Tasks.Core" VersionOverride="$(MicrosoftBuildMinimumPackageVersion)" Version="14.3.0" />
14+
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.1" />
15+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.1" />
16+
<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.1.2" />
17+
<PackageReference Include="Skyline.DataMiner.CICD.DMApp.Common" Version="2.0.14" />
1318
<PackageReference Include="Skyline.DataMiner.CICD.Assemblers.Automation" Version="1.1.0" />
19+
<PackageReference Include="Skyline.DataMiner.Core.AppPackageCreator" Version="2.0.3" />
1420
<PackageReference Include="System.Text.Json" Version="9.0.1" />
1521
</ItemGroup>
1622

0 commit comments

Comments
 (0)