Playing with my Microsoft Surface RT I was itching to do some coding on it. So I have started porting SharpDevelop http://www.icsharpcode.net/opensource/sd/download/ so that it will run on Windows RT.
A few notes:
- This is unsupported by Microsoft method, your device must be “unlocked” to allow running 3rd party Desktop apps
- I had to go back to SharpDevelop 3.2 as it was last version without WPF based GUI (Windows RT doesn’t support WPF)
- So far I only tested C# Windows Forms GUI design & compile + C# Console. C# ASP.NET compiles but you’ll need to deploy manually to a web server. VB.NET currently doesn’t work.
- Debugging does not work, you must run compiled EXE outside debugger currently
- Ensure target framework is .NET 4.0 and platform is Any CPU (not x86/x64)
- I removed SVN support, WPF templates
- I migrated projects to .NET 4.5 framework and changed the build platform from x86 to Any CPU
- You need to copy from full Windows machine with .NET 4 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.Targets onto Windows RT. Possibly other files in this folder too. I copied the entire C:\Windows\Microsoft.NET\Framework\v4.0.30319 from my Win8 machine with VS2012 & Windows SDK installed but did not overwrite any existing files in the directory on Windows RT device, if you do you’ll trash your .NET. I chose “skip” for duplicate files. Recommend make backup of dir on Windows RT before modification.
- You will need to copy from existing Windows development machine with Visual Studio 2012 installed – C:\Program Files\Reference Assemblies on 32-bit machine or C:\Program Files (x86)\Reference Assemblies to your Windows RT devices. You should have structure like this:
- I also had to take these two DLLs from an existing Windows 8 machine and copy to these locations
xcopy system.xml.linq.dll C:\windows\assembly\GAC_MSIL\System.Xml.Linq\4.0.0.0__b77a5c561934e089\
xcopy system.data.datasetextensions.dll C:\windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\4.0.0.0__b77a5c561934e089\
- It is possible you may need to copy other DLLs from a Windows 8 machine, the name of missing DLL should be displayed when running EXE
Once above is accomplished you can do the following:
- Download and Extract
- Run bin\SharpDevelop.exe
- Click File | New Solution
- Select Windows Application
- Give it name Hello World, click Create
- Select MainForm.cs tab, then select Design
- Click View | Tools
- Expand Windows Forms, drag label onto Form
-
Right click label properties, change text to Hello, Worl
- Click Build | Edit Configuration/Platform
- In Platform click x86 and Edit
- Add anycpu then select it click OK
- Select platform Any CPU again. Should look like this:
- Hit the red exclamation mark to run program (next to green play button) or hit Ctrl+FN+Search Button
Vs201 project Source code and binary here:
https://skydrive.live.com/redir?resid=E1A3C870740A073D!270&authkey=!AI0vFrK_EVY53hI
original project here: http://www.icsharpcode.net/opensource/sd/download/
for this specific error you just need to copy the Microsoft.CSharp.Targets file though (I think installed by visual studio)
Took another look at it tonight and it worked with your appended instructions, thanks! I figured that was the issue but I had no idea where to get the mentioned files.
Also, for anyone that cares, I grabbed the files from a Win 7 edition of VS2012 and so far it works fine!
Great, over this weekend I’ll try to add VS2012 project file support, and hopefully get debugger working
when I compiled, I got this error:
Parameter “SearchPaths” has invalid value “{CandidateAssemblyFiles}%3b
%3b
{HintPathFromItem}%3b
{TargetFrameworkDirectory}%3b
{Registry:Software\Microsoft\.NETFramework,v4.0,AssemblyFoldersEx}%3b
%3b
{GAC}%3b
{RawFileName}%3b
bin\Debug\System.winmd”. Illegal characters in path. (MSB3248)
There is invalid characters in SearchPaths. MSBuild obtains this path from the following locations:
(1) Files from current project – indicated by {CandidateAssemblyFiles}
(2) $(ReferencePath) – the reference path property, which comes from the .USER file.
(3) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
(4) The directory of MSBuild’s “target” runtime from GetFrameworkPath.
The “target” runtime folder is the folder of the runtime that MSBuild is a part of.
(5) Registered assembly folders, indicated by {Registry:*,*,*}
(6) Legacy registered assembly folders, indicated by {AssemblyFolders}
(7) Resolve to the GAC.
(8) Treat the reference’s Include as if it were a real file name.
(9) Look in the application’s output folder (like bin\debug)
Option (2) would be most likely cause. I haven’t see this issue myself, but this problem with msbuild.exe is also known to occur on full Windows with Visual Studio, so you might look for other solutions people have found for this problem out on the internet, they may have more details.
The problem is SharpDevelop and the target files in v4.0.30319 are not fully compatible.
The simplest fix is to just add:
v4.0 C:\Windows\Microsoft.NET\Framework\v4.0.30319
to your project, in the PropertyGroup section.
Correction (copy paste missed some tags)
<FrameworkPathOverride^gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319</FrameworkPathOverride>
I got this error:
SharpDevelop Version : 3.2.1.6466
.NET Version : 4.0.30319.18033
OS Version : Microsoft Windows NT 6.2.9200.0
Current culture : Vietnamese (Vietnam) (vi-VN)
Current UI language : en-US
Working Set Memory : 34356kb
GC Heap Memory : 2316kb
Unhandled exception terminated SharpDevelop
Exception thrown:
System.NullReferenceException: Object reference not set to an instance of an object.
at ICSharpCode.Core.WinForms.ToolBarComboBox..ctor(Codon codon, Object caller) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\ICSharpCode.Core.WinForms\ToolBar\ToolBarComboBox.cs:line 52
at ICSharpCode.Core.WinForms.ToolbarService.CreateToolbarItemFromDescriptor(ToolbarItemDescriptor descriptor) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\ICSharpCode.Core.WinForms\ToolBar\ToolBarService.cs:line 55
at ICSharpCode.Core.WinForms.ToolbarService.CreateToolStripItems(Object owner, AddInTreeNode treeNode) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\ICSharpCode.Core.WinForms\ToolBar\ToolBarService.cs:line 27
at ICSharpCode.Core.WinForms.ToolbarService.CreateToolStrip(Object owner, AddInTreeNode treeNode) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\ICSharpCode.Core.WinForms\ToolBar\ToolBarService.cs:line 74
at ICSharpCode.Core.WinForms.ToolbarService.CreateToolbars(Object owner, String addInTreePath) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\ICSharpCode.Core.WinForms\ToolBar\ToolBarService.cs:line 111
at ICSharpCode.SharpDevelop.Gui.DefaultWorkbench.CreateToolBars() in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\Base\Project\Src\Gui\Workbench\DefaultWorkbench.cs:line 681
at ICSharpCode.SharpDevelop.Gui.DefaultWorkbench.Initialize() in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\Base\Project\Src\Gui\Workbench\DefaultWorkbench.cs:line 288
at ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.InitializeWorkbench(IWorkbench workbench, IWorkbenchLayout layout) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\Base\Project\Src\Gui\WorkbenchSingleton.cs:line 107
at ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.InitializeWorkbench() in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\Base\Project\Src\Gui\WorkbenchSingleton.cs:line 90
at ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbenchInternal(Object settings) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\ICSharpCode.SharpDevelop.Sda\Src\CallHelper.cs:line 122
at ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbench(WorkbenchSettings settings) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\ICSharpCode.SharpDevelop.Sda\Src\CallHelper.cs:line 112
at ICSharpCode.SharpDevelop.Sda.SharpDevelopHost.RunWorkbench(WorkbenchSettings settings) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\ICSharpCode.SharpDevelop.Sda\Src\SharpDevelopHost.cs:line 117
at ICSharpCode.SharpDevelop.SharpDevelopMain.RunApplication() in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\StartUp\Project\SharpDevelopMain.cs:line 182
at ICSharpCode.SharpDevelop.SharpDevelopMain.Run(String[] args) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\StartUp\Project\SharpDevelopMain.cs:line 97
at ICSharpCode.SharpDevelop.SharpDevelopMain.Main(String[] args) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\StartUp\Project\SharpDevelopMain.cs:line 49
—- Recent log messages:
Failed to append recent log messages.
System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at ICSharpCode.SharpDevelop.Sda.LogMessageRecorder.AppendRecentLogMessages(StringBuilder sb, ILog log) in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\ICSharpCode.SharpDevelop.Sda\Src\LogMessageRecorder.cs:line 109
at ICSharpCode.SharpDevelop.Sda.ExceptionBox.getClipboardString() in c:\Users\mccafferym\Downloads\SharpDevelop_3.2.1.6466_Source\src\Main\ICSharpCode.SharpDevelop.Sda\Src\ExceptionBox.cs:line 138
—- Post-error application state information:
Installed 3rd party AddIns:
I followed the instruction, but when I try to run Sharp Develop it says, that SearchAndReplace.dll or a dependency of it was not found.
You must extract files with subdirectory structure intact and run SharpDevelop from bin\SharpDevelop.exe and SearchAndReplace.dll must be at AddIns\AddIns\Misc\SearchAndReplace folder.
It is exactly in this subdirectory.
I solved the problem. If you extract the archive with Windows Explorer it does not work. I used 7Zip and it worked.
Hello!
I’m very exiting for I can develop on my surface rt.So,how di you port the #Develop to the arm?VS2012 is inpossible I think.#develop of course can not.So what tool did you use to port the PC app to the WIndows RT?So,Can you port the vbc.exe to windows RT?With this exe you can use # Develop to write vb.net program.I would like to ask, whether the arm version of the vbc.exe or whether to write?I need it! Because I usually need to use VB.NET programming.So,what tool did you use to port PC app to the Windows RT?And do you have a vbc.exe in arm edition?
Hello!
I’ve got 2 questions:
1.Why the vb.net doesn’t work?Because the vbc.exe doesn’t work?So can you port vbc.exe to windows rt?I really need to write vb.net!
2.How did you port the #develop from pc to arm?How to?What tool did you use?
1. Can’t port vbc.exe no source code and not included in RT. If it was pure .NET this wouldn’t be issue
2. To port it I used Visual Studio 2012 and switched all projects to compile,under “any CPU” and .net 4.5. I didn’t change any code. I removed any native (non .net) plugins
The easiest option is to switch to C# or use auto convert tools to convert your vb.net to c#. Or remote connect to full windows machine with visual studio, set your .net project to 4.5 and any CPU, then your project will run on Windows RT (jail break devices)
Hi there! I just wanted to say: fantastic! It works really, really well! This is like makeing the RT worth 10 times more! Whoohoooo :)
files has invalid value… show that error in my projects… i need help
I’m late getting to the show here, but I wanted to thank you so much for this encouraging URL. I hope to learn enough to have some fun with my Surface RTs. Previously had only found the csc.exe on my Surface and failed “Hello world” type test for missing DLLs, and at Git someone suggested commenting out missing DLLs to get it to work. This is great!! It would be nice if Microsoft would increase product life cycle for RT.
I don’t currently have a Windows 8 Machine so I’m wondering where I can get
system.xml.linq.dll C:\windows\assembly\GAC_MSIL\System.Xml.Linq\4.0.0.0__b77a5c561934e089\
system.data.datasetextensions.dll C:\windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\4.0.0.0__b77a5c561934e089\
I installed .NET Framework 4.0 on a Windows 10.
Thanks