简体   繁体   中英

Visual Studio 2017 Conditional Compilation Symbols not Working for Publish

I'm developing a C# Web Application with VS 2017. I'm using Conditional Compilation Symbols to set variables to different values for my Debug, Test and Release builds. When I do a build on my development machine, exerything works fine. When I try to publish my solution, the Conditional Compilation Symbols are not set. I now this because I get a compiler error stating the constants I set in the conditonal compilations clauses are not set.

Does anyone know what might be wrong?

I published with the release configuration and it now works for all configurations. Go figure...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM