Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


C# interactive window visual studio preview mac

I just want to know if there's a way to add/open a C# interactive window in visual studio preview for mac? I'm currently working through the 'C# Streams and Data Processing' course and in the 'Reference Types Versus Value Types' class we have to interact with the program using the C# interactive window, (vs for mac doesn't have this option).

I'm using mono csharp in the terminal as a repl. Is there a way to interact with a vs solution using that instead?

Also when I navigate to my project folder in the terminal and use 'dotnet restore' I get this message: "Nothing to do. None of the projects specified contain packages to restore."

and with 'dotnet run' I get this error message:

"/usr/local/share/dotnet/sdk/1.0.1/Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/Users/shaniconnell/Projects/Treehouse Sandbox/SoccerStats-working-with DateTime/SoccerStats/SoccerStats/SoccerStats.csproj]"

I've spent the last 5 days on google search trying to find a solution to this but have had no luck. Any help or advice would be great, thanks.

Daniel Tkach
Daniel Tkach
7,608 Points

Hi Shani, I use Parallels and run Visual Studio as if it were a native Mac application, it's quite amazing. You can try it free for 30 days I think.

Thanks for the tip Daniel, yes after days of research it looks like that is the best way to go. I decided to use Boot Camp Assistant instead of a virtual machine just to keep things simple.

Jon Wood
Jon Wood
9,884 Points

Visual Studio for Mac may not have that yet, actually. Since they fairly recently acquired Xamarin they used their Xamarin Studio to become Visual Studio or Mac so it may be some time before they add that feature.