question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MissingManifestResourceException

See original GitHub issue
Exception message:System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "ClassLibrary1.Migrations.Test.resources" was correctly embedded or linked into assembly "ClassLibrary1" at compile time, or that all the satellite assemblies required are loadable and fully signed.
Stack trace:
   at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
   at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
   at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
   at ClassLibrary1.Migrations.Test.System.Data.Entity.Migrations.Infrastructure.IMigrationMetadata.get_Target()
   at System.Data.Entity.Migrations.DbMigration.GetModel(Func`2 modelAccessor)
   at System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration migration, DbMigration lastMigration)
   at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ApplyMigration(DbMigration migration, DbMigration lastMigration)
   at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
   at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
   at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration)
   at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
   at System.Data.Entity.Migrations.Infrastructure.MigratorScriptingDecorator.ScriptUpdate(String sourceMigration, String targetMigration)
   at System.Data.Entity.Infrastructure.Design.Executor.ScriptUpdate.<>c__DisplayClass0_0.<.ctor>b__0()
   at System.Data.Entity.Infrastructure.Design.Executor.OperationBase.<>c__DisplayClass4_0`1.<Execute>b__0()
   at System.Data.Entity.Infrastructure.Design.Executor.OperationBase.Execute(Action action)

Further technical details

EF version: 6.3.0-preview9-19423-04 Database Provider: EntityFramework.SqlServer Operating system: Windows 10 IDE: Visual Studio 2019 16.2.4

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

23reactions
bricelamcommented, Sep 13, 2019

@Varorbc This is an issue with the SDK for .NET Framework projects. I’ve filed https://github.com/dotnet/sdk/issues/3639.

Workaround

You can work around the issue by adding this to your csproj:

<PropertyGroup>
  <EmbeddedResourceUseDependentUponConvention>true</EmbeddedResourceUseDependentUponConvention>
</PropertyGroup>

Unfortunately, in 3.0 Preview 9 you’ll then hit https://github.com/microsoft/msbuild/issues/4695, but this should be fixed in the next release.

2reactions
mjamrocommented, Jul 23, 2021

I’m targeting net461 and the workaround with setting EmbeddedResourceUseDependentUponConvention is not working.

Instead i’m using:

<ItemGroup>
    <EmbeddedResource Update="**\*.resx">
        <DependentUpon>$([System.String]::Copy('%(FileName)')).cs</DependentUpon>
    </EmbeddedResource>
</ItemGroup>

which seems to work just fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What does MissingManifestResourceException mean and ...
This problem occurs if you use a localized resource that exists in a satellite assembly that you created by using a .resources file...
Read more >
MissingManifestResourceExcepti...
In .NET apps, MissingManifestResourceException is thrown when the attempt to retrieve a resource fails because the resource set for the neutral culture ...
Read more >
System.Resources.MissingManifestResourceException ...
Resources.MissingManifestResourceException: 'Could not find any resources appropriate for the specified culture or the neutral culture. Make ...
Read more >
System.Resources.MissingManifestResourceException
Based on the code snippet, it looks like the code expects a resource with the name "button1.BackgroundImage"... System::ComponentModel:: ...
Read more >
How I can fix this error in windows form
MissingManifestResourceException : 'Could not find any resources appropriate for the specified culture or the neutral culture.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found