How to prevent MSBuild creating the .lib file when all the .obj files are already uptodate and the .lib file already exists? - msbuild

When I run MSBuild from commandline the lib file always get created even when it is already uptodate.
It prints something like this.
*.vcxproj -> *.lib
Can I make it not do this as well?

Related

Why is my key file's relative path changed from ..\ to *Undefined* when building with MSBuild?

In my solution folder, there is a folder called Tools which is not included in the solution itself (because the "Show All Files" function of VS's Solution Explorer doesn't display it to include in the project). Inside is an SNK file for signing assemblies. Another programmer has signed a project with that file. When I pulled the project from Git, its "Signing" property showed the path as ..\..\..\Tools\key.snk.
Building the solution with VS is fine, but if I use MSBuild there will be an error that read:
CSC : error CS7027: Error signing output with public key from file
'*Undefined*Tools\key.snk' -- File not found.
[C:\Source\src\Client\Share\QED\QED.csproj]
I have tried re-signing the project myself with the file. The file path changed to key.snk, the SNK file was copied into the project, but the error stayed the same.
I'm using MSBuild 17 with VS2022.

How to force CMake to relink project on resources change?

I have a very simple C++ executable and a few .txt resource files. At build time I embedd the .txt files into the C++ binary via linker and then I load them at runtime (based on this answer). That works great.
My problem is relinking. Whenewer I change the .cpp source of my executable and run make, the project rebuilds itself. However, if I change a .txt file and run make, the binary doesn't relink. How can I force CMake to watch changes to my resource files (.txt) so that when those change the executable gets relinked to contain the newest .txt resource files?
You can set a source property called OBJECT_DEPENDS containing the path to your .txt file. The file to set this property for should be any source that is included in your target.

Visual Studio ASP.NET Web API Precompiled files placed in a different folder with TFS

I have an asp.net web api project whose output needs to be packaged in a setup project using wix.
I would like to precompile the site. The problem is that the precompilation process generates variable file names (ie. *.compiled files in particular).
I also would like to build the setup in a TFS build.
It seems that my only option is to generate a .wxs file wihtin the prebuild step of the wix project.
The .wxs files source paths are using $(var._My_Web_Project_.TargetDir). This seems to be translated to a Sources based directory.
I'm using paraffin to do that already and it works perfectly fine when building the solution with visual studio.
When building the solution through a TFS build, the .compiled files are copied to a Binaries folder, whereas all the other related web site files are copied to a Sources based directory.
The build errors are like the following :
The system cannot find the file 'd:\BuildAgents\___basedir___\Binaries\___web_project_dir\_PublishedWebSites\___site___\bin\textsample.cshtml.c6fb271c.compiled'.
The file is indeed in the Sources directory.
'd:\BuildAgents\___basedir___\Sources\___web_project_dir\_PublishedWebSites\___site___\bin\textsample.cshtml.c6fb271c.compiled'
I think I somehow need to redefine the aspnet_compiler output or something like this, but can't figure out how to do that.
The msbuild command line arguments are the follwing:
/p:GenerateProjectSpecificOutputFolder=true /p:VisualStudioVersion=14.0 /p:DeployOnBuild=true /p:PublishProfile=local /p:CleanWebProjectOutputDir=False /verbosity:d
EDIT 1: I'm using XAML build.
Any help appreciated.
EDIT 2:
With the new task based build, it works as is (no need to use an additional Copy Files task).
The aspnet_compiler output the .compiled files in the correct folder :
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p D:\BuildAgents\vNext\_work\1\s\Softs\__Solution__\__Web_Project\obj\Release\AspnetCompileMerge\Source -c D:\BuildAgents\vNext\_work\1\s\Softs\__Solution__\__Web_Project__\obj\Release\AspnetCompileMerge\TempBuildDir
In the new tasks based build system, it's easy to copy files from a source folder to a target folder with Copy Files task.
Source Folder: Folder that contains the files you want to copy.
Contents: Specify minimatch pattern filters (one on each line) that you want to apply to the list of files to be copied.
Target Folder: Folder where the files will be copied. In most cases you specify this folder using a variable.

Not able to create .so file in httpd-2.4.18

While I am installing httpd-2.4.18 on non stop hp, I am not able to create .so file in modules. It creates only .a file. But .so file is required in httpd.conf. How to create .so file ?
Make sure that you are using the SHARED pragma (assuming you are coding in C or C++) to make a DLL. I think that corresponds to your ".so" file.

Confused with two zlib1.dll of SDL_image extension and SDL_ttf?

Inside the SDL_image extension bin folder there is a file zlib1.dll and inside the SDL_ttf bin folder there is also zlib1.dll file,are these two files the same or different because when i tried to copy all the files under bin of SDL_ttf to widows/system32 it says "replace" or "skip this file" ,i have already install SDL_image extension and using it with code blocks 13.12.What should i do?
The files should be the same (differing only in when the were compiled) so you can safely replace one of them. Both libraries use and therefore include the zlib1.dll as they are independent from each other, but when you use both this happens.