我有一个用于 WebAssembly Blazor 应用程序的现有 Azure CI 管道,可与 .NET Core 3.1 配合使用。
我升级了应用程序以使用 .NET 5 RC,但管道不再工作。
根据建议,我删除了 NuGet 任务,并插入了两个新任务:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 5.0.100-rc.1.20452.10'
inputs:
version: '5.0.100-rc.1.20452.10'
includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
projects: '**/*.csproj'
Run Code Online (Sandbox Code Playgroud)
那个工作。
但是构建任务失败了:
...
ValidateSolutionConfiguration:
Building solution configuration "release|any cpu".
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
##[error]Test1\Server\Server.csproj(0,0): …Run Code Online (Sandbox Code Playgroud) 这段代码小规模地表示我的问题:
public class Person
{
public int ID { get; set; }
public string Name { get; set; }
public virtual Person Parent { get; set; }
public virtual ICollection<Person> Friends { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
当我在实体框架(4.1)场景中使用此类时,系统会生成一个唯一的关系,认为Parent和Friends是同一关系的两个面.
如何在语义上区分属性,并在SQL Server中生成两个不同的关系(因为我们可以看到Friends与Parent :-)完全不同).
我尝试使用流畅的界面,但我想我不知道正确的调用.
谢谢大家.
Andrea Bioli
c# entity-framework code-first entity-framework-4 entity-framework-4.1
看起来CodeFirst在没有完全控制数据库时停止做功课(我想).该场景是一个托管在Arvixe.com上的网站(或者我认为任何其他共享托管服务器),我必须从他们的控制面板创建数据库(而不是使用Sql Server Management Studio,只是说......).一旦创建了一个空数据库,我在网站上注册了一个连接,我用它从poco对象生成数据库,如:
add-migration m1 -targetdatabase myconnection
这正确地生成了我的FIRST迁移,我可以毫无问题地应用
update-database -targetdatabase myconnection
第一个问题,不是太重要,因为数据库是现有的,它不会发出Seed命令,所以我必须手动插入我的第一个记录,但这不是一个大问题.
然后我改变了我的poco对象,我需要更新数据库,但是当我发出另一个时
add-migration m2 -targetdatabase myconnection
它给出了错误:
System.Data.Entity.Migrations.MigrationsPendingException:由于以下显式迁移未决,因此无法生成显式迁移:[201111081426466_m1].在尝试生成新的显式迁移之前应用挂起的显式迁移.
这真的很奇怪,因为如果我查看数据库,我甚至可以看到表__MigrationHistory,但它看起来似乎无法识别它...
任何有同样问题的人,或者调查哪些好的小费?在此先感谢Andrea Bioli
entity-framework code-first entity-framework-4 ef-code-first
使用Polymer PWA(https://polymer.github.io/pwa-starter-kit/)的最小示例(如果有),以正确显示vaadin网格是什么?我尝试了许多不同的组合,但从来没有工作过,经常会出现这样的警告:property-accessors.js:275 Polymer :: Attributes:无法将Array解码为JSON我做错了什么?谢谢安德烈