malware-dev / mdk-se Goto Github PK
View Code? Open in Web Editor NEWMalware's Development Kit for SE
License: MIT License
Malware's Development Kit for SE
License: MIT License
Since the minifier uses an assembly which is not strong-named, and the wizard project must be strong-named, I'm in a bit of a bind.
Proposed solutions:
System.Runtime.InteropServices.COMException (0x80004005): Project unavailable.
at EnvDTE.Project.Save(String FileName)
at Malware.MDKServices.ScriptUpgrades.AnalyzeProject(Project project, ScriptUpgradeAnalysisOptions options)
at Malware.MDKServices.ScriptUpgrades.<>c__DisplayClass13_0.b__1()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Malware.MDKServices.ScriptUpgrades.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MDK.MDKPackage.d__48.MoveNext() in C:\Users\Morten\Dropbox\Projects\Space Engineers\MDK-SE\Source\MDK\MDKPackage.cs:line 260
Tried creating a new project while another windows of VS was open, got this
Hi Malware, I tried installing the .vsix file following the steps outlined in you getting started guide (I only got as far as Step 2) when the installer complained that the extension cannot be installed with with the currently VS2015 community installation, please help?
Install log:
`2017/08/13 21:12:12 - Microsoft VSIX Installer
2017/08/13 21:12:12 - -------------------------------------------
2017/08/13 21:12:12 - Initializing Install...
2017/08/13 21:12:12 - Extension Details...
2017/08/13 21:12:12 - Identifier : MDK.Morten Aune Lyrstad.e02b602e-3099-44a5-88c6-cb30cab978f6
2017/08/13 21:12:12 - Name : MDK/SE
2017/08/13 21:12:12 - Author : Morten Aune Lyrstad
2017/08/13 21:12:12 - Version : 0.9.36
2017/08/13 21:12:12 - Description : A toolkit to help with ingame script (programmable block) development for Keen Software House's space sandbox Space Engineers.
Space Engineers is trademarked to Keen Software House. This toolkit is fan-made, and its developer has no relation to Keen Software House.
2017/08/13 21:12:12 - Locale : en-US
2017/08/13 21:12:12 - MoreInfoURL : https://github.com/malware-dev/MDK-SE
2017/08/13 21:12:12 - InstalledByMSI : False
2017/08/13 21:12:12 - SupportedFrameworkVersionRange : [4.6.1,)
2017/08/13 21:12:12 -
2017/08/13 21:12:12 - SignatureState : Unsigned
2017/08/13 21:12:12 - Supported Products :
2017/08/13 21:12:12 - Microsoft.VisualStudio.Community
2017/08/13 21:12:12 - Version : [15.0]
2017/08/13 21:12:12 -
2017/08/13 21:12:12 - References :
2017/08/13 21:12:12 - -------------------------------------------------------
2017/08/13 21:12:12 - Identifier : Microsoft.VisualStudio.MPF.15.0
2017/08/13 21:12:12 - Name : Visual Studio MPF 15.0
2017/08/13 21:12:12 - Version : [15.0]
2017/08/13 21:12:12 - MoreInfoURL :
2017/08/13 21:12:12 - Nested : No
2017/08/13 21:12:12 -
2017/08/13 21:12:12 - Signature Details...
2017/08/13 21:12:12 - Extension is not signed.
2017/08/13 21:12:12 -
2017/08/13 21:12:12 - Searching for applicable products...
2017/08/13 21:12:12 - Found installed product - Microsoft Visual Studio Community 2015
2017/08/13 21:12:12 - Found installed product - Microsoft Visual Studio 2015 Shell (Integrated)
2017/08/13 21:12:12 - Found installed product - Global Location
2017/08/13 21:12:12 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
at VSIXInstaller.App.InitializeInstall(Boolean isRepairSupported)
at VSIXInstaller.App.InitializeInstall()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()`
Since all utility classes must reside in the same namespace, the analyzer should detect and warn about deviations.
Perhaps the Mod API is not in your line of interest, but thought I would ask just in case. Would it be possible to introduce another template aimed at the Mod API, with references to relevant libraries, and where the debug feedback could say "The type or member x is prohibited in the Space Engineers Mod API" like it does currently for the In-Game API? Or, would it make things too troublesome, or mess with the point or "target audience" of the kit? Would it be pointless to use the MDK just for availability feedback?
Of course, the minifier wouldn't work, nor would deployment, hmm. Maybe in the Script Options, if a particular library is referenced, or if a "Mod API"-option has been ticked, then one would be unable to highlight or select the minifer and deployment options.
Some times, it seems after installing a new version, Visual Studio will generate an erroneous path for the whitelist.cache
file in a new scripting project.
Workaround: Reloading the project should kick in the update checker, prompting you to allow the update of the project. It should work after that.
When deploying with a shared Project and Utility Classes.
Items are added in alphabetical order So any customize variables, Program(), Save(), Main(string argument) gets further down in the code instead of at the front.
May be user training.
A request has been made to allow for portions of the code to remain unminified when using the minifier, in order to facilitate in-script configuration.
It should be possible to manually specify the order of files as they get merged together with the deployment builder.
This is a split from issue #17 by Elfiwolfe.
If the script (previously deployed) is open in another program like Notepad++, and you try to deploy, it won't deploy, which is fine, but the script cannot be attempted to be deployed again until Visual Studio is restarted. Or, there is some other reason behind why it is trying to deploy indefinitely. Try opening the script up in Notepad++, deploy, and if it works, wait a couple of seconds, and try to deploy again. At this point it should be stuck in deploying state.
Going through all those menus. Sure, one can assign hotkeys to it, but... I'd like to find a better way.
I'm wondering whether I should autodetect when an update release is uploaded to GitHub, and push a notification to VS's notification area...
Allow for plugins to do pre- and postprocessing of the code during deployment. The preprocessors work on the individual code files, the postprocessors work on the merged script file.
Value cannot be null
Parameter name: path
Visual Studio Community 2017 throws this error when I try to create any project using MDK-SE. It creates 2 directories (of name of the project)
Thats all, no .sln files, no .cs files, no .csproj files, nothing. It's the first time I use MDK-SE, what should I do? Downloaded Gold Release 1.0
because all files should be saved, and the project should compile successfully.
Add support for mockups and the simulation of blueprints to test scripts directly in Visual Studio without the need of running the game.
This seems to be a good starting point for this feature:
https://docs.microsoft.com/en-us/visualstudio/extensibility/walkthrough-displaying-statement-completion
I have yet to find any means of showing the Space Engineers item templates when in a Shared Project.
Add an option to strip unused types from the deployed scripts. This will make shared projects even more useful.
I suppose this behavior is expected if it minifies from top-to-bottom, going through A to Z. I tried to see if I could balance characters written and instruction count by writing a sort of library of strings that has to be repeated throughout the script. Since I found it messy to keep the library above Program(), I moved it below Main(). As a result, not all of the variables got abbreviated upon deploy.
string
_TARGET = "Target",
_RANGE = "Range",
_METEORS = "Meteors",
_MISSILES = "Missiles",
_SMALLSHIPS = "SmallShips",
_LARGESHIPS = "LargeShips",
_CHARACTERS = "Characters",
_STATIONS = "Stations",
_NEUTRALS = "Neutrals",
_ON = "_On",
_OFF = "_Off",
_ONOFF = "OnOff",
_ATMOSPHERIC = "atmospheric",
_HYDROGEN = "hydrogen",
_ION = "ion";
string y="Target",_RANGE="Range",_METEORS="Meteors",_MISSILES="Missiles",C="SmallShips",D="LargeShips",E="Characters",F="Stations",G="Neutrals",H="_On",_OFF="_Off",J="OnOff",K="atmospheric",L="hydrogen",M="ion";
When I moved the collection of strings back up to the top, above Program(), it was no longer an issue.
Easiest solution: User writes variables at the top where they are expected to be found procedurally.
Just so I don't forget that I want this ready for the 1.0 release...
Just a quick little tool where you can rename and delete the scripts in the local workshop area.
... it minifies the callbacks too. Yay me! ๐
When I open the solution of the attached project, VS stopped working
devenv.exe
System.nullReferenceExpection
'Object reference not set to an instance of an object.'
Debugger says
$exception {"Object reference not set to an instance of an object."} System.NullReferenceException
Output says
An unhandled exception of type 'System.NullReferenceException' occurred in mscorlib.dll
Object reference not set to an instance of an object.
It would be very useful to be able to import a previously written script - or a script downloaded from the workshop - into an MDK project.
Change the way files are referenced, and verify the paths themselves, don't rely on the MSBuild property
As requested, here is the log. Will also attempt repro.
MDK.Build.BuildException: Error loading script projects from C:\Users\saett\OneDrive\Documents\Visual Studio 2017\Projects\MDK Nav\MDK Nav.sln ---> System.InvalidOperationException: The operation cannot be completed because a build is already in progress.
at Microsoft.Build.Shared.ErrorUtilities.ThrowInvalidOperation(String resourceName, Object[] args)
at Microsoft.Build.Execution.BuildManager.BeginBuild(BuildParameters parameters)
at Microsoft.CodeAnalysis.MSBuild.ProjectFile.BuildAsync(BuildManager buildManager, BuildParameters parameters, BuildRequestData requestData, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.MSBuild.ProjectFile.d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.ProjectFile.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.CSharp.CSharpProjectFileLoader.CSharpProjectFile.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MDK.Build.BuildModule.d__30.MoveNext() in C:\Users\Morten\Dropbox\Projects\Space Engineers\MDK-SE\Source\MDK\Build\BuildModule.cs:line 116
--- End of inner exception stack trace ---
at MDK.Build.BuildModule.d__30.MoveNext() in C:\Users\Morten\Dropbox\Projects\Space Engineers\MDK-SE\Source\MDK\Build\BuildModule.cs:line 123
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MDK.Build.BuildModule.<b__29_0>d.MoveNext() in C:\Users\Morten\Dropbox\Projects\Space Engineers\MDK-SE\Source\MDK\Build\BuildModule.cs:line 102
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at MDK.MDKPackage.d__49.MoveNext() in C:\Users\Morten\Dropbox\Projects\Space Engineers\MDK-SE\Source\MDK\MDKPackage.cs:line 359
Just a little Copy&Paste slip in the sample code of The Grid Terminal System and Subclasses :
public class SomeUsefulSubclass
{
Program _program;
public AirlockSystem(Program program)
{
_program = program;
}
I believe the constructor should be named SomeUsefulSubclass
instead of AirlockSystem
.
Nevertheless the documentation is awesome! Same valid for the MDK! Thankyou.
pics:
http://imgur.com/a/qDmrL (multiple images)
project (zipped):
https://drive.google.com/open?id=0B1BcAyBfX9iFWUlhTWFFMXN5Rk0
The error "type or member 'string' is prohibited in Space Engineers" appeared after I had used Ctrl+ X (cut & paste) on two methods that were seemingly unrelated to the method in which the error appeared. Seemed to me that IntelliSense wants data types ("var") to be more specifically defined ("string").
string[] ss = { "stuff", "stuff" };
// "var" was underlined red as an error
foreach (var s in ss) {
// do
}
Note: I have Program.cs, Program1.cs, etc in the same IngameScript project, which may be improper usage of the MDK. The error(s) also disappeared as soon as I backspaced and rewrote the "r" in one of the "var"s. There were no crash. I view this bug as irrelevant, but for all I know it may be the cause for other issues, which is why I'm mentioning it.
Ps. I've never used GitHub before so I apologize if I'm not following GitHub bug report customs.
When a class is used from a separate file (no matter if from the same project or from a Shared Library), the final script is broken because it contains an invalid closing bracket between program part and extension part and the last closing bracket of the extension class gets removed.
I found this location in source code, which is propably the root cause? :-)
MDK-SE/Source/MDK/Build/ScriptGenerator.cs
Lines 36 to 37 in 02b611f
After updating to 0.9.38, the deploy button in the context menu of the project (as well as some other buttons in the Tools menu) is gone. After going back to 0.9.37, all buttons where back again. Visual Studio version is 15.2.
Edit: Forgot to mention: Maybee this is related to #27? But closing and reloading solution did not fix the issue.
In the 1.0 release 2017/08/12, The Tools-->MDK menu has two options: "Blueprint Manager" and "Check for Updates."
Clicking "Check for Updates" opens a dialogue box with the header "New MDK Version Available," but the text in the dialogue explains "There's no new version available for download at this time." (Should the header change?)
Furthermore, the grey text that follows advises me to "Go to Tools | Options | MDK | SE to set your options for update checks" ... but as explained above, there are only two menu options: "Blueprint Manager" and "Check for Updates." I do not have "SE" as an available option!
Improve the analyzer so it warns about a missing or corrupt whitelist file rather than just disallowing everything
Request to add identification xml file inside the text help document content, the establishment of multi-language xml document, so that the game can not identify the translation after the update content. (Such as: Sandbox.Common.xml inside the
^ What the title says...
I cannot create an Ingame Script project with the extension. Every time I confirm Visual Studio says the parameter "path" cannot be null, therefore making the directory for the project but leaving nothing inside.
Some warnings are given in the Activity Log when I open the Create Project dialog, if related to this issue:
615 | Warning | Found templates with duplicate template ids at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ProjectTemplates\CSharp\Windows\2052\ClassLibrary_WorkerRole.vstemplate" and "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ProjectTemplates\CSharp\Windows\2052\ClassLibrary\csClassLibrary.vstemplate" 616 | Warning | Found templates with duplicate template ids at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ProjectTemplates\CSharp\2052\SharedProject\SharedProject.vstemplate" and "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ProjectTemplates\CSharp\Windows\2052\SharedProject\SharedProject.vstemplate" 617 | Warning | Found templates with duplicate template ids at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ProjectTemplates\VisualBasic\Windows\2052\ClassLibrary_WorkerRole.vstemplate" and "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ProjectTemplates\VisualBasic\Windows\2052\ClassLibrary\classlibrary.vstemplate" 618 | Warning | Error! Cannot access file (C:\Users\[USERNAME]\AppData\Roaming\Microsoft\VisualStudio\15.0_3f523700\ProjectTemplatesCache\cache.bin).
And the "null" dialog will pop up together with this line of log:
619 | Warning | Performance warning: String load failed. Pkg:{D15F5C78-D04F-45FD-AEA2-D7982D8FA429} (VisualBasicProjectSystemPackage) LANG:0804 ID:2
I've installed the latest MDK but after opening a project in VS2017 (not an MDK project) I get the following error from VS...
System.NotImplementedException: The method or operation is not implemented. at EnvDTE.Project.Save(String FileName) at Malware.MDKServices.ScriptUpgrades.AnalyzeProject(Project project, ScriptUpgradeAnalysisOptions options) at Malware.MDKServices.ScriptUpgrades.<>c__DisplayClass13_0.<AnalyzeAsync>b__1() at System.Threading.Tasks.Task'1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Malware.MDKServices.ScriptUpgrades.<AnalyzeAsync>d__13.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MDK.MDKPackage.<OnSolutionLoaded>d__48.MoveNext() in C:\Users\Morten\Dropbox\Projects\Space Engineers\MDK-SE\Source\MDK\MDKPackage.cs:line 260
This is not going to be easy and might not even be possible, but it would be nice to have a way to see the estimated total character count a script will have when deployed.
This is a problem reported happening intermittently with new projects. A reproduction has still not been made. If you have this problem, please upload your failing project here. If you can find a reliable reproduction, you are officially awesome.
#endregion being stripped off. starting with RC version. was working on prerelease versions
example.
shared project autogyro
namespace IngameScript {
partial class Program {
#region Autogyro
// http://forums.keenswh.com/threads/aligning-ship-to-planet-gravity.7373513/#post-1286885461
double CTRL_COEFF = 0.5;
...
void gyrosOff() {
for (int i = 0; i < gyros.Count; ++i) { gyros[i].GyroOverride = false; }
}
#endregion
//endof autogyro
the #endregion and //endof autogyro are getting stripped off during the code being packaged together.
When i try deploying the script, i get this error
System.ArgumentNullException: Der Wert darf nicht NULL sein. Parametername: obj bei Microsoft.Internal.VisualStudio.PlatformUI.Utilities.GetObjectData(IVsUIObject obj) bei Microsoft.VisualStudio.PlatformUI.StatusBarService.GetImageListFromMonikers(IEnumerable
1 monikerList)
bei Microsoft.VisualStudio.PlatformUI.StatusBarService.GetBuiltInAnimation(StatusBarAnimationIndex statusBarAnimationIndex)
bei Microsoft.VisualStudio.PlatformUI.StatusBarService.StartAnimation(Object animationInfoKey, Boolean isBuiltInAnimation)
bei Microsoft.VisualStudio.PlatformUI.StatusBarService.Animation(Int32 fOnOff, Object& pvIcon)
bei MDK.VisualStudio.StatusBarAnimation.set_IsEnabled(Boolean value) in C:\Users\Morten\Dropbox\Projects\Space Engineers\MDK-SE\Source\MDK\VisualStudio\StatusBarAnimation.cs:Zeile 69.
bei MDK.MDKPackage.d__49.MoveNext() in C:\Users\Morten\Dropbox\Projects\Space Engineers\MDK-SE\Source\MDK\MDKPackage.cs:Zeile 0.`
The default behavior of the deployment builder should be to order the files with Program first, then the rest in an alphabetical order.
This is a split from issue #17 by Elfiwolfe.
Initial comment block is removed and replaced with MDK comment section.
Source before Deploy:
https://cdn.discordapp.com/attachments/260126085684002826/341281763949150210/unknown.png
Minor typo programmers will usually notice immediately => not critical:
_logOutput = GridTerminalSystem.GetBlockWithName("Log LCD") as IMyTextBlock;
Very neat info in that blog, btw. :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.