VS2012 publish release build fails

274 Views Asked by At

I am using the web publish procedure in VS2012 to deploy my MVC 4 project to a remote IIS server. This works fine when publishing a debug configuration. However, when I try to deploy a release configuration, the build fails. The setup is that I use the MVC 4 framework, but I have all my controllers in a separate F# project. The controllers consume web services that can be accessed by using a client library that generates the clients using F# type providers. When the release configuration is building I notice multiple errors because the wcf types are no longer valid. Yet, the lib providing these types has been build al ready.

Using exactly the identical setup but changing the build configuration to debug (in the web publish dialog under settings), I can publish the solution without any problems.

1

There are 1 best solutions below

0
On

Try to delete the obj folder before publishing using the release config.