What's purpose of <Use64BitIISExpress /> element in csproj file
Solution 1
I noticed this entry, not surprisingly, after I made a change to the Properties page of the my Project. Under the Web section of the Properties page, you'll see a section called "Servers". After I changed the "Project URL" to use the correct port number for debugging, this entry appeared (not because I changed that option specifically, but it's when I noticed it appearing).
<Use64BitIISExpress />
In this section you can select either "IIS Express" or "External Host". Next to that dropdownlist, there is another dropdownlist for "Bitness". Mine was currently set to "Default", which displays the entry in the Project file as an empty element. After changing the "Bitness" to "x64", my Project file entry changed to:
<Use64BitIISExpress>true</Use64BitIISExpress>
Changing my "Bitness" to "x86" results in:
<Use64BitIISExpress>false</Use64BitIISExpress>
Returning "Bitness" to "Default" makes it again an empty element:
<Use64BitIISExpress>
</Use64BitIISExpress>
I understand this doesn't address your question of "where is the documentation?". I, too, could not find any relevant MSBuild documentation for this attribute. But, I thought it worth noting where the attribute is coming from and how it acts based on selected options from the Project properties while we anxiously await some formal, official documentation.
Solution 2
The purpose of that (pretty obvious) is to start IIS Express in 64bit mode. It is the equivalent of setting 64bit only on the Application pool in IIS.
If your project has a dependency on a DLL that only runs under 64bit mode then this is when you need to set it. This has been available since VS2013
Probably is useful if you prefer to do do F5 debugging instead of process reattaching for your pure 64bit applications
This started showing up in the config files since VS2017
due to all the changes happening with Visual Studio portability. (VSCode, Visual Studio Mac, Xamarin, etc)
Comments
-
Ondrej almost 2 years
When I edit Web application project, Visual Studio 2017 (15.3.1) adds
<Use64BitIISExpress />
element underProject/PropertyGroup
in csproj file. I can't find any documentation, what is the purpose and if it affects something, when presented (as it is, without any attributes).Only result I was able to find was mention about registry value of the same name.
Does someone know what this element serves for? Was it introduced in some of recent updates of Visual Studio 2017?
-
Ondrej over 6 yearsIt answers my question "what is the purpose" - you answered what setting it reflects - this is what I was about.
-
Piotr Kula over 6 yearsIt is probably the same as setting the IIS Application pool to 64bit only.. if you that is what you need to debug in IISExpress - This has been available since VS2013 and was used for software that only released 64bit DLL's
-
jpmc26 over 6 yearsNow I'd like to know what idiot made this a project level configuration instead of associating it with a particular target platform (x86/x64).
-
Mark Schultheiss almost 6 yearsSo is
<Use64BitIISExpress />
the same as "true" or "false"? -
Urk over 5 years@MarkSchultheiss <Use64BitIISExpress /> appears to be neither true nor false; it's "Default", which leads me to believe it's based on your hosting configuration rather than your solution's Project setting.
-
Slothario over 4 yearsWhen <Use64BitIISExpress /> appears, it seems Visual Studio has no bitness changing it.
-
Tvde1 over 3 yearsSo is including
<Use64BitIISExpress />
any different from omitting it?