nbrightproject / NBrightBuy

NBrightStore - E-Commerce for DNN (NBSv3)
http://www.nbrightproject.org/
21 stars 15 forks source link

Unable to compile PaymentProvider #35

Closed micahsdad1402 closed 7 years ago

micahsdad1402 commented 8 years ago

I've download and created the PaymentProvider project.

The Namespace is DPSPaymentProvider.

It won't compile. I get the error: Error 1 Could not load type 'DPSPaymentProvider.DPSPaymentProviderPayment'. C:\inetpub\wwwroot\dnn8\DesktopModules\DPSPaymentProvider\Payment.ascx 1

Payment.ascx contains:

`<%@ Control language="C#" Inherits="DPSPaymentProvider.DPSPaymentProviderPayment" AutoEventWireup="true" Codebehind="Payment.ascx.cs" %>

/asp:Repeater Payment.ascx.cs contains: ` using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using System.Web; using System.Web.UI.WebControls; using DotNetNuke.Common; using DotNetNuke.Entities.Portals; using NBrightCore.common; using NBrightCore.render; using NBrightDNN; using Nevoweb.DNN.NBrightBuy.Base; using Nevoweb.DNN.NBrightBuy.Components; using DPSPaymentProvider; using DataProvider = DotNetNuke.Data.DataProvider; namespace DPSPaymentProvider { ``` /// ----------------------------------------------------------------------------- /// /// The ViewNBrightGen class displays the content /// /// ----------------------------------------------------------------------------- public partial class DPSPaymentProviderPayment : NBrightBuyAdminBase` ``` Any ideas?
leedavi commented 8 years ago

I'm not in the office until next week, but if you email me your code i'll try and take a look on my laptop.

micahsdad1402 commented 8 years ago

Dave,

Thanks. Much appreciated.

You can download the code from here: https://www.dropbox.com/s/lwfzdzyz81uhnct/DPSPaymentProvider.zip?dl=0

John Jacobson p. 1300 737 907 or +61 3 9438 6699 (Australia) p. +64 9 816 9563 (New Zealand) john@goldrushtechnology.com.aumailto:john@goldrushtechnology.com.au www.goldrushtechnology.com.auhttp://www.goldrushtechnology.com.au/ www.vipre.com.auhttp://www.vipre.com.au/

[cid:image006.png@01D1F0F7.BC576ED0]

[Connect on Facebook]https://www.facebook.com/JohnJacobsonBiz

[Connect on Twitter]https://twitter.com/goldrushtechn

[Connect on LinkedIn]http://nz.linkedin.com/in/johndjacobson

[Connect on Google+]https://plus.google.com/108387220574719282390/#108387220574719282390/

From: David Lee [mailto:notifications@github.com] Sent: Sunday, 7 August 2016 9:19 PM To: leedavi/NBrightBuy NBrightBuy@noreply.github.com Cc: John Jacobson john@goldrushtechnology.com.au; Author author@noreply.github.com Subject: Re: [leedavi/NBrightBuy] Unable to compile PaymentProvider (#35)

I'm not in the office until next week, but if you email me your code i'll try and take a look on my laptop.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/leedavi/NBrightBuy/issues/35#issuecomment-238072261, or mute the threadhttps://github.com/notifications/unsubscribe-auth/APO0XU15090SZwfCQr2TjZ9yp2FsT-PEks5qdaLzgaJpZM4JeQq4.

Protected by MailGuard: e-mail anti-virus, anti-spam and content filtering. http://www.goldrushtechnology.com.au/mailguard/http://www.goldrushtechnology.com.au/mailguard%20/

Report this message as spamhttps://console.mailguard.com.au/ras/1OZR9duhwC/3RG24JFVRfCSKUhEyDOAMi/3.159

micahsdad1402 commented 8 years ago

I was able to compile the payment provider. I then thought I should set this up with the code so I can see how you have done other stuff. I got compile errors (develop branch).

I was getting errors on the follow code that I commented out and replaced with the code below.

ERROR: error was: Error 12 'Nevoweb.DNN.NBrightBuy.Components.CategoryData.DataRecord' is a 'field' but is used like a 'type' C:\inetpub\wwwroot\dnn8\DesktopModules\NBright\NBrightBuy\Components\CategoryData.cs 135 34 NBrightBuy

Is this fix correct?

` //public String CategoryRef => DataRecord.GetXmlProperty("genxml/textbox/txtcategoryref");

    //public int CategoryId => DataRecord.ItemID;
    public String CategoryRef
    {
        get
        {
            if (Exists) return   DataRecord.GetXmlProperty("genxml/textbox/txtcategoryref");
            return "";
        }
    }
    public int CategoryId
    {
        get
        {
            if (Exists) return DataRecord.ItemID;
            return 0;
        }
    }`
micahsdad1402 commented 8 years ago

getting stuck on the payment page. getting the following error:

System.TypeInitializationException: The type initializer for 'Nevoweb.DNN.NBrightBuy.Components.Interfaces.PaymentsInterface' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'DPSPaymentProvider' or one of its dependencies. The system cannot find the file specified. at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at Nevoweb.DNN.NBrightBuy.Components.Interfaces.PaymentsInterface.CreateProvider() in c:\inetpub\wwwroot\dnn8\DesktopModules\NBright\NBrightBuy\Components\Interfaces\PaymentsInterface.cs:line 45 at Nevoweb.DNN.NBrightBuy.Components.Interfaces.PaymentsInterface..cctor() in c:\inetpub\wwwroot\dnn8\DesktopModules\NBright\NBrightBuy\Components\Interfaces\PaymentsInterface.cs:line 27 --- End of inner exception stack trace --- at Nevoweb.DNN.NBrightBuy.Components.Interfaces.PaymentsInterface.Instance(String ctrlkey) at Nevoweb.DNN.NBrightBuy.Payment.GetPaymentProviderTemplates() in c:\inetpub\wwwroot\dnn8\DesktopModules\NBright\NBrightBuy\Payment.ascx.cs:line 287 at Nevoweb.DNN.NBrightBuy.Payment.OnInit(EventArgs e) in c:\inetpub\wwwroot\dnn8\DesktopModules\NBright\NBrightBuy\Payment.ascx.cs:line 130

I have put the payment provider in my own directory, so I'm suspecting that it's not loading the template correctly. When I attach the project to the process that is running the chrome tab, Breakpoints wont work because "no symbols have been loaded for this document"

If you could point me in the right direction it would be much appreciated.

leedavi commented 8 years ago

Hi John, This is usually because the compiled dll and/or symbol fie does not exist in the DNN bin folder.

That zip you put in dropbox doesn't have any VS project file, so I can see what the compile build events are doing. have you checked the required files are in the DNN bin folder?
Have you got a Git repo I could pull your code from?