How to install Microsoft® Surface® 2.0 SDK without installing Visual Studio

大兔子大兔子 提交于 2019-12-06 03:19:59

The SDK requires Visual Studio, but the runtime does not. Download the runtime components from the same location you've probably downloaded the SDK from.

When you click download you have the option to just download the runtime installer.

Try this:

  1. install the XNA Game Framework Runtime 4.0 first (xnafx40_redist.msi)
  2. Use the following PS code instead of my original version:
foreach ($base in @('HKLM:\Software\Microsoft\VisualStudio', 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio')) {

cd $base
mkdir 10.0
cd 10.0                                                                                                          
mkdir Setup                                                                                                       
mkdir Setup\VS                                                                                                    
cd Setup\VS                                                                                                       
New-ItemProperty -path . -Name EnvironmentPath -PropertyType String -Value d:\DummyVS10                           
mkdir d:\DummyVS10   
cd "$base\10.0"                                                                                             
mkdir Projects
cd Projects                                                                                                    
mkdir '{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}'                                                                    
cd '{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}'                                                                       
New-ItemProperty -path . -Name DefaultProjectExtension -PropertyType String -Value foo
cd "$base"                                                                                             
mkdir SxS
cd SxS
mkdir VS7
cd VS7
mkdir 10.0
cd "$base\10.0"
New-ItemProperty -path . -Name InstallDir -PropertyType String -Value D:\DummyVS10
}

I managed to install the Surface 2.0 SDK on my machine that only has VS2013 installed.

Of course, this is not a supported scenario ;-)... so use at your own risk!

I checked the MSI for how they detect the presence of VS2010, and just added two dummy registry entries, as follows (from a "run as administrator" PowerShell prompt):

cd HKLM:\Software\Microsoft\VisualStudio                                                                          
# 10.0 was already present on my machine, might need to be created 
cd 10.0                                                                                                          
mkdir Setup                                                                                                       
mkdir Setup\VS                                                                                                    
cd Setup\VS                                                                                                       
New-ItemProperty -path . -Name EnvironmentPath -PropertyType String -Value d:\DummyVS10                           
mkdir d:\DummyVS10                                                                                                
mkdir Projects                                                                                                    
mkdir '{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}'                                                                    
cd '{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}'                                                                       
New-ItemProperty -path . -Name DefaultProjectExtension -PropertyType String -Value foo

Once these entries exist, the installer runs like a charm, and I can build my VS2013 solution that references the Surface SDK!

If the previous answers do not work for you, you can edit the MSI file with SuperOrca to remove the offending checks from the "LaunchCondition" folder. They are easily identifiable by their error messages in the second column.

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