TFS 2010 MSBuild: After dll in Binaries folder - msbuild

I'm currently using the AfterBuild target to extend my build script but at that point the dll for the project hasn't been placed in the Binaries folder.
What target will run after the dll has been placed in the Binaries folder?

If you're talking in the context of TeamBuild (you tagged it TFS), here's a relevant MSDN link

Related

referencing a dll in MSbuild

I have an application that I am trying to build through the command line with MSBuild. This project will be built on a machine without a specific dll in the GAC (the dll it will need is in the GAC on the machine on which it is running on). Is there a way that in the MSBuild command that I can have it referrence a dll in a folder? Changing the proj file would require some changes in each of the projects that we use. Is there a way to reference the dll in the MSBuild Command Line?

Copy to AppX output directory with Visual Studio 2013 (WinRT app)?

I have a WinRT app built with VS2013 using C#. It uses SQLite so it needs the sqlite3.dll included in the project to be in the output directory. I included that DLL in my project and set it to always copy to the output directory. The problem is VS2013 copies it to the Debug directory, but not the AppX directory underneath Debug, which appears to be the WinRT output directory. Because of the the app fails because it can't find sqlite3.dll, which is up in the parent Debug directory instead of the AppX directory.
For now I'm just hand-copying the DLL into the AppX directory. What's the best way to fix this problem so that the DLL is copied to the correct directory?
In your project's Properties window choose Build Events tab. On Post-build window include similar string (please, mind to change the path to sqlite3.dll):
xcopy /Y $(ProjectDir)3DParties\sqlite3\$(PlatformName)\sqlite3.dll $(TargetDir)AppX\
Or even better option. This page https://www.sqlite.org/download.html contains section named "Precompiled Binaries for Windows Runtime" where you can download VSIX package. When you install this package into your system, you can simply reference sqlite3.dll for all target platforms (ARM, x86, x64) including all necessities automatically like this: Add Reference -> Windows 8.1 -> Extensions -> SQLite for Windows Runtime (Windows 8.1)
I can't be sure this is the "right" solution, but I set the file's property to Content/Copy-if-newer.
THEN what I've found is that if the AppX directory is already there, VS doesn't update it, just as you describe above, BUT if you delete the Appx directory then VS will create it from scratch and add the necessary files.
Not as good as having everything automated, but beats hand-copying.

Statically link to the dll files

I have already built a project, and run it in VS2010.
But if I want to run the .exe on other computers which does not
install Visual Studio, it will need .dll files (such as msvcrt.dll and
msvcp60.dll in WINDOWS\SYSTEM32, and some other dlls in the
development package). I didn't use MFC in this project. How to static
link all these dlls into the .exe file in Visual C++ so that I don't
have to copy all the dlls to the other machines?
BTW: I don't want to make install package either
Thanks
Siba
You can set your project to statically link the CRT, by using the /MT flag for the runtime library. Or, you could keep the /MD setting, and install the vcredist package along with your executable (you can get it from here, and also from one of your VS2010 installation folders). To get an idea of each options pros and cons, read this.
Oh, and a similar question has been asked before...

WIX installer - Copying Assembly of a unreferenced plugin project into the web application bin folder

I'm new to WIX installer and would appreciate if someone could help me solve the below issue.We have a web application where we load plugin assembly(non referenced) using reflection and a web deployment project which merges all the assemblies in to a single one. In the webdeployment project file there are couple of lines which generates the "ProjectWebFiles.wix" source file when built.
<PropertyGroup>
...........
<WixDirectoryId>ProjectWebFolder</WixDirectoryId>
<WixComponentGroupId>ProjectWebFiles</WixComponentGroupId>
</PropertyGroup>
We have a WIX installer project which creates msi installer from this wix file and we want the web application project bin folder to have the unreferenced assembly when the application is installed using msi.
One solution is we could add the project as a static reference to the web project but we want to keep that as a last option since we have to build the web project everytime the plugin project is modified.
Can this be achieved by modifying the web application deployment project file ?
That is MSBuild syntax, not WiX syntax, so I'm not exactly sure what you are asking for. If you are just trying to get all the files from another project or directory, then take a look at the HeatProject task and/or HeatDirectory task.

Compile WebSite Project with NAnt

I have a website project in Visual Studio 2008. I would like to build this website using MSBuild. I use the following command to build the solution:
msbuild.exe mysolution.sln /t:Rebuild /v:q
After I ran the command, it creates a new folder called precompiled, creates a copy of my project, removes all code files and places 1000 dll files in the bin folder.
Now when I do a "rebuild" from Visual studio, it doesn't do that.
Is there a way to rebuild the project without having it to create the precompiled folder?
Thanks
I think I found it. I should be using devenv.exe instead? How to build a .NET website using Nant