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

Resources File in .NET Standard (1.4) with New csproj #21158

Closed
dagrooms52 opened this issue Apr 17, 2017 · 3 comments
Closed

Resources File in .NET Standard (1.4) with New csproj #21158

dagrooms52 opened this issue Apr 17, 2017 · 3 comments
Labels
area-System.Resources question Answer questions and provide assistance, not an issue with source code or documentation.
Milestone

Comments

@dagrooms52
Copy link

I'm developing an application targeting .NET Standard 1.4, using the new csproj style (not project.json), and trying to get a localizable resources file to become available throughout the project.

I get compiler errors when including a resources file currently, similar to 'Resources' does not contain a definition for 'X'

The csproj automatically includes the resources file as follows:

    <ItemGroup>
        <Compile Update="Resources.Designer.cs">
            <DesignTime>True</DesignTime>
            <AutoGen>True</AutoGen>
            <DependentUpon>Resources.resx</DependentUpon>
        </Compile>
    </ItemGroup>

    <ItemGroup>
        <EmbeddedResource Update="Resources.resx">
            <Generator>ResXFileCodeGenerator</Generator>
            <LastGenOutput>Resources.Designer.cs</LastGenOutput>
        </EmbeddedResource>
    </ItemGroup>

Did it miss a step in the generation? Why can't I access any of the members of my resources file throughout the assembly?

http://stackoverflow.com/questions/43454441/resources-file-in-net-standard-1-4-with-new-csproj

@tarekgh
Copy link
Member

tarekgh commented Apr 17, 2017

@karelz we need to move this issue to msbuild. this is tooling issue and not really corefx. do you know the repo we can move this issue to?

@karelz
Copy link
Member

karelz commented Apr 17, 2017

@tarekgh
Copy link
Member

tarekgh commented Apr 17, 2017

@dagrooms52 I moved the issue to msbuild repo so I am closing it here.

@tarekgh tarekgh closed this as completed Apr 17, 2017
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.0.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Resources question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
None yet
Development

No branches or pull requests

4 participants