Skip to content

Commit

Permalink
Add PackageDownload for Microsoft.NETFramework.ReferenceAssemblies.ne…
Browse files Browse the repository at this point in the history
…t452 to make FSharpAcceptanceTestAssembly work
  • Loading branch information
bradwilson committed Jun 29, 2023
1 parent aeba1bb commit 028866f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test.utility/Compilation/FSharpAcceptanceTestAssembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ protected FSharpAcceptanceTestAssembly(string basePath)
protected override IEnumerable<string> GetStandardReferences()
{
var homeDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
var fxDir = $@"{homeDir}\.nuget\packages\microsoft.netframework.referenceassemblies.net452\1.0.2\build\.NETFramework\v4.5.2\";
// If you update this path, make sure to update the PackageDownload in test.utility.csproj as well
var fxDir = $@"{homeDir}\.nuget\packages\microsoft.netframework.referenceassemblies.net452\1.0.3\build\.NETFramework\v4.5.2\";
var mscorlib = $@"{fxDir}mscorlib.dll";
var sysRuntime = $@"{fxDir}Facades\System.Runtime.dll";

return new[] { mscorlib, sysRuntime, "xunit.abstractions.dll" };
}


protected override void Compile(string code, string[] references)
{
var sourcePath = Path.GetTempFileName() + ".fs";
Expand Down
5 changes: 5 additions & 0 deletions test/test.utility/test.utility.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<!-- Needed by FSharpAcceptanceTestAssembly -->
<PackageDownload Include="Microsoft.NETFramework.ReferenceAssemblies.net452" Version="[1.0.3]" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\xunit.assert\xunit.assert.csproj" />
<ProjectReference Include="..\..\src\xunit.execution\xunit.execution.csproj" />
Expand Down

0 comments on commit 028866f

Please sign in to comment.