Can Surface SDK run on Visual Studio 2012?

假装没事ソ 提交于 2019-12-05 05:53:00

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. Use Visual Studio 2010 to set up a Surface project.
  2. Safe and close Visual Studio 2010.
  3. Open the solution using Visual Studio 2012.
  4. Change the target framework under project settings to .NET 4.5.
  5. Save as a new solution file.
  6. Compile, ... everything works!

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.

The easiest way will unfortunately be for you to run VS2010.

Currently the SDK is not supported in VS2012, for a few reasons. Notably, the way that touch works in Win8 is a lot better than in previous versions of Windows. This unfortunately meant a rewrite of the touch layer that the Surface SDK uses. The new controls are written to adapt dynamically based on mouse/touch input, making the Surface SDK controls a bit redundant.

Microsoft might make the SDK available for VS2012 in the future, but this is kind of debatable.

If you are still dead set on giving it a shot, download an application called Orca (http://msdn.microsoft.com/en-us/library/windows/desktop/aa370557(v=vs.85).aspx) and edit the SDK installer file, removing the dependency on VS2010.

This is how I got the Surface 1 SDK to work with VS2010, since it was targeting VS2008 (note that it still has not been updated to work with VS2010)

Let me know how you go.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!