Yes, this is possible.
Instructions:
Build
->Configuration manager
->Active solution configuration
->New...
- Create a new configuration named:
Offline
. Project
->Properties
->Build
->Configuration
->Offline
.- Conditional compilation symbols, type:
OFFLINE
. - Save project.
- Restart Visual Studio (reloading the project is not enough).