.NET Core Version: (e.g. 3.0 Preview1, or daily build number, use dotnet --info)
3.0.100-preview5-011568
Windows version: (winver)
Windows 10 Version 1903
Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes/No
No
Problem description:
Failed to build PresentationFramework: the type ColumnDefinitionCollection and RowDefinitionCollection could not be found in Grid.cs.
See: Grid.cs
Actual behavior:
------ Build started: Project: PresentationFramework, Configuration: Debug Any CPU ------
System\Windows\Controls\Grid.cs(309,16,309,42): error CS0246: The type or namespace name 'ColumnDefinitionCollection' could not be found (are you missing a using directive or an assembly reference?)
System\Windows\Controls\Grid.cs(324,16,324,39): error CS0246: The type or namespace name 'RowDefinitionCollection' could not be found (are you missing a using directive or an assembly reference?)
System\Windows\Controls\Grid.cs(3347,22,3347,48): error CS0246: The type or namespace name 'ColumnDefinitionCollection' could not be found (are you missing a using directive or an assembly reference?)
System\Windows\Controls\Grid.cs(3348,22,3348,45): error CS0246: The type or namespace name 'RowDefinitionCollection' could not be found (are you missing a using directive or an assembly reference?)
System\Windows\Controls\Grid.cs(4151,21,4151,47): error CS0246: The type or namespace name 'ColumnDefinitionCollection' could not be found (are you missing a using directive or an assembly reference?)
System\Windows\Controls\Grid.cs(4152,21,4152,44): error CS0246: The type or namespace name 'RowDefinitionCollection' could not be found (are you missing a using directive or an assembly reference?)
Done building project "PresentationFramework.csproj" -- FAILED.
Expected behavior:
The type ColumnDefinitionCollection and RowDefinitionCollection could be found in the project PresentationFramework.
Minimal repro:
Build the project PresentationFramework.
Hey, @LinkDoyle I just tried and was able to build locally. Can you make sure your branch is fully synced to master and, if you're still experiencing this, can you attach the binlog from artifacts\log\{Configuration} (Where {Configuration} is Release or Debug (whatever you're building))?.
Thanks!
That's a flaky code-generator. It never fails in build-servers, but sometimes fails on local builds.
If Grid.cs etc. has been generated (search for it by doing dir /s/b Grid.cs under artifacts), then delete them (also look for Row.cs) - or better yet, delete all of artifacts and then rebuild. Chances are good that those files exist but happen to be incomplete or are empty.
Things should work ok the next time around
Edit: The generated files are called ColumnDefinition.cs and RowDefinition.cs
Hi, @vatsan-madhavan @rladuca After deleting all of artifacts and then rebuild, the build was successful. Thank you.
Most helpful comment
That's a flaky code-generator. It never fails in build-servers, but sometimes fails on local builds.
If
Grid.csetc. has been generated (search for it by doingdir /s/b Grid.csunderartifacts), then delete them (also look forRow.cs) - or better yet, delete all ofartifactsand then rebuild. Chances are good that those files exist but happen to be incomplete or are empty.Things should work ok the next time around
Edit: The generated files are called
ColumnDefinition.csandRowDefinition.cs