Change executable path of Run/Debug configuration in Rider IDE for web project - iis-express

In the Rider IDE for a web project I want to change the Executable path (see red area in attached screenshot) in the Run/Debug configuration. The text-field is grayed out and after playing around a bit I didn't find a way to change this.
Is there a way to change this option?
Is it not yet implemented (did not find it yet in the issue tracker)?
What I want to do is change the path such that it points to the 32-bit version of IIS-Express as the given web project references an old 32-bit C++ library, hence the project has to run as 32-bit process.

You may use
DotNet Executable run/debug configuration and set wherever exe you need.

Related

Can I create a Visual Studio 2019 project from existing C code?

Here is my current setup:
Some C code (some embedded code) in a folder and subfolders. Organised as I needed and how the embedded editor needed.
If I use Eclipse to create a new C project and place the project file in the root of my sourcecode, then Eclipse will find all folders and files, then index them correctly. I then able to browse the files as a project, functions linked to other files, defines are showing up correctly.
Now, our version control is Visual Studio 2019, and I'm looking for a solution or guide, how to open the same file structure in visual Studio instead of Eclipse. I don't want to open the Eclipse project, I try to drop the use of Eclipse, so I can just use one tool to version control the files and browse the code for editing. I also don't want to compile, debug in visual Studio, I can use the dedicated environment for that. I only want to edit the files like it would be in Eclipse, save the files as the VS editor is much better than the embedded editor. (By the way, the embedded studio IAR and it's editor is horrible, hence why I used Eclipse in the past, but I don't want to open IAR project in VS, just a nice editor needed from VS.)
Any suggestions? Anyone done this successfully?
When you open VS2019 directly (i.e. not via a source or project file) you should be presented with a start page that includes this:
Select "Open a local folder" and it will present the project from the root you select. It will even apply IntelliSense for code completion for symbols within the selected code base. For headers external to the project tree, you can add include search paths to get better navigation, browsing and completion.
A more comprehensive integration with IAR is possible using VisualGDB extension as described here.

How to publish my C# project using OpenCV Nuget packages in Visual Studio?

I have developed an opencv application using windows form and C#.
The opencv packages I got from the Nuget packages manager (EMGU.CV and ZedGraph).
Everything works fine in visual studio, but when I publish the project and install the program in my machine, it throws an exception when I click a button that performs some opencv operations.
I guess the opencv packages didn't come along with the final published project, so how do I do to make it export when publishing, I thought it would be an automated process, I have already used other nuget packages and I had no problem with it.
What Am I missing here?
After some days waiting for an answer, and looking for solutions, I've figured it out how to solve this issue.
I came across this question:The type initializer for 'Emgu.CV.CvInvoke' threw an exception
Which led me to this: http://www.emgu.com/wiki/index.php/Download_And_Installation#The_type_initializer_for_.27Emgu.CV.CvInvoke.27_threw_an_exception.
More precisely this part:
First of all, I don't know why the compilation runs fine inside visual studio enviroment and why not when publishing the project as it is. For some reason, the Nuget packges are not enough for publishing the project, you need to add the .dll files manually yourself (not sure why this occurs once I have worked with Nuget packages before and this workaround was not necessary).
To find the .dll files you go to your project directory, then you go to bin\Debug\x64 or bin\Debug\x86 (depends on which operating system you are targetting - 32 bits or 64 bits -in my case I added all .dll files from x86 folder, I guess you can add from both folders if in doubt).
The Debug folder of your project is build every time you run the project inside Visual Studio enviroment, so if your Debug folder is empty then you just need to run the project one time to be able to find the auto generated files inside that folder. Just a side note here, you can use either the Debug or the Release folder inside bin, just remember to check if you compiled the project in Debug mode for Debug folder, or Release mode for Release folder, otherwise the desired folder will be empty, as explained before, I found no differences between the files generated, I added the dll files from Debug\x86.
Once you have located the .dll files, you go to Visual Studio, right click on the project in the Solution Explorer tab, then Add ---> Existing Item.
Go to the folder where the .dll files are, select all and click Add.
Once you have done this, the .dll file will be shown in the Solution Explorer.
Right click on each .dll file added in the Solution Explorer, and open the properties tab by clicking Properties. On the Properties tab, go to option Copy to Directory and change the field to Copy Always (the emgu documentation link provided above states to use the option "Copy if newer", but to make sure I chose "Copy always", it worked fine for me). Repeat the process for all .dll files added.
Now you are ready to go for publishing the project as it is,just remember doing this every time before publishing your project to see if no .dll files are missing, so once you got to final version of your program, run it, and then make sure to check the .dll files, it might have new ones to add or to remove.

Relative versus Absolute path to cv::imread OpenCV

I've got a cross platform error with OpenCV 2.3.1 and 2.4 on both VS2010 and Xcode 4.2
If I use cv::imread while giving the path to the image as an absolute path, it works. It does not work if that is a relative path. I usually put the images in the same dir as the code as well as all other dirs in the project just to be careful.
Much appreciated if anyone can answer this. Thank you!
Harish.
In Visual Studio, when you create a C++ project, it sets the project's working directory to the project dir, not the output dir of the executable.
That means that if you run the project from inside Visual Studio (by using the F5 button or the "Start Debugging" button), the program that you are writing won't be able to see the files that are in the same dir as the .exe file. But when you run the program from Windows Explorer (by double-clicking it) it will work as expected.
To fix this, you need to go in the Project properties window under Configuration properties -> Debugging, and change the Working Directory from $(ProjectDir) to $(OutputPath). You should change this both for the Debug and the Release configuration.
I don't know if this is the same case in XCode, but you can try this solution there too.

In Visual Studio change my main project from Console to Window when I switch from Debug to Release

anyone knows how to do this automatically/programmatically? I mean, when I switch my solution from Debug to Release, I want my main project to change from Console to Window automatically.
I thought to use vb script, but I want to know if anyone has a better solution before.
Console/Windowed subsystem is a per-project per-configuration setting. You can change it separately for Debug & Release configurations via project properties dialog - so you can just setup your Debug/Release configurations once (the settings are stored in the project files).

Why will my project not debug?

I just downloaded Microsoft Visual C++ and am trying to run a simple hello world. However, when I go to debug, I get the error "Unable to start program 'C:\Users\Sterling\Documents\Visual Studio2010\Projects\test\Debug\test.dll'"
And thats it. It doesn't say WHY it can't start it...it just says it can't. Has anyone experienced this? And know an answer? I'm thinking about just reinstalling it, but was hoping to find an easy solution first. Is there a separate program I need to start .dll files? I just got this laptop about a week ago so I may not have it yet. This is on Windows 7. Thank you for any help.
You have built your project as a DLL. You cannot run DLLs standalone. If you meant to build it as a program (.EXE), change the Project Settings.
Right click Project in Solution Explorer, click Properties - edit Configuration Properties -> General -> Configuration Type to be "Application (.exe)".
If you want to build (and run) your project as a DLL, you will have to also write a program that uses it in order to to test it. You could do this as a separate 'TestDll' EXe project in the same solution as your existing DLL.

Resources