Windows 10技术预览的Windows软件开发工具包(SDK)
至
Windows Software Development Kit (SDK) for Windows 10 Insider Preview:
所以解决方案文件的更改只有VisualStudioVersion从14.0.22609.0到14.0.22823.1.
项目文件的更改也很小:
<TargetPlatformVersion>10.0.10030.0</TargetPlatformVersion> <TargetPlatformMinVersion>10.0.10030.0</TargetPlatformMinVersion>
至
<TargetPlatformVersion>10.0.10069.0</TargetPlatformVersion> <TargetPlatformMinVersion>10.0.10069.0</TargetPlatformMinVersion>
问题是,原来这个通用项目已经成功构建成任何cpu配置,但现在我开始收到以下错误:
The processor architecture of the project being built “Any cpu” is not
supported by the referenced SDK “Microsoft.NET.CoreRuntime,
Version=1.0”. Please consider changing the targeted processor
architecture of your project (in Visual Studio this can be done
through the Configuration Manager) to one of the architectures
supported by the SDK: “x86,x64,ARM”.
所以消息是明确的做什么,只是想确认:
是否真的这样,任何cpu都不可能从“Windows 10内幕预览的SDK”开始的通用项目?
更新
新创建的项目也没有Anycpu – 默认的是x86.
Open your solution that contains your C# Windows Universal app. You will see that your project file (.csproj file) needs to be updated. Right-click the project file and choose to edit this file.
Find the
<PropertyGroup>
element that contains the<TargetPlatformVersion>
… Next,set the value of the<Platform>
element to x86 …Find
<PropertyGroup>
elements that are configured for the Anycpu platform as part of the Condition attribute. Remove these elements and all of their child elements. Anycpu is not supported for Windows 10 apps in Visual Studio 2015 RC.
更新1
从这个视频 – Deep Dive into XAML and .NET Universal Windows App Development,转发到0:32:28 – 似乎有一个(小)的机会回到“任何cpu”的版本:
更新2
Visual Studio 2015 RC fixed bugs and known issues再次确认:
The Anycpu platform configuration is not supported for Windows 10 Insider Preview applications that are built by using C# and Visual Basic. This release of Visual Studio uses the .NET Native to build Windows 10 applications. The .NET Native compiles C# and Visual Basic code to native code and is not cpu-agnostic.
所以在我看来,希望恢复“Anycpu”配置几乎就是对于VS2015 RTM.
更新3
那么,the RTM is finally here和预期的 – no AnyCPU:
Find elements that are configured for the Anycpu platform as part of the Condition attribute. Remove these elements and all of their children. Anycpu is not supported for Windows 10 apps in Visual Studio 2015.