Issues with Jetbrains Rider
See original GitHub issueDescribe the bug When opening a project made with HandyControl visual studio template, in Rider, I got a warning that Project ‘myProject’ load finished with warnings: [NETSDK1022] Duplicate ‘Page’ items were included. The .NET SDK includes ‘Page’ items from your project directory by default. You can either remove these items from your project file, or set the ‘EnableDefaultPageItems’ property to ‘false’ if you want to explicitly include them in your project file. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: ‘Properties\DesignTimeResources.xaml’ at (69:5)
this warning becomes an error when building or running the project in Rider, and won’t let me proceed. so I added a line
<EnableDefaultPageItems>false</EnableDefaultPageItems>
in myProject.csProj (I believe this value is default TRUE). and that error went away but a bunch of other errors appeared such as “Cannot resolve symbol ‘InitlizeComponent’” , cannot convert expression type MainWindow to return type System.windows.window (at CreateShell) MainWindow is hc:Window.
leaving EnabledDefaultPageItems to FALSE give all these same error in visual studio also, but setting to true make it work in visual studio. there are this ItemGroup in *.csProj file
<ItemGroup>
<Page Include="Properties\DesignTimeResources.xaml" Condition="'$(DesignTime)'=='true' OR ('$(SolutionPath)'!='' AND Exists('$(SolutionPath)') AND '$(BuildingInsideVisualStudio)'!='true' AND '$(BuildingInsideExpressionBlend)'!='true')" >
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<ContainsDesignTimeResources>true</ContainsDesignTimeResources>
</Page>
</ItemGroup>
Removing these lines and setting EnabledDefaultPageItems to TRUE. Made the project work in Rider.
but when I change theme while any TextBox on the current page has the property VerticalScrollBarVisibility = true, the project throws an exception - See stacktace here To Reproduce Steps to reproduce the behavior:
- Create a project with HandyControl Visual Studio AddOn template
- open it inJetbrains Rider -First error
- Add <EnableDefaultPageItems> FALSE </EnableDefaultPageItems> -Second Error
- Create a TextBox and set VerticalScrollBarVisibility = Visible and then change Theme. -Third Error
Environment :
- .net: core 3.0
- IDE [e.g. vs 2019/ Rider 2020 2.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (7 by maintainers)
I changed the height of TextBox and the theme change started working, but as I input text in it and it auto changes the height, Then changing the theme causes the exception. (means when VerticalScrollBar is visible) I think I’ll just go with disabling the scrollbar. Thank you so much for your help. for your efforts and ah…faster replies. 😄
In general, this problem is due to the design of your user interface With this change, I was able to run your program without any problems