-
Notifications
You must be signed in to change notification settings - Fork 123
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
Updated version of https://github.com/fsharp/FSharp.Compiler.Service/pull/593 #597
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,15 @@ open System.Collections | |
open System.Reflection | ||
|
||
type TaskItem (itemSpec:string) = | ||
let assembly = Assembly.Load(new AssemblyName("Microsoft.Build.Utilities.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")) | ||
let assembly = | ||
Assembly.Load( | ||
new AssemblyName( | ||
#if !NETSTANDARD1_5 | ||
"Microsoft.Build.Utilities.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" | ||
#else | ||
"Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" | ||
#endif | ||
)) | ||
let buildUtilitiesTaskType = assembly.GetType("Microsoft.Build.Utilities.Task") | ||
let instance = Activator.CreateInstance(buildUtilitiesTaskType, [|itemSpec|]) | ||
|
||
|
@@ -784,7 +792,15 @@ module internal ToolLocationHelper = | |
// instance.GetType().GetPropserty(propName, BindingFlags.Public).SetValue(instance, propValue, null) | ||
|
||
type ResolveAssemblyReference () = | ||
let assembly = Assembly.Load(new AssemblyName("Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")) | ||
let assembly = | ||
Assembly.Load( | ||
new AssemblyName( | ||
#if !NETSTANDARD1_5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is NETSTANDARD1_5 defined in both the project.json and FSharp.Compiler.Service.fsproj? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK is this defined automatically when compiling netstandard1.5 with project.json. I have no idea how it works after switching to msbuild. Most likely I should have used another symbolor added it to msbuild but i have no idea... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fsproj doesnt compile for netstandard, so it's ok i think. |
||
"Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" | ||
#else | ||
"Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" | ||
#endif | ||
)) | ||
let resolveAssemblyReferenceType = assembly.GetType("Microsoft.Build.Tasks.ResolveAssemblyReference") | ||
let instance = Activator.CreateInstance(resolveAssemblyReferenceType) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to note: This will actually disable the msbuild resolution code path. Therefore the changes below are not actually needed (at least for my case) and I never tested them. I just wanted to bring some attention there as there seems to be a problem which should be fixed...