Maybe I was a little late, but I ran into a problem, and I just created and assembled an assembly containing only the source AssemblyInfo.cs file with the attributes I needed.
Then I added the AssemblyInfo project to my solution.
And then I implemented a script to run during deployment as follows:
:: Just prepare and clean before starting
SET DOTNETINSTALLDIR=%FRAMEWORKDIR%\v4.0.30319
rmdir /S /Q "%Depot%\AssetExplorer.Web"
mkdir "%Depot%\AssetExplorer.Web"
:: Compiles the web site
call "%DOTNETINSTALLDIR%\aspnet_compiler" -f -c -u -p "%~1..\Discovery.Web" -v "/AssetExplorer" "%Depot%\AssetExplorer.Web"
:: Time to merge the contents into the assembly
call "%WindowsSDK_ExecutablePath_x86%\aspnet_merge" -o ICM.dll -a "%Depot%\AssetExplorer.Web" -copyattrs "%~1..\AssemblyInfo\obj\Release\AssemblyInfo.dll"
Magic in
-copyattrs "%~1..\AssemblyInfo\obj\Release\AssemblyInfo.dll",
it takes the attributes from AssemblyInfo.dll and copies them to the generated assembly.
Hope it helps;)
source
share