By Jeff Pagley - 5/31/2015
I have upgraded to DevExpress v14.2 and .NET Framework 4.0. I have recompile the Strataframe Inherited UI DLL using DevExpress v14.2 references. When trying to load an existing form that uses the Strataframe DevExpress Wrapper control 'MaintenanceFormBarManager' I am getting the error below. Also, I am not able to drag it onto a form in the designer. In addition, I am getting other errors related to the inherited UI controls on forms when running the app.
Thank you for your help!
Object reference not set to an instance of an object. Instances of this error (1) 1. Hide Call Stack at DevExpress.XtraBars.Design.BarManagerDesigner.Initialize(IComponent component) at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo) at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name) at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name) at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement) at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject) at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)
|
By Andrew Harper - 5/31/2015
Hi Jeff,
Did you change the target framework of your application to .net 4.0 under the advanced compile options and have you run the Project Converter from the DevExpress Menu in Visual Studio on your application project? |
By Edhy Rijo - 6/1/2015
Hi Jeff,
Andy is right, you have to change the target framework of your application and the "Strataframe Inherited UI DLL" to .net 4.0. I currently use 4.5.
P.S. Be aware of DevExpress 15.1 to be release soon, probably this week. They have a full week of webinars starting today to show up the what is new in 15.1, highly recommended.
|
By Jeff Pagley - 6/1/2015
Yes I have changed the target framework to 4.0 and ran the DevExpress Project converter. The project converter will not run unless the target framework is 4.0 or higher. My other thought was do I need to place the ""Strataframe Inherited UI DLL" in the GAC?
|
By Edhy Rijo - 6/1/2015
Hi Jeff,
Yes you have to copy to the GAC. I use a batch file provided by SF with modifications to handle .Net 4.0 which is called "AfterBuild.bat", this batch file is executed in the Post build event of the project with the following code:
"$(SolutionDir)AfterBuild.bat" "$(TargetPath)" "$(TargetDir)$(ProjectName).xml"
Create the AfterBuild.bat file and place it in this folder, if you already have a copy of this batch file there, make a backup copy.
C:\Program Files (x86)\MicroFour\StrataFrame Source Code
Here is the content of my AfterBuild.bat:
"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe" /i %1 /f rem "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe" /i %1 /f
copy /Y %1 "%CommonProgramFiles(x86)%\MicroFour\StrataFrame" copy /Y %2 "%CommonProgramFiles(x86)%\MicroFour\StrataFrame"
With this batch file, when I update DevExpress, just need to do the following:
- Run DevExpress project converter to fix references to the new libraries.
- Rebuild the "Strataframe Inherited UI DLL"
- In the rebuild process the batch file will copy the file to the \Common Program Files and also register in the GAC.
Please let me know if that works for you.
|
By Andrew Harper - 6/1/2015
Hi Edhy,
Nice to see back - I'd forgotten about afterbuild.bat, thanks for the reminder, |
By Edhy Rijo - 6/1/2015
Hi Andrew,
Nice to see you back too!!!
About afterbuild.bat, glad to be able to help and hope help with Jeff's issue.
|
By Jeff Pagley - 6/1/2015
Hi Edhy,
Didn't notice it, but I have the AfterBuild.bat in place. It is the one provided by Strataframe. As far as I can tell, I have done everything correctly, but I am still having the same problems. I have done this several times over the years without any problems. Any other suggestions?
Thanks,
Jeff
|
By Edhy Rijo - 6/1/2015
Jeff, Make a copy of the SF AfterBuild.bat and use mine which has been tested for .Net 4.x
|
By Jeff Pagley - 6/1/2015
Hi Edhy,
That worked.
Thank You!
Jeff
|
By Edhy Rijo - 6/1/2015
Hi Jeff,
Glad it worked out for you.
Enjoy!!!!
|
|