Bug Report T521771
Visible to All Users

CodeRush raises an exception in WebApi with .NET Core

created 8 years ago (modified 8 years ago)

Hello guys,

I'm an a problem since 5 days, I'm stuck since 5 days … I check with Julie Lerman (EF guru) and Shawn wildermuth (guru too) they don't find (but thanks for their help it's very kind) but both was sure it's not an EF or .NET Core problem.

I have a simple .NET Core solution, 3 projects, 1 class by project very small very basic

In my WebApî code I have this in the file Startup.cs:

C#
public void ConfigureServices(IServiceCollection services) { // Add framework services. services.AddMvc(); services.AddDbContext<StoreContext>( options => options.UseSqlServer("Data Source=localhost;Initial Catalog=TestingDB;Integrated Security=True;")); }

An exception is raised on the line where 'AddDbContext' is.

The exception is :
Error CS0012: The type 'DBConenction' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Common, version=4.1.0.0

The same project was working on Julie's box and on Shawn's box. The same project on my 3 boxes (desktop + laptop, laptop for work) same exception.

Then this morning with a lot of courage, I created a virtual box with VMWare pro, I installed Windows 10x64 and install step by step the applications I use. At each steps I tried to run the solution with VS2017

  1. Install VS2015 and VS2017 Pro (with the latest update : 15.2 (26430.12))  ==> no exception
  2. SQL Server 2016 standard ===> no exception
  3. SQL SErver Management Studio 2016 ===> no exception
  4. Windows update ===> no exception
  5. Google chrome ===> no exception
    6. Add extensions on VS2017 : SuperCharger and CodeRush ===> exception
  6. Uninstall both extensions
  7. Install Supercharger ===> no exception
    9. Install CodeRush ==> exception
    10 Disable CodeRush ==> no exception

I think it's clear isn't it ?

This time with all the time lost I don't win a free one year subscription to an "Universal Subscription" or a huge huge huge coupon I won't understand.

I join a .RAR file with the project and a small video.

Could check ?

Christian,

Show previous comments (4)
DevExpress Support Team 8 years ago

    Christian,

    We greatly appreciate your cooperation and the time you spent to prepare such a detailed description of the problem. Thank you.

    We have already corrected the behavior you reported and these changes are included in the following daily build: DevExpress.CodeRush.Roslyn-17.1.4.17157.vsix

    We hope installing this build will make things better. Please let us know your results once you have an opportunity to try it.

    CI CI
    Christian Ista 8 years ago

      And about the "commercial gesture" ?

      DevExpress Support Team 8 years ago

        Christian,
        I cannot comment much on this subject.  It is better to contact our management at management@devexpress.com to discuss this kind of questions.

        Answers approved by DevExpress Support

        created 8 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.