You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build intercepts the output of MSBuild and drops it on the floor.
Include your code
public IProjectContext Build(){varerrors=newList<string>();varoutput=newList<string>();vartmpFile= Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());varresult=
Command.CreateDotNet("msbuild",newstring[]{
_projectPath,$"/t:EvaluateProjectInfoForCodeGeneration",$"/p:OutputFile={tmpFile};CodeGenerationTargetLocation={_targetLocation};Configuration={_configuration}"}).OnErrorLine(e => errors.Add(e)).OnOutputLine(o => output.Add(o)).Execute();if(result.ExitCode !=0){throw CreateProjectContextCreationFailedException(_projectPath, errors);}try{varinfo= File.ReadAllText(tmpFile);varbuildContext= JsonConvert.DeserializeObject<CommonProjectContext>(info);returnbuildContext;}catch(Exceptionex){thrownew InvalidOperationException("Failed to read the BuildContext information.", ex);}}
Include stack traces
at Microsoft.Extensions.ProjectModel.MsBuildProjectContextBuilder.Build() in /tmp/Scaffolding/src/Shared/Microsoft.DotNet.Scaffolding.Shared/MsBuild/MsBuildProjectContextBuilder.cs:line 58
at Microsoft.VisualStudio.Web.CodeGeneration.Tools.Program.GetProjectInformation(String projectPath, String configuration) in /tmp/Scaffolding/tools/dotnet-aspnet-codegenerator/Program.cs:line 298
File a bug
Build
intercepts the output ofMSBuild
and drops it on the floor.Include your code
Include stack traces
Include provider and version information
The text was updated successfully, but these errors were encountered: