SLN Configuration Settings Issue

Nov 24, 2016 at 10:24 AM
Hi

As previously mentioned there's an issue with the configuration being stored in the SLN file, they are not being persisted at all. Each and every time I open the solution/project in a new Visual Studio session the default entities are selected. I have to refresh the organization list, then the entities, and select the specific entities I want to generate the code for. Needless to say, this could cause a breakage when other projects depend on this generated assembly and required entities are no longer present.

The credentials are persisted fine and not a problem.

I'm using VS 2015 Update 3 (14.0.25431.01).
The installed version of this CRM Code Generator is 1.0.3.2
We're using GIT repos in VSTS.

Please let me know if there's any further information or details you need. I'm also more than happy to try any fixes you suggest.

Kind regards,

Digga
Dec 1, 2016 at 10:20 AM
Hi

Further analysis is showing the SLN file is completely missing the configuration and the tool will not write to the file.

I've resolved this issue by editing the SLN file manually and entering the configuration myself as below in the Global section:
GlobalSection(CrmCodeGeneration) = preSolution
    UseSSL = True
    UseIFD = False
    UseOnline = True
    UseOffice365 = True
    ServerName = crm.dynamics.com
    ServerPort = 
    HomeRealm = 
    Domain = 
    WindowsAuthorization = False
    Organization = OrganizationNameHere
    IncludeEntities = CommaDelimitedLowerCaseEntityNamesHere
    IncludeNonStandard = False
EndGlobalSection
Steps to resolve:
  1. Check-out SLN from source control
  2. Edit the SLN adding the GlobalSection to the Global section, I made this the first entry by the way in this section
  3. Set your Organization
  4. Set your Entities
  5. Save file
  6. Check-in to source control
The tool is now reading and writing changes to the configuration in the SLN file.

Other Observations

Until you check-in the SLN file after manually editing, the configuration section is wiped out again on build.
The SLN file was only ever updated on build, or when closing the solution and being prompted by VS to save the Solution. You would think the Generate Code button would persist the configuration or you could provide a Save Configuration button in the tool.

Kind regards,

Digga