private static async Task Main(string[] args) { var factory = new MSBuildWorkspaceFactory(); var workspace = await factory.GetWorkspace(@"C:\Users\Antan87\source\repos\C#\Test\TestApp\TestApp.sln"); var handler = new MSBuildWorkspaceHandler(workspace); }
public async Task <ActionResult> Post([FromBody] CreateWorkspaceRequest request) { var msBuildWorkspace = new MSBuildWorkspaceFactory().GetWorkspace(); Solution solution = await msBuildWorkspace.OpenSolutionAsync(request.FilePath); var collection = this._repository.GetCollection <WorkspaceEntityCollection>(); var entity = collection.AddEntity(); entity.Path = request.FilePath; entity.Solution = solution; return(Ok(solution.Id.Id)); }