netcorecli-fsc
netcorecli-fsc copied to clipboard
assemblyinfo attributes are not generated from fsproj
ref https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/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 https://github.com/GoogleCloudPlatform/google-cloud-dotnet/issues/863#issuecomment-285860239, 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.