当我发布 ABP 项目时,出现以下错误:
C:\Program Files\dotnet\sdk\6.0.100-rc.1.21458.32\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path:
D:\Github\volo\abp\lepton-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton\compilerconfig.json,
D:\Github\volo\abp\bookstore\src\Acme.BookStore.Theme\compilerconfig.json,
D:\Github\volo\abp\lepton-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton\package.json,
D:\Github\volo\abp\bookstore\src\Acme.BookStore.Web\package.json.
D:\Github\volo\abp\bookstore\src\Acme.BookStore.Web\Acme.BookStore.Web.csproj
Run Code Online (Sandbox Code Playgroud) 我的项目有一个错误。当我在项目中使用 DataStore 时,出现错误。我不打算为我的项目创建多个数据存储。我确实想为其创建一个数据存储,但是在运行项目时出现错误
我在 StackOverflow.com 上发现了很多问题,例如
等等...
但我的项目错误没有解决
如何解决这个问题
这是我在UserPreferences.kt中的代码
class UserPreferences @Inject constructor(context: Context) {
// private val dataStore = context.dataStore
private val Context.dataStore by preferencesDataStore(name = "userPrefs")
private val context = context.applicationContext
companion object {
private val ACCESS_TOKEN_KEY = stringPreferencesKey("accessToken")
private val REFRESH_TOKEN_KEY = stringPreferencesKey("refreshToken")
}
val getAccessToken: Flow<String>
get() = context.dataStore.data.map {
it[ACCESS_TOKEN_KEY]?:""
}
suspend fun setRefreshToken(value: String) {
context.dataStore.edit { it[ACCESS_TOKEN_KEY] = value }
}
val getRefreshToken: Flow<String>
get() = …Run Code Online (Sandbox Code Playgroud) 我想在下面的代码中将公历日期转换为波斯日期
select cast(dateGregorian as persianDate) date
from order
where orderid = ?
Run Code Online (Sandbox Code Playgroud)