on a Web Setup, how do I exclude all .pdb files? - file-handling

In a sample solution on Visual Studio 2008, let's say, I have this:
myWebSite project (web site project)
myLibrary project (library project)
myWebsiteDeploy project (web deployment project)
myWebSetup project (web setup project)
inside myWebSite there is a myLibrary.dll and myLibrary.pdb witch they are included in the myWebSiteDeploy project and pass to the myWebSetup
How can I tell myWebSeiteDeploy or myWebSetup to exclude all *.pdb files as they are not needed in a deployed website ?

Open the project properties in Visual Studio. Select the "Build" tab, change your "Configuration" to "Release" and click on the "Advanced" button. Change debug info to "none". Then the build will not create the .pdb files.

Related

setup NSIS build in Bamboo

I have to setup build process in Bamboo server. My requirements are,
We have a web-server application [more than 20 web projects, 10 windows service projects, DB scripts, some supported utilities like exe, xml's, code signing certificates, ssl certificates]
We have already build automation in c#, which uses NSIS scripts to generate installer.exe
Our build process has the following steps:
Checkout the source code
Checkout the Utilities
Checkout the NSIS installer source code
Update the source code
Update the Utilities
Update the Product versions in all the Assembly files of all the projects & Wix files
Build all the MSI projects based from the list [Project.xml] -> Once build completed with Code Signing post build CMD, then move to
some [ex: LatestPackage] folder in any [ex: Package] directory
Build all the Web app projects from the list [Project.xml] -> Publish into some [ex: LatestPackage] folder in any [ex: Package]
directory
Build all the support projects for installer from the list [Project.xml]
Copy the "LatestPackage" from "Package" directory to "LatestPackage" folder in "NSIS Installer" directory
Update the Installer source codes
Copy the installer custom assets to respective folder in "Installer" directory [SQL, some exe's]
Update Installer.xml file with the Branding information's in "Installer" directory
Compile Installer.nsi file & Installer package will be generated under Installer directory
Could anyone guide me in right path to achieve this.
1. Need to setup task for each and every projects?
2. Where to keep the files once build completed?
3. How to move the all the projects binaries into another projects directory?
4. How to keep the supported files and copy them to our source code folders?
5. How to maintain the generated build?
Is Bamboo Server Windows based? Can Visual Studio be installed on it?
If yes then you can automate building NSIS installers using MSBuild and Visual & Installer.
Also (if VS is present) there is an option to create NSIS project in Visual Studio and build the installer from it (building the solution from command line).

Stop Visual Studio 2019 from automatically adding files in project folder

I have a .NET Core 3 project in Visual Studio 2019. When I copy and paste a file, through Windows Explorer, into the project folder, Visual Studio automatically includes the file into my project, which I do not want to happen. Is there a setting to disable this feature?
Starting from VS 2017 project format in .NET has changed. You need to add <PropertyGroup> tag at the top of your .csproj file:
<PropertyGroup>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
Here is the complete answer to your question:
In Visual Studio, why are all files automatically part of my C# project?
Well, you can modify the known project file (.csproj for c# project), by customize the items include path that satisfied your include files specifically.
For more details, you can check these out:
https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-well-known-item-metadata?view=vs-2015&redirectedfrom=MSDN
Understanding a csproj assembly reference
Including content files in .csproj that are outside the project cone
Enjoy and deploy with confidence!

TFS How to Build Visual Studio-based "Open Folder" CMake project

I have an ARM-GCC project, which is configured and built using Visual Studio's native "Open folder..." CMake project support (introduced in VS2017). All of our needed build settings are stored in CMakeSettings.json.
I would like to build this project using our TFS Continuous Integration server.
I've confirmed that our build server contains all of the prerequisites provided 'out of the box' by the Visual Studio 2017 installer - CMake, Ninja, and ARM-GCC compilers. These tools are all installed to a 'standard' Visual Studio tooling location:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Linux\gcc_arm
etc.
These tools 'just work' out of the box, when we open the project using Visual Studio's "File" -> "Open Folder..." approach. Within TFS however, we can't seem to get the solution to build. I've tried a few different approaches within the build definition...
Option 1: 'Visual Studio' task
This approach complains about a missing sln/proj file:
Specify a project or solution file. The current working directory does
not contain a project or solution file.
There is no project or solution file, because it is an "Open Folder" project, with a CMakeSettings.json file, instead...
Option 2: 'MSBuild' Task
I have not found a set of command-line options capable of building a CMake project folder, using MSBuild.
Option 3: 'CMake' Task
When adding a CMake task to the build definition, the build server complains that it does not fulfill the auto-generated "cmake" ability prerequisite, despite the fact that Visual Studio has installed the cmake tool.
Has anyone successfully completed a TFS automated build of a Visual Studio-hosted "Open Folder..." CMake project?

Build OpencvBlobsLib in Windows Environment

How to perform the build OpenCVBlobsLib Lib in Microsoft Visual Studio 2013 (works on previous versions)
Step by step (I put this tutorial in github issues but closed)
I download your cvBlobslib (https://github.com/OpenCVBlobsLib/opencvblobslib)
I create an Empty Project in Visual Studio 2013
I put the 6 .h and 5 .cpp in the project
I Binding all OpenCV dependencies (https://www.youtube.com/watch?v=v-VgWxkVp2w)
I download this file: pthreads-w32-2-9-1-release.zip 1.17MB
and Unzip in this Folder: C:\pthreads.hWin32 (I create this folder)
This folder had 3 Subfolders: "Pre-built.2" , "pthreads.2" , "QueueUserAPCEx".
"Pre-built.2" had 3 Subfolders: "lib"(2 Subfolders: x64 with libpthreadGC2.a(Exetension .a) and pthreadVC2.lib, x86 I don't use it), "dll", "include" with 3 .h files.
I add "include" in "Additional include directories".
I add "lib" in "Additional library directory".
I add "pthreadVC2.lib" (inside lib folder)
change the "Configuration Type" in Configuration Properties -->> General to Static Library .lib
I add this Line above all includes and in All .cpp:
#pragma warning(disable: 4996)//This function or variable may be unsafe
in main menu I select Release / x64 and I click in "BUILD" -->> "Build Solution"
In folder: C:\Users\Ricardo\Documents\Visual Studio 2013\Projects\cvBlobsLib\x64\Release
Had cvBlobsLib.lib with 11.554 KB.
You can download the Result here:
https://www.dropbox.com/s/bctrg3o8jihnf2r/cvBlobsLib.lib

How to compile all builds for a Delphi Project Group that has few projects in Delphi IDE?

I am using Delphi XE. Since Delphi 2007, it supports Project Group (.groupproj) that we may add projects into it.
We may define various build configuration for projects in "Build Configurations" e.g.: Debug and Release build.
Since Delphi 2010, a runtime variable $(Config) may be used to set Output Directory like: .\$(Config)
In this example, $(Config) translated to "Debug" for Debug build and "Release" for Release build respectively.
When Debug build is activated in build configuration, output file will stored in ".\Debug" folder relative to the current directory.
This is a nice feature so we may have output files stored in various folders for builds defined in Project's Build Configuration.
Furthermore, using the "Build" menu item in context menu (pop-up menu via mouse right click) of "Build Configuration" perform compilation for all builds underneath.
Unfortunately, I have more than 200 projects in my project group. Each project has Debug and Release build defined. I don't find any way to trigger an action to build Debug and Release build for 200 projects at once.
The only solution I knew so far is using View | Configuration Manager to change the active configuration before each build. However, that would marks all project as modified.
Please share your thoughts on how to compile all builds available to a project group.
Thank you.
I have added a item to the Explorer context menu for *.groupproj calling this *.bat:
call "C:\Program Files (x86)\CodeGear\RAD Studio\5.0\bin\rsvars.bat"
MSBuild %1 /t:Build /p:Configuration=Release
if errorlevel 1 goto Fehler
goto :EOF
:Fehler
pause
So I can do a release build from Explorer with two mouse clicks.

Resources