wicked programmer
helping developers everywhere innovate and learn
  • Home
  • Events
  • Publications
  • Learning
  • About

General/ Learning

Daily Learning – Fix your database project needing a reference to .NET Framework

Wicked ProgrammerSeptember 8, 2018

Recently we were doing some work on ASP.NET Core Identity.  We created a SQL Server database project to contain the database and imported the existing database.  Unfortunately, we kept getting the following error on build.

[themify_box icon=”highlight” color=”light-blue”]Your project does not reference “.NETFramework,Version=v4.7.1” framework. Add a reference to “.NETFramework,Version=v4.7.1” in the “TargetFrameworks” property of your project file and then re-run NuGet restore[/themify_box]

This seems quite odd because we don’t reference .NET Framework.  That aside the error was directly related to the target framework setting for SQLCLR.  Interestingly we are not using SQLCLR.  To cut to the answer, the issue was a file project.assets.json file in the obj directory.  I deleted the obj directory and rebuilt and now all is well.

Thanks to Max Jones who also had this problem and found the solution.

Related Posts

Count Coding Example-min

General /

Quality Issue #1 – Count vs. Count()

Learning /

Working with Azure Maps

bitarray-min

General /

Introducing BitArray serialization for Newtonsoft.Json and System.Text.Json

‹ AWS re:Invent 2017 – November 26th through December 1st, 2017, Las Vegas, NV› Daily Learning – Checking which version of .NET Core is installed







Back to Top

© wicked programmer 2023