Giter VIP home page Giter VIP logo

crmcodegenerator's People

Contributors

xairrick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crmcodegenerator's Issues

N:N Duplicate Code Generation

Hi Eric

I've a problem with duplicate code generation using the extended V2 template from 15.0.4, specifically for the Campaign entity N:N relationships. I've reverted to the template from 1.0.4 for now.

The campaigncampaign_association relationship only appears on the entity once, though, the Load_campaigncampaign_association method and Referencedcampaigncampaign_association property is generated twice, along with the duplicate campaigncampaign_association constant in the ManyToMany class.

I've attached a sample of the file.
ExtendedV2.zip

Let me know if there's anything else you need from me.

Current version doesn't work with VS 2015

After installing this extension on VS 2015 I get error message saying:

Microsoft Visual Studio
The 'CrmCodeGenerator_VSPackagePackage' package did not load correctly.

The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\urbonjuo\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'.

Restarting Visual Studio could help resolve this issue.
Continue to show this error message?
Yes No

In log file I found this:

ERROR LegacySitePackage failed for package [CrmCodeGenerator_VSPackagePackage]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.Framework, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.Framework, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Shell.Framework, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit) at Microsoft.VisualStudio.Shell.Package.RegisterToolboxItemDiscoveryFactories() at Microsoft.VisualStudio.Shell.Package.Initialize() at CrmCodeGenerator.VSPackage.CrmCodeGenerator_VSPackagePackage.Initialize() at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. {D57CC223-384B-41CC-B5D0-814A71CE8D61} 80070002 VisualStudio

Looks like it's trying to load VS v15 assembly, witch is VS 2017, but I don't have it installed, I'm using 2015 (v14).

Regards.

Issue when attribute has same name as entity

mistake when generating classes.
Below I will give an example of the work of the standard mechanism of the utility.
[System.Runtime.Serialization.DataContractAttribute()]
[Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("new_bankgroup")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "8.0.1.7297")]
public partial class new_BankGroup : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
{

[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("new_bankgroup")]
public string new_BankGroup1 // correct
{
get
{
return this.GetAttributeValue("new_bankgroup");
}
set
{
this.OnPropertyChanging("new_BankGroup1");
this.SetAttributeValue("new_bankgroup", value);
this.OnPropertyChanged("new_BankGroup1");
}
}

}

And you template.

[System.Runtime.Serialization.DataContractAttribute()]
[Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("new_bankgroup")]
public partial class new_BankGroup : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
{
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("new_bankgroup")]
public string new_BankGroup // error name property == name class
{
get
{
return this.GetAttributeValue("new_bankgroup");
}
set
{
this.OnPropertyChanging("new_BankGroup");
this.SetAttributeValue("new_bankgroup", value);
this.OnPropertyChanged("new_BankGroup");
}
}
}

Need to test in AspNetCore project

It's been reported that the tool doesn't work in AspNetCore projects. "...It chokes on dependencies like System.Runtime.Serialization..."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.