Maybe someone can help me out with some ideas, please?
All my csprojs import a common build file which hangs targets off Pre and PostBuild targets which do various stuff... including setting up IIS artifacts and updating the VistualStudio project extensions IISUrl accordingly. This means that hitting F5 sets up side by side local dev environments for different branches.
I use the MSBuild.ExtensionPack.Web namespace.
However, running MSBuild Solution1.sln /p:BuildInParallel=true can result in more than one MSBuild.ExtensionPack.Web task firing at the same time which then throws as follows:
MSBuild.ExtensionPack.Web: FileLoadException: Filename: \?\C:\WINDOWS\system32\inetsrv\config\applicationHost.config\r [C:\NeilTest\Branch4\Solution1\MvcApplication5\MvcApplication5.csproj]
Error: Cannot commit configuration changes because the file has changed on disk\r [C:\NeilTest\Branch4\Solution1\MvcApplication5\MvcApplication5.csproj]
I suppose I could amend the solution build order - but this kinda breaks the 'each project should be self-describing and autonomous' result I was after.
Is there a way I can mark certain tasks or targets as not runnable in parallel?
Or... do I need to amend the MSBuild.ExtensionPack.Web code to mutex?
Any help much appreciated.
Thank you
Neil
All my csprojs import a common build file which hangs targets off Pre and PostBuild targets which do various stuff... including setting up IIS artifacts and updating the VistualStudio project extensions IISUrl accordingly. This means that hitting F5 sets up side by side local dev environments for different branches.
I use the MSBuild.ExtensionPack.Web namespace.
<!-- Import the common build framework -->
<Import Project="$(MSBuildProjectDirectory)\..\_Build\CommonBuild.proj" />
<!-- Specify the site details and CommonBuild.proj will create it -->
<PropertyGroup>
<AppPoolName>$(AssemblyName)</AppPoolName>
<AppPoolPipelineMode>Integrated</AppPoolPipelineMode>
<AppPoolIdentityType>ApplicationPoolIdentity</AppPoolIdentityType>
<AppPoolManagedRuntimeVersion>$(TargetFrameworkVersion)</AppPoolManagedRuntimeVersion>
<WebApplicationName>$(AssemblyName)</WebApplicationName>
<WebApplicationPhysicalPath>$(MSBuildProjectDirectory)</WebApplicationPhysicalPath>
</PropertyGroup>
This works just tickety boo in VS (with parallelism turned off as it is my default)However, running MSBuild Solution1.sln /p:BuildInParallel=true can result in more than one MSBuild.ExtensionPack.Web task firing at the same time which then throws as follows:
MSBuild.ExtensionPack.Web: FileLoadException: Filename: \?\C:\WINDOWS\system32\inetsrv\config\applicationHost.config\r [C:\NeilTest\Branch4\Solution1\MvcApplication5\MvcApplication5.csproj]
Error: Cannot commit configuration changes because the file has changed on disk\r [C:\NeilTest\Branch4\Solution1\MvcApplication5\MvcApplication5.csproj]
I suppose I could amend the solution build order - but this kinda breaks the 'each project should be self-describing and autonomous' result I was after.
Is there a way I can mark certain tasks or targets as not runnable in parallel?
Or... do I need to amend the MSBuild.ExtensionPack.Web code to mutex?
Any help much appreciated.
Thank you
Neil