dotnet / netcorecli-fsc

[DEPRECATED] F# and .NET Core SDK working together

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

assemblyinfo attributes are not generated from fsproj

enricosada opened this issue · comments

ref googleapis/google-cloud-dotnet#863

Attributes like TargetFrameworkAttribute, Version, FileVersion should be auto generated as temporary AssemblyInfo.fs passed to compiler

that's a regression from .net core sdk preview2

atm is not implemented at all.

As a workaround, these can be manually generated.
From googleapis/google-cloud-dotnet#863 (comment), create a new source file (file name doesnt matter)

namespace System

[<assembly:System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v1.1")>]
do ()

and add it as Compile item, like <Compile Include="AssemblyInfo.fs" />

how to fix it: we need to implement F# support in WriteCodeFragment tasks https://github.com/Microsoft/msbuild/blob/master/src/Tasks/WriteCodeFragment.cs

is just a foreach over assemblyattributes, in the switch (for coreclr), like c# does, no codedom needed

Same file for msbuild full codegen

/cc @brettfo @KevinRansom

How were these attributes getting created before?

@baronfel--just trying to see how necessary it is to bake support for every language into core MSBuild tasks.