У меня есть приложение ASP.NET Core + Blazor (шаблон по умолчанию) с 2 проектами.
Когда я создаю профиль публикации IIS:
Код: Выделить всё
MSDeploy
true
Release
Any CPU
false
04df5cd2-b320-4d8c-85bd-d25cd9b83925
false
https://mytestserver.com:8172/msdeploy.axd
TestApp
true
WMSVC
true
true
IISWebDeploy
ModuleOneTest
Код: Выделить всё
public string GetConstants()
{
List constants = new List();
#if ModuleOneTest
constants.Add("ModuleOneTest From Server");
#endif
return string.Join(", ", constants);
}
Код: Выделить всё
public string GetConstants()
{
List constants = new List();
#if ModuleOneTest
constants.Add("ModuleOneTest From Client");
#else
constants.Add("Not defined");
#endif
return string.Join(", ", constants);
}
How can I fix this issue to work correctly with multiple projects?
Источник: https://stackoverflow.com/questions/781 ... -correctly
Мобильная версия