Skip to content

Bad code generation for resource #3689

@dsyme

Description

@dsyme

@brettfo There seems to be a problem with resource generation

Building `tests\projects\Sample_VS2012_FSharp_ConsoleApp_net45_with_resource`` using

cd tests\projects\Sample_VS2012_FSharp_ConsoleApp_net45_with_resource
msbuild /p:FSharpTargetsPath=C:\GitHub\dsyme\visualfsharp\release\net40\bin\Microsoft.FSharp.Targets

which has

		<EmbeddedResource Include="ResxResource.resx">
			<GenerateSource>true</GenerateSource>
		</EmbeddedResource>

Gives multiple bad source files such as obj\Debug\ResxResource.fs

// <auto-generated>

namespace global

open System.Reflection

module internal  =
    type private C (_dummy:System.Object) = class end
    let mutable Culture = System.Globalization.CultureInfo.CurrentUICulture
    let ResourceManager = new System.Resources.ResourceManager("ResxResource", C(null).GetType().GetTypeInfo().Assembly)
    let GetString(name:System.String) : System.String = ResourceManager.GetString(name, Culture)
    let GetObject(name:System.String) : System.Object = ResourceManager.GetObject(name, Culture)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-ProjectsAndBuildMSBuild tasks, project files, framework resolutionBugImpact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions