0

I have an instance with our custom project and the Amazon Integration project published. Both projects work fine in 2018R1. During the upgrade I had to update the database first and then the application. The regular update of both at the same time did not work. Once the update completed and I tried to logon, the following trace appeared:

Publish Customization
Compiled projects: ARMCustomizations,BQLExecutor,CustomRepGISiteMap,LingoEDI,AmazonIntegration
Validation started.
Copying the website C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_cs\cs207500.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_cs\cs207500.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\Pages_SM\SM909090.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\Pages_SM\SM909090.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_so\so101000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_so\so101000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_so\so301000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_so\so301000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_so\so302000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_so\so302000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_so\so501000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_so\so501000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_so\so503000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_so\so503000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_tx\tx205000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\CstPublished\pages_tx\tx205000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\App_RuntimeCode\BQLExecutor.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Bin\CookComputing.XmlRpcV2.dll
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Bin\LingoApi.dll
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Bin\LingoEDI.dll
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Bin\MarketplaceWebServiceFeeds.dll
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Bin\MarketplaceWebServiceOrders.dll
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Bin\MarketplaceWebServiceSellers.dll
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Bin\MWSClientCsRuntime.dll
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Bin\PX.AmazonIntegration.dll
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Bin\PX.AmazonIntegration.pdb
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\GLAccountsLiability.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\image00301.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\image00901.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\image01101.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\image01301.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\image01501.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\image01701.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\image01901.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\image02101.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\MarketplaceConfiguration01.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\New  Schedule Import Orders.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\New  SO Clear Log.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\New  Submit FBM Shipment Info.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\New Import FBA Tracking Number.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\New Import Orders.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\New SH Clear Log.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\SO Preferences.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\SOORER Preferences.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\TaxCategories1.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\Taxes1.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Icons\Amazon_Integration_Images\TaxZone Screen.png
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED201000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED201000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED202010.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED202010.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED203010.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED203010.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED204020.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED204020.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED205000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED205000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED209999.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED209999.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED401000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED401000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED501000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED501000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED502000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED502000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED503000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED503000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED504000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED504000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED505000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED505000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED506000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED506000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED507000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\ED\ED507000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SM\SM909090.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SM\SM909090.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO204000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO204000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO401000.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO401000.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO401001.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO401001.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO509100.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO509100.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO509200.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO509200.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO509300.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO509300.aspx.cs
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO509400.aspx
Patching the file C:\Program Files (x86)\Acumatica ERP\Customization\2018R2\2018R2Validation\2018R2Website\Pages\SO\SO509400.aspx.cs
Done
Validating Binary Files
LingoEDI.dll Failed to resolve type reference: PX.Objects.Common.PXOrderedSelect`5 declared in PX.Objects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Fixed binding: Transactions from PX.Objects.SO.SOOrderEntry
Fixed binding: Adjustments from PX.Objects.AR.ARPaymentEntry
PX.AmazonIntegration.dll Failed to resolve type reference: PX.Objects.Common.PXOrderedSelect`5 declared in PX.Objects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Fixed binding: Transactions from PX.Objects.SO.SOOrderEntry
Validation failed.

The code works fine in 2018R1. I assumed I just needed to recompile so I built the dev environment in this instance and compiled successfully. When I tried to run it, I got this error:

Server Error in '/2018R2' Application.
Cannot load a reference assembly for execution.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.BadImageFormatException: Cannot load a reference assembly for execution.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[BadImageFormatException: Cannot load a reference assembly for execution.]

[BadImageFormatException: Could not load file or assembly 'System.ValueTuple' or one of its dependencies. Reference assemblies should not be loaded for execution.  They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +225
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +110
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +22
   System.Reflection.Assembly.Load(String assemblyString) +34
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +48

[ConfigurationErrorsException: Could not load file or assembly 'System.ValueTuple' or one of its dependencies. Reference assemblies should not be loaded for execution.  They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +767
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +256
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +58
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +281
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +69
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +137
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +172
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +848

[HttpException (0x80004005): Could not load file or assembly 'System.ValueTuple' or one of its dependencies. Reference assemblies should not be loaded for execution.  They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +714

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3160.0

My project is compiled in .net 4.7.1. Any ideas why this would happen. The initial error indicates the same issue with my project and the Amazon project both relating to the sales order screen.

LingoEDI.dll Failed to resolve type reference: PX.Objects.Common.PXOrderedSelect`5 declared in PX.Objects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
    Fixed binding: Transactions from PX.Objects.SO.SOOrderEntry
    Fixed binding: Adjustments from PX.Objects.AR.ARPaymentEntry
PX.AmazonIntegration.dll Failed to resolve type reference: PX.Objects.Common.PXOrderedSelect`5 declared in PX.Objects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
    Fixed binding: Transactions from PX.Objects.SO.SOOrderEntry
Validation failed.

Any ideas what is causing this?

enter image description here

Jerry Welliver
  • 377
  • 1
  • 13
  • See my answer on **[System.BadImageFormatException: Reference assemblies should not be loaded for execution](https://stackoverflow.com/questions/61336306/system-badimageformatexception-reference-assemblies-should-not-be-loaded-for-ex/61702386#61702386)**. – Murat Yıldız May 09 '20 at 19:22

1 Answers1

0

The Acumatica 2018 R2 Technical Release notes mention that PXOrderedSelect family has been moved from PX.Objects to PX.Data. The Amazon Integration and LingoEDI librairies will need to be updated.

As for your other error, this is related to your project references and conflicting packages that got moved to your bin/ directory on build. The following link may be helpful: Could not load file or assembly 'System.ValueTuple'

Gabriel
  • 3,733
  • 16
  • 29
  • Thanks for answering Gabriel. How do I determine what needs to be changed for the SOOrder select? I have no errors when I compile and I don't hard code the qualifiers for the selects. Can you provide any tips or suggestions for finding what needs to be changed? – Jerry Welliver Sep 30 '18 at 23:42
  • Are you compiling using the same build? – Gabriel Oct 01 '18 at 12:29
  • Yes. I created a new extension library in the project screen and then copied the source code from my original 2018R1 instance. – Jerry Welliver Oct 01 '18 at 12:55
  • For the System.ValueTuple issue, everything I have read says that is included in .Net 4.7. I added the System.ValueTuple as a reference anyway and rebuilt but I still get the error. All .Net references are 4.7.1. – Jerry Welliver Oct 01 '18 at 14:34
  • Steps followed: Current working dev instance 18.108.0016. Created empty 2nd instance same version. Imported project and pub'd DB changes. Import/restore snapshot from current. Build to verify setup. Install 18R2. Upgrade DB. Upgrade site. Ran ok without my stuff. Deleted obj and bin folders in my project and recomp'd. Got error PX.CS.Contracts ref. Recomp'd and then got ValueTuple error. I have no ideas left. Can anyone assist? – Jerry Welliver Oct 02 '18 at 14:33
  • @JerryWelliver can you verify the references? If you're still referencing PX.Data and PX.Object from 18.1 and compile that would cause Visual Studio to copy other dependencies into your 18.2 site – Gabriel Oct 02 '18 at 17:53
  • If I remove PX.Data and PX.Objects from the reverences and I get errors throughout my code since none of the using statements can pull in their info. What references do I need? I have added a picture of my current references to the end of the original post. – Jerry Welliver Oct 04 '18 at 14:56
  • Right-click the reference and select Properties; the property toolbox will show you where the referenced file is coming from. You may be referencing the wrong version of the file... – Gabriel Oct 04 '18 at 18:03
  • The properties for all of them are in the new R2 folder. The dotnet refs all point to 4.7.1. – Jerry Welliver Oct 04 '18 at 19:02