visual-studio-2019

Build error after upgrading MimeKit to .NET 4.7.2: Your project does not reference “.NETFramework,Version=v4.7.2” framework

[亡魂溺海] 提交于 2019-12-11 18:07:11
问题 First, this is not a duplicate of: Build error while transitioning between branches: Your project is not referencing the ".NETFramework,Version=v4.7.2" framework I downloaded MimeKit and opened it in VS2019. I attempted to update the project from .NET 4.5 to .NET 4.7.2. After doing this, it won't compile. I get the following error: Your project does not reference ".NETFramework,Version=v4.7.2" framework. After finding the SO post above, I was very hopeful, but it didn't work. I followed the

std::locale throws runtime_error exception to “en_US.UTF-8” locale

只愿长相守 提交于 2019-12-11 17:45:59
问题 So I have a strange issue with the following code snippet in my project with std::locale: std::locale local; try { local = std::locale ("en_US.UTF-8"); } catch (std::runtime_error &e) { std::cout << e.what(); } It throws an exception with a message: "bad locale name" in my production code, but in case I run it in an empty sandbox project it set the local correctly. I suppose my project has a config somewhere that I am not familiar with, but I do not have any clue where should I look or where

Visual Studio 2019: Error pop-up appears: “To prevent an unsafe abort when evaluating the function…”

夙愿已清 提交于 2019-12-11 16:34:37
问题 I am facing an issue with Visual Studio 2019 (version 16.3.8), when starting an ASP.NET Core 3 WebApi project. After clicking OK the project starts and runs without any issue. However the pop-up keeps nagging me every time I have to start my solution. How can I stop showing it? What is it trying to tell me anyway? 回答1: There seems to be two possible solutions to this, that at least worked for me being on Visual Studio 2019. Solution Goto Tools => Options => Debugging => General and then

Visual Studio 2019 v16.0.1 intellisense partially not working

大兔子大兔子 提交于 2019-12-11 16:31:14
问题 I have noticed weird issue with Visual Studio 2019 v16.0.1 the intellisense about "Using directive is unncessary" normally grey is missing and type reference suggestion for missing using is not working. For the same suggestion i get both item working fine for visual studio 2017, so i am not sure if there is a setting that is turned off or i am missing something. I also tried with Visual Studio 2019 Preview but no luck. I have tried the following:- 1.) deleted .vs folder and restarted. 2.)

How to implement Test Adapter

。_饼干妹妹 提交于 2019-12-11 15:53:25
问题 I'm trying to implement a custom test adapter for a unit testing framework I'm working on. The following sources have provided information to get me started: https://devblogs.microsoft.com/devops/writing-a-visual-studio-2012-unit-test-adapter/ https://blogs.msdn.microsoft.com/bhuvaneshwari/2012/03/13/authoring-a-new-visual-studio-unit-test-adapter/ https://blogs.msdn.microsoft.com/aseemb/2012/03/03/how-to-make-your-extension-visible-to-the-test-explorer-in-visual-studio-11/ http:/

Build target in the Publish Profile is not executing even if the Publish is successful

跟風遠走 提交于 2019-12-11 15:25:20
问题 I have a publish profile Staging.pubxml created for a console project (.NET Core 2.1), as follows: <?xml version="1.0" encoding="utf-8"?> <!-- https://go.microsoft.com/fwlink/?LinkID=208121. --> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <PublishProtocol>FileSystem</PublishProtocol> <Configuration>Staging</Configuration> <Platform>Any CPU</Platform> <TargetFramework>netcoreapp2.1</TargetFramework> <PublishDir>bin\Release

How do I jump to matching brace in VS 2019?

懵懂的女人 提交于 2019-12-11 14:28:00
问题 As best as I can tell, Visual Studio 2019 completely removed the ability to jump to matching brace. I tried the hotkey I've been using for years (Ctrl-]) and it changes indent instead (why would I need that? This is C#, not Python). I also tried looking up the KeyMap (Environment->Keyboard) setting and searching for match, and there was nothing relevant. As far as I can tell, Microsoft has completely removed this feature, but I wanted to confirm that Fattie and I are not the only ones with

How perform Visual studio 2019 Ninja builds with custom CMake version?

独自空忆成欢 提交于 2019-12-11 09:10:20
问题 I'm trying to build a project with Ninja on Visual Studio 2019 from the IDE. I want to use a CMake version different from the one integrated in the VS 2019 distribution. I have set the cmakeExecutable variable in my CMakeSettings.json file to point to my system installation of CMake and the build works fine using the Visual Studio generator. However, if I use Ninja as generator, Visual Studio falls back using the VS-integrated version of CMake. Is there a way to build with Ninja and a custom

VS2019 + Xamarin.Forms = UWP/EXE dropped?

此生再无相见时 提交于 2019-12-11 09:04:22
问题 How do I get the UWP back into Xamarin.Forms Cross-Platform creation to have the templates ready to roll? After picking through the release notes, playing with VS2019's UI and a few hours of web searching, I have only found others posting about the problem in the preview versions. Some say UWP is gone forever, some say it just isn't included by default (so Microsoft can brag about how the install went from 23GB to 8GB or something like that) - but no help on HOW TO re-enable it, or add it to

Function name is ambigious in SQL server

邮差的信 提交于 2019-12-11 08:45:50
问题 Based on this question, I've created a function and added it to my database. Now I want to use that function as a calculated column: -- Based on https://stackoverflow.com/a/1012802/10406502 (work by Even Mien) CREATE FUNCTION [dbo].[StripCharacters] ( @String NVARCHAR(MAX), @MatchExpression VARCHAR(255) ) RETURNS NVARCHAR(MAX) AS BEGIN SET @MatchExpression = '%['+@MatchExpression+']%' WHILE PatIndex(@MatchExpression, @String) > 0 SET @String = Stuff(@String, PatIndex(@MatchExpression, @String