Run a program when .NET project is opened in Visual Studio - automation

Is there a way to run an external program when a .NET project loaded into VS?

Related

Dotfuscator Error when integrating into VB winform Application

I am trying to integrate obfuscation into the build of a project. I am using Visual Studio 2019 CE 16.11.5 and the project is a VB winform Application targeting .net 4.6. Windows 10 Pro x64.
As soon as I add required lines into my project files and save. Visual studio unloads my project, showing the following message in output window:
error : The imported project "C:\Program Files (x86)\MSBuild\PreEmptive\Dotfuscator\6\PreEmptive.Dotfuscator.Common.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)/MSBuild/PreEmptive/Dotfuscator/6/PreEmptive.Dotfuscator.Common.targets" is correct, and that the file exists on disk.
I checked the folder in the error message and it is not there. I uninstalled and installed Dotfuscator still the required folder is not created.
I also have VS 2022 CE installed.
What am I missing?

Visual Studio 2019 Solution does not build exe file for Windows Service Project

Recently converted VB.NET solution from Visual Studio 2013 4.0 Framework to Visual Studio 2019 4.8 Framework. The solution contains 22 project. Of the 22 projects there is one Windows Form Application and one Windows Service project.
In Visual Studio 2013, compiling the solution would create two .exe files. One for the Windows Form project and another for the windows service project.
After converting to Visual Studio 2019 and compiling the solution, there is only one .exe file being created. That .exe file is for the Windows Form project (startup project).
When solution was being compiled using VS 2013, both .exe files would get created.
Does anyone know what I need to do to get VS 2019 to create the two .exe output files when compiling? Thanks

DLL Project using C++ Not Running in Visual Studio

Working with DLLs using C++, I've come across an issue, the code builds but does not compile/run in Visual Studio. When I use Visual Studio 2017, the problem is "xxx.dll is not a valid win32 application", when using Visual Studio 2010, it's something like "xxx.dll is missing ", the code builds fine, it just doesn't run in Visual Studio, I'm a newbie in DLLs and need to use some sort of debugger.
DLLs don't run. They contain code that is loaded by something else. You can't just run a DLL in Visual Studio. You need an executable (EXE) which loads the DLL.
You can set an executable which runs when you press Start Debugging. This is done in the properties of the project. By default, this is set to the variable $(TargetPath), but you can change this to launch anything under the debugger.
I don't have VS2017, but here is the project properties for VS2015:

Vsinstr - The application with instrumented binaries is not launching, If visual studio is not installed

I have an application developed in VC++ by using visual studio.
The app is having multiple DLLs.
To generate code coverage, I am instrumenting few DLLs by using "VsInstr".
Replacing the instrumented binaries in the client machine.
Now. I am unable to launch the application(No specific errors also). The app is asking me to restart the app.
But if I install visual studio(2015) in the machine and launch the app its getting launched successfully.
Should I install Visual studio to launch an application with instrumented DLLs ?
Need help to identify/isolate the dependent file rather than installing the full visual studio.
-- CHANDRU

Unable to load solution created in VS for Mac in Xamarin Studio

I am testing out the new Visual Studio for Mac, and I created a new .NET Core empty web application - was able to build and run the project.
Then I tried opening the solution with Xamarin Studio and I got the following error message:
Project file doesn't have a valid ProjectGuid
Am I trying to do something that is not possible at the moment, or am I missing some configuration?
Xamarin Studio does not support .NET Core projects created by Visual Studio for Mac.
The project file format is very different for .NET Core projects created by Visual Studio for Mac. One example is that the project does not have a GUID however there are many differences.
The DNX addin was created to support the older style .NET Core projects, which use .xproj and project.json files. Visual Studio for Mac creates the newer MSBuild SDK style project files which are .csproj files.