@@ -39,15 +39,23 @@ protected override async Task ExecuteAsync(OleMenuCmdEventArgs e, Project projec
39
39
}
40
40
else
41
41
{
42
- manifestPath = Path . Combine ( solutionPath , options . DefaultPath ) ;
42
+ manifestPath = options . RelativeTo == RelativeTo . Solution
43
+ ? Path . Combine ( solutionPath , options . DefaultPath )
44
+ : Path . Combine ( projectPath , options . DefaultPath ) ;
43
45
}
44
46
47
+ // ensure that the manifestPath directory exists
48
+ Directory . CreateDirectory ( manifestPath ) ;
49
+
50
+ // reset the path to include the manifest file name now that the directory exists
51
+ manifestPath = Path . Combine ( manifestPath , manifestFileName ) ;
52
+
45
53
await VS . StatusBar . StartAnimationAsync ( StatusAnimation . Build ) ;
46
54
await VS . StatusBar . ShowProgressAsync ( STATUS_MESSAGE , 1 , 2 ) ;
47
55
await pane . WriteLineAsync ( OutputWindowManager . GenerateOutputMessage ( STATUS_MESSAGE , "ManifestGen" , LogLevel . Information ) ) ;
48
- await pane . WriteLineAsync ( OutputWindowManager . GenerateOutputMessage ( $ "Generating using: msbuild /t:GenerateAspireManifest /p:AspireManifestPublishOutputPath= { manifestPath } ", "ManifestGen" , LogLevel . Information ) ) ;
56
+ await pane . WriteLineAsync ( OutputWindowManager . GenerateOutputMessage ( $ "Generating using: dotnet run --publisher manifest --output-path { manifestPath } ", "ManifestGen" , LogLevel . Information ) ) ;
49
57
var result = await Cli . Wrap ( "dotnet" )
50
- . WithArguments ( $ "msbuild /t:GenerateAspireManifest /p:AspireManifestPublishOutputPath= { manifestPath } ")
58
+ . WithArguments ( $ "dotnet run --publisher manifest --output-path { manifestPath } ")
51
59
. WithWorkingDirectory ( projectPath )
52
60
. WithStandardOutputPipe ( PipeTarget . ToStringBuilder ( stdOutBuffer ) )
53
61
. WithStandardErrorPipe ( PipeTarget . ToStringBuilder ( stdErrBuffer ) )
@@ -64,12 +72,12 @@ protected override async Task ExecuteAsync(OleMenuCmdEventArgs e, Project projec
64
72
}
65
73
else
66
74
{
67
- await pane . WriteLineAsync ( OutputWindowManager . GenerateOutputMessage ( $ "Manifest created at { manifestPath } \\ { manifestFileName } ", "ManifestGen" , LogLevel . Information ) ) ;
75
+ await pane . WriteLineAsync ( OutputWindowManager . GenerateOutputMessage ( $ "Manifest created at { manifestPath } ", "ManifestGen" , LogLevel . Information ) ) ;
68
76
}
69
77
70
78
try
71
79
{
72
- await VS . Documents . OpenAsync ( Path . Combine ( manifestPath , manifestFileName ) ) ;
80
+ await VS . Documents . OpenAsync ( Path . Combine ( manifestPath ) ) ;
73
81
}
74
82
catch ( Exception ex )
75
83
{
0 commit comments