Just in case, when someone encounters this, I missed this error by adding this line to the Project / PropertyGroup section of the cloud services.ccproj file: <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
eg
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>2.9</ProductVersion>
<ProjectGuid>8c99xxxx-xxxx-xxxx-xxxx-xxxxxxxx273e</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MyCloudService</RootNamespace>
<AssemblyName>MyCloudService</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<StartDevelopmentStorage>True</StartDevelopmentStorage>
<Name>CloudSheetCloudService</Name>
etc...
By default, the cloud services project does not define the structure (it does not need it), but something in MSBuild seems to be performing a version check between the cloud service and the web / worker roles, and then the build fails.
Changing the version of the tools did not help.
As a background - I have an old cloud service that references project 4.6.2, which uses the new csproj style as follows:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
</PropertyGroup>
</Project>
NTN. Mark.
Change: The file to be edited is a .ccproj, not a .cproj file, as previously indicated.
Markd source
share