Unable to validate/publish customization project in Acumatica 2019R2 - acumatica

I am attempting to validate my customization project before upgrading from 2019R1 to 2019R2. The error messages are not specific enough to be much use in diagnosing the problems, and seem to be referring to objects in the Acumatica code base.
Validating Binary Files
MyProject.dll Failed to resolve type reference: PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1 declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
MyProject.dll Failed to resolve type reference: PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1/By`1 declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
MyProject.dll Failed to resolve type reference: PX.Objects.PO.POLineType/Goods/Provider declared in PX.Objects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Fixed binding: splits from PX.Objects.PO.POReceiptEntry
Fixed binding: Item from PX.Objects.IN.InventoryItemMaintBase
MyProject.dll Failed to resolve method reference: System.Void PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1/By`1::.ctor() declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
MyProject.dll Failed to resolve method reference: System.Void PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1/By`1::.ctor() declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
MyProject.dll Failed to resolve method reference: System.Void PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1/By`1::.ctor() declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
MyProject.dll Failed to resolve method reference: System.Void PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1/By`1::.ctor() declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
I attempted to unpublish all customization, upgrade, and open my project in visual studio to find the specific errors, but there were none. The customization project subsequently published successfully, but I was missing data from custom objects.
Any suggestions for determining what I need to change in my customization project?

I would check if during build you used dll of proper Acumatica version.

I had been building the Acumatica website within the project, without success. I eventually was able to publish with no apparent weirdnesses after I changed the .NET version of the website project to 4.8 and was able to publish, although I'm not certain if that's what made the difference or just hitting it repeatedly with a hammer did the trick.

Related

How to figure out the main issue in a Nuget Package

I recently updated my packages and I started to get this weird warning in a few projects. I'm unable to resolve it:
Found conflicts between different versions of "System.Runtime.CompilerServices.Unsafe" that could not be resolved.
There was a conflict between "System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
"System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
References which depend on "System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll].
C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll".
C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll
References which depend on "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll".
C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll
C:\Users\0000\.nuget\packages\system.collections.immutable\5.0.0\lib\net461\System.Collections.Immutable.dll
C:\Users\0000\.nuget\packages\nito.disposables\2.2.1\lib\net461\Nito.Disposables.dll
C:\Users\0000\.nuget\packages\nito.asyncex.context\5.1.2\lib\net461\Nito.AsyncEx.Context.dll
C:\Users\0000\.nuget\packages\nito.asyncex.coordination\5.1.2\lib\net461\Nito.AsyncEx.Coordination.dll
C:\Users\0000\.nuget\packages\nito.asyncex.oop\5.1.2\lib\net461\Nito.AsyncEx.Oop.dll
C:\Users\0000\.nuget\packages\nito.asyncex.tasks\5.1.2\lib\net461\Nito.AsyncEx.Tasks.dll
C:\Users\0000\.nuget\packages\nito.asyncex.interop.waithandles\5.1.2\lib\net461\Nito.AsyncEx.Interop.WaitHandles.dll
C:\Users\0000\.nuget\packages\nito.cancellation\1.1.2\lib\net461\Nito.Cancellation.dll
C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll".
C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll
C:\Users\0000\.nuget\packages\utf8json\1.3.7\lib\net47\Utf8Json.dll
C:\Users\0000\.nuget\packages\easy.logger.extensions\1.5.0\lib\net45\Easy.Logger.Extensions.dll Focus.Tests.LogicTester
How do I decipher what is the actual issue here? Is there a package that internally depend on a specific version of a DLL but that DLL is also addedd directly with a newer version?
In short, you have dependencies on two different versions of the same DLL. Breakdown below, but TL;DR, you should be able to resolve this by updating your PackageReference to System.Runtime.CompilerServices.Unsafe to version 6.0.0.
If you don't call into it directly, consider removing the PackageReference, as it should be added transitively via the other references listed below.
If you don't have a PackagerReference to this package, adding one (using version 6.0.0) would make that the primary reference, thereby again aligning everything at the same version.
Error message breakdown:
Found conflicts between different versions of "System.Runtime.CompilerServices.Unsafe" that could not be resolved.
There was a conflict between "System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The compiler picked one based on some measure of how directly you referenced it (as opposed to one of your dependencies referencing it):
"System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
The 5.0 version is referenced by:
References which depend on "System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll].
C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll
The item in the project that creates this runtime dependency on the 5.0 file seems to be itself, i.e. you reference it directly:
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll".
C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll
The 6.0 version is referenced by these dependencies:
References which depend on "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll
...
C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll
...
These are indirectly referenced via other packages:
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll".
C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll
C:\Users\0000\.nuget\packages\system.collections.immutable\5.0.0\lib\net461\System.Collections.Immutable.dll
C:\Users\0000\.nuget\packages\nito.disposables\2.2.1\lib\net461\Nito.Disposables.dll
C:\Users\0000\.nuget\packages\nito.asyncex.context\5.1.2\lib\net461\Nito.AsyncEx.Context.dll
C:\Users\0000\.nuget\packages\nito.asyncex.coordination\5.1.2\lib\net461\Nito.AsyncEx.Coordination.dll
C:\Users\0000\.nuget\packages\nito.asyncex.oop\5.1.2\lib\net461\Nito.AsyncEx.Oop.dll
C:\Users\0000\.nuget\packages\nito.asyncex.tasks\5.1.2\lib\net461\Nito.AsyncEx.Tasks.dll
C:\Users\0000\.nuget\packages\nito.asyncex.interop.waithandles\5.1.2\lib\net461\Nito.AsyncEx.Interop.WaitHandles.dll
C:\Users\0000\.nuget\packages\nito.cancellation\1.1.2\lib\net461\Nito.Cancellation.dll
...
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll".
C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll
C:\Users\0000\.nuget\packages\utf8json\1.3.7\lib\net47\Utf8Json.dll
C:\Users\0000\.nuget\packages\easy.logger.extensions\1.5.0\lib\net45\Easy.Logger.Extensions.dll Focus.Tests.LogicTester

Is there a build issue in the recent versions of ServiceStack 3?

I have had the following warning show up in visual studio when compiling a project using ServiceStack 3.9.71.0 (seems to affect most recent releases too). Not sure why it hasn't shown up before but it has started showing up after I created a test lib which references my main project and both have references to the same service stack DLLs:
Warning 2 Found conflicts between different versions of the same
dependent assembly that could not be resolved. These reference
conflicts are listed in the build log when log verbosity is set to
detailed. C:\Program Files
(x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets 1635
Inspecting the build log shows:
10> There was a conflict between "ServiceStack.Interfaces,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" and
"ServiceStack.Interfaces, Version=3.9.60.0, Culture=neutral,
PublicKeyToken=null". 10> "ServiceStack.Interfaces,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" was chosen
because it was primary and "ServiceStack.Interfaces, Version=3.9.60.0,
Culture=neutral, PublicKeyToken=null" was not. 10> References
which depend on "ServiceStack.Interfaces, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null"
[C:\proj\packages\ServiceStack.Common.3.9.71\lib\net35\ServiceStack.Interfaces.dll] ...
This error is correct as it seems an older version of ServiceStack.Interfaces is referenced (http://i.imgur.com/4vw3069.jpg) by the latest releases in NuGet in addition to an old version of ORMLite. I have removed all previous versions of ServiceStack from my system so its not picking up any old DLLs. My projects just have references to ServiceStack, common, interfaces and text; I removed ORM as I do not use it but adding it to both projects did not help.
A little unsure how I can resolve this error as Github does not seem to have been updated since 3.9.60, any ideas?
This is just a warning, it should build, and can safely be ignored. The error message does indicate that the build system correctly chose v1.0.0.0.
"ServiceStack.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" was chosen
The version was intentionally reset from 3.9 to 1.0, about 4 months ago in this commit. This coincides with the beta release of ServiceStack v4. Presumably the v3 assembly versions where reset to a low number to allow for future BSD builds to be created without encroaching on the v4 version numbering, and to denote the clear change of project ownership.

Could not compute a complete dependency map for the project

i would like to get rid of this message so build time dramatically decreases (it builds and runs ok).
This warning appears in mtouch.
warning MT3006: Could not compute a complete dependency map for the
project. This will result in slower build times because Xamarin.iOS
can't properly detect what needs to be rebuilt (and what does not need
to be rebuilt). Please review previous warnings for more details.
Test solution: helloworld mvvmcross solution with ios project and pcl (wp8+monotouch+net45+android) + Microsoft HTTP PCL package in pcl only + an async call to HttpClient.GetStringAsync in the pcl.
Full log:
warning MT3005: The dependency 'System.Windows, Version=2.0.5.0,
Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly
'Cirrious.CrossCore, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=e16445fd9b451819' was not found. Please review the
project's references.
warning MT3005: The dependency 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly
'Cirrious.MvvmCross, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=e16445fd9b451819' was not found. Please review the
project's references.
warning MT3005: The dependency 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly
'Cirrious.MvvmCross.Binding, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' was not found. Please review the project's
references.
warning MT3005: The dependency 'System.Net.Primitives, Version=3.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of
the assembly 'Com.Catenum.Intouch.Business, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' was not found. Please review the
project's references.
warning MT3005: The dependency 'System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of the assembly
'Com.Catenum.Intouch.Business, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' was not found. Please review the project's
references.
warning MT3005: The dependency 'System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of
the assembly 'Com.Catenum.Intouch.Business, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' was not found. Please review the
project's references.
warning MT3006: Could not compute a complete dependency map for the project. This will result in slower build times because
Xamarin.iOS can't properly detect what needs to be rebuilt (and what
does not need to be rebuilt). Please review previous warnings for more
details.
You must make sure that all the assemblies only reference BCL assemblies that Xamarin.iOS ships.
For example:
warning MT3005: The dependency 'System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of the assembly 'Com.Catenum.Intouch.Business, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' was not found. Please review the project's references.
Xamarin.iOS does not have a System.Net.Http v1.5.0.0, it has v2.0.5.0 instead (all the Xamarin.iOS base class libraries have version v2.0.5.0, except monotouch.dll itself). The solution is to recompile Com.Catenum.Intouch.Business as a Xamarin.iOS class library (this typically involves creating a new Xamarin.iOS class library project, and link the source files in), which will ensure it contains the correct reference to System.Net.Http.dll.
Note that in Xamarin.iOS 7.0.4 there is a (harmless) bug which causes spurious MT3005/3006 warnings in some cases. This is probably the case for the first warning:
warning MT3005: The dependency 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly 'Cirrious.CrossCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e16445fd9b451819' was not found. Please review the project's references.
since Xamarin.iOS does contain a System.Windows assembly with that version.

The dependency ''mscorlib, Version=2.0.0.0,...' was not found

i get the following error by compiling my project:
warning MT3005: The dependency 'mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' of the assembly
'ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral,
PublicKeyToken=null' was not found. Please review the project's
references.
warning MT3005: The dependency 'System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' of the assembly
'ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral,
PublicKeyToken=null' was not found. Please review the project's
references.
warning MT3006: Could not compute a complete dependency map for the
project. This will result in slower build times because Xamarin.iOS
can't properly detect what needs to be rebuilt (and what does not need
to be rebuilt). Please review previous warnings for more details.
I've found out that the System dependency of my project uses the version 2.0.5.0 and the ZipSharp uses 2.0.0.0
What should I do?
To fix the warnings you need to get (or build from sources) a version of ZipSharp that is compiled against the BCL (mscorlib.dll, System.dll) that is shipped with Xamarin.iOS (i.e. 2.0.5.0).
Note that those are warnings, not errors, so it might work.

Failed to resolve "Microsoft.Win32.RegistryKey" reference from "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" (MT2002)

When trying to debug on my iPhone I get the error:
Error MT2002: Failed to resolve "Microsoft.Win32.RegistryKey" reference from "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" (MT2002)
What does this mean and how do I fix it?
The issue you are seeing is a result of using the type Microsoft.Win32.RegistryKey in your project or any third party libraries, this likely not available in MonoTouch
I would take a look at the library you have developed and double check everything is ok.

Resources