Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's purpose of <Use64BitIISExpress /> element in csproj file

When I edit Web application project, Visual Studio 2017 (15.3.1) adds <Use64BitIISExpress /> element under Project/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?

like image 848
Ondrej Avatar asked Aug 23 '17 10:08

Ondrej


People also ask

What does Csproj file do?

CSPROJ files define a project's content, platform requirements, versioning information, and web server or database server settings. They also list the files that are part of the project.

What is none tag in Csproj?

csproj file tags: None - The file is not included in the project output group and is not compiled in the build process. An example is a text file that contains documentation, such as a Readme file. Compile - The file is compiled into the build output.

Where is .csproj file located?

csproj files (WebApi is the name of my project). It is located as expected in the root of the project.

How do I open a .csproj file in Visual Studio 2019?

Right-click on the project (tagged as unavailable in solution explorer) and click "Edit yourproj. csproj". This will open up your CSPROJ file for editing.


2 Answers

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)

like image 41
Piotr Kula Avatar answered Sep 25 '22 17:09

Piotr Kula


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.

like image 125
Urk Avatar answered Sep 23 '22 17:09

Urk