There is an external application that executes C# libraries(plugins - my class library).
Is it possible to attach debug to my class library project in Rider.
In a Visual Studio, this is done very easily. For example, as described in this article. But how to do it in a Rider?
Thank you
Now you can use .NET Executable for your task. Put your library as command-line arguments into a run configuration. In the future, we want to add the macro for OutputPath.
Related
I have a solution in VS 2013 that have a few utility tasks that need to be done once in a while, for example rebuild some files that are embedded in the output executable.
Right now I am using a test to run these, just because it is simple to run some code from the IDE, but I don't like it – it's not a test.
My question is how would you create some utilities or commands that can be run from the IDE?
If you can make your utilities runnable from a commandline (for example, if they're in batch scripts or standalone helper executables), then you can use the External Tools functionality of Visual Studio.
Here's the MSDN page for that topic.
I don't have VS 2013 handy, but I've done this with previous versions of Visual Studio. It is a little more natural than running a test to invoke some helper utility tasks, although that works in a pinch.
You could also cobble together a pre/post-build event that runs the utility task. It's unclear what you are doing periodically, but if it's a pretty lightweight operation, it might not hurt to do it there.
You can use my Visual Commander extension to create and run commands using .NET and Visual Studio automation model in the IDE.
I'm not a professional programmer yet, I've just started college and I study some things by myself outside of it. I'm doing pretty basic stuff in C#, like console applications and simple stuff for the web in asp.net.
I've noticed that whenever I publish a C# project using Visual Studio 2010, I am obligated to use this "click once" setup wizard for my apps. But I don't really think any of them need a setup program, they are just a executable and maybe a bunch of .dlls which are able to run by just executing them right away.
I fail to see what's the poing of this click once installer? It probably checks if the correct version of the .Net framework is installed and, if not, installs it. But is that all it does? I think this click once is too ugly and if checking the .net version is all it does I'd rather code my own installer using another language which looks better and provides more info about my program.
You don't need to use ClickOnce, that's just an option for how to distribute your app. You could simply build using the Release configuration and then distribute that Release folder (typically bin\Release, configured in the project's settings), or use a post-build command to, e.g., build a zip of the assemblies and config(s) you need:
del /Q $(SolutionDir)MyApp-win.zip
cd $(OutDir)
"C:\Program Files\7-Zip\7z.exe" a $(SolutionDir)MyApp-win.zip MyApp.exe MyApp.exe.config OtherAssembly.dll
I recommend using ClickOnce for smaller apps since it simplifies the distribution of app updates alot.
You don't need to use the ClickOnce installer that is provided by Visual Studio though. You can create your own installer (with a UI that suits you more) that in turn uses ClickOnce under the hood for the heavy lifting.
See https://msdn.microsoft.com/en-us/library/dd997001.aspx.
I have a C# class library which I also use via COM Interop. To test the library I added a C# test app to the solution, set it to the startup project and I can test it that way. The library works fine this way but one function is not working when called via COM Interop from a Visual C++ 6 test application. How do I debug the library in this situation? I searched for a solution on Google but the only advice I can find is to add a test app to the solution which of course I can't do in this situation.
EDIT: Very sorry. I forgot to say the Visual C++ test application is Visual C++ 6.
First, open boot Visual Studio and Visual C++. Start your test application in VC++. After that, in VS, open the Debug menu and choose the Attach to process. This will show you a list of current process that are running, choose the one corresponding to your test application and click on Attach. This will enabled you to put breakpoint and debug your DLL.
I have a visual studio project. I later added a .cs file for testing and have added the appropriate 'using' statements and [Test] and [Testfixture] attributes. When I open the nunit gui application, however, it only accepts .dll, .exe, and .nunit files. I was wondering what exact steps I need to take to execute the tests I wrote. Is it possible to do so directly in visual studio?
You should add the NUnit dll as a reference on your project.
JetBrains' Resharper is able to run the tests inside Visual Studio. Read more about Resharpers unittesting here. JetBrains has also developed a line coverage tool: dotCover.
Right now, Resharper is the best solution.
Test Driven .Net is the best free solution I know of.
Visual Studio 11 will finally allow for 3rd part testing framework plugins.
I'm toying with my first remoting project and I need to create a RemotableType DLL. I know I can compile it by hand with csc, but I wonder if there are some facilities in place on Visual Studio to handle the Remoting case, or, more specificly, to tell it that a specific file should be compiled as a .dll without having to add another project to a solution exclusively to compile a class or two into DLLs.
NOTE: I know I should toy with my first WCF project, but this has to run on 2.0.
You can get away with just calling csc.exe on the pre-build event if you don't want to mess with the .proj file directly and add build events.
None that I know of using VS 2008 at the moment.
But you might want to check out NAnt. It is made for this kind of work.