You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running all unit tests for the first time, it throws the exception:
But when I run this failing specific test, it works!
Seems like, there is a file lock problem on tempkey.rsa
The issue is in the IdentityServerBuilderExtensionsCrypto.AddDeveloperSigningCredential method.
Here's the test output
Acme.BookStore.Books.BookAppServiceTests.UpdateAsync
Source: BookApplicationTests.cs line 71
Duration: 1 ms
Message:
System.IO.IOException : The process cannot access the file 'C:\MyProjects\2_4_0\mvc\tiered\Acme.BookStore\aspnet-core\test\Acme.BookStore.Application.Tests\bin\Debug\netcoreapp3.1\tempkey.rsa' because it is being used by another process.
Stack Trace:
FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
FileStream.ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
StreamWriter.ctor(String path)
File.WriteAllText(String path, String contents)
IdentityServerBuilderExtensionsCrypto.AddDeveloperSigningCredential(IIdentityServerBuilder builder, Boolean persistKey, String filename, RsaSigningAlgorithm signingAlgorithm)
AbpIdentityServerDomainModule.AddIdentityServer(IServiceCollection services)
AbpIdentityServerDomainModule.ConfigureServices(ServiceConfigurationContext context)
ModuleLoader.ConfigureServices(List`1 modules, IServiceCollection services)
ModuleLoader.LoadModules(IServiceCollection services, Type startupModuleType, PlugInSourceList plugInSources)
AbpApplicationBase.LoadModules(IServiceCollection services, AbpApplicationCreationOptions options)
AbpApplicationBase.ctor(Type startupModuleType, IServiceCollection services, Action`1 optionsAction)
AbpApplicationWithExternalServiceProvider.ctor(Type startupModuleType, IServiceCollection services, Action`1 optionsAction)
AbpApplicationFactory.Create(Type startupModuleType, IServiceCollection services, Action`1 optionsAction)
AbpApplicationFactory.Create[TStartupModule](IServiceCollection services, Action`1 optionsAction)
ServiceCollectionApplicationExtensions.AddApplication[TStartupModule](IServiceCollection services, Action`1 optionsAction)
AbpIntegratedTest`1.ctor()
BookStoreTestBase`1.ctor()
BookStoreApplicationTestBase.ctor()
BookAppServiceTests.ctor() line 15
The text was updated successfully, but these errors were encountered:
When running all unit tests for the first time, it throws the exception:
![image](https://user-images.githubusercontent.com/9526587/78778372-d5186f80-79a3-11ea-9f20-fa3d9e1ea5c2.png)
But when I run this failing specific test, it works!
Seems like, there is a file lock problem on
tempkey.rsa
The issue is in the
IdentityServerBuilderExtensionsCrypto.AddDeveloperSigningCredential
method.Here's the test output
The text was updated successfully, but these errors were encountered: