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

Unable to use GenerateResxSource #7741

Closed
softwaretirol opened this issue Aug 11, 2021 · 9 comments
Closed

Unable to use GenerateResxSource #7741

softwaretirol opened this issue Aug 11, 2021 · 9 comments

Comments

@softwaretirol
Copy link

I am trying to use the "GenerateResxSource" and "GenerateResxSourceEmitFormatMethods" property.
Just defined a default console application, throwed a Resources.resx in there and activated the flags.

But there is no class generated? Do i miss anything? Tryed to explicitly set the GenerateSource Attribute an all resx in addition - also not working.

Thanks for any hint.

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>
  <PropertyGroup>
    <GenerateResxSource>true</GenerateResxSource>
    <GenerateResxSourceEmitFormatMethods>true</GenerateResxSourceEmitFormatMethods>
  </PropertyGroup>
  <ItemGroup>
    <EmbeddedResource Update="*.resx" GenerateSource="true"  />
  </ItemGroup>
</Project>

@ghost ghost added the Needs Triage A new issue that needs to be associated with an epic. label Aug 11, 2021
@MattGal
Copy link
Member

MattGal commented Aug 18, 2021

[Triage]: Should investigate in FR to determine if this is a bug or incorrect usage, then kick back to triage.

@ghost ghost removed the Needs Triage A new issue that needs to be associated with an epic. label Sep 2, 2021
@markwilkie
Copy link
Member

I think we've changed the way loc works and this can be closed? @jonfortescue ?

@jonfortescue
Copy link
Contributor

@markwilkie xliff-tasks still relies on underlying resxs, so I think this is still relevant. Admittedly, I'm not familiar at all with how resx generation works.

@ChadNedzlek
Copy link
Member

@jonfortescue Do you know who would? I don't know that there is enough context in this issue to actually take action on it or prioritize it appropriately, unfortunately. As such, unless we get more info soon, it should probably be closed.

@jonfortescue
Copy link
Contributor

I think our best bet is @ericstj -- any ideas?

@sharwell
Copy link
Member

It sounds like this is a request to use Arcade's GenerateResxSource task in a non-arcade project. This scenario is the intended audience for Microsoft.CodeAnalysis.ResxSourceGenerator, but keep in mind the package is difficult to install right now.

@ericstj
Copy link
Member

ericstj commented Oct 28, 2021

Right, to use GenerateResxSource your project would need to reference the Microsoft.DotNet.Arcade.Sdk. That's what we do for shared infra in our dotnet repositories, but it's not something that's shipped on public nuget. You can do that if you like, but it's a lot if all you want is this one task.

I agree with @sharwell that the Microsoft.CodeAnalysis.ResxSourceGenerator is probably a better choice here. @sharwell will that be going on nuget.org?

@sharwell
Copy link
Member

will that be going on nuget.org?

Yes once we work out the usability issues.

@riarenas
Copy link
Member

riarenas commented Nov 4, 2021

Looks like this has been answered. Thanks @sharwell and @ericstj

@riarenas riarenas closed this as completed Nov 4, 2021
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

No branches or pull requests

8 participants