I would like to use C# Interactive on Visual Studio 2017 to run some methods on classes in an .NET Framework 4.6.1 project I have created which uses ASP.NET Core. In a traditional class library project, I am able to right-click on the project and choose Initialize Interactive with Project to use classes from my project in the C# Interactive window.
Right-clicking on my ASP.NET Core project, I do not have this option. Is there any way to use classes from this project in C# Interactive?
If it matters, the classes I would like to use in C# Interactive do not directly interact with ASP.NET Core; they are simply data containers with methods. It would probably be possible to move them to a separate class library project in the solution, but I'd like to know if it's possible to keep them in the ASP.NET Core project first.
My .csproj:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="EntityFramework" Version="6.1.3" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.3" />
<PackageReference Include="Microsoft.AspNet.Razor" Version="3.2.3" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.0.0" />
<PackageReference Include="RazorEngine" Version="3.10.0" />
</ItemGroup>
</Project>