Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

VS2015 ASP.NET website and x64

$
0
0

I am in the process of migrating my solution from running compiling in VS2013 x86 to VS2015 x64. My solution consists of class libraries and a ASP.NET website (NOT WEB APPLICATION) Most of my 3rd party assemblies are compiled for AnyCPU so they are easy but I do have a specific 3rd party assembly compiled specifically for x86 or x64. Up until before the migration I had a reference in my website to the x86 assembly and it was all ok. Now when trying to migrate to x64, I changed my IIS settings to run the pool as x64, removed the old x86 reference but when I add the x64 reference it just does not appear on the website references list (I tried this with other x64 assemblies and the result is the same). When trying to compile the site I get tons of errors that the compiler does not recognize types in the x64 assembly and of other types that are supposedly missing (site was fully compilable in x86)

reading about this online, I found suggestion to add a compiler option to set the target platform. when I added just the compilerOptions part to the web.config like this

<system.codedom><compilers><compiler compilerOptions="/platform:x64" /></compilers></system.codedom>

VS suddenly displayed the reference and site was compilable but when trying to access the site through IIS I got an error that the compiler line was missing a language attribute and then the extension was missng until I got to a this

<system.codedom><compilers><compilercompilerOptions="/platform:x64"language="c#;cs;csharp"extension=".cs"></compiler><compilercompilerOptions="/platform:x64"language="vb;vbs;visualbasic;vbscript"extension=".vb"></compiler></compilers></system.codedom>

and now again the x64 assembly does not show in the references window.

I know I have the option of converting to a web application and that would solve this problem but I want to try to solve this using the website.

The issue I guess is because the VS IDE is x86 and for a web site it just tries to load the assembly as x86 for compilation (actual running of the site will be performed by IIS which is set to run x64)

Other things I have tried without success:

  1. Adding the x86 and x64 assemblies to the GAC. adding a reference to the x86 assembly or the x64 assembly in the website.
  2. setting under tools->options->Web Debugging->Use x64 IIS express

Also, note that because this is a website, changing the target platform on the solution configuration is not an option since I only have AnyCPU for the web site.

How can I make VS compile this as x64? other web applications I have that are compiled as x64 have a reference to the same x64 assembly without a problem (because their target platform is set to x64) but on a website I cannot seem to set this.

My machine is a Win10 x64 machine with IIS installed on it.


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>