visual-studio-2019

“There was an error running the selected code generator: 'The value -1 outside the acceptable range of [0,2147483647]. Parameter name :value''”

房东的猫 提交于 2019-12-17 11:43:53
问题 I am working on an ASP.NET MVC project and so far I had no problems with scaffolding any type of items until now. Every time I want to create a new controller or view, I get the following error message: There was an error running the selected code generator: 'The value -1 is outside the acceptable range of [0,2147483647]. Parameter name :value' This issue only arises in the project that I'm currently working on as I tried creating a new controller in another project and it worked flawlessly.

How can I install the VS2017 version of msbuild on a build server without installing the IDE?

。_饼干妹妹 提交于 2019-12-17 02:34:15
问题 Historically, this has been done with the Microsoft Build Tools. But it seems that the Build Tools may not be available for versions after 2015. The replacement appears to be the Visual Studio build tools, which doesn't seem to have a real homepage yet. I downloaded the VS2017 Professional installer, and went to the Individual Components tab. Right away, the summary is telling me that the Visual Studio core editor is there, taking up 753MB. I don't want the editor. Just msbuild. There is no

Can I record/play macros in Visual Studio 2012/2013/2015/2017/2019?

无人久伴 提交于 2019-12-17 02:28:39
问题 Apparently macros were dropped from Visual Studio 2012. Is there a plugin/extension/tool that will let me record & play keyboard macros (much like the record/play temporary macro in Visual Studio 2010)? For example, I typically would use a macro when converting code from one language to another or to quickly generate properties from a text list, etc. 回答1: You can try the Text Macros for Visual Studio 2012-2019 extension (I am the author). It basically does the same thing as the Notepad++

Log complete call stack in Visual Studio

时光总嘲笑我的痴心妄想 提交于 2019-12-14 04:13:53
问题 In Visual Studio Debug mode one can view the partial call stack when reaching a given breakpoint . I want to save and search the complete call stack during debug mode, without setting any special breakpoint. If and how is that possible? I am using Visual Studio 2019 Preview. 回答1: For a .NET application, you can use my Runtime Flow extension to collect a complete function calls sequence. It works outside debug mode and without setting breakpoints. 来源: https://stackoverflow.com/questions

ISharedPreferences stored string is updating after restart of my APP

半腔热情 提交于 2019-12-13 20:23:45
问题 I am passing a string from an Activity to Fragment everything works perfectly but my passed string is not updating instantly it updates after restart of my app.Through google search I tried changing my code "editor.commit" to "editor.apply" but no use please help me with your suggestions, thanks Activity.cs var text = newSentence.ToString(); ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this); ISharedPreferencesEditor editor = prefs.Edit(); editor.PutString("Data",

Using VS2019 with TFS2018 vnext build system without server side work around

╄→尐↘猪︶ㄣ 提交于 2019-12-13 17:19:29
问题 I recently ran into a problem trying to use VS2019 with the TFS2018 vnext build system. You cannot select VS2019 in the "Visual Studio Build" step, and selecting "Latest" does not use Visual Studio 2019. On a test server, upgrading the server software from TFS 2018.3 to Azure Devops Server 2019 fixes the issue. Is there a simple work-around that would allow Visual Studio 2019 to be used without affecting the TFS server in a questionable way. This question extends the question here: Using

How to restore normal “New Project” windows on Visual Studio 2019

﹥>﹥吖頭↗ 提交于 2019-12-13 12:07:57
问题 After upgrading to Visual Studio 2019 I noticed the very unpleasant change of the "new project" window, as announced here. As with much of the community I totally hate the new useless window and would pretty much prefer to use the normal old one. To show what I'm refering to, here are screenshots of the old and the new screens: VS 2017 and earlier: VS 2019: This is somewhat similar to this other question asking about the start page, but this time, it's about the new project dialog. How can I

Issue in System.Reflection.MethodBase.Invoke when debugging ASP.NET Core 3 in Visual Studio 2019

你离开我真会死。 提交于 2019-12-13 02:43:53
问题 I am writing an ASP.NET Core 3 Razor Page app in VS2019. I have started to get a message, "To prevent an unsafe abort when evaluating the function 'System.Reflection.MethodBase.Invoke' all threads were allowed to run..." Can someone tell what is going on and how to resolve it? Thanks 来源: https://stackoverflow.com/questions/58793111/issue-in-system-reflection-methodbase-invoke-when-debugging-asp-net-core-3-in-vi

How to move the caret to after the end-quotes when typing XAML?

心已入冬 提交于 2019-12-12 22:08:29
问题 After typing something like: <StackPanel Name="someStackPanel" the caret is before the end-quotes. The only way I know of transferring the caret to the right of the end-quotes (so I can continue typing) is to press the right ( > ) button. But that button is rather inconvenient. (Note that this problem doesn't exist for drop-down options such as Orientation="Horizontal" Where after selecting Horizontal from the drop-down menu, the caret is placed after the end-quotes.) I tried return and tab

Visual Studio 2019: Start Page instead of Start Window

时光毁灭记忆、已成空白 提交于 2019-12-12 10:45:57
问题 Visual Studio introduced a blocking Start Window instead of a non-blocking Start Page . Considering how extensible Visual Studio is, is there a way to have VS2019 display a non-blocking Start Page . The new Start Window is quite annoying, less informative, displays all projects, not just solutions, pinning is not up to previous standards, and no additional information. Most annoying is the blocking aspect. I am thinking that there is some sort of extension or setting that Microsoft has