I\'ve got an asp.net mvc deployment package that I\'m trying to build with team city. The package builds without any problems, but the bin folder contains file that are not
I experienced the same issue on a build server that only had 4.5.1 sdk
installed.
Add the p:FrameworkPathOverride
parameter to msbuild
. For example:
msbuild /p:FrameworkPathOverride="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1"
After a bunch more digging around I noticed that the build server had the .Net framework on, but not the framework SDK. After installing the SDK on the build server the additional assemblies were no longer added.
On a build server running Windows Server 2012 R2 I experienced a similar problem - the following task was copying unwanted files to the output directory:
[06:47:07]_CopyFilesMarkedCopyLocal
[06:47:07]Copy
[...]
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" to "bin\Release\mscorlib.dll".
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\normidna.nlp" to "bin\Release\normidna.nlp".
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\normnfc.nlp" to "bin\Release\normnfc.nlp".
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\normnfd.nlp" to "bin\Release\normnfd.nlp".
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\normnfkc.nlp" to "bin\Release\normnfkc.nlp".
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\normnfkd.nlp" to "bin\Release\normnfkd.nlp".
Similar to the answer of @ilivewithian a package was missing: Microsoft .NET Framework 4.5.2 Developer Pack for Windows Vista SP2, Windows 7 SP1, Windows 8, Windows 8.1, Windows Server 2008 SP2 Windows Server 2008 R2 SP1, Windows Server 2012 and Windows Server 2012 R2.
Easiest solution was to copy my local C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework up to the build server