Visual Studio requires Rebuild Solution when I change my IronPython scripts - visual-studio-2012

I have a large C# project which includes a number of IronPython scripts. These scripts are called using the Microsoft.Scripting.Hosting facility. Within the Visual Studio solution the Python scripts are all kept in their own Project.
If I edit one of the scripts and Run the solution, all my C# code is compiled as needed but the IronPython code is from before my edits. To force the compiler to use my new scripts I need to use Build | Rebuild Solution.
Is there some way to instruct the compiler to consider and recompile the IronPython scripts when the solution is run?

Related

How do I make a MS VS C++ project standalone?

So I wrote a small script to do some math calculations, but I cant get it to run on another computer. When I try to run it, it says I'm missing multiple dlls. MSVCP140D.dll, VCRUNTIME.dll, and ucrtbased.dll are the ones it says it cant find. The only include I have in the entire doc is iostream, is it somehow linked to specific Visual Studios dlls? and if so how would I go about making it able to run on a different computer.
I am using VS 2019 and windows 10 if that helps in any way.
any and all help appreciated.
You can use static linking of the C Runtime (/MTd or /MT), but it's not recommended in general which is why all VC++ projects default to the DLL version of the CRT (/MDd or /MD).
See Microsoft Docs.

How does Python IntelliSense and linting in Visual Studio Code locate modules?

I'm just getting started using Visual Studio Code and using it to develop Python. I'm trying to understand how best to use the VS Code environment, and am trying to understand the workspace. There already is a great answer for What is a VS Code Workspace on StackOverflow.
But I have another very specific question: How are Python modules found by IntelliSense and linting in the VS Code IDE (These are provided by the VS Code Python extension as far as I can tell)? Linting is working because it can find the standard Python modules, but it cannot find the site modules. There are various places search paths can be set, both in the Python environment and in the VS Code settings. But I cannot find anything that gives a big picture view of how to set up the VS Code IDE.
I also should add that I am working with a relatively flat folder structure with application folders and common folders (with modules shared by the applications) on the same level. My thinking is to create VS Code multi-root workspaces for each application that includes the common code for each application. Do I have to set up a Python environment? Do I need to set up paths somewhere in the workspace?

does every .exe file need a new project in Microsoft Visual C++?

My background is Linux and traditional makefiles. I have a project where the makefile builds several dozen executables I can then run to perform tests against the library being developed. This library is now ported to Windows.
My question: In Microsoft Visual C++, do I have to create a new project for every individual test .exe file? Or is there a way to create 1 project that will easily build all of the .exe files? E.g., test001.cpp becomes test001.exe, test002.cpp becomes test002.exe, etc.
I'm using Microsoft Visual C++ 2010 Express. Right now what I do is click on File->Add->New Project...->Win32 Console Application->... for every test executable. But it would be nicer if all these test files could be built without a new project for each one.
You need to have one project per executable, but you can have multiple projects per Visual Studio "solution".
When you build a solution, all of its projects get built. If you need the projects to be built in a specific order within the solution, you can easily set up dependencies.
If you're using Visual Studio in the normal fashion, then yes, each VS project (i.e. each .vcproj file) corresponds to exactly one output file (an executable, DLL, or static library).
You can also use Visual Studio with makefiles though, if you want. Just write your makefile as usual, except the C++ compiler is the cl.exe in the VS binaries directory, the linker is link.exe, and of course all of the command line flags are completely different. You can even set your VS project to use make instead of its built-in system, so you can still use the IDE for editing and debugging.

Setting up a 1-step build for a Visual C++ Application

Any suggestions? Code and artwork/assets are all in SVN, and we don't want to port it to GCC or another compiler before anyone suggests it!
Simplicity and minimising 3rd-party tools is preferred, since we don't have a build-server it'll probably still be run on a developer's PC but we don't want them just doing a build manually and packaging it up.
It's basically just a C++ solution with several projects, plus we have an Inno Setup installer to build.
Right now it's a 3-step process (or 4 if you include uploading the release to FTP):
Get from SVN
Build solution from VC++
Run Inno to create the packaged
installer
You can use MSVC pre, post & custom build steps to do this, they run programs through the windows command line. also see this: http://blogs.msdn.com/b/visualstudio/archive/2010/04/26/custom-build-steps-tools-and-events.aspx
If you can't do it with the VS build steps (see Necrolis' answer), then in the past I've used makefiles run with nmake, which is included with VS (you need to start a command prompt with the right environment settings for VS - there's a shortcut on the start menu.)
Nowadays I use FinalBuilder ( http://www.finalbuilder.com/home.aspx ) for all this sort of stuff, which is expensive and doesn't meet your 'not 3rd party' desire, but is an excellent tool. Once you get into it, you'll realise that there are probably far more steps you'd like to do than merely compiling/packaging - you probably want to be incrementing version numbers, moving files around, creating directories, etc. FB is good at that sort of stuff.
I am adding up to date answer for other users:
Currently there is 3rd party extension available which integrates Inno Setup into Visual Studio and allows you to build installers directly from IDE (or from command line using MSBuild).
It is possible to use pre, post & custom build steps, batch files, code signing, running programs through the windows command line etc.
Check Visual Studio Marketplace for more info about Visual & Installer: https://marketplace.visualstudio.com/items?itemName=unSignedsro.VisualInstaller

generate exe file

i have developed application in visual c++ 6.0,i have do exe of that application,i have done by using icnt.exe(install creator),but when i run my application exe file on other system which does't have the vc++ software it's showing dll files are missing,how could than i downloaded the dll files again it is asking other dll's files.i want run my application without installing vc++ software in windows,how can i solve it,plz help me i'm touble.
How to make Realease build? by default its debug build
thanks for reply.
As a wild guess, you have deployed the Debug build, which depends on DLLs that are not allowed to be shipped.
If that is the case, have VC6 create a Release build and deploy that.
You can verify which DLLs are required by your application with the depends.exe utility that came with Visual Studio.
Edit: The easiest way to get a release build when ready is to use the Batch Build command from the Build menu. It will let you pick among all of the known build types in the project, and choose to either build them clean (recommended) or to just bring them up to date.
It is also possible to switch the GUI to default to the Release build instead of Debug. That is the right thing to do if you actually need to run the debugger on the Release build. Note that both builds include debug symbols. The differences have more to do with which runtime libraries are linked, and certain optimizations such as making the assert() macro have no effect.

Resources