Migrations don't compile. 'Unable to create a manifest resource name for %MIGRATION_FILE%.resx'. Could not find a part of the path '%MIGRATION_FILE%%.cs'
See original GitHub issueWe are getting the following build errors when trying to compile our EF6 project on .NET Core Preview 9 (also tested nightly build 6.3.0-rc1-19455-01, tested both Windows and Mac).
Microsoft.CSharp.CurrentVersion.targets(100, 9): [MSB3041] Unable to create a manifest resource name for "Migrations\201806250240525_MigrationName1.resx". Could not find a part of the path 'C:\...PathToProject...\Migrations\Migrations\###############_MigrationName1.cs'.
Microsoft.CSharp.CurrentVersion.targets(100, 9): [MSB3041] Unable to create a manifest resource name for "Migrations\201806250240525_MigrationName2.resx". Could not find a part of the path 'C:\...PathToProject...\Migrations\Migrations\###############_MigrationName2.cs'.
...
Microsoft.CSharp.CurrentVersion.targets(100, 9): [MSB3041] Unable to create a manifest resource name for "Migrations\201806250240525_MigrationName5.resx". Could not find a part of the path 'C:\...PathToProject...\Migrations\Migrations\###############_MigrationName5.cs'.
It seems the paths being looked for includes ‘Migrations\Migrations\’ twice, which indeed doesn’t exist.
Further technical details
EF version: Tried both 6.3.0-preview9-19423-04 and 6.3.0-rc1-19455-01 Database Provider: System.Data.SqlClient (SQL Server) Operating system: Tried both Windows 10 and MacOS Mojave 10.14.6 IDE: Rider 2019.2.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (10 by maintainers)
Top Results From Across the Web
Unable to create a manifest resource name error in Visual ...
It basically means it can't find your files. 1. Try to close and reopen the project. 2. Re-add the files via Add ->...
Read more >[Solved] C# Error: Unable to create a manifest resource name
I`ve updated the project(Reports folder) but when I want to build it, it shows this error and the error is not about my...
Read more >when build project error manifest display why and how to ...
Could not find a part of the path 'C:............\Form1.cs'. Unable to create a manifest resource name for "Form1.resx". The file or directory ...
Read more >Visual Studio 2010: Unable to create a manifest resource ...
I've done a Ctl+F search for the form name across the entire solution and "FrmList does not show up. I'm totally stuck. Any...
Read more >How to fix: “Could not find any resources appropriate for the ...
In this post we´re going to see a common error that may pop up when using resource files in ASP.NET MVC. Could not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@divega confirmed that putting the files in the root directory avoids the problem – though obviously not an acceptable workaround since we have tens of migrations and would change + pollute the project structure.
The workaround of manually adding the dependent-upon references also avoids the issue, as mentioned above (more acceptable):
The resource names will be wrong (as they were in preview8) causing
new ResourceManager(typeof(MyMigrationClass))
to fail