How can we help you today? How can we help you today?
haleyjason
This is a common problem I run into when I'm debugging an addin ... that is crashing. Do you have any addins installed? Are you getting the popup crash dialog to send information to Red-Gate or is it just closing? / comments
This is a common problem I run into when I'm debugging an addin ... that is crashing. Do you have any addins installed? Are you getting the popup crash dialog to send information to Red-Gate or i...
0 votes
This weekend I put together some code using Jason Bock's FileGenerator addin for a starting point. Here is a rough listing of what I added to it: Foreach class inheriting from Form Create new file of same name with extension of .resx Copy form cs file and rename to new file of same name with extension of .Designer.cs Foreach .Designer.cs file Add 'partial' to declaration Remove contructors Remove event handlers Change AutoScaleMode.Font to System.Windows.Forms.AutoScaleMode.Font ... others Foreach original form.cs file Add 'partial' to declaration Remove control declarations (if instantiated in InitializeComponents()) Remove IContainer declaration Remove Dispose method Remove InitializeComponents() method Copy Dataset.cs file and create new .Designer.cs file Foreach .Designer.cs file Add 'partial' to declaration Remove any method the doesn't have [DebuggerNonUserCode] Remove any property that doesn't have [DebuggerNonUserCode] Remove any field declarations that are not set in InitClass() method Foreach dataset .cs file Remove any method that has [DebuggerNonUserCode] Remove any property that has [DebuggerNonUserCode] Remove any field declarations that are set in InitClass() method Change VSProject to look like this: <None Include="TestWinFormsApplication\TestDbDataSet.xsd"> <Generator>MSDataSetGenerator</Generator> <LastGenOutput>TestDbDataSet.Designer.cs</LastGenOutput> <SubType>Designer</SubType> </None> <Compile Include="TestWinFormsApplication\TestDbDataSet.cs"> <DependentUpon>TestDbDataSet.xsd</DependentUpon> <SubType>Component</SubType> </Compile> <Compile Include="TestWinFormsApplication\TestDbDataSet.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>TestDbDataSet.xsd</DependentUpon> </Compile> Replace '$' with '_' in all files Notes: - The Addin works best if you choose the second level of the assembly tree (where it shows the complete name ie. TestExample.exe (or .dll) - not the namespace which is the first level). - The dataset designer won't have your DataTableAdapters (I couldn't figure out how to reverse these) - You might need to add some additional using/imports statements to get it to compile - If you use linq from the data tables, you'll probably need to replace the base class of the data table to be System.Data.TypedTableBase<yourrow> - The table adapter classes are still in their own cs/vb files - this will save you from having them deleted when the designer regenerates ... since I couldn't figure out the xs:annotation creation in the designer's xsd file. The addin in currently at: http://jasonhaley.com/files/FileGenerator.zip ... this is an unauthorized hack of Jason Bock's File Generator - so please do not distribute. NOTE: in my testing I mostly used C#, so there could be some unknown VB issues. / comments
This weekend I put together some code using Jason Bock's FileGenerator addin for a starting point. Here is a rough listing of what I added to it:Foreach class inheriting from Form Create new file ...
0 votes