Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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));
        }