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

无人久伴 提交于 2020-01-02 08:50:13

问题


I have a kiosk application build on Microsoft® Surface® 2.0 SDK and WPF.

The device for deployment is a kiosk and Visual Studio is not installed.

When running the application on the kiosk I miss some dlls Microsoft.Surface.Core, so I tried to install Microsoft® Surface® 2.0 SDK but it require VS.

Error:

You must install Microsoft Visual Studio 2010 or Microsoft Visual C# 2010 express before you install Microsoft Surface 2.0 sdk.

I would like to know a work around in order to install SDK without having VS... or an alternative approach?


回答1:


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.




回答2:


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
}



回答3:


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!




回答4:


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.



来源:https://stackoverflow.com/questions/21702121/how-to-install-microsoft-surface-2-0-sdk-without-installing-visual-studio

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