Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
111 views
in Technique[技术] by (71.8m points)

c# - Can you get solution as variable, without giving its solution path?

I've been using so far this part of code to get my solution variable (using Rosyln)

var workspace=MSBuildWorkspace.Create();
var solution = workspace.OpenSolutionAsync(solutionPath).Result;
...

Is there a way for me to get this/current solution without giving its path? For example:

var solution = this.GetCurrentSolution(); //Ofcourse this exact code doesn't work, since this doesn't exist.
question from:https://stackoverflow.com/questions/65835206/can-you-get-solution-as-variable-without-giving-its-solution-path

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...