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

Re-add embed #6277

Merged
merged 1 commit into from
Feb 25, 2019
Merged

Re-add embed #6277

merged 1 commit into from
Feb 25, 2019

Conversation

KevinRansom
Copy link
Member

Back in August we renamed Embed to EmbeddedFiles, this Build Property is used to specify to the build task what source files to embed in the PDB. The property was renamed to align with the C# BuildTask since we did it first this seems slightly unfair, but hey …

However, there is a nasty side effect that sometimes now shows up. Msbuild has a habit of re-using loaded assemblies, so it is possible for some solutions to actually use different versions of the F# compiler depending on installed versions, paths, etc.

This causes us to see occasionally under hard to diagnose circumstances, this error:

  C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\Microsoft.FSharp.Targets(276,15): 
error MSB4064: The "Embed" parameter is not supported by the "Fsc" task. Verify the parameter exists on the task, and it is a settable public instance property. [D:\a\1\s\fcs\FSharp.Compiler.Service.ProjectCrackerTool\FSharp.Compiler.Service.ProjectCrackerTool.fsproj]
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\Microsoft.FSharp.Targets(265,9): 
error MSB4063: The "Fsc" task could not be initialized with its input parameters.  [D:\a\1\s\fcs\FSharp.Compiler.Service.ProjectCrackerTool\FSharp.Compiler.Service.ProjectCrackerTool.fsproj]

The Fix here is to make the build task now support both Embed and EmbeddedFiles, so that now whichever Microsoft.FSharp.Targets file is in use we end up being able to support the property.

Also, we are switching back to using the old Task-property in Microsoft.FSharp.Targets, so that if the old build task was loaded first then it's will be used.

We will use the msbuild property EmbeddedFiles as input to the Embed buildtask property so that our project files look like the C# ones.

/cc @dsyme, @cartermp, brettfo

Kevin

@KevinRansom KevinRansom merged commit efb57cf into dotnet:master Feb 25, 2019
@KevinRansom KevinRansom deleted the readdembed branch February 25, 2019 20:23
@dsyme
Copy link
Contributor

dsyme commented Feb 26, 2019

Thank you for fixing this, I'd seen the error from time to time and had no idea what was going on

@cartermp cartermp added this to the 16.0 milestone Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants