How do I merge all of my project from VS2010 into a single exe file?
My application has a solution with 4 project and the IT architecture is N-tier.
You could use ilmerge http://research.microsoft.com/en-us/people/mbarnett/ILMerge.aspx if your application is .NET
Related
We have a Vb.net project which is using C1.WPF.4.dll assembly.
When we create an installer project C1.WPF.4.dll dependency gets added to the project and installer.
We tried to exclude C1.WPF.4.dll from the main project.
Tried to remove the reference from dependency and VDPROJ file
C1.WPF.4.dll has dependencies of .net framework.
all other dlls can be excluded but only this dll is unable to exclude.
But if we rebuild the project the dll still appears in the installer project.
How can we exclude or remove dll from the installer project?
thanks in advance.
We are using Visual Studio 2017 to create the installer.
https://i.stack.imgur.com/B3HLA.png
This is one of the many reasons I don't recommend using Visual Studio Deployment Projects (.VDPROJ). I spent years trying to turn off this automated dependency scanning. It's impossible really.
Check out Windows Installer XML (WiX - opensource) and Industrial Strength Windows Installer XML (IsWiX - opensource by me). I have a tutorial here:
https://github.com/iswix-llc/iswix-tutorials
I am using Jenkins for CI.
My application- ( solution name HP_app) is a vb.net windows forms ( repository https://XXXXXX.org/scm/HP/HP_app.git)
Windows forms References .dll from class library (solution name HP_app_lib)(repository https://XXXXXX.org/scm/HP/HP_app_lib.git)
I have set up two separate Jenkins job for each solution.Class library solution builds perfectly.Now windows forms solution is dependent on HP_app_lib.dll.
<SpecificVersion>False</SpecificVersion>
<HintPath>..\HP_app_lib\bin\Debug\HP_app_lib.dll</HintPath>
</Reference>
How can I build windows forms using msbuild.
#user2211290 The windows form project and that assembly files structure should be like this:
HP_app_lib
--bin
--Debug
--\HP_app_lib.dll
[windows form project folder (e.g. HP_app)]
--[windows form project name].vbproj
After that build windows form project directly through msbuild, for example: MSBuild [windows form project name].vbproj.
I found the solution.
As windows forms solution is Referencing class
library-Which alone stand alone VS solution also going continuous changes.
Below project reference in MSBuild file is changed from
<HintPath>..\HP_app_lib\bin\Debug\HP_app_lib.dll</HintPath>
To file path in Jenkins server <HintPath>C:\jenkins\workspace\CI_FASET_LIB\bin\Debug\FASETLib.dll</HintPath>
Few more tips.
Normally Build servers will not come with Visual Studio installed.Jenkins MS build is searching for Microsoft.office.Interop.word.dll and ADODB.dll in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.
So I have moved these dll's from dev machine to Build server .net framework path.
Dev machine as we got VS,these are located in.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Visual Studio Tools for Office\PIA\Office14
I have a Visual Studio 2010 Solution with a class library project. What I want to do is compile 2 DLLs on build. I want to compile against .NET 3.5 and .NET 4.0 respectively. Something like below.
myproject\bin\debug\3.5\assembly.dll
myproject\bin\debug\4.0\assembly.dll
Is this possible?
Maybe you'can write a simple problem to execute on each build, it simply does:
make a copy of your working project file (*.csproj, *.vbproj, etc.)
edit the target info from 4.0 to 3.5 (or from 3.5 to 4.0) and update other related properties, it should be simple enough.
call msbuild.
I've used this approach before for different purpose.
The target framework is part of the application project settings that cannot depend on the configuration (unlike build settings).
I'm afraid you will have to create a separate project for each framework version.
My VS 2010 solution has let's say 1 native C++ dll project and 1 c# wrapper project. What I want is a pure magic. My solution has 32 and 64 bit configurations, mostly because of native dll. I'd like to build the solution so that c# dll includes both 32bit and 64bit native dll as resources in c# dll. Then I will unpack proper bitness in runtime and use it (this is not a problem). My question is how do I configure VS solution to build both bitnesses and then put them into the C# project before it builds?
I could probably do a clever .msbuild script, but then I won't be able to build nicely from VS.
You can do the following:
Right-click on the C# project in Solution Explorer and select Unload Project.
The project will be unloaded. Right-click on the project again and select Edit *.csproj.
Now you can edit the project file inside Visual Studio. *.csproj file has rather simple XML format.
Go down the *.csproj file right before </Project> closing tag.
Add the following lines:
<Target Name="BeforeBuild">
<MSBuild Projects=".\..\NativeLibrary.sln" Properties="Configuration=Release;Platform=x64"/>
<MSBuild Projects=".\..\NativeLibrary.sln" Properties="Configuration=Release;Platform=Win32"/>
</Target>
No, you can right-click on the project file in Solution Explorer and select Reload Project.
Also, you will need to add 32-bit and 64-bit *.dll files to resources. I have used this approach for a long time and it works perfectly. You can build your C# project from inside Visual Studio.
In VS 2010 express there are a few library projects (dlls) attached to the application project. When building the solution the dlls output to bin/Release/. Is there a way to have the .exe output to bin/Release and the dlls to bin/Release/dll?
This requires either a .config file with the <probing> element or implementing AppDomain.AssemblyResolve so that the CLR can find these DLLs. You'll have a deployment problem too, you have to convince ClickOnce to publish these DLLs. Realistically should only attempt this with the retail edition of Visual Studio so you can create a Setup project.
Fwiw: your customer won't mind that the DLLs are in the same folder as the EXE. I think most actually strongly prefer this. I do.
You could always have a post build event on the application project that copies all .dll files to a dll directory.
However the assembly loader will not be able to find the dll file and you application will not start.