Skip to content

Commit 43af365

Browse files
committed
Updates to README.md to support github migration
1 parent 27ad4c3 commit 43af365

File tree

4 files changed

+209
-1
lines changed

4 files changed

+209
-1
lines changed

CrmCodeGenerator.sln

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26430.15
4+
VisualStudioVersion = 15.0.26730.16
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{FE93ED76-041D-4F4C-8569-FC05C2D982B7}"
77
ProjectSection(SolutionItems) = preProject
@@ -16,6 +16,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrmCodeGenerator.Controls",
1616
EndProject
1717
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D53929D0-932B-4D63-9736-AF3CE1F55339}"
1818
ProjectSection(SolutionItems) = preProject
19+
Documentation\image_thumb_1.png = Documentation\image_thumb_1.png
20+
Documentation\image_thumb_2.png = Documentation\image_thumb_2.png
1921
README.md = README.md
2022
EndProjectSection
2123
EndProject
@@ -54,6 +56,7 @@ Global
5456
HideSolutionNode = FALSE
5557
EndGlobalSection
5658
GlobalSection(ExtensibilityGlobals) = postSolution
59+
SolutionGuid = {A6E84E50-393E-4D70-8B43-CF9CD3E460A2}
5760
VisualSVNWorkingCopyRoot = .
5861
EndGlobalSection
5962
GlobalSection(CrmCodeGeneration) = preSolution

Documentation/image_thumb_1.png

75.5 KB
Loading

Documentation/image_thumb_2.png

94.6 KB
Loading

README.md

+205
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# Dynamics CRM Code Generator for Visual Studio
2+
3+
Visual Studio extension that will generated the early bound classes for for Microsoft Dynamics CRM 2011 / CRM 2013 / CRM 2015 / CRM 2016 / Dynamics 365. Very Similar to what the CrmSvcUtil.exe does, which is also provided in the CRM Developer Toolkit as the “Generate Wrapper” function.
4+
5+
### Benefits of using this tool over the standard tool
6+
7+
Control which entities to generate classes for
8+
This will keep the size of the generated code to a minimum. If you use the CrmSvcUtil.exe to generate, the code file will be 200,000 lines. Compared ~1000 lines for each entity you select.
9+
10+
### Customize the way the code is generated
11+
You get a default T4 template for the code that gets generated. This will give you full control how the code gets generated.
12+
13+
### Built for Visual Studio
14+
You never have to leave Visual Studio to regenerate the early bound classes. All the configurations* are stored in the .SLN of the solution which allows you save them to Source Control. This is very helpful if you are working with other developers. (*username & password are stored in the .SUO file, which typically isn’t checked into Source Control)
15+
16+
The Developer Toolkit does allow you to stay inside Visual Studio but it wont allow you change connection settings while in Visual Studio. You have to exit Visual Studio, delete your .SUO file then restart Visual Studio.
17+
18+
19+
20+
## How To Use
21+
Install the VS extension –> [v1.15.0.0](https://github.com/xairrick/CrmCodeGenerator/raw/master/CrmCodeGenerator.VSPackage/bin/Debug/CrmCodeGenerator.vsix)
22+
23+
24+
#### Add a template to your project
25+
26+
Highlight the project where you want to store the template and generated code.
27+
Tools –> Add CRM Code Generator Template... (if you don’t see this menu, then shutdwon visual studio and reinstall the extension)
28+
29+
![File](Documentation/image_thumb_2.png)
30+
31+
Start with one of the provided templates
32+
33+
- **CrmSvcUtil.tt** – Code generated from this will be exactly what is produced from CRmSvcUtil.exe
34+
- **CrmSvcUtilExtended.tt** – Adds fieldname & Option Sets values (used v2 instead)
35+
- **CrmSvcUtilExtendedV2.tt** – Adds enum properties for all Two Option and Option Set fields (this is the one I use)
36+
- **JavaScript.tt** – Example of how to generate a JavaScript file from the CRM Schema (from https://crm2011codegen.codeplex.com )
37+
- **CSharp.tt** – POCO example of how to put C# data annotation on the fields. (requires you to put a reference to System.ComponentModel.DataAnnotations in your project)
38+
Sample.tt – Just another example of how to create a template for C#
39+
Connection & Entities
40+
41+
After a template is added to your project you will be prompted for CRM connection info. Connection info is saved to the .SLN file (username & password are saved to .SUO).
42+
Pick the entities that you want to include. (NOTE: if you click refresh you must have all the connection information filled out)
43+
Click the “Generate Code” button (this process takes about 45 seconds, but seems like 5 minutes)
44+
When the dialog goes away, it’s done and the generated code is ready to use.
45+
Refreshing metadata from the server
46+
47+
If you make schema changes in CRM and you want to refresh the code, right click the template and select “Run Custom Tool”
48+
49+
![File](Documentation/image_thumb_1.png)
50+
51+
#### Changing the template
52+
53+
When you make changes to the template and save, Visual Studio will automatically attempt to re-generate the code. HINT: select ‘No’ for fresh entities if you have just made changes in the template and don’t need to refresh from the CRM server, it will be much faster
54+
55+
56+
57+
58+
59+
60+
### History
61+
##### Version 1.15.0.0 Beta
62+
- [UPDATED] added VS2017 support
63+
64+
##### Version 1.0.4.0
65+
- [UPDATED] to Dynamics 365 (aka CRM 8.2)
66+
67+
##### Version 1.0.3.3
68+
- [BUG] Fixed attributes named Id
69+
- [BUG] Fixed attributes name EntityTypeCode
70+
- [BUG] Fixed related entities having the same name as the entity or other fields
71+
- [BUG] Fixed optionset item having lable of 'true' or 'false'
72+
73+
##### Version 1.0.3.1 Beta
74+
- [NEW] CrmSvcUtilExtendedV2 template. Puts Enums & Fields names inside the Entity class. New entity properties that will allow Option Sets & Two Option properties to be set/get directly with an Enum (making the code much easier to read).
75+
76+
##### Version 1.0.0.21 Alpha
77+
- [NOTE] compiled on new machine, so it's alpha until more tests can be done
78+
- [BUG] fixed saving properties on solutions.
79+
80+
81+
##### Version 1.0.0.4 Beta
82+
- [UPDATE] Improvement to entity metadata rerieval
83+
- [UPDATE] option to get unpublished changes
84+
85+
##### Version 1.0.0.3 Beta
86+
- [UPDATED] to Visual Studio 2013 (still works on VS2012)
87+
- [UPDATED] to CRM 2015
88+
89+
##### Version 0.9.3
90+
- [UPDATE] disabling login form while retrieving data from the server.
91+
- [BUG] Fixed, when you have an existing .tt file on disk but not in the project and you were adding a .tt file with the same name to the project Visual Studio would get set stuck in a loop
92+
- [BUG] Fixed, when an error occurred while refreshing the entities the hourglass cursor would be stuck.
93+
94+
##### Version 0.9.2
95+
- [BUG] Reverted back to modal dialog, as Visual Studio will send control keys (eg backspace, home, end) to text editor window with a modeless dialog.
96+
- [BUG] now showing the wait cursor sooner when logging into CRM to retrieve the entities.
97+
- [UPDATE] updated templates so that they would convert any Carriage Return in descriptions to CRLF
98+
99+
##### Version 0.9.1
100+
- [BUG] fixed bug when existing template window was open in the editor and it was being replaced.
101+
- [UPDATE] changed AddTemplate window to non-modal (Login window has to be modal)
102+
- [BUG] fixed window position to center on Visual Studio
103+
- [BUG] removed connection cache as it may not renew itself (eg leave VS open over night and you wont be able to re-generate code)
104+
105+
##### Version 0.9
106+
CrmSvcUtil.tt is ready for production. All generated classes has been compared to(and match) the Output from CrmSvcUtil.exe
107+
- [UPDATE] added more entities to the list of Non-Standard
108+
- [UPDATE] updated Attributes1 to match naming used by CrmSvcUtil.exe
109+
- [UPDATE] removed double underscore on Event, Namespace, & Abstract attributes to match CrmSvcUtil.exe
110+
- [UPDATE] removed background color on checkbox
111+
- [UPDATE] converted attributes name for SecondHalf & FirstHalf to match the title case used by CrmSvcUtil.exe
112+
- [BUG] fixed name for InvoiceState.Closed
113+
- [REFACTOR] Moved NonStandard entities to helper class
114+
- [UPDATE] Added the ability to exclude the non-standard entities with a checkbox.
115+
- [UPDATE] added summaries to XrmServiceContext class in CrmSvcUtil.tt
116+
- [BUG] fixed false positive on self-referencing many to many relationships (eg CampaignItem Campaign-to-Campaign is not self-referencing)
117+
- [UPDATE] to only use base.Id on read only entities (this is a template change if you have an old template delete and use the - one from this version)
118+
- [UPDATE] Dialogs now open in the center of Visual Studio
119+
120+
##### Version 0.8.5
121+
- [UPDATE] XML escaped the descriptions so they can be added into the summary of an class/property
122+
- [UPDATE] force-excluded entities that aren't included in CrmSvcUtil.exe
123+
- [BUG] typo in CrmSvcUtil.tt
124+
- [UPDATE] corrected CalendarRules by mirroring what CrmSvcUtil.exe does
125+
- [UPDATE] added rule to convert attribute name from calendar_calendar_rules to CalendarRules
126+
- [UPDATE] update Attribute type for ManagedProperties (eg ConnectionRole.IsCustomizable)
127+
- [UPDATE] fixed the case on the 'From' attribute
128+
- [UPDATE] excluded some more entities that aren't included with CrmSvcUtil.exe
129+
- [UPDATE] added support deprecated attributes
130+
- [UPDATE] cosmetic changes to CrmSrvUtil template to make it look more like the output from CrmSrvUtil.exe
131+
132+
##### Version 0.8.4.1
133+
- [BUG] Fixed bug in CrmSvcUtil template that cause problem with readonly entities
134+
135+
##### Version 0.8.4
136+
- [BUG] corrected AuditId so that it is now read only attribute on Audit (to match CrmSvcUtil.exe)
137+
- [BUG] corrected the StateCode on the AsyncOperation entity to allow it to be R/W (to match CrmSvcUtil.exe)
138+
- [BUG] Fixed attribute name for the ID attribute of Activities (it should be activityid not appoinmentid)
139+
- [BUG] AllParties needed to be made read only.
140+
- [BUG] Proper case for RequiredAttendees
141+
- [BUG] fixed the Attribute names for the period attributes on the fiscal calendars (now using annual/quarter/month instead of period/periodN/periodN)
142+
- [BUG] fixed attribute name of self-referencing 1:N relationship (eg "account_parent_account")
143+
- [UPDATE] Added ObjectTypeCode to entities that have them (eg address, annotation, queueitem, etc.)
144+
- [REFACTOR] removed the extra code that was added to created the Base fields (it wasn't needed, they were jsut being excluded)
145+
- [BUG] Added fully qualified class name to OptionSetValue
146+
- [UPDATE] Added Entity/Class summary to CrmSvcUtil template
147+
- [UPDATE] Replaced spaces with tabs in the CrmSvcUtil template
148+
- [UPDATE] Replaced all spaces in the CrmSvcUtil template with tabs
149+
- [UPDATE] Added summary to the attributes.
150+
151+
152+
##### Version 0.8.3.3
153+
- [BUG] fixed bug that was allowing a relationship to be updatable when the underlying property was not updatable.
154+
- [UPDATE] Added Referenced/Referencing relationships for self referencing N:N relationships (eg campaigncampaign_association)
155+
- [BUG] changed naming convention on 1:N relationship to match CrmSvcUtil.exe (removed the pluralization)
156+
- [UPDATE] forced removed postregarding, postrole, imagedescriptor, owner as they aren't provide in CrmSvcUtil
157+
- [BUG] Corrected the names of the Self-referencing relationships (eg contact_customer_contacts)
158+
- [UPDATE] Added _Base attributes for currency attributes. Added some explicit class names
159+
160+
##### Version 0.8.3.2
161+
- [BUG] Possible naming conflict when an N:N relationship has the same name as the entity. (eg native N:N relationship)
162+
163+
##### Version 0.8.3.1
164+
- [BUG] Used the wrong name when mapping related entities for custom entities. (also requires template to be updated; change attribute.ToEntity.DisplayName to attribute.ToEntity.HybridName)
165+
166+
##### Version 0.8.3
167+
Worked on getting the CrmSvcUtil template to more closely mirror what is generated by CrmScvUtil.exe
168+
- [UPDATE] Added support for N:N Relationships
169+
- [UPDATE] Added Support for N:1 Relationships
170+
- [UPDATE] Added Support for 1:N Relationships
171+
- [UPDATE] forced excluding applicationfile entity, it's not provided with the CrmSvcUtil.exe
172+
- [UPDATE] changed default templates so that CrmSvcUtil is the one that match Microsoft's CrmSvcUtil.exe and CrmSvcUtilExtended is the one with extra items (enums for OptionSetValue)
173+
- [UPDATE] Added additional fields for Entity Images (to match CrmSvcUtil)
174+
- [BUG/UPDATE] Removed the *Name & *Type fields from standard template.
175+
- [BUG] allowed OwnerId to be writable (needed when creating a new record).
176+
- [UPDATE] more standardization of the CrmSrvUtil. Removed 'sub'attribute fields
177+
- [BUG/UPDATE] forced excluding these entities; sqlencryptionaudit, subscriptionsyncinfo, and subscriptiontrackingdeletedobject. As they were not listed in the entities that are retrieved by CrmSvcutil
178+
- [BUG/UPDATE] CrmSvcUtilStandard template updated the StateCode to mirror the CrmSvcUtil where the field is ReadOnly.
179+
- [UPDATE] Added ActivityParty (forced if there is Activity in the entities list)
180+
- [BUG/UPDATE] for the standard template uniqueidentifiers are now being set to Nullable<GUID>.
181+
182+
183+
##### Version 0.8.2
184+
- [UPDATE] saving originally generated code so that is can be re-used if the developer cancels the login process the code generation does wipe out the file
185+
- [REFACTOR] Cleaning up the code in DteHelper
186+
- [UPDATE] Made Intersect Entities (aka Native N:N) readonly in the standard template
187+
- [UPDATE] Changed the default URL to match CRM OnLine
188+
- [BUG] Fixed bug that was causing the setting to get lost (ie not saved in the .SLN)
189+
- [BUG] was defaulting to the last organization that was selected.
190+
- [UPDATE] Better error handling for connection problems
191+
- [BUG] fixed so that the ErrorList window would be cleared of any previous template errors
192+
- [UPDATE] Username & Password (encrypted) now stored in the .SUO file
193+
- [UPDATE] password input is now using a PasswordBox so the password is concealed.
194+
195+
196+
##### Version 0.8.1
197+
- [UPDATE] updated wording of menu item
198+
- [BUG] Template was being added if the developer hit cancel or close.
199+
- [UPDATE] removed Min/Max button from dialogs
200+
- [BUG] Fixed Typo in Dialogbox
201+
- [UPDATE] Leaving Login window until have the mapping is done, so it clear to the developer that it's still working.
202+
- [UPDATE] Any syntax errors in the template will generate an Error and show the Error List
203+
204+
##### Version 0.8.0
205+
Complete overhaul. Menu item now only add the template with the 'Custom Tool' attached. The 'Custom Tool' will then prompt for login credentials

0 commit comments

Comments
 (0)