c#-interactive

Project can't find my EF connection string in C# Interactive

醉酒当歌 提交于 2019-12-24 23:26:14
问题 I have several projects: DAL, Business Layer, Domain Model, Client and a couple of others. The client project is set as the startup project and has the connection strings defined in its app.config. When I initialize a C# Interactive window with my project, it seems to initialize properly. There is a long list of #r references and I am left at a prompt. When I try to instantiate an object that has to read from the database in its constructor, I get "No connection string named "Entities" could

C# Interactive and Entity Framework

家住魔仙堡 提交于 2019-12-23 02:21:33
问题 I am trying to run a method in C# Interactive that return some data from local db using Entity Framework. But it return an error saying that the connection string named 'InteractiveConsoleDBEntities' could be found in the application config file. I am using data base first. I use the option "Initialize Interactive with project" to start with C# Interactive. Here is the details... Commands in Interactive Console #r "C:\Users\Path\InteractiveConsole\packages\EntityFramework.5.0.0\lib\net45

VS2015 C# interactive: error CS7069: Reference to type 'Object' claims it is defined in 'System.Runtime', but it could not be found

空扰寡人 提交于 2019-12-19 18:58:06
问题 I just updated to VS2015 Update 2, and started playing around with the C# interactive window. I wanted to use a static method in a static class in one of my .NET 4.0 targeted library projects, so I right-clicked on the project in Solution Explorer, and selected Initialize Interactive with Project . The output in the interactive window looks like this (I replaced some of the full paths with '..' for brevity): #reset Resetting execution engine. Loading context from 'CSharpInteractive.rsp'. #r "

VS2015 C# interactive: error CS7069: Reference to type 'Object' claims it is defined in 'System.Runtime', but it could not be found

久未见 提交于 2019-12-19 18:57:07
问题 I just updated to VS2015 Update 2, and started playing around with the C# interactive window. I wanted to use a static method in a static class in one of my .NET 4.0 targeted library projects, so I right-clicked on the project in Solution Explorer, and selected Initialize Interactive with Project . The output in the interactive window looks like this (I replaced some of the full paths with '..' for brevity): #reset Resetting execution engine. Loading context from 'CSharpInteractive.rsp'. #r "

C# Interactive and Entity Framework

丶灬走出姿态 提交于 2019-12-06 16:38:21
I am trying to run a method in C# Interactive that return some data from local db using Entity Framework. But it return an error saying that the connection string named 'InteractiveConsoleDBEntities' could be found in the application config file. I am using data base first. I use the option "Initialize Interactive with project" to start with C# Interactive. Here is the details... Commands in Interactive Console #r "C:\Users\Path\InteractiveConsole\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll" #r "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6