add version to prject

release
Amir Hossein Khademi 2024-04-23 12:12:12 +03:30
parent 0249727d32
commit 4e2aec8e2c
2 changed files with 5 additions and 3 deletions

View File

@ -6,8 +6,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<AssemblyVersion>0.22.25.45</AssemblyVersion>
<FileVersion>0.22.25.45</FileVersion>
<AssemblyVersion>0.23.26.46</AssemblyVersion>
<FileVersion>0.23.26.46</FileVersion>
</PropertyGroup>
<ItemGroup>

View File

@ -6,9 +6,11 @@ builder.Host.UseSerilog();
LoggerConfig.ConfigureSerilog();
string env = builder.Environment.IsDevelopment() == true ? "Development" : "Production";
builder.Host.UseContentRoot(Directory.GetCurrentDirectory());
string projectName = "Vesmeh";
if (builder.Environment.IsDevelopment())
{
string projectName = "Hamyan";
builder.Configuration.AddJsonFile($"AppSettings/appsettings.json").AddJsonFile($"AppSettings/appsettings.{env}{projectName}.json");
}
if (builder.Environment.IsProduction())
builder.Configuration.AddJsonFile($"AppSettings/Production/appsettings.{env}.json");