Skip to content

Instantly share code, notes, and snippets.

View mrward's full-sized avatar

Matt Ward mrward

View GitHub Profile
syntax = "proto3";
option csharp_namespace = "GrpcGreeter";
package greet;
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply);

.NET Core 2.0 SDK Preview 1 Support in Visual Studio for Mac 7.0

This document covers the steps required in order to use build and run .NET Core 2.0 and .NET Standard 2.0 projects with Visual Studio for Mac.

Existing project templates target .NET Core 1.1

If only the .NET Core 2.0 SDK is installed then the projects will fail to run due to the 1.1 runtime being unavailable. To target .NET Core 2.0 the TargetFramework in the project will need to be edited to target netcoreapp2.0 or netstandard2.0. Alternatively the dotnet cli installed with the .NET Core 2.0 SDK can be used to create the project with the correct dependencies and target framework.

.NET Core App 2.0 Project

PackagesViewModel error
System.AggregateException: One or more errors occurred. ---> System.UriFormatException: Invalid URI: The hostname could not be parsed.
at System.Uri.Parse (UriKind kind, System.String uriString) [0x00020] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System/Uri.cs:1306
at System.Uri.ParseUri (UriKind kind) [0x00000] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System/Uri.cs:1176
at System.Uri..ctor (System.String uriString, UriKind uriKind) [0x0005b] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System/Uri.cs:200
at System.Data.Services.Client.Util.CreateUri (System.String value, UriKind kind) [0x00000] in /private/tmp/source-mono-4.4.0-c7sr1/bockbuild-mono-4.4.0-branch-c7sr1/profiles/mono-mac-xamarin/buil
INFO [2015-01-15 10:41:43Z]: PackagesViewModel error
System.AggregateException: One or more errors occurred ---> System.NullReferenceException: Object reference not set to an instance of an object
at System.IO.Packaging.Package.LoadRelationships () [0x001e9] in /private/tmp/source-mono-mac-3.12.0-branch-32/bockbuild-mono-3.12.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.12.0/mcs/class/WindowsBase/System.IO.Packaging/Package.cs:338
at System.IO.Packaging.Package.get_Relationships () [0x0000b] in /private/tmp/source-mono-mac-3.12.0-branch-32/bockbuild-mono-3.12.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.12.0/mcs/class/WindowsBase/System.IO.Packaging/Package.cs:86
at System.IO.Packaging.Package.GetRelationshipsByType (string) [0x00006] in /private/tmp/source-mono-mac-3.12.0-branch-32/bockbuild-mono-3.12.0-branch/profiles/mono-mac-xamarin/build-root/mono-3.12.0/mcs/class/WindowsBase/System.IO.Packaging/Package.cs:293
at NuGet.OptimizedZipPackage.EnsureManifest () <IL 0x00021, 0x00057>
at NuGet.O