Comments (31)
Can I get the full output in the log?
from dlab.xrm.xrmtoolboxtools.
CRM Authentication Type Detected: ActiveDirectory
Executing "..\XrmToolBox\Plugins\CrmSvcUtil Ref\crmsvcutil.exe" /namespace:"CrmLib" /out:"..\XrmToolBox\Plugins\CrmSvcUtil Ref\CrmServiceContext.cs" /servicecontextname:"CrmServiceContext" /codecustomization:"DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Entity.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.Entity.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /namingservice:"DLaB.CrmSvcUtilExtensions.NamingService,DLaB.CrmSvcUtilExtensions" /metadataproviderservice:"DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService,DLaB.CrmSvcUtilExtensions"
CrmSvcUtil : CRM Service Utility [Version 8.0.1.7297]
¸ 2015 Microsoft Corporation. All rights reserved
Options:
/nologo
Suppresses the banner.
/language:
The language to use for the generated proxy code. This can be either 'CS' or 'VB'. The default language is 'CS'. Short form is '/l:'.
/url:
A url or path to the SDK endpoint to contact for metadata.
/out:
The filename for the generated proxy code. Short form is '/o:'.
/namespace:
The namespace for the generated proxy code. The default namespace is the global namespace. Short form is '/n:'.
/interactivelogin:
Presents a login dialog to loginto the service with, if passed all other connect info is ignored. Short form is '/il:'.
/connectionstring:
Connection String to use when connecting to CRM. If provided, all other connect info is ignored. Short form is '/connstr:'.
/username:
Username to use when connecting to the server for authentication. Short form is '/u:'.
/password:
Password to use when connecting to the server for authentication. Short form is '/p:'.
/domain:
Domain to authenticate against when connecting to the server. Short form is '/d:'.
/serviceContextName:
The name for the generated service context. If a value is passed in, it will be used for the Service Context. If not, no Service Context will be generated
/help
Show this usage message. Short form is '/?'.
/generateActions
Generate wrapper classes for custom actions Short form is '/a'.
/deviceid:
Device ID to use when connecting to the online server for authentication. Short form is '/di:'.
/devicepassword:
Device Password to use when connecting to the online server for authentication. Short form is '/dp:'.
Example:
crmsvcutil.exe /url:http://localhost/Organization1/XRMServices/2011/Organization.svc /out:GeneratedCode.cs
Output file was not updated or not found! ..\XrmToolBox\Plugins\CrmSvcUtil Ref\CrmServiceContext.cs
from dlab.xrm.xrmtoolboxtools.
hmm... you're missing a URL parameter... not sure how that could have happened.
Has it worked for you before, or is the first time you've tried it?
from dlab.xrm.xrmtoolboxtools.
It has worked on an older version. This is the first time I try it on this version.
from dlab.xrm.xrmtoolboxtools.
What version of the Early Bound Generator is it?
from dlab.xrm.xrmtoolboxtools.
Version: 1.2016.4.27
from dlab.xrm.xrmtoolboxtools.
Can you delete (make a backup first if you wish) all DLaB files in your plugins directory, and the entire CrmSvcUtil Folder, and redownload?
from dlab.xrm.xrmtoolboxtools.
I tried this but I get the same result as before.
from dlab.xrm.xrmtoolboxtools.
Think I figured it out. You're connecting with XRM Toolbox without entering credentials, just using AD correct?
from dlab.xrm.xrmtoolboxtools.
Yes indeed.
from dlab.xrm.xrmtoolboxtools.
DLaB.Xrm.2016.zip
Try downloading, unblocking, and extracting these files into your plugins directory of the XrmToolBox. It should prompt you for a password, then you can enter it and everything should get populated.
from dlab.xrm.xrmtoolboxtools.
I tried this but it causes the error shown below. Also trying to close the program or trying to specify which entities to skip, causes crashes.
Could this be caused cause we are using CRM 2011?
CRM Authentication Type Detected: ActiveDirectory
Executing "..\XrmToolBox\Plugins\CrmSvcUtil Ref\crmsvcutil.exe" /namespace:"CrmLib" /out:"..\XrmToolBox\Plugins\CrmSvcUtil Ref\CrmServiceContext.cs" /servicecontextname:"CrmServiceContext" /codecustomization:"DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Entity.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.Entity.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /namingservice:"DLaB.CrmSvcUtilExtensions.NamingService,DLaB.CrmSvcUtilExtensions" /metadataproviderservice:"DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService,DLaB.CrmSvcUtilExtensions" /connectionstring:"Url=CRMPath;UserName=;Password=***********"
CrmSvcUtil : CRM Service Utility [Version 8.0.1.7297]
¸ 2015 Microsoft Corporation. All rights reserved
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Source : System.ServiceModel
Method : Retrieve
Date : 24/05/2016
Time : 10:28:23
Error : Metadata contains a reference that cannot be resolved: 'CRMPath/XRMServices/2011/Discovery.svc?wsdl&sdkversion=0'.
Stack Trace : at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever retriever)
at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveServiceEndpointMetadata(Type contractType, Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration1..ctor(Uri serviceUri, Boolean checkForSecondary) at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateManagement[TService](Uri serviceUri, Boolean enableProxyTypes, Assembly assembly) at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.CreateAndAuthenticateProxy[T](IServiceManagement
1 servicecfg, Uri ServiceUri, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, String LogString)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.DiscoverOrganizations(Uri discoveryServiceUri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.InitCRM2011Service()
Inner Exception Level 1 :
Source : System
Method : GetResponse
Date : 24/05/2016
Time : 10:28:23
Error : The remote name could not be resolved: '****'
Stack Trace : at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Unable to Login to Dynamics CRM
Unable to Login to Dynamics CRM
CrmSvcUtil Error: 2 : Exiting program with exit code 2 due to exception : System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Connection to CRM is not established. Aborting process.
at Microsoft.Crm.Services.Utility.SdkMetadataProviderService.Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata()
at DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService..ctor(IMetadataProviderService defaultService, IDictionary`2 paramters)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Crm.Services.Utility.ServiceFactory.CreateInstance[TIService](TIService defaultServiceInstance, String parameterValue, CrmSvcUtilParameters parameters)
at Microsoft.Crm.Services.Utility.ServiceProvider.InitializeServices(CrmSvcUtilParameters parameters)
at Microsoft.Crm.Services.Utility.CrmSvcUtil.get_ServiceProvider()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
CrmSvcUtil Error: 2 : ===== DETAIL ======
CrmSvcUtil Error: 2 : Source : mscorlib
Method : InvokeMethod
Date : 10:28:23
Time : 24/05/2016
Error : Exception has been thrown by the target of an invocation.
Stack Trace : at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Crm.Services.Utility.ServiceFactory.CreateInstance[TIService](TIService defaultServiceInstance, String parameterValue, CrmSvcUtilParameters parameters)
at Microsoft.Crm.Services.Utility.ServiceProvider.InitializeServices(CrmSvcUtilParameters parameters)
at Microsoft.Crm.Services.Utility.CrmSvcUtil.get_ServiceProvider()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
Inner Exception Level 1 :
Source : CrmSvcUtil
Method : Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata
Date : 10:28:23
Time : 24/05/2016
Error : Connection to CRM is not established. Aborting process.
Stack Trace : at Microsoft.Crm.Services.Utility.SdkMetadataProviderService.Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata()
at DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService..ctor(IMetadataProviderService defaultService, IDictionary`2 paramters)
Output file was not updated or not found! ..\XrmToolBox\Plugins\CrmSvcUtil Ref\CrmServiceContext.cs
from dlab.xrm.xrmtoolboxtools.
Are the Domain, userName, and password all correct in the Commandline that gets generated?
from dlab.xrm.xrmtoolboxtools.
I'm having the exact same issue. The URL parameter is missing from the command line.
from dlab.xrm.xrmtoolboxtools.
I think the error message in my last comment was of several tries I made. I edited it to give a better view.
The connectionstring in the commandline seems to be incomplete, as the UserName doesn't get populated.
Edit: I just noticed the URL in the commandline is a bit different from the predefined organization URL.
from dlab.xrm.xrmtoolboxtools.
Can you try copying the command line generated in the log to an actual command lineand, add the missing username, and then try running it? You can try the different URL names as well. If you get something to work, let me know and I can edit the output to match.
from dlab.xrm.xrmtoolboxtools.
It does work adding the username and changing the URL manually.
from dlab.xrm.xrmtoolboxtools.
What is the issue with the URL? Is it using the unique org Id? Is the domain being populated correctly?
from dlab.xrm.xrmtoolboxtools.
In my case it does not work. This is part of the output. This is coming from an isolated VM so I don't mind the password being in here :)
C:\Users\Administrator\Downloads\XrmToolBox\Plugins\CrmSvcUtil Ref>CrmSvcUtil.ex
e /namespace:"CrmEarlyBound" /out:"C:\Users\Administrator\Downloads\XrmToolBox
Plugins\CrmSvcUtil Ref\Entities.cs" /servicecontextname:"CrmServiceContext" /cod
ecustomization:"DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService,DLaB.Cr
mSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Entity.Cus
tomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmS
vcUtilExtensions.Entity.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /nami
ngservice:"DLaB.CrmSvcUtilExtensions.NamingService,DLaB.CrmSvcUtilExtensions" /m
etadataproviderservice:"DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService
,DLaB.CrmSvcUtilExtensions" /url:http://springfield:5555/U2U/XrmServices/2011/Or
ganization.svc /username:administrator /password:secret /domain:U2UCOURSE
CrmSvcUtil : CRM Service Utility [Version 8.0.1.7297]
© 2015 Microsoft Corporation. All rights reserved
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Organization not fou
nd. Org = U2U/
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Unable to Login to D
ynamics CRM
Unable to Login to Dynamics CRM
Exiting program with exception: Exception has been thrown by the target of an in
vocation.
CrmSvcUtil Error: 2 : Exiting program with exit code 2 due to exception : System
.Reflection.TargetInvocationException: Exception has been thrown by the target o
f an invocation. ---> System.Exception: Connection to CRM is not established. Ab
orting process.
at Microsoft.Crm.Services.Utility.SdkMetadataProviderService.Microsoft.Crm.Se
from dlab.xrm.xrmtoolboxtools.
And now the weird thing: if I copy all the files from the latest version of the CRM SDK BIN folder into the C:\Users\Administrator\Downloads\XrmToolBox\Plugins\CrmSvcUtil Ref folder it will generate the entity classes successfully if I run it again.
C:\Users\Administrator\Downloads\XrmToolBox\Plugins\CrmSvcUtil Ref>CrmSvcUtil.ex
e /namespace:"CrmEarlyBound" /out:"C:\Users\Administrator\Downloads\XrmToolBox
Plugins\CrmSvcUtil Ref\Entities.cs" /servicecontextname:"CrmServiceContext" /cod
ecustomization:"DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService,DLaB.Cr
mSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Entity.Cus
tomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmS
vcUtilExtensions.Entity.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /nami
ngservice:"DLaB.CrmSvcUtilExtensions.NamingService,DLaB.CrmSvcUtilExtensions" /m
etadataproviderservice:"DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService
,DLaB.CrmSvcUtilExtensions" /url:http://springfield:5555/U2U/XrmServices/2011/Or
ganization.svc /username:administrator /password:secret /domain:U2UCOURSE
CrmSvcUtil : CRM Service Utility [Version 8.1.0.7629]
© 2015 Microsoft Corporation. All rights reserved
from dlab.xrm.xrmtoolboxtools.
the organization URL for our test environment is http://crm.company.com/crmtest and in the generated command line this was http://crmtest.company.com/crmtest
from dlab.xrm.xrmtoolboxtools.
So @JurgenPostelmans, are you good?
from dlab.xrm.xrmtoolboxtools.
@PeulenF ok, so it looks like I'm not generating that URL correctly.. I'll have to review that, as well as make sure I'm pulling the username.
from dlab.xrm.xrmtoolboxtools.
Can you download, unblock, then unzip this folder into your XrmToolBox Plugin folder? and let me know if the URL is being created correctly?
from dlab.xrm.xrmtoolboxtools.
I'm unable to use the plugin using these files. Followed by a crash and the following error:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at DLaB.EarlyBoundGenerator.EarlyBoundGeneratorPlugin.HydrateSettingsFromUI()
at DLaB.EarlyBoundGenerator.EarlyBoundGeneratorPlugin.ClosingPlugin(PluginCloseInfo info)
at XrmToolBox.MainForm.RequestCloseTabs(IEnumerable`1 pages, PluginCloseInfo info)
at XrmToolBox.MainForm.MainForm_FormClosing(Object sender, FormClosingEventArgs e)
at System.Windows.Forms.Form.OnFormClosing(FormClosingEventArgs e)
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
from dlab.xrm.xrmtoolboxtools.
Try deleting the EarlyBoundEntities.xml file... this will delete your settings, but you can give it a shot...
from dlab.xrm.xrmtoolboxtools.
I'm getting the same exception and I deleted the EarlyBoundEntities.xml file
the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at DLaB.EarlyBoundGenerator.EarlyBoundGeneratorPlugin.HydrateSettingsFromUI()
at DLaB.EarlyBoundGenerator.EarlyBoundGeneratorPlugin.CreateCode(CreationType creationType)
at DLaB.EarlyBoundGenerator.EarlyBoundGeneratorPlugin.Create(CreationType creationType)
at DLaB.EarlyBoundGenerator.EarlyBoundGeneratorPlugin.BtnCreateEntities_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
from dlab.xrm.xrmtoolboxtools.
I'll have to look at this deeper. Thanks for trying...
from dlab.xrm.xrmtoolboxtools.
@JurgenPostelmans can you get the latest version an try again?
from dlab.xrm.xrmtoolboxtools.
@daryllabar I just tried the new version and it could successfully generate the entities, option sets and actions in C#.
One strange thing however was that in my connection settings in XrmToolbox I have "Use your current credentials" checked and your plugin asked me for the password when I pressed the "Create All" button.
In the output below you can see that Username is empty in the connection string but password is there. Could be that this is the expected behavior?
CRM Authentication Type Detected: ActiveDirectory
Executing "C:\Users\Administrator\Downloads\XrmToolBox\Plugins\CrmSvcUtil Ref\crmsvcutil.exe" /generateActions /out:"C:\Users\Administrator\Downloads\XrmToolBox\Plugins\CrmSvcUtil Ref\Actions.cs" /namespace:"CrmEarlyBound" /codecustomization:"DLaB.CrmSvcUtilExtensions.Action.CustomizeCodeDomService,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Action.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.Action.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /connectionstring:"Url=http://springfield:5555/U2U;UserName=;Password=_"
Executing "C:\Users\Administrator\Downloads\XrmToolBox\Plugins\CrmSvcUtil Ref\crmsvcutil.exe" /namespace:"CrmEarlyBound" /out:"C:\Users\Administrator\Downloads\XrmToolBox\Plugins\CrmSvcUtil Ref\OptionSets.cs" /codecustomization:"DLaB.CrmSvcUtilExtensions.OptionSet.CreateOptionSetEnums,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.OptionSet.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.OptionSet.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /namingservice:"DLaB.CrmSvcUtilExtensions.NamingService,DLaB.CrmSvcUtilExtensions" /connectionstring:"Url=http://springfield:5555/U2U;UserName=;Password=_"
from dlab.xrm.xrmtoolboxtools.
Closing this in favor of new #47 since multiple issues were discussed in this issue.
from dlab.xrm.xrmtoolboxtools.
Related Issues (20)
- Microsoft.Xrm.Tooling.Connector login Newtonsoft.Json assembly mismatch HOT 4
- Handle Xml File Formatting
- Fails to update Plugin Step Image
- Implement Retry Logic
- IEnumerable Activity Party Typing Bug (again) HOT 4
- EBG V2 Generation Error: Microsoft.Xrm.Sdk.PreferredSolutionDetails is not available HOT 10
- Should be possible to specify language to use HOT 2
- Allow to override Entity Names
- Add a default Messages Whitelist
- State Name is incorrect when using Entity Class Name Overrides
- 'Upgraded' v1settings files are missing some options in v2 HOT 3
- Cannot implicitly convert type ...StatusCode to 'Microsoft.Xrm.Sdk.OptionSetValue' HOT 3
- Fix Ordering of local Enums
- Error with StateCode when overriding EntityName
- Alternate Keys aren't ordered
- Allow for Enum Name Replacement strings
- Add a Search Box for the Properties Grid
- Connection Record1ObjectTypeCode and Connection_Record2ObjectTypeCode Are noisy between Environments HOT 2
- Seeing default settings helps us rookies HOT 2
- "_" underscore is removed from OptionSet Names? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dlab.xrm.xrmtoolboxtools.