Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when adding new document type umbraco 7.4.3 nuget version v7.4.2.5 #29

Open
jonsamwell opened this issue Aug 4, 2016 · 1 comment

Comments

@jonsamwell
Copy link

jonsamwell commented Aug 4, 2016

Hi,

The below code throws the error:

'System.TypeLoadException' in mscorlib.dll

Additional information: GenericArguments[1], 'System.Int32', on 'Umbraco.Core.Persistence.Repositories.RepositoryBase`2[TId,TEntity]' violates the constraint of type parameter 'TEntity'.

Unfortunately there is no associated stack trace.

I haven't been able to figure out why. This is on a fresh Umbraco install and the first and only migration that is run.

This is the code that is throwing it:

 DocumentType
    .Create(nameof(SiteDocumentType))
    .CreateTab(DocumentTypePropertyTabs.Company)
    .AddProperty(nameof(SiteDocumentType.SiteTitle), nameof(SiteDocumentType.SiteTitle), DataTypes.TextString, DocumentTypePropertyTabs.Company, true)
    .AddProperty(nameof(SiteDocumentType.PrimaryContactEmail), nameof(SiteDocumentType.PrimaryContactEmail), DataTypes.TextString, DocumentTypePropertyTabs.Company, true)
    .AddProperty(nameof(SiteDocumentType.PrimaryContactNumber), nameof(SiteDocumentType.PrimaryContactNumber), DataTypes.TextString, DocumentTypePropertyTabs.Company, true)
    .Save();
@jonsamwell jonsamwell changed the title Error when add new document type umbraco 7.4.3 nuget version v7.4.2.5 Error when adding new document type umbraco 7.4.3 nuget version v7.4.2.5 Aug 4, 2016
@anD1332
Copy link
Contributor

anD1332 commented Aug 30, 2016

Hi, issue is probably a conflict with the Umbraco versions.

We will need to investigate this to see if we can remove the dependency to the specific Umbraco version but one workaround for the time being would be to create a fork of uFluent with the version of Umbraco you are using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants