Don't attempt to filter any referenced assemblies

Re https://github.com/mono/monodevelop/issues/6304
Re VSTS #704919
This commit is contained in:
nosami 2018-10-12 17:29:29 +01:00
Родитель e72e063c1f
Коммит 9d3661bd5f
4 изменённых файлов: 5 добавлений и 25 удалений

Просмотреть файл

@ -8,7 +8,7 @@ open System.Reflection
// The assembly version has the format {Major}.{Minor}.{Build}.{Revision}
[<assembly: AssemblyVersion("1.0.0.27")>]
[<assembly: AssemblyVersion("1.0.0.28")>]
//[<assembly: AssemblyDelaySign(false)>]
//[<assembly: AssemblyKeyFile("")>]

Просмотреть файл

@ -37,27 +37,6 @@ type ResourceProvider(config : TypeProviderConfig) =
let addRef ref =
cp.ReferencedAssemblies.Add ref |> ignore
let rec getSolutionRootFolder (folder:DirectoryInfo) =
match folder.EnumerateFiles("*.sln") |> Seq.tryHead with
| Some _sln -> folder
| None ->
let parent = folder.Parent |> Option.ofObj
match parent with
| Some p -> getSolutionRootFolder p
| None -> config.ResolutionFolder |> DirectoryInfo
let addProjectReferences() =
// This might add references that we don't need. Not sure it matters.
let parentFolder = getSolutionRootFolder (DirectoryInfo config.ResolutionFolder)
let isRefAssembly (r:string) =
r.StartsWith parentFolder.FullName && File.Exists r
config.ReferencedAssemblies
|> Array.filter(isRefAssembly)
|> Array.iter addRef
let addReference assemblyFileName =
printfn "Adding reference %s" assemblyFileName
let reference =
@ -74,7 +53,8 @@ type ResourceProvider(config : TypeProviderConfig) =
addReference "System.dll"
addReference "mscorlib.dll"
addProjectReferences()
config.ReferencedAssemblies
|> Array.iter addRef
if isInsideIDE then
printfn "Running inside IDE context"

Просмотреть файл

@ -8,7 +8,7 @@ open System.Reflection
// The assembly version has the format {Major}.{Minor}.{Build}.{Revision}
[<assembly: AssemblyVersion("1.0.0.27")>]
[<assembly: AssemblyVersion("1.0.0.28")>]
//[<assembly: AssemblyDelaySign(false)>]
//[<assembly: AssemblyKeyFile("")>]

Просмотреть файл

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Xamarin.Android.FSharp.ResourceProvider</id>
<version>1.0.0.27</version>
<version>1.0.0.28</version>
<title>Xamarin.Android.FSharp.ResourceProvider</title>
<authors>Xamarin</authors>
<owners>Xamarin</owners>