Closed bradphelan closed 4 years ago
@jviau - would this be project-system, or core CPS?
It's nasty, but here's a glob that works for Resx/embedded resources: https://github.com/onovotny/MSBuildSdkExtras/blob/master/MSBuild.Sdk.Extras/build/MSBuild.Sdk.Extras.Common.targets#L14-L28
I see the same stuff getting added to the project file when you run the tool.
This is CPS. I have identified the issue, single file generator is rewriting all property, causing us to expand them all. We will fix this soon.
Nice - @jviau is there an ID for the issue on the CPS side?
Great - closing as external then. If you can - it would be great to comment here on the expected release with the fix once it's merged.
@Pilchie did this ever get a release?
@davidwengier We had a bunch of changes both in single file generators and editing since above - can we verify if this still exists? The internal bug was won't fix but we've had feedback here and https://github.com/Microsoft/msbuild/issues/2352#issuecomment-454076634.
Internal PR here: https://devdiv.visualstudio.com/DevDiv/_git/CPS/pullrequest/217519
i also note that renaming a parent file, that has dependents globbed under it, results in those dependents being explicitly duplicated in the csproj. will the fix for this issue also resolve that?
@SimonCropp No, can you file a new one for that here?
@davkean done https://github.com/dotnet/project-system/issues/5706
This has been fixed.
Here is a fun example of bad behaviour of globbing and the project system. I have
where I18NReactive is a custom single file generator I wrote. The globbing and dependencies work at first glance.
Then I right click and select run custom tool to regen the
resx.cs
file. And not only does it update the file it also updates my csproj file. 👎 so now it isthat's kinda wierd no?
I also tried