visual-studio

Does .Net Core support User Secrets per environment?

我怕爱的太早我们不能终老 提交于 2021-02-20 19:08:27
问题 Let's say I have connection string for Development environment specified in appsettings.Development.json and connection string for the Staging environment specified in appsettings.Staging.json All I need to do to switch between Development and Staging is to navigate to Visual Studio Debug tab in project properties and change the value for ASPNETCORE_ENVIRONMENT environment variable. Now, of course I don't want to have connection string in appsettings.*.json for security reasons. So I move it

The locale en-EN is an invalid culture identifier

允我心安 提交于 2021-02-20 18:59:07
问题 I recently shifted from a computer which had Windows 10 with VS 2017 to a computer which had Windows 8.1 with VS 2017. I was working with a piece of code which had a line like this. Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(locale); Here, locale value is en-EN . I got hit with a surprise when this threw a CultureNotFoundException exception with a message. en-EN is an invalid culture identifier. Surprising to me because, the same code with locale as en-EN works in

The locale en-EN is an invalid culture identifier

耗尽温柔 提交于 2021-02-20 18:58:38
问题 I recently shifted from a computer which had Windows 10 with VS 2017 to a computer which had Windows 8.1 with VS 2017. I was working with a piece of code which had a line like this. Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(locale); Here, locale value is en-EN . I got hit with a surprise when this threw a CultureNotFoundException exception with a message. en-EN is an invalid culture identifier. Surprising to me because, the same code with locale as en-EN works in

Just installed v16.8.3 of visual studio and I seem to be getting tabs for F#

邮差的信 提交于 2021-02-20 18:49:13
问题 instead of spaces. I use F# quite a lot, not had this problem before. My F# settings seem to imply tabs are converted to 4 spaces..."insert spaces = 4" v16.8.3 very odd (actually this is a new install on a fresh machine not an upgrade, that may be relevant....I may have done something on my normal machine many moons ago, that Ive now forgotten) 回答1: I think this is the Adaptive Formatting behavior in Visual Studio: To turn off this behavior, please go to Tools > Options, and then Text Editor

Visual Studio 2015 - CodeLens toggle on/off with keyboard shortcut

别等时光非礼了梦想. 提交于 2021-02-20 05:34:30
问题 I would like to have a quick keyboard shortcut to turn on/off this feature. The feature is useful, but sometimes I want to look only at code and this feature distorts the code visual appearance. I have bound EditorContextMenus.CodeLens.CodeLensOptions to a keyboard shortcut, but this is too slow because the Options menu takes too long to open. I would really like to have shortcut that toggles this feature on and off. How can I do this? Did I miss some option in Environment->Keyboard or is

Exporting cpp mangled functions from a 3rd party library

断了今生、忘了曾经 提交于 2021-02-20 05:19:26
问题 I have a third party library as source code. It comes with a Visual Studio project that builds a .lib from it. I want to access the functionality from C# though, so I copied the project and changed it to create a dll. The DLL didn't contain any exported functions though, so I also created a module definition (.def) file, and added the functions I need in the EXPORTS section. This works for all the functions that are declared in extern "C" blocks. However, some of the functions that I need are

Error in C# application . System.ArgumentException: The path is not of a legal form?

偶尔善良 提交于 2021-02-20 05:01:09
问题 I am not getting why this error is coming i serach in net and not able to get answer . Technologies using : C# Visual Studio for debugging the project I have a code private void InitializeWatcher(string sourceDirectoryPath, string watcherFilter, bool isWatcherIncludeSubdirectories) { objWatcher = new FileSystemWatcher(); objWatcher.IncludeSubdirectories =isWatcherIncludeSubdirectories; objWatcher.InternalBufferSize = 16384; if (Utilities.LogLevel >= Utilities.Informational) { Utilities

Building System.Data.SQLite from Source, Builds with Target Framework 4.0

拈花ヽ惹草 提交于 2021-02-19 08:26:48
问题 I'm trying to build System.Data.SQLite in Visual Studio using the source code downloaded from http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki I was able to build the solution, but when I tried to reference the System.Data.SQLite.dll from a project with TargetFramework=3.5, I received the following message: "System.Data.SQLite.dll or one of its dependencies, requires a later version of the .NET Framework than the one specified in the project." I noticed that their managed

Extra space at the beginning/end of .text section

做~自己de王妃 提交于 2021-02-19 08:04:08
问题 I'm looking for a way to reserve some extra space at the begining/end of the .text section from C/C++ using Visual Studio compiler. I've only found one solution on how to reserve some extra space in code section in Visual Studio: PE File .text Section Size #pragma optimize( "", off ) #define NOP __asm { NOP } ; #define NOP8 NOP NOP NOP NOP NOP NOP NOP NOP #define NOP64 NOP8 NOP8 NOP8 NOP8 NOP8 NOP8 NOP8 NOP8 #define NOP512 NOP64 NOP64 NOP64 NOP64 NOP64 NOP64 NOP64 NOP64 #define NOP4096 NOP512

Debugger how to only see values not memory addresses of variables

为君一笑 提交于 2021-02-19 06:01:30
问题 As of late I have been working extensively with struct and classes in visual studio.Most of them have a lot of values witch makes them hard to track in the watch windows while debugging because the watch windows and the floating watch windows ( the one you can pin , dont know precise term ) always show the memory address which obscures the view of the values. Is there a way to make it so that the watch windows only show the values and not memory addresses 回答1: Write the custom natvis would be