PathTooLongException with _GenerateBindingRedirectsIntermediateAppConfig
See original GitHub issueWe just hit a PathTooLongException on EF because this variable was producing the following path.
C:\Projects\EntityFramework\test\Microsoft.EntityFrameworkCore.SqlServer.Design.FunctionalTests\obj\Debug\netcoreapp1.1\Microsoft.EntityFrameworkCore.SqlServer.Design.FunctionalTests.csproj.Microsoft.EntityFrameworkCore.SqlServer.Design.FunctionalTests.dll.config
That filename seems rather excessive. Does it really need both $(MSBuildProjectFile) and $(TargetFileName) in there?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (7 by maintainers)
Top Results From Across the Web
The "GenerateBindingRedirects" task failed unexpectedly.
The "GenerateBindingRedirects" task failed unexpectedly. System.IO.PathTooLongException: The specified path, file name, or both are too long.
Read more >Enable or disable autogenerated binding redirects
Read how to enable or disable automatic binding redirection. This feature affects desktop apps and web apps targeting .NET Framework 4.5.1 ...
Read more >Binding Redirects
The fix if you're using .NET Framework · Enable <AutoGenerateBindingRedirects> (this doesn't work for web projects - it doesn't handle web.config ).
Read more >Codul lui da vinci film subtitrat in romana
The answer provided in this question: Web deployment task build failed could finally ... So just check if binding redirect can help.2" in...
Read more >Diagnostics - Jon Skeet's coding blog
NET Core within a WPF application to make it easy to interact with logs ... as I'd expect, but given that this is...
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

If the .exe/.dll name wasn’t unique the assembly would collide in the shared obj directory.
Workaround:
produces:
It doesn’t seem like it at first glance.
I’ve been spelunking through history trying to figure out why it’s this way, and it seems to have been introduced in dev12 with
GenerateBindingRedirects. I suspect it was named this way as a compromise between$(IntermediateOutputPath)$(MSBuildProjectFile).{filename}pattern for project-singleton caches and$(TargetFileName).configThis does cause duplication in the standard case, and having a very long project name that’s the same as the assembly name is not uncommon.
I think we could change this variable to
$(IntermediateOutputPath)$(MSBuildProjectFile).app.config. Anyone have an idea why not?(Obligatory “the real problem is #53 and then don’t worry about this”. Obligatory “but we live in the current world”.)