How to publishing a Vensim model via code. - visual-studio-2010

I'm working with visual studio 2010 in the C # language. I want to publish a model using code (dll from Vensim DSS) and not using the GUI of Vensim DSS. Is this possible?

No. It is not possible via any code. The reason for publishing is to ensure that a licensed copy of Vensim DSS is used to generate the model.

Related

Azure Functions Visual Studio 2015 intellisense

I'm playing around with Azure Functions but I've noticed VS 2015 doesn't provide intellisense for .csx files.
Any idea how to fix this?
This isn't an issue with your configuration. IntelliSense support with csx is limited and will be improved in future tooling releases (also targeting VS Code and the portal).
Follow this blog post Publishing a .NET class library as a Function App and don't look back. Full C#, (not .csx.), C# 7 (if using VS2017), and full intellisense and debugging.
Basically the approach is instead of creating a Function Project (in VS2015 only), instead create an ASP.NET project and use the Azure Function CLI to create the actual functions. Then you are not dealing with .CSX files which have poor support within the VS editor.
From the New Project dialog, choose ASP.NET Web Application (.NET Framework) with the empty site template.
Open the project properties. In the Web tab, choose Start External Program
For the program path, enter the path to func.exe for the Azure Functions CLI. If you’ve installed the Visual Studio Functions Tooling, the path will look something like C:\Users\USERNAME\AppData\Local\Azure.Functions.Cli\1.0.0-beta.93\func.exe If you’ve installed the Azure Functions CLI through NPM, the path will be something like C:\Users\USERNAME\AppData\Roaming\npm\node_modules\azure-functions-cli\bin\func.exe
For Command line arguments, set host start
For Working directory, specify the root of the web project on your machine (unfortunately, this isn’t set automatically.)
One solution is to develop your Function as a Precompiled function as explained here: https://github.com/Azure/azure-webjobs-sdk-script/wiki/Precompiled-functions
I got fed up very quickly of the limited intellisense.

Where is DoubleUpperTriMatrix structure type located?

I need to create a DoubleUpperTriMatrix data structure in my app but I can't find where it is located so I can import the needed libraries. Using Google found that people include it via System.Object.CenterSpace.NMath.Matrix.DoubleUpperTriMatrix but it seems on Visual Studio 2010 it is not there anymore. How do I include it?
This component is not a part of Visual Studio, nor is it published by Microsoft. It is published by a 3rd-party called CenterSpace Software as part of their NMath package, which you will need to purchase.

VS2010 Custom Build Tool Template

I use many custom build tools in visual studio 2010 for generating protocol buffer code. I'm curious if there's a way to create a template for this custom build tool so that I can just apply it to any .proto files I create? I'm using native c++ and I know there's a plugin for the .net version to do something similar but it's not appropriate for my uses.

Alternatives to Using BuildProviders with Web Applications

I've read that you cannot use a BuildProvider with Web Applications in Visual Studio (or more specifically, you can use it, but your code isn't part of the project)
Are there any other ways to generate code on the fly using a Web Application project?
With or without using third-party tools?
Have you tried T4 templates in Visual Studio?

Visual Studio class/file templates: Is there a way to change their content automatically per project/solution?

I've updated my default templates in Visual Studio for classes, interfaces, code files, etc. I removed the default namespaces and added a copyright header blurb.
Is there a way to use a variable or something in the template so I don't have to zip/unzip and re-run the vs installer to change the copyright header? (I'm a consultant, the code-owner isn't always me or my company).
Yes, you can. The documentation for this sort of thing is part of the Visual Studio SDK. There are already many variables you can use.
If you find you want to get fancy, look into the Guidance Automation Toolkit. A template using GAT can accept user input as well as information from the project and environment, can unfold one or more templates, filling in placeholders with the data gathered, and then can execute various actions against the unfolded templates, the project, or whatever.
You can get the complete example implemented here: Multi-Project Templates with Wizard: Visual Studio 2010 Sample

Resources