System.NullReferenceException: Object reference not set to an instance of an object.
at ICSharpCode.FormsDesigner.Services.TypeResolutionService..ctor()
at ICSharpCode.WpfDesign.AddIn.MyTypeFinder..ctor()
at ICSharpCode.WpfDesign.AddIn.MyTypeFinder.Create(OpenedFile file)
at ICSharpCode.WpfDesign.AddIn.WpfViewContent.LoadInternal(OpenedFile file, Stream stream)
at ICSharpCode.SharpDevelop.Gui.AbstractViewContentHandlingLoadErrors.Load(OpenedFile file, Stream stream)
Descargar archivo ->->->-> https://urllio.com/2yPAhs
I did try your suggestion of using Visual Studio, and at first the Form Designer didn't seem to work there either. (I started the project with a Macro, and opened it in VS by draging the .sln file into VS. )
But a search online revealed a post about the forms designer not working if there is more than one class in the project. After deleting all other classes, the the designer suddenly started working. No luck trying this with Sharp.
Since I couldn't get the Sharp Forms Designer to work, I had to add the form buttons in VS, and copy the code back (with few edits). I've attached a couple of text files with the code just in case anyone else has the same issues.
(BTW, just in case anyone else also has this problem, I noticed the PPF handout is missing a step - copy and paste "016 Drag on Space Elevator" into a new class called Class2. I couldn't figure out why it wouldn't compile until I watched the video again. )
Also, I completely disagree about Sharp Develop only being good to set up projects. It has some limitations, but anyone can always edit, build, and test within 2 seconds with SharpDevelop. It's great for beginners, because it takes the least amount of time and effort to get some code up and running. I prefer to test and edit all my code within Sharp, and then just copy and paste into VS, making the few edits necessary for things like uidoc and doc. And you seem to have proven Sharp Develop can do some things its not supposed to do - like external applications, ribbons, and ribbon buttons.
I almost forgot to mention just in case anyone else needs to use the Sharp Develop Forms Designer in Revit 2021: For some reason, if I open Revit 2020 first, and open a sharp develop edit window in 2020 (by selecting a macro and then selecting edit), then open 2021 Revit, then the Sharp Develop Forms Designer works. I've tried this several times.
Yes Sharp develop is a fully functioning IDE and looks clean...faster to. With VS I may have falling in love with the Vertical Brace lines and the dark theme. VS also it supports installer projects for making MSI.
Meanwhile, since this is now a know and proven issue I hope the developers get in and take a look at the problem. Hopefully it will get fixed for 2021 and, if not, hopefully it will get fixed before 2022 hits the streets here in a bit...
For WPF you can add the Window and copy over the Xaml, it will sill build if you add a reference to system.xaml. The designer still doesn't work but that can be done elsewhere. Not much you can do for windows forms however.
It is a shame that SharpDevelop as an IDE seems to be on it last legs, probably there were updates to redistributables elsewhere due to .net and it isn't coping well with changes. I don't think it is as supported as it was so will be interesting to see what is decided going forward.
Well, they need to stop that talk. First they gave us VSTA as an IDE, then decided that it was too much of an effort to keep up with by themselves and took it away, then they gave us SharpDevelop as an IDE, now you say that they're talking about taking that away as well?
I don't know anything about the new one that you mentioned but there is a very good reason that we need an IDE, so we can actually test our code in real time. For many the IDE is all they need as they're just developing for themselves or perhaps only a couple of team members so they simply share the macros.
For people like me (that may go years between trying to write any additional functions) it is important to stay in an , at least somewhat, familiar language and environment. I struggle enough as it is trying to translate all of the C Sharp examples and such to the VB that I am somewhat familiar, but I simply can't take the time to fully immerse myself in a new language... I use VB because VBA was the IDE of choice (for many, many applications) when I started trying to hack things together more years ago than I would care to admit
All I'm trying to do is simplify a few things for myself and my co workers. I simply can't dedicate myself full time to learning all of the ins and outs of all of the different programming interfaces.
I don't have any inside knowledge on these things but I can see the signs I think. The band is still playing but there is water on deck up to their ankles. Could be wrong perhaps it is a simple fix that will be fixed.
I to would like SharpDevelop to continue but this is a 3rd party component and I think VSTA was a Microsoft maintained thing. Still available for AutoCAD but you have to install it (last time I wondered about it). The .Net languages have been around for quite a while now Excel/Word/AutoCAD etc. all support them. I used them in AutoCAD over a decade ago now.
Probably most Revit developers these days are either those that use Revit API with one of the .Net languages or those that use some form of Python over that. I tend to wonder what the district features of SDE are that you can't get with a free version of Visual Studio? Probably the only distinct feature is to package a macro and have it delivered with a project file (that is more to do with how Autodesk implement it).
The developers of SharpDevelopment are still offering its components in jigsaw fashion on github. There is a VB/C# code converter there from SharpDevelop. There is also the various designers that SDE uses but I think they've taken a step back from providing all of those items as an integrated thing (can't really blame them given the emergence of Visual Studio Code or even VS Community edition).
With Visual Studio I can't do that. So I am building the solution step by step in the IDE, then copying the code into Visual Studio (and adding the menu constructors and whatnot there) where it will eventually live to distribute as a functioning application to the rest of the company.
I know that Autodesk walked away from VSTA simply because they didn't want the headache of following Microsoft's rules for using and integrating it. I, personally wish they would do what they are constantly telling us to do... suck it up and deal with it and reintegrate VSTA as the IDE for all Autodesk apps with an IDE (primarily Autocad and Revit but...)
Actually, the Autocad based products are still using 2012 VBA as the IDE (the last official version of VBA that was left behind by Microsoft in favor of the newer concept of VSTA which allowed for more programming languages to be used so a person wasn't stuck with Visual Basic and could use C Sharp, etc or even mix code types in the same solution).
I would work exclusively in Visual Studio and not care about an IDE if they would provide us with a simple, quick, and easy to use and understand, reloading mechanism for applications written in VS that gives us the same ability to just rebuild the solution, then run the new build.
I have the same problem. Unfortunately, opening Revit 2020 (and leaving the SD window open) and then Revit 2022 doesn't work form. In fact, now using previous versions of Revit I can't use forms anymore!
tldr;
You must use version VS 2022 17.9.0 Preview 2 or newer to edit Windows or Dynamics GP forms in the forms designer of Visual Studio.
Since Visual Studio 2022, it is now a 64-bit application, this means editing Windows Forms in the forms designer for forms of 32-bit applications (such as Dynamics GP), is not possible (unless on this version of VS). Visual Studio throws an error: "The designer could not be shown for this file because none of the classes within it can be designed"
Visual Studio being 64-bit will not host the 32-bit application form. This is not just a GP issue, anyone working with 32-bit components faces the same issue. This renders the forms designer in Visual Studio useless for 32-bit applications or visual components.
In this very long thread on the Microsoft forum, you can see the long wait for a couple of years for the solution to the problem.
The Visual Studio team needed to create a 32-bit process container that the form could be off-loaded to for editing within Visual Studio. The solution is not perfect for everyone's needs, particularly with complex components, but it solves the issue for Dynamics GP development and Visual Studio 2022.
Simply download the preview version of Visual Studio (be aware this is a preview version and subject to instability), or if you are reading this in the future, just download the current version as long as it is at or above 17.9.0, then you are good to go. Preview 1 also had the out-of-process forms designer but it was an option that had to be turned on in settings.
When opening the 32-bit form, the dialog "Visual Studio is unable to load 32-bit assembly. Do you want to use Windows Forms out-of-process designer?" will pop up. There is also a difficult to read check box to make this selection sticky for this project (Remember for the current project). I have overlayed my label on the screenshot to make it easier to read.
The Form Designer (or Designer) is displayed automatically when you are creating or editing a form, such as a Windows VCL Application or an HD Multi-Device Application.The Form Designer runs automatically when you create a graphical application that uses a form file, either a .dfm or a .fmx file.
d3342ee215