Coder Social home page Coder Social logo

vsc-se's Introduction

Here are the steps to set up Visual Studio Code for Space Engineers ingame script development.

This will provide an environment where autocompletion / intelisense and syntax checking work.

  • I'll assume you already have SE installed!

  • Install Visual Studio Code (VSC)

  • Install the following VSC Extensions

    • install c# extension in VSC (OmniSharp)
    • install NuGet Package manager VSC Extension
  • install .net cli tools / SDK (needed?)

  • install net framwork devpack 4.6.1

  • Then clone this directory structure.

  • If you have a non-standard SE location, change SpaceEngineers.csproj

  • 'open folder' (this folder) from VSC.

  • copy starter-template.cs to a new file for each script you create

  • change the namespace

  • Put your code changes between the region tags (see comment in template)

Credit to https://github.com/mrdaemon for the working .csproj file.

vsc-se's People

Contributors

gregretkowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vsc-se's Issues

Did the steps change meanwhile? IntelliSense problem

Hi,

I wanted to start writing code outside of game, however it seems I'm out of luck.
My example code I try to use intellisense on:
public void Main(string args) {
GridTerminalSystem.
}

So I installed VSCode, OmniSharp C# Extension, .NET Sdk 5.0.101, devpack 4.6.1 in this order.
Changed the SpaceEngineers Path to D:... in the csproj file.
It didn't work so I added NuGet Package manager Extension, but that didn't change anything.

P.S.: the last lines are written when trying to use IntelliSense
(info: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionService
Could not find document for file d:\Users\SnowSky\Projekte\VSC-SE-master\SpaceEngineers\rocket_test.cs)

As this "Project" is two years old, are there maybe things that changed?

I would really appreciate some help :)

My OmniSharp Output:
`Starting OmniSharp server at 17.12.2020, 21:27:13
Target: d:\Users\SnowSky\Projekte\VSC-SE-master\SpaceEngineers.sln

OmniSharp server started.
Path: c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5\OmniSharp.exe
PID: 13800

Starting OmniSharp on Windows 6.2.9200.0 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 16.8.0 - "c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild\Current\Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to 'c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild\Current\Bin\MSBuild.exe'
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.8.0 - "c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild\Current\Bin"
CscToolExe = csc.exe
CscToolPath = c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild\Current\Bin\Roslyn
MSBuildExtensionsPath = c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild
MSBuildToolsPath = c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild\Current\Bin
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'd:\Users\SnowSky\Projekte\VSC-SE-master'.
info: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'd:\Users\SnowSky\Projekte\VSC-SE-master\SpaceEngineers.sln'.
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:\Users\SnowSky\Projekte\VSC-SE-master\SpaceEngineers\SpaceEngineers.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'd:\Users\SnowSky\Projekte\VSC-SE-master'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.MSBuild.ProjectManager
Loading project: d:\Users\SnowSky\Projekte\VSC-SE-master\SpaceEngineers\SpaceEngineers.csproj
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'd:\Users\SnowSky\Projekte\VSC-SE-master' on host 14204.
[warn]: OmniSharp.MSBuild.ProjectLoader
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Sandbox.Common", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
[warn]: OmniSharp.MSBuild.ProjectLoader
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Sandbox.Game, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
[warn]: OmniSharp.MSBuild.ProjectLoader
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SpaceEngineers, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
[warn]: OmniSharp.MSBuild.ProjectLoader
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SpaceEngineers.Game, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
[warn]: OmniSharp.MSBuild.ProjectLoader
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SpaceEngineers.ObjectBuilders, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
[warn]: OmniSharp.MSBuild.ProjectLoader
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "VRage.Game, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'd:\Users\SnowSky\Projekte\VSC-SE-master\SpaceEngineers\SpaceEngineers.csproj'.
d:\Users\SnowSky\Projekte\VSC-SE-master\SpaceEngineers\SpaceEngineers.csproj
c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): Error: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Sandbox.Common", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): Error: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Sandbox.Game, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): Error: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SpaceEngineers, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): Error: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SpaceEngineers.Game, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): Error: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SpaceEngineers.ObjectBuilders, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
c:\Users\SnowSky.vscode\extensions\ms-dotnettools.csharp-1.23.8.omnisharp\1.37.5.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): Error: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "VRage.Game, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

Adding project 'd:\Users\SnowSky\Projekte\VSC-SE-master\SpaceEngineers\SpaceEngineers.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: SpaceEngineers
info: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionService
Could not find document for file d:\Users\SnowSky\Projekte\VSC-SE-master\SpaceEngineers\rocket_test.cs
info: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionService
Could not find document for file d:\Users\SnowSky\Projekte\VSC-SE-master\SpaceEngineers\rocket_test.cs
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.