System.IO.IOException with a .NET gRPC Project on Mac

Hey everyone,


I created a new gRPC project with Visual Studio on a Mac and ran into the following error when trying to run it:

System.IO.IOException
...
http/2 over tls is not supported on macos due to missing alpn support

It turns out that Kestrel does not support HTTP/2 with TLS on MacOS. In order to get around it we end up having to configure it to not use TLS.

In program.cs, add the lines below with your HTTP port (e.g. 20257):

var builder = WebApplication.CreateBuilder(args);

builder.WebHost.ConfigureKestrel(options =>
{
    // Setup a HTTP/2 endpoint without TLS.
    options.ListenLocalhost(20257, o => o.Protocols =
        HttpProtocols.Http2);
});

Thanks to the following links for the info:

“protobuf” visual studio a namespace cannot directly contain members such as fields or methods

Hi everyone,

I ran into the following intellisense error while adding a new proto file:

“protobuf” visual studio a namespace cannot directly contain members such as fields or methods

This was one of many errors that were shown and appeared to be an issue with Intellisense mistaking the file for a normal class definition. The following appears to have fixed it:

1) Right click on the file and select “exclude from project”
2) Clean the solution and rebuild
3) Re-include the file in the project (you may have to toggle ‘Show All Files’ at the top of solution explorer to see the excluded item).

Cheers,
Chris

Exited with code 9009 – Visual Studio Build

Hey everyone,

I ran into the following error today while attempting to build a solution:

combiner exited with code 9009

It apparently means that a file couldn’t be found. The solution was to simply restart visual studio.

I’d been manually adding them to the directory and this is apparently a common cause. See the following Stackoverflow post for more info: https://stackoverflow.com/a/28198020/522859

Could not find part of the path ‘C:xlib’ – Adding new Web API Project

Hey everyone,

I ran into the following error when I tried to add a new Web API project in Visual Studio Express 2015 for Web:

Could not find part of the path ‘C:xlib’

The workaround for this was to temporarily unbind the project from TFS: File > Source Control > Advanced > Change Source Control > Click unbind on each of the projects

While not the same problem, this post helped me out: https://github.com/NuGet/Home/issues/1164

TF30063: You are not authorized to access asxproject – TFS Online/Visual Studio

Hey everyone,

I ran into the following issue while trying to install the HTML Agility Pack via Nuget today:

TF30063: You are not authorized to access asxproject…

This fixed it for me:
– Go to “Team Explorer”
– Up the very top click on the “Connect to Team Projects” button (power cable looking icon next to the home button)
– Right click on the project and then click connect

Once connected, everything seemed to start working for me again. Check out this stackoverflow post more info: http://stackoverflow.com/a/16700451/522859

The installer has encountered an unexpected error installing this package.This may indicate a problem with this package.The error code is 29506 – SQL Server Management Studio

Hey everyone,

I ran into the following error while trying to install Sql Server Management Studio on Windows 8:

The installer has encountered an unexpected error installing this package.This may indicate a problem with this package.The error code is 29506

To fix it, all you need to do is run the exe with administrative privileges.

oldIndex must be a valid index in the Children collection (Visual Studio)

Hey everyone,

Just posting this in case anyone else runs into it. After unshelving, the following error kept popping up when I tried to open files using the solution explorer:

oldIndex must be a valid index in the Children collection
Parameter name: oldIndex
Actual value was -1.

I’m still not sure what caused it, but restarting visual studio seems to have fixed it.

Unescape String in Watch Window – Visual Studio

Hey everyone,

Just a quick post on how to remove the escape characters from a string in the watch window. All you’ve got to do is append “,nq” (short for no quotes) to the watch variable name.

MyLongString becomes MyLongString,nq

This removes all of the quotes and line breaks. Pretty handy for when you’ve got to copy the values.

Check out these links for more info:

MSDN: http://msdn.microsoft.com/en-us/library/e514eeby%28v=vs.100%29.aspx
StackOverflow: http://stackoverflow.com/a/9786653/522859

How to Open the Same File Twice in Visual Studio

Hey everyone,

Today I was working on a fairly large class and needed to compare two different areas of code. I’m used to using text editors such as notepad++ and sublime where I would normally just open the file multiple times. It turns out that Visual Studio has a similar feature, although it’s admittedly a lot less intuitive:

– Open the file you want to duplicate and make it the active tab (just click on it somewhere)
– Select window from the menu up the top
– Click New Window

This will duplicate your active tab. To place them side by side simply right click on one of them and then select ‘New Vertical Tab Group’.

Thanks to this Stackoverflow post for the solution: http://stackoverflow.com/a/772159/522859

How to Open the Same File Twice in Visual Studio

Hey everyone,

I was working on a fairly large class in visual studio and having a bit of trouble comparing two different areas within it. Thankfully, StackOverflow knew of a way to make things a lot easier – open the same file twice:

– With the tab you want to duplicate currently active, select Window from the menu
– Click new window
– On the new window, right click and select ‘New Vertical Tab Group’ from the drop down