Dotfuscator post build for visual studio setup project VS 2010 - c#

I am using Visual Studio 2013. I have a .NET application that is getting deployed via Visual Studio Setup Project. Right now I have the Primary Output of the application begin used in the setup project. I want to use the Dotfuscator tool to obfuscate my code and then used the dotfuscated output for my setup project. Can someone lead me in the right direction?
I have tried the following
1: On my application post-build event, pass my .xml configuration file from Dotfuscator to the Dotfuscator application. This created an obfuscated exe, but it was still deploying the regular exe with my setup project
On my application post-build event, pass my exe to the Dotfuscator command line tool with the community edition...it would create a obfuscated exe in the Dotfuscated folder and then copy it over to my Release folder. However, the setup project was still deploying the regular exe with my setup project.
Any suggestions?

Found the answer via another thread...I was not aware the Visual Studio Setup Project pulled the 'Primary Output' from the obj folder instead of the bin folder. I copied by obfuscated exe to the obj folder before the setup project was built and this worked.

Related

How to run the .net project in the local machine

Wanted to run the .Net project in my local machine. I have taken the backup of the live server as well as the DB. Now I have to run the project in my laptop.
As mentioned in my comment,
If you have the source code and visual studio install, great.
You should have an .sln file. Just double click on it and your visual studio will open.
There are lots of tutorials of how to run Visual Studio / c# code (You can also use Visual Studio code, or any other ligher software) you decide what is your preference.
Let me know if this helps
You didn't mention backup in dll form or source code,
if it is in source code you can simply load project in Visual studio and set as start-up project run that.
and if it is in in dll then you can locally host your project in your IIS server.

Add external exe file in my setup file in Visual Studio

I have created a WPF app on Visual Studio 2015. I have created installer using WIX toolset. Now I need to add an external exe file into setup.
Please, let me know the way, How to add exe file into my installer package.

Build an executable file without Microsoft Visual Studio from project file

I don't have MS Visual Studio installed and can't install it due to financial/legal reasons. I've inherited an executable file built with Visual Studio using C#. It isn't working as planned. I can fix the problem by changing 1 line of code. I have done so, but now I don't know how to re-build the project into an executable without Visual Studio.
I've tried running the following code from the command prompt:
>C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:exe
/out:exchange.exe exchange.csproj
Am I on the right track?
Edit: This question is different from this question because here I ask about building and compiling a whole project... not just a .cs file.
I would suggest installing Visual Studio Community edition (free)
But, if you just want to build using msbuild through the commandline the simplest way would be (assuming you navigated to where msbuild is or have the env path set):
msbuild "C:\Users\Something\Documents\Visual Studio 2015\Blah path\Hello.csproj"
Building (then running) a simple console app that prints hello with the above:
You can use MonoDevelop for compiling your C# project.

Change Published Project Install Directory in Windows8.1

I am trying to change the default installation directory of my projects when I publish them but I seem to have no choice over where the published setup.exe actually puts the program. It seems after setup.exe running and application installed, all the processed files are under the folder of C:\Users\{username}\AppData\Local\Apps\2.0\ (Something like that, I dont remember the exact directory as it is very long). This is not what i want as I installed the program in the C:\Program Files\ but all the log files go to the C:\Users\{username}\AppData\Local\Apps\2.0\. This is really really annoying.
The application I published is C# Windows Form Application
And I have looked through online and found that somebody suggested to create an MSI package for C# Windows Application Using a Visual Studio Setup Project instead of publishing the program:
Publish Windows form application how change the installation path
It is supposed that the above website can solve this problem. Are there any other suggestions to solve this redirection problem after publishing the C# Windows Form Application? Thank you.
When you use the Publish funtion in Visual Studio, you are creating click-once publication. This type of deployment has relatively fixed rules and not everything can be configured. It allways installs into an obfuscated folder under windows user profile. It is similar to the fact, that you cannot change location where windows-store modern apps are installed under Windows 8.1.
You can create MSI setup project for your app - but in Visual Studio 2012 this type of project is missing and it was re-introduced againg in Visuals Studio 2013. There you can specify install folder. You can also use Install Shield Lite with Visual Studio 2012.
You wrote:
This is not what i want as I installed the program in the C:\Program
Files\
It is not possible to install ClickOnce application using Publish button in Visual Studio into C:\Program Files\.
If you have just problem with the location of your log files, you need to specify a different folder within your application code. Make sure that user, who is running your app, has write access to that folder - it should be in some user's profile folder or in a public folder. Avoid %ProgramFiles% as a folder for your log files - it is not a good practice.
Instead of Application.StartupPath you should use path accessible to all users including non-admin, like:
Path.Combine(Environment.GetFolderPath(SpecialFolder.CommonApplicationData),"MyCompanyName")
You can use InstallShield to create installation wizards/Setup.
Here's the free version for Visual Studio

visual studio 2012 test project is loading configuration settings from machine.config but not from app.config

I am trapped in to a misterious issue. The visual studio 2012 test project, whenever I am tring to run it, is loading configuration settings from machine.config but not from app.config.
What you are describing here is normal. The reason for this the test runner is an external application that is ran by visual studio when you run the tests. As such, the test runner has its own config file that you would have to modify to pull this off. Conversely, the machine.config applies to every .net process that runs on your machine, so those settings will come in to the test project.
The problem in Visual Studio 2012 itself. To run tests by default it doesn't use your bin folder, it deploys assemblies to system folder.
So, your app.config doesn't work in this case. There are several solutions like copy your app.config to this folder on post build event or use .runsettings File. But the simplest way is to update your Visual Studio.
This issue was fixed in Visual Studio 2012 Update 4 and Visual Studio 2013.

Categories

Resources