1

I have just downloaded, today, the free startup template for MVC5 and EF. On opening, restoring all packages then building, I get the following build error in the "Core" project:

Error CS0508 'AppSettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)': return type must be 'IEnumerable' to match overridden member 'SettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)'

Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

As the error message suggested, I added the reference to the assembly, however, that produced a whole lot of other errors.

Looking at the sample projects, they are using v2.1.3 of the APB assemblies and they compile fine.

The latest downloaded sample uses v3.0.0 of the APB assemblies.

Any help to get this up and running is appreciated. Thanks in advance.

Community
  • 1
  • 1
Gman
  • 11
  • 2

1 Answers1

1

Error CS0508 'AppSettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)': return type must be 'IEnumerable' to match overridden member 'SettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)'

AppSettingProvider already does that. Make sure you didn't modify the return type in that file.

Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

Update to VS2017 15.3.3+. For VS2015, install NETStandard.Library.NETFramework package.

aaron
  • 39,695
  • 6
  • 46
  • 102
  • I am using VS2015, the link you provided is for a preview version. The project already has NETStandard.Library @ v2.0.0 – Gman Sep 22 '17 at 07:09
  • ... continued I did install via conosle, but unfortunately, lots of errors came up with conflicting references. e.g. Error CS1703 Multiple assemblies with equivalent identity have been imported: '\NETStandard.Library.NETFramework.2.0.0-preview2-25405-01\build\net461\ref\System.Collections.Concurrent.dll' C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Collections.Concurrent.dll'. Remove one of the duplicate references. Quite a few duplicate references to remove ... – Gman Sep 22 '17 at 07:16
  • Still the same issue. My steps: 1. Download new sample package (MVC5 & EF) 2. Restored all packages 3. Opened NuGet Package Manager for Core project 4. Search for NETStandard.Library.NETFramework with include prerelease clicked 5. Installed library 6. Build solution -> same error with conflicts occur – Gman Sep 22 '17 at 07:43
  • if you have time or have VS2015, are you able to build one from scratch with my steps provided and see if you get the same errors? Thanks for the help so far – Gman Sep 22 '17 at 07:47
  • I reproduced the errors and could no longer get it to work in VS2015. Are you stuck in VS2015 Professional or Enterprise? Otherwise, what is keeping you from VS2017? – aaron Sep 22 '17 at 18:33
  • Thanks @aaron, most of my projects are VS2015 so was keeping things the same. I used another PC with VS2017 and still get the same errors. Seems like the latest sample project has some issues. – Gman Sep 23 '17 at 08:05
  • @aaron: How can I create a template using the previous version of ABP, i.e. 2.3.0? I have the same issues and upgrading VS 2015 to VS 2017 is not an option. – boggy Sep 29 '17 at 17:11
  • You can only choose the project version for premium startup templates. – aaron Sep 29 '17 at 17:19
  • You can build your own from [module-zero-core-template/releases/tag/v2.5.1](https://github.com/aspnetboilerplate/module-zero-core-template/releases/tag/v2.5.1). – aaron Oct 01 '17 at 09:26