All,
I currently have my solution comprising of 2 Class librarys and a Web Site building within teamCity using Msbuild. Now I want to precompile the website and make it available as an artifact. However when i try to Precompile it using
<Target Name='PrecompileWeb' DependsOnTargets='Build'> <AspNetCompiler PhysicalPath='$(BuildDir)\Location\' TargetPath='$(BuildDir)\Publish' Force='true' Debug='true' /> </Target>
I get an error becasue it is looking for a virtual path (which i don’t have as all I want to do it precompile the files I am not interested in publishing the site) if I put a dummy path in I get another error (correctly) about it not being an application under IIS
Any ideas
Is this a Web Site or Web Application Project? If the latter, instead of doing an AspNetCompiler task, do an MSBuild task to the csproj/vbproj file, calling the targets
Rebuild;ResolveReferences;_CopyWebApplicationand specifying theOutDirproperty.If you are using a website, then specify the VirtualPath to be a valid IIS path. What is happening is that, when you don’t specify the VirtualPath property, it tries to resolve it using the PhysicalPath and IIS. I believe that’s just an artifact of how the AspNetCompiler works.