fix upgrade issue which can occur in development environments
This commit is contained in:
parent
5a77c83e68
commit
f7cf25c4bb
|
@ -1,5 +1,6 @@
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
|
@ -506,6 +507,9 @@ namespace Oqtane.Infrastructure
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RemoveAssemblies(string[] assemblies, string version)
|
private void RemoveAssemblies(string[] assemblies, string version)
|
||||||
|
{
|
||||||
|
// in a development environment assemblies cannot be removed as the debugger runs fron /bin folder and locks the files
|
||||||
|
if (!_environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
foreach (var assembly in assemblies)
|
foreach (var assembly in assemblies)
|
||||||
{
|
{
|
||||||
|
@ -524,3 +528,4 @@ namespace Oqtane.Infrastructure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user