Given a Solution where:
When you call msbuild this way:
msbuild.exe /v:m "c:\mysolution\p1\p1.csproj"
msbuild checks all project dependencies is builds dependencies if necessary. The typical output is:
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.1]
Copyright (C) Microsoft Corporation 2007. All rights reserved.
P4 -> c:\mysolution\P4\bin\Debug\P4.dll
p3 -> c:\mysolution\p3\bin\Debug\p3.dll
p2 -> c:\mysolution\p2\bin\Debug\p2.dll
p1 -> c:\mysolution\p1\bin\Debug\p1.dll
In my case, I know the dependencies exist and are all right.
Is there a way to build only project p1.csproj
without verifying dependencies? The solution can be with msbuild or with something else.
you can pass /p:BuildProjectReferences=false
to msbuild, which will skip build project refence..
but this has one limitation, if your solution configuration and referenced project's configuration is mismatch, msbuild will failed to resolve referenced project's target output file...
here is a free vs extension package, you can download and try http://visualstudiogallery.msdn.microsoft.com/98de4058-8dc7-435b-9e01-c0f71dace808
vs package: Sharp Build Utility
I'm the author of this extension, i have the same requirement in current work, enjoy this tool...
essentially, this extension can handle above case, which will make a shadow copy of your build project file, change all project reference to dll file reference, and launch msbuild with the shadow project file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With