Reputation: 17565
Last year, I had a problem concerning Telerik OpenAccess enhancer. That was a very unstable situation: once it worked, sometimes not, ...
Now I have another problem, also about Telerik OpenAccess enhancer, but this time the problem is very clear:
This gives me a clear situation and I would like to profit of this situation to firmly understand what Telerik OpenAccess enhancer is about and how corresponding problems can be tackled. Hence my first question: What is Telerik OpenAccess enhancer exactly?
I had a look inside the *.csproj
file and I've found the following property group:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
...
<EnhancerAssembly>
$(SolutionDir)\packages\Telerik.DataAccess.Fluent.2016.2.822.1\
tools\enhancer\enhancer.exe
</EnhancerAssembly>
</PropertyGroup>
In both cases, this are the used build settings:
As far as my problem is concerned: I have built my project in six ways: in Visual Studio 2017 and in Visual Studio 2022, using three MSBuild build verbosities: Normal, Detailed and Diagnostics.
I'm planning to start with the normal case (where differences are already visible), investigate those differences and try to dig deeper as I go.
Hereby the compiler output in VS2017:
2>OpenAccessEnhancer:
2> "C:\<Source_Dir>\Project.<Customer>\<Product>\packages\Telerik.DataAccess.Fluent.2016.2.822.1\tools\enhancer\enhancer.exe"
-verboseMode:3
-assembly:"C:\<Source_Dir>\Project.<Customer>\<Product>\<Product>.<Customer>.Server\obj\Debug\<Product>.<Customer>.Server.dll"
-reference:<list of project references>
-attributeMapping
-fluentMapping
2> Telerik AD Telerik Data Access Enhancer, Version 2016.2.822.1, Copyright (C) 1996-2016 Telerik AD. All rights reserved.
2> Creating "obj\Debug\<Product>.<Customer>.Server.oa" because "AlwaysCreate" was specified.
2> The project was successfully enhanced by Telerik OpenAccess ORM Enhancer 2016.2.822.1
2>_CopyFilesMarkedCopyLocal:
2> Creating "C:\<Source_Dir>\Project.<Customer>\<Product>\<Product>.<Customer>.Server\obj\Debug\<Product>.<Customer>.Server.csproj.CopyComplete" because "AlwaysCreate" was specified.
2>_CopyAppConfigFile:
2> Copying file from "app.config" to "..\..\..\Site\<Product> Server\Modules\<Product>.<Customer>.Server.dll.config".
2>CopyFilesToOutputDirectory:
2> Copying file from "obj\Debug\<Product>.<Customer>.Server.dll" to "..\..\..\Site\<Product> Server\Modules\<Product>.<Customer>.Server.dll".
2> <Product>.<Customer>.Server -> C:\<Source_Dir>\Site\<Product> Server\Modules\<Product>.<Customer>.Server.dll
2> Copying file from "obj\Debug\<Product>.<Customer>.Server.pdb" to "..\..\..\Site\<Product> Server\Modules\<Product>.<Customer>.Server.pdb".
2>
2>Build succeeded.
Hereby the compiler output in VS2022:
2>OpenAccessEnhancer:
2> "C:\<Source_Dir>\Project.<Customer>\<Product>\packages\Telerik.DataAccess.Fluent.2016.2.822.1\tools\enhancer\enhancer.exe"
-verboseMode:3
-assembly:"C:\<Source_Dir>\Project.<Customer>\<Product>\<Product>.<Customer>.Server\obj\Debug\<Product>.<Customer>.Server.dll"
-reference:<list of project references>
-attributeMapping
-fluentMapping
2> Telerik AD Telerik Data Access Enhancer, Version 2016.2.822.1, Copyright (C) 1996-2016 Telerik AD. All rights reserved.
2>C:\<Source_Dir>\Project.<Customer>\<Product>\<Product>.<Customer>.Server\obj\Debug\<Product>.<Customer>.Server.dll(-1,-1):
OpenAccess Enhancer error 0: The specified assembly 'C:\Users\DDM\AppData\Local\Temp\_ptil_37352\<Product>.<Customer>.Server.dll' cannot be loaded.
The problem might be that the enhancer runs in a .NET framework 2.0 vm and the assembly to enhance is a .NET 4.0 assembly or
you are trying to enhance a x86 assembly in a 64 bit process or a x64 assembly in a 32 bit process.
Please change the required version inside the enhancer.exe.config or venhance.exe.config or switch to 'Any CPU' for this project.
2>
2>Build FAILED.
These differences already raise some new questions:
VerboseMode
, used in the enhancer, equals 3. The "manpage" of the enhancer gives no information (-verboseMode:<value> Verbose mode (default: 0)
). What is the value for maximal verbosity and how can I configure this?*.oa
file is created because AlwaysCreate
was specified. A WSL search in the project directory reveals the following:./<Product>/<Product>.<Customer>.Server/OpenAccessNuGet.targets:
<Touch AlwaysCreate="true" Files="@(EnhancementFlagFile)" Time="%(IntermediateAssembly.ModifiedTime)" />
./<Product>/packages/Telerik.DataAccess.Fluent.2016.2.822.1/content/OpenAccessNuGet.targets:
<Touch AlwaysCreate="true" Files="@(EnhancementFlagFile)" Time="%(IntermediateAssembly.ModifiedTime)" />
Which AlwaysCreate
are we talking about here?
Spoiler alert:
The description of the compiler error message is the following:
The specified assembly
C:\Users\DDM\AppData\Local\Temp\_ptil_xxxxx\<Product>.Server.dll
cannot be loaded. The problem might be that the enhancer runs in a .NET framework 2.0 vm and the assembly to enhance is a .NET 4.0 assembly or you are trying to enhance a x86 assembly in a 64 bit process or a x64 assembly in a 32 bit process.
Please change the required version inside the enhancer.exe.config or venhance.exe.config or switch to 'Any CPU' for this project.
How to understand this error message:
Which one is it and if needed, how can I fill in the ellipsis?
Upvotes: 0
Views: 64