本文介绍了Surface SDK 可以在 Visual Studio 2012 上运行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用 Surface SDK 创建 WPF 应用程序.我正在使用 Visual Studio 2012,并根据 这个 SO 帖子,VS2012 不允许这样做.但是,由于这是在正式发布之前发布的,所以我想确保我没有遗漏任何东西.

I need to create a WPF app using the Surface SDK. I am using Visual Studio 2012, and according to this SO post, VS2012 doesn't allow that. However, since this was posted before it was officially released, I want to make sure I'm not missing something.

我只需要一些随附的触摸/滑动控件.VS2012 有不同的选择吗?另一个开发人员使用的是 2010,所以它需要能够仍然在他的机器上运行.这是一个非常简单的应用程序,我只需要敲定,所以我正在寻找最快、最简单的方法.我们和最终应用程序都将在 Windows 7 上运行.

I just need a few of the touch/swipe controls that come with it. Is there a different option for VS2012? The other developer is using 2010, so it needs to be able to still run on his machine. It's a very simple app that I just need to hammer out, so I'm looking for the fastest, easiest method. Both of us and the end application is to run on Windows 7.

推荐答案

我找到了一个看似可行的简单解决方案.它确实希望您安装 Visual Studio 2010.按照以下步骤,我设法使用 .NET 4.5 在 Visual Studio 2012 中进行编译.TouchDown 事件有效.我在一些小项目上进行了尝试,它们似乎工作得很好.

I found an easy solution by which it seems to work. It does expect you to have Visual Studio 2010 installed. Following the following steps I managed to compile in Visual Studio 2012 using .NET 4.5. TouchDown events work. I tried it out on some small projects and they seem to work perfectly fine.

  1. 使用 Visual Studio 2010 设置 Surface 项目.
  2. 安全并关闭 Visual Studio 2010.
  3. 使用 Visual Studio 2012 打开解决方案.
  4. 将项目设置下的目标框架更改为 .NET 4.5.
  5. 另存为新的解决方案文件.
  6. 编译,...一切正常!

此方法使您不必自己设置所有配置文件/引用.唯一的缺点是您没有将任何 Surface 工具集成到 IDE 中.例如.工具箱、项目模板……这当然不会阻止您自己编写普通的 XAML.

This method prevents you from having to set up all the configuration files/references yourself. The only downside is you don't have any of the Surface tools integrated into the IDE. E.g. the toolbox, project templates, ... This of course doesn't prevent you from writing plain XAML yourself.

如果由于某种原因这从长远来看不起作用,我会更新这篇文章.

If for some reason this doesn't work in the long run I will update this post.

这篇关于Surface SDK 可以在 Visual Studio 2012 上运行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 14:22