Current filter:
                                You should refresh the page.
                                  • 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:

                                    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=

                                    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 ?


                                Show all comments
                                • Alex X (DevExpress) 06.02.2017

                                  Hi Christian,

                                  Thank you for contacting our support.

                                  I have managed to reproduce this behavior locally. Let me explain that happens.
                                  When the debugger reaches this statement:

                                  services.AddDbContext<StoreContext>( options => options.UseSqlServer("Data Source=localhost;Initial Catalog=TestingDB;Integrated Security=True;"));

                                  Debug Visualizer tries to evaluate the AddDbContext method call expression via the Visual Studio Debugger expression evaluation API and then displays the result.
                                  In this case, the result of the evaluation will be an error message, because the UseSqlServer method is referenced within a lambda expression, and the assembly where it is declared haven't yet loaded at the moment of the program execution.
                                  You can see in this video that the watch window produces the same result for this expression even though the CodeRush extension is disabled:
                                  So, I recommend you ignore this message because this error doesn't affect the program execution.
                                  Also, we will add a special option for Debug Visualizer which will instruct it to not display compilation errors from the debugger.

                                • Christian Ista 06.02.2017

                                  I will do more tests but I have some doubt about "this error doesn't affect the program execution"

                                • Alex X (DevExpress) 06.05.2017

                                  Hi Christian,

                                  Thank you for the update.
                                  Note that the errors which codes started with the "CS" prefix all are compiler time errors and should not affect the runtime.  You could see these errors because the debugger  tries to compile the expression on the fly and fails because it has no context of the expression, such as project dependencies and so on. You can see in the screencast above ( that the Watch window produces the same errors because it utilizes the same evaluation API as Debug Visualizer.

                                • Christian Ista 06.05.2017

                                  Lost my time (again), marked as "Bug" and no "commercial gesture" not fair.

                                • Alex X (DevExpress) 06.06.2017


                                  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-

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

                                • Christian Ista 06.06.2017

                                  And about the "commercial gesture" ? 

                                • Alex X (DevExpress) 06.06.2017

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

                                1 Solution

                                Creation Date Importance Sort by