Skip to content

Conversation

@KevinRansom
Copy link
Contributor

This allows the TargetFramework for compilation in the test framework to be configured.

It is necessary because the current mechanism uses #if/#else/#endif to hard code the framework references based on the TFM of the test build. However, we should be able to compile other tfms for example Netstandard2.0

@KevinRansom KevinRansom requested a review from a team as a code owner February 13, 2023 22:56
Comment on lines +128 to +140
/Z.fs
/Y.fs
/X.fs
/Library.fs
/Ghost.fs
/D.fsi
/D.fs
/C.fsi
/C.fs
/B.fsi
/B.fs
/A.fsi
/A.fs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should those be removed?

let systemDynamicRuntimeRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netstandard20.System_Dynamic_Runtime).GetReference(display = "System.Dynamic.Runtime.dll (netstandard 2.0 ref)")


module private NetCoreApp31Refs =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still use netcoreapp31 somewhere?

let asNetStandard20 (cUnit: CompilationUnit) : CompilationUnit =
match cUnit with
| FS fs -> FS { fs with TargetFramework = TargetFramework.NetStandard20 }
| CS cs -> CS { cs with TargetFramework = TargetFramework.NetStandard20 }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious - does it work with C# tests too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not yet, when I need it for C# I will make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants