dotnet / netcorecli-fsc

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple embedded resources issue

ncave opened this issue · comments

Using a simple starter template:

<Project Sdk="FSharp.NET.Sdk;Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard1.6</TargetFramework>
    <Version>1.0.0-alpha</Version>
    <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="Library.fs" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
    <PackageReference Include="FSharp.Core" Version="4.1.*" />
  </ItemGroup>
</Project>

Adding more than one .resx file to the folder results in the following build error:

C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft.Common.CurrentVersion.targets(2857,5): error MSB3577: Two output file
 names resolved to the same output path: "obj\Debug\netstandard1.6\.resources" [C:\Projects\test_fs\test_fs.fsproj]

P.S. C# templates work fine with multiple .resx

@ncave the resx where not converted to resource files at all 😄 now is implemented

@enricosada More than one .resx file in project works now?

@ncave yes, because resx was not implemented at all, so all resx collided to obj\Debug\netstandard1.6\.resources instead of obj\Debug\netstandard1.6\Res1.resources for Res1.resx etc

i just need to publish FSharp.NET.Sdk 1.0.1 on nuget.org (really soon, probably tonight), i'll ping you and in the fsharp/fsharp-compiler-docs#700 issue

Would it work with other target frameworks too (net462)?

good test case.
Anyway yes, checked. i'll add to test suite (i need to use a better framework matrix, or anyway cleanup a bit)

@ncave just to be sure i added as tests in #82.

if you have more test case in mind np, but there is just invocation of task built by vf# repo, but no need to duplicate testing a lot (but check target framework is ok ihmo)

@ncave this issue is fixed with the new published FSharp.NET.Sdk v1.0.1 package