Roslyn doesn't work with unsaved projects

Topics: General
Apr 5, 2014 at 12:04 PM
I often create small VS projects to test something, so I have the "Save new projects when created" option disabled.

This worked fine with the old CTP, but the new preview shows the following error:
Unable to locate the solution directory. Please ensure that the solution has been saved.
After that, I'm unable to use Roslyn in the created project (there are no references to its assemblies).

I think this is because Roslyn now uses NuGet, and NuGet doesn't work with unsaved projects.

If that's the case, I think the right fix is to make NuGet work even in that situation. But in the meantime, I think that Roslyn projects should always be created in the saved state (e.g. ASP.NET projects behave like that).
Apr 5, 2014 at 2:37 PM
You are right. Unfortunately we became aware of this issue JUST before shipping and didn't have time to fix it. We will look at addressing it for the future.