Skip to content

Commit b7594ff

Browse files
committed
fix(tests): Repair InstallValidatorTests build and runtime failures
The SDK-format migration (d9f4aaf) incorrectly converted the original FwBuildTasks assembly reference into a ProjectReference with Build=false and Private=False. This prevented FwBuildTasks.dll from being copied to the test output directory, causing a runtime FileNotFoundException. Incremental builds masked the issue by reusing stale DLLs. Changes: - Restore the original direct assembly Reference pattern for FwBuildTasks, pointing to BuildTools/FwBuildTasks/$(Configuration)/ with Private=True so the DLL is copied to Output/<Configuration>/ - Add Compile Remove for AssemblyInfoForTests.cs and AssemblyInfoForUiIndependentTests.cs, matching the sibling InstallerArtifactsTests project (this project does not reference the FW core assemblies those files depend on) - Replace the GAC reference Microsoft.Build.Utilities.v4.0 with a direct reference to Microsoft.Build.Utilities.Core from BuildTools (needed for the MSBuild Task base type used by LogMetadata) - Add Nullable=annotations to support string? syntax in WixInstallerArtifactsTests.cs - Fix malformed XML (OutputType and NoWarn were concatenated on one line)
1 parent 52d8b79 commit b7594ff

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

Src/InstallValidator/InstallValidatorTests/InstallValidatorTests.csproj

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
<AssemblyName>InstallValidatorTests</AssemblyName>
55
<RootNamespace>SIL.InstallValidator</RootNamespace>
66
<TargetFramework>net48</TargetFramework>
7-
<OutputType>Library</OutputType> <NoWarn>168,169,219,414,649,1635,1702,1701</NoWarn>
7+
<OutputType>Library</OutputType>
8+
<NoWarn>168,169,219,414,649,1635,1702,1701</NoWarn>
89
<IsTestProject>true</IsTestProject>
910
<Prefer32Bit>false</Prefer32Bit>
1011
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
12+
<Nullable>annotations</Nullable>
1113
</PropertyGroup>
1214
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
1315
<DebugSymbols>true</DebugSymbols>
@@ -20,19 +22,25 @@
2022
<Optimize>true</Optimize>
2123
<DefineConstants>TRACE</DefineConstants>
2224
</PropertyGroup>
25+
<ItemGroup>
26+
<Compile Remove="$(FwRoot)Src\AssemblyInfoForTests.cs" />
27+
<Compile Remove="$(FwRoot)Src\AssemblyInfoForUiIndependentTests.cs" />
28+
</ItemGroup>
2329
<ItemGroup>
2430
<PackageReference Include="SIL.TestUtilities" />
2531
</ItemGroup>
2632
<ItemGroup>
27-
<Reference Include="Microsoft.Build.Utilities.v4.0" />
2833
<Reference Include="netstandard" />
34+
<Reference Include="FwBuildTasks">
35+
<HintPath>../../../BuildTools/FwBuildTasks/$(Configuration)/FwBuildTasks.dll</HintPath>
36+
<Private>True</Private>
37+
</Reference>
38+
<Reference Include="Microsoft.Build.Utilities.Core">
39+
<HintPath>../../../BuildTools/FwBuildTasks/$(Configuration)/Microsoft.Build.Utilities.Core.dll</HintPath>
40+
<Private>False</Private>
41+
</Reference>
2942
</ItemGroup>
3043
<ItemGroup>
31-
<ProjectReference Include="../../../Build/Src/FwBuildTasks/FwBuildTasks.csproj">
32-
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
33-
<Build>false</Build>
34-
<Private>False</Private>
35-
</ProjectReference>
3644
<ProjectReference Include="../InstallValidator.csproj" />
3745
</ItemGroup>
3846
<ItemGroup>

0 commit comments

Comments
 (0)