Creating WPF Window in Revit Multi-Version Library Project
First of all, I would like to recommend our Revit secondary development open source project RevitApiWrapper
In the open source framework, a multi-version generation framework is provided. Instead of using the original .netframework framework, it is changed to .net core framework. You can directly modify it. If you need custom modifications, you can refer to jimmy’s blog which provides basic implementation and configuration.
.net core Project
How to add WPF windows in a class library project? There are many ways on the Internet, such as adding WPF typeid or creating components, but when using it, I found that neither can be used in this framework. Attached links can also be referred to blog modification attempts if needed
Set C# class library project to add WPF elements
Add WPF Window object in ordinary “Class Library” project
Create a class library project through the project, right-click and add, finding no WPF window. You can open the csproj file and create a new group, adding the following words.
1 | <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> |
After saving, click right-click on the project location to add all types of WPF windows





