简体   繁体   中英

crmsvcutil.exe for CRM 2011 returns error

I am trying to use the crmsvcutil.exe for a CRM 2011 On Premise installation. I am running it from command line using the following command:

CrmSvcUtil.exe /url:http://crmx36/FMGLegal/XRMServices/2011/Organization.svc
    /out:Xrm /username:owsike /password:test /domain:CORP
    /namespace:XRM /serviceContextName:LegalDataContext    /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization,Microsoft.Xrm.Client.CodeGeneration"

The window for the crmsvcutil.exe will then open, but close after less than a second. I am trying to enable tracing, but all the posts I've seen suggest adding a line to its config file. My SDK download did not include a config file for this exe, so I created one with the following content:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
  </appSettings>

  <system.diagnostics>
    <trace autoflush="false" indentsize="4">
      <listeners>
        <add name="configConsoleListener"
        type="System.Diagnostics.ConsoleTraceListener">
          <filter type="System.Diagnostics.EventTypeFilter"
          initializeData="Error" />
        </add>
      </listeners>
    </trace>
  </system.diagnostics>

</configuration>

But logging/tracing is still not being enabled, so I can't see the error that it is throwing. Does anyone know why the exe is still not using logging/tracing, or why my crmsvcutil.exe is erroring out?

It sounds like you're opening up run, and pasting in the command line. Instead try this:

  1. Push Windows Key "R" to open the Run dialog
  2. Type in "cmd" push enter
  3. Right click and paste in your url
  4. Push "Enter" to run your command. It won't auto close and you can see what error message you're getting.

As far as the Config file goes, I don't think one is required, but this is what I have:

<configuration>
    <system.diagnostics> 
       <trace autoflush="false" indentsize="4"> 
          <listeners> 
             <add name="configConsoleListener" type="System.Diagnostics.ConsoleTraceListener"> 
                <filter type="System.Diagnostics.EventTypeFilter" initializeData="Error" /> 
             </add> 
          </listeners> 
       </trace> 
    </system.diagnostics>
</configuration>

Update

Use the Xrm Early Bound Generator instead. It extends and automates the creation of the Early Bound classes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM