aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
258 stars 124 forks source link

Outdated Reference in ...CodeGeneration.Design" Version="2.0.0-preview2-final" #1051

Open RandyBuchholz opened 7 years ago

RandyBuchholz commented 7 years ago

There was a compatibility error with Microsoft.Composition. This is being addressed https://github.com/dotnet/corefx/issues/18452.

CodeGeneration.Design is still referencing the old version and gives: Package 'Microsoft.Composition 1.0.27' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework...

The correct version is 1.0.31.

image

RandyBuchholz commented 7 years ago

Workaround. For a new project this seems to get things right. In VS2017-3

  1. Create a new MVC project. It will bring in three references. AspNetCore.All, EntityFrameworkCore.Tools, CodeGeneration.Design. There will be a warning on Design.
  2. Remove CodeGeneration.Design from your project file.
  3. In PackageManager add Microsoft.Composition 1.0.31
  4. In PackageManager add CodeGeneration.Design

The subs to Design are different now and everything seems to work image