Ndepend Error no is no application assembly defined in the project - build

I'm trying to analyze VS solution via Ndepend as part of a tfs build.
I added an .ndproj file in the same directory of .sln file under Sources folder.
I'm Using Team Build 2010 workflow activity to add Ndepend as part of the build.
But I encountred this problem :
There is no application assembly defined in the project file
Can any one help me please.

Related

Missing .qmake.stash file

Who creates .qmake.stash file? When is it created?
I've been working with Qt in Visual Studio creating Windows applications for some years now but never had to care about this file. But now I have set up a cross compilation in Visual Studio using WSL 1 in order to build my application for Linux on arm64.
I'm able to build all projects in my VS solution on my development computer. Now I'm trying to setup this cross compilation system on another PC. The first project of this solution could be built without a problem, but the second one failed with
error : qmake: Project ERROR: Cannot run compiler 'aarch64....'
error : qmake: Maybe you forgot to setup the environment?
error : qmake: Error creating Makefile
After many hours of investigation comparing project files and configurations I was able to find the reason: qmake didn't find the file .qmake.stash when it should create the Makefile.
The working project has a .qmake.stash file in the intermediate output path $(IntDir) /obj//<vs_configuration>, e.g. myproject/obj/x64/RelArm64.
The failing project doesn't have this file in its $(IntDir).
If I manually copy this file from the working project to the other project, it works, too.
Who should have placed this file to $(IntDir) before executing qmake?
My qmake.stash file in the working project is quite old. So it seems as if it isn't generated during every build process.

How to exclude files in VSTS build but keep them under repository

I have a dot-net project build with VISUAL STUDIO 2015 4.6.1 framework and I have two independent program folders in the source code which has some build errors. There are no references to these programs from the main program.
When I push the whole source code onto VSTS I get build errors. So now I need a way to exclude those two folders from the manual build for now but may need them later after they are debugged so I don't want to delete them from VSTS too.
Can someone suggest?
Use an MS Build project file. Create an MSBuild project file from scratch
And the at the build solution step in VSTS, select or type the project file path instead of the solution file.
You will have to remove it down the road though. The maintenance tasks tend to be hard and counter-intuitive whenever the code base grows quickly. Visual Studio will not warn you if you have build errors (like obsolete path) in the MS Build project file.

C++ Project not building. No output files are produced

I have a solution with multiple C# projects included, and a single C++ project.
The C++ project is a .NET Framework bootstrapper that should produce a native executable file. I first built the project as a single project solution, however i'm now trying to migrate it into a master solution.
In order to migrate it, I added a new project called Setup to my existing solution called Master. I then added each header, source and resource by adding new files and copy-pasting the content.
I also changed the output directory to $(Configuration)\ so that it doesn't put the Debug and Release folders in the root folder of the solution.
Now, when I attempt to build the project, it says Rebuild All Succeeded, however when i try to debug it i get the following error
Unable to start the program ~ The system cannot find the file specified
Image of error shown when attempting to debug (F5)
If i navigate to the output directories, they are empty.
This is my first attempt at a C++ project, have i made a schoolboy error?
Does anyone know how I can get this working?
I found the answer. It was indeed a schoolboy error.
I was targeting AnyCPU, whereas i should have been targeting x86.
Now that i'm targeting the correct architecture, the project builds as expected.

Building VC++ 6 project from TeamCity. Can't find header files

I have a VC++ project and I have got the .dsw file. I want to build the project through TeamCity and obtain the .dll file.
In the TeamCity, In Build Steps I have given the Runner type as Command Line and passing in the following parameters.
Myproject.dsw /MAKE "Myproject - Win32 Release MinSize"
It creates empty output directories and all but I get this error
fatal error RC1015: cannot open include file 'afxres.h'
I have checked that the file is located at 'C:\ProgramFiles\Microsoft Visual Studio\VC98\MFC\Include'.
I don't understand why it is not picking up the file from this location. I tried adding this location to Environment Variable PATH, but it does not work.
The TeamCity picks up few files from 'C:\ProgramFiles\Microsoft Visual Studio\VC98\Include' though.
Please help.
I some how figured out the solution for this.
The TeamCity Agent runs as a windows service. So, it can not access the User environment variable for e.g. %include% and %lib%.
What I did is, I passed these two variables as environment variables to TeamCity Build. And voila!!! It works. :)

How can I use Visual Studio to work with large non-VS codebase?

I'm a fairly experienced C# dev, but have very little C++ knowledge. I have set my self a project to get a custom Firefox build running, and be able to control it from C# code.
I have got so far as getting and building the Firefox source, and creating a Visual Studio solution for the exe. This means I can now run via F5 in Visual studio. If I open a source file, I can set break points and have them hit.
What I'm not sure how to do, is load the entire source, as if I were working with a C# .NET solution. As I understand it, there are no project files with the Firefox source, as it is not windows specific source. I have followed an online example that suggests creating using 'project from existing code' option in VS, which resulted in VS grinding to a halt as there were so many files.
What are the steps to getting the code into an environment (preferably Visual Studio) that makes it simple(ish) to edit, debug and navigate the source code.
Note: Instructions I have been working through so far are here: https://cs.senecac.on.ca/~david.humphrey/writing/debugging-firefox.html
From you question, I beleive you are almost there. You have a working build ? That means you have :
A Solution File (*.sln)
A Project file (*.vcxproj or *.vcproj depending on yoru visual studio version)
With that in hand, what works best for me is this layout (adapted to your needs) :
Starting from a root folder of you liking, say MyProject
Create a new Empty solution there
Move the folder with your working build in a subdirectory, like MyProject\MyCustomFirefox
In Visual Studio "Add an existing project" and find your vcxproj file
In the same solution, create a C# project like you always do, in a directory at the same level as your FF build, like MyProject\MyFirefoxController
In short the solution file is pretty much alone in the root directory, and each project is in its own directory.
You will also need to adjust build options so that the output files (a DLL or an EXE) is seen by your C# project. While your are at it, make the C# project dependent on your Firefox build : it will instruct the msbuild to rebuild one if you change the other.
This will not work with the Express edition, I beleive. They are single language.
If you have a command line build path, which is creating a VS-debuggable executable, you could try adding all the source files to the project, but marking them 'exclude from build'. Then add a 'post-build step' to call the command line tools.
You may have to do a little more tweaking in the project properties to get the command line output recognized as the output to debug, but theoretically this could work.