Skip to content

Revert incorrect resource file DependentUpon changes#37518

Closed
Copilot wants to merge 3 commits intorelease/10.0from
copilot/fix-dotnet-ef-version-issue
Closed

Revert incorrect resource file DependentUpon changes#37518
Copilot wants to merge 3 commits intorelease/10.0from
copilot/fix-dotnet-ef-version-issue

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

The previous changes incorrectly modified DependentUpon from Resources.Designer.tt to Resources.resx in an attempt to fix MSBuild's **/*.resx glob expansion error. This error is actually an MSBuild SDK bug (dotnet/sdk#10172) triggered when directories with special characters exist in user projects, not an EF Core issue.

Changes

Reverted the following in 4 csproj files (ef, dotnet-ef, EFCore.Tasks, Microsoft.Data.Sqlite.Core):

  • Removed explicit <EmbeddedResource Update> blocks for Properties\Resources.resx
  • Restored <DependentUpon>Resources.Designer.tt</DependentUpon> (was incorrectly changed to Resources.resx)

Root Cause

The T4 templates (Resources.Designer.tt) correctly generate the Resources.Designer.cs files from .resx sources. MSBuild's default SDK behavior already includes **/*.resx as embedded resources. The dependency chain was correct as-is.

The reported error occurs when user projects contain directories with special characters (e.g., D:\Processed with a colon), causing MSBuild's glob pattern matcher to fail - this is beyond EF Core's control.

Original prompt

This section details on the original issue you should resolve

<issue_title>dotnet-ef --version 10.0.2 - Throws Exception</issue_title>
<issue_description>### Error

dotnet-ef --version 10.0.2 - Throws Exception

`/opt/hostedtoolcache/dotnet/sdk/10.0.102/Microsoft.Common.CurrentVersion.targets(3442,5): error MSB3552: Resource file "**/*.resx" cannot be found. [/home/vsts/work/1/s/src/xxx/xxx/xxx.csproj]
0 Warning(s)
1 Error(s)

Time Elapsed 00:00:02.45

Microsoft.EntityFrameworkCore.Tools.CommandException: Build failed. Use dotnet build to see the errors.
at Microsoft.EntityFrameworkCore.Tools.Project.Build(IEnumerable1 additionalArgs) at Microsoft.EntityFrameworkCore.Tools.RootCommand.Execute(String[] _) at Microsoft.EntityFrameworkCore.Tools.Commands.CommandBase.<>c__DisplayClass0_0.<Configure>b__0(String[] args) at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args) at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)

-> In version 10.0.1 this error did not occured. Error was thrown in a pipeline using efcore-migration-script-generator-task@1

Links

No response

Root Cause

unknown

Blocking

  • This issue is blocking

Affected Releases

  • .NET 10
  • .NET 10 (SDK band build)
  • .NET 11</issue_description>

<agent_instructions>Start by creating a project that reproduces the reported issue, after that try to isolate it to a test case. If it's not possible to create a test case for this issue just keep the project in the PR and try to fix the issue.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@akoeplinger I assume this also happens with just `dotnet build` right? looks similar to https://github.com/dotnet/sdk/issues/10172 @AndriySvyryd There were only 2 relevant PRs between 10.0.1 and 10.0.2:

Try adding --framework net10.0 to the command line and making sure that only v10+ SDKs are installed on the machine. If that doesn't work please share a small project that shows the issue.</comment_new>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 15, 2026 20:12
- Add explicit EmbeddedResource Update for Properties\Resources.resx
- Change DependentUpon for Resources.Designer.cs from .tt to .resx
- This prevents MSBuild glob expansion issues with resource files

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
…Core

- Add explicit EmbeddedResource Update for Properties\Resources.resx
- Change DependentUpon for Resources.Designer.cs from .tt to .resx
- Ensures consistency with ef and dotnet-ef projects

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix exception thrown by dotnet-ef version 10.0.2 Fix resource file DependentUpon to prevent MSBuild glob expansion errors Jan 15, 2026
Copilot AI requested a review from AndriySvyryd January 15, 2026 20:21
Copilot AI changed the title Fix resource file DependentUpon to prevent MSBuild glob expansion errors Revert incorrect resource file DependentUpon changes Jan 15, 2026
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

Successfully merging this pull request may close these issues.

2 participants