vs-2015-preview

'Console' does not contain a definition for 'ReadKey' in asp.net 5 console App

余生长醉 提交于 2019-11-29 13:21:29
I am creating a Simple application in ASP.NET 5 Console in VS2015 CTP . For the below line of code // Wait for user input Console.ReadKey(); I am getting error 'Console' does not contain a definition for 'ReadKey' . Also i am getting a Suggestion as ASP.Net 5.0-Available ASP.NET Core 5.0- Not available . ReadKey keyword is no more used ? what does that suggestion means i need to add some reference ? Basically, Console.ReadKey is available in the full framework, but isn't available in .NET Core. That's why it's saying it's "Available" for ASP.NET 5.0 (building against the full framework) but

Reference Microsoft.VisualStudio.QualityTools.UnitTestFramework for CI build

自作多情 提交于 2019-11-29 10:55:35
问题 I have created a C# test project in VS2015 RC. it builds locally but when i attempt to build on our CI build server (TeamCity) it fails with errors: UnitTest1.cs(2,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [D:\BuildAgent\work\e486bf18e454d0c2\dh.PSP.Coordinator.Api.Tests\dh.PSP.MetadataService.Api.Tests.csproj] UnitTest1.cs(9,10): error CS0246: The type or namespace name 'TestMethod' could

Can Roslyn generate source code from an object instance?

北慕城南 提交于 2019-11-28 09:29:56
Using the Roslyn API with Visual Studio 2015, can I convert an object instance to source code? Can I create an extension method like ".ToSourceCode()" as shown below? class Foo { } class Program { static string classSourceCode = "class Foo { }"; static void Main() { var instance = new Foo(); var instanceSourceCode = instance.GetType().ToSourceCode(); System.Diagnostics.Debug.Assert(instanceSourceCode == classSourceCode); } } No. However, ILSpy can. Based on the comments on the question and what I understand about Roslyn, decompilation is not supported. However, thanks to @Bradley's ILSpy tip,

'Console' does not contain a definition for 'ReadKey' in asp.net 5 console App

送分小仙女□ 提交于 2019-11-28 07:16:34
问题 I am creating a Simple application in ASP.NET 5 Console in VS2015 CTP . For the below line of code // Wait for user input Console.ReadKey(); I am getting error 'Console' does not contain a definition for 'ReadKey' . Also i am getting a Suggestion as ASP.Net 5.0-Available ASP.NET Core 5.0- Not available . ReadKey keyword is no more used ? what does that suggestion means i need to add some reference ? 回答1: Basically, Console.ReadKey is available in the full framework, but isn't available in

Task Runner Explorer can't load tasks

雨燕双飞 提交于 2019-11-27 17:07:25
I'm using VS2015 and Gulp. I open the Task Runner Explorer and hit refresh, and this shows up in the log: Failed to run "C:\Projects\Test\Gulpfile.js"... cmd.exe /c gulp --tasks-simple Error: `libsass` bindings not found in C:\Projects\Test\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-ia32-11\binding.node. Try reinstalling `node-sass`? at Object.sass.getBinaryPath (C:\Projects\Test\node_modules\gulp-sass\node_modules\node-sass\lib\extensions.js:148:11) at Object.<anonymous> (C:\Projects\Test\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:16:36) at Module._compile

How to use Entity Framework Power Tools in Visual Studio 2015?

偶尔善良 提交于 2019-11-27 11:19:03
I have used Entity Framework in Visual Studio 2012. Build entity model by "reverse engineer code first". But when I setup Visual Studio 2015 just now, and setup EF power tools by NuGet, I can not find "reverse engineer code first" option. Anyone knows what i should do? Thanks! octavioccl Entity Framework Power Tools is a Visual Studio extension , so you need to install it first. But, there is a problem, the supported versions of Visual Studio are 2010, 2012 and 2013. Visual Studio 2015 is in Preview Version. I think that's why it is not included yet. But I have a solution that works for me in

Can Roslyn generate source code from an object instance?

那年仲夏 提交于 2019-11-27 02:58:15
问题 Using the Roslyn API with Visual Studio 2015, can I convert an object instance to source code? Can I create an extension method like ".ToSourceCode()" as shown below? class Foo { } class Program { static string classSourceCode = "class Foo { }"; static void Main() { var instance = new Foo(); var instanceSourceCode = instance.GetType().ToSourceCode(); System.Diagnostics.Debug.Assert(instanceSourceCode == classSourceCode); } } 回答1: No. However, ILSpy can. Based on the comments on the question

Task Runner Explorer can't load tasks

眉间皱痕 提交于 2019-11-26 18:54:29
问题 I'm using VS2015 and Gulp. I open the Task Runner Explorer and hit refresh, and this shows up in the log: Failed to run "C:\Projects\Test\Gulpfile.js"... cmd.exe /c gulp --tasks-simple Error: `libsass` bindings not found in C:\Projects\Test\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-ia32-11\binding.node. Try reinstalling `node-sass`? at Object.sass.getBinaryPath (C:\Projects\Test\node_modules\gulp-sass\node_modules\node-sass\lib\extensions.js:148:11) at Object.<anonymous> (C:

How to use Entity Framework Power Tools in Visual Studio 2015?

蹲街弑〆低调 提交于 2019-11-26 18:01:17
问题 I have used Entity Framework in Visual Studio 2012. Build entity model by "reverse engineer code first". But when I setup Visual Studio 2015 just now, and setup EF power tools by NuGet, I can not find "reverse engineer code first" option. Anyone knows what i should do? Thanks! 回答1: Entity Framework Power Tools is a Visual Studio extension, so you need to install it first. But, there is a problem, the supported versions of Visual Studio are 2010, 2012 and 2013. Visual Studio 2015 is in Preview