Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build net472 of Microsoft.DotNet.DependencyMangager since the netstandard2.0 can't be ngened #10390

Merged
merged 1 commit into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp"
file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.xml"
file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\FSharp.Build.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
file source="$(BinariesFolder)\Microsoft.DotNet.DependencyManager\$(Configuration)\netstandard2.0\Microsoft.DotNet.DependencyManager.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
file source="$(BinariesFolder)\Microsoft.DotNet.DependencyManager\$(Configuration)\net472\Microsoft.DotNet.DependencyManager.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Build.Framework.dll"
file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Build.Tasks.Core.dll"
file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Build.Utilities.Core.dll"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net472</TargetFrameworks>
<IsPackable>true</IsPackable>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netstandard2.0</TargetFrameworks>
<AssemblyName>Microsoft.DotNet.DependencyManager</AssemblyName>
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
<AllowCrossTargeting>true</AllowCrossTargeting>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ open Internal.Utilities.FSharpEnvironment
/// host implements this, it's job is to return a list of package roots to probe.
type NativeResolutionProbe = delegate of Unit -> seq<string>

#if NETSTANDARD
open System.Runtime.Loader

// Cut down AssemblyLoadContext, for loading native libraries
Expand Down Expand Up @@ -105,12 +106,15 @@ type NativeDllResolveHandlerCoreClr (nativeProbingRoots: NativeResolutionProbe)
if not (isNull eventInfo) then
eventInfo.RemoveEventHandler(AssemblyLoadContext.Default, handler)
()
#endif

type NativeDllResolveHandler (nativeProbingRoots: NativeResolutionProbe) =
let handler:IDisposable option =
type NativeDllResolveHandler (_nativeProbingRoots: NativeResolutionProbe) =
let handler: IDisposable option =
#if NETSTANDARD
if isRunningOnCoreClr then
Some (new NativeDllResolveHandlerCoreClr(nativeProbingRoots) :> IDisposable)
Some (new NativeDllResolveHandlerCoreClr(_nativeProbingRoots) :> IDisposable)
else
#endif
None

let appendSemiColon (p:string) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type NativeResolutionProbe = delegate of Unit -> seq<string>
type NativeDllResolveHandler =

/// Construct a new NativeDllResolveHandler
new: nativeProbingRoots: NativeResolutionProbe -> NativeDllResolveHandler
new: _nativeProbingRoots: NativeResolutionProbe -> NativeDllResolveHandler

member internal RefreshPathsInEnvironment: string seq -> unit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<NgenArchitecture>All</NgenArchitecture>
<NgenPriority>2</NgenPriority>
<Private>True</Private>
<AdditionalProperties>TargetFramework=netstandard2.0</AdditionalProperties>
<AdditionalProperties>TargetFramework=net472</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj">
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
Expand Down