Search code examples
c#asp.netpublish

ASPNETCOMPILER error ASPCONFIG: Could not load file or assembly 'My dll' or one of its dependencies. Only publish time error occured


ASPNETCOMPİLER(0,0): Error ASPCONFIG: Could not load file or assembly 'DAL' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I update oracle data access from 2.121.2.0 to 4.122.19.1.

I changed my project platform target to x64.

Now project is working. But when I publish error occured.

Does anyone know what may be causing this issue and how to solve this problem ?


Solution

  • İf you look output you see that compiler use C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe but I need is C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler.exe. x86 aspnet compiler doesn't compile for x64 platform. So I changed compiler with added new x64 active solution platform. Then everything is ok