How to create x64 assembly (instead of AnyCPU) .Net Azure Cloud Service?

I am using Azure 2.7.

I created a C # cloud service that contains only one working role. After that, the solution contains

  • Ccproj
  • A csproj

Both use AnyCPU configuration.

Then I added PropertyGroup "Debug | x64" and "Release | x64" to both projects. Also changed the default value for x64 for both. The result is x64.

However, when I choose to publish to ccproj, I notice that it always creates AnyCPU instead of x64. I cannot find how to get him to create x64 for packaging and deployment.

Then I edited the proj file again and deleted the PropertyGroup for "Debug | AnyCPU" and "Release | AnyCPU". After I did this, and when I tried to create x64 again, I got an error:

C: \ Program Files (X86) \ MSBuild \ 14.0 \ Bin \ Microsoft.Common.CurrentVersion.targets (723.5): error: the OutputPath property was not set for the project 'AzureWorkerRoleExample.ccproj. Please check that you indicate a valid combination of configuration and platform for this project. Configuration = 'Release' Platform = 'AnyCPU'. This error may also occur if any other project tries to follow the Link to the project to the project, this project was uploaded or not included in the solution, and the link to the project is not built using the same or equivalent configuration or platform.

I could not figure out how to get around this error.

Any idea on how to get VS to create an x64 version of the cloud service and deploy it?

One workaround detected: keep AnyCPU property groups, but also put

<PlatformTarget>x64</PlatformTarget>

in Group. So the AnyCPU build is actually for x64. But it sounds hacked.

Any idea?

Thanks a lot!

+6
source share

All Articles