File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
test/Serilog.Settings.Configuration.Tests/Support Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -93,16 +93,18 @@ async Task PublishAsync(PublishMode publishMode)
93
93
94
94
File . WriteAllText ( fodyWeaversXml . FullName , publishMode == PublishMode . SingleFile && IsDesktop ? "<Weavers><Costura/></Weavers>" : "<Weavers/>" ) ;
95
95
96
- var publishArgs = new [ ] {
96
+ var publishArgsBase = new [ ] {
97
97
"publish" ,
98
98
"--no-restore" ,
99
99
"--configuration" , "Release" ,
100
100
"--output" , outputDirectory . FullName ,
101
101
$ "-p:TargetFramework={ TargetFramework } "
102
102
} ;
103
+ var autoGenerateBindingRedirects = $ "-p:AutoGenerateBindingRedirects={ publishMode is PublishMode . Standard } ";
103
104
var publishSingleFile = $ "-p:PublishSingleFile={ publishMode is PublishMode . SingleFile or PublishMode . SelfContained } ";
104
105
var selfContained = $ "-p:SelfContained={ publishMode is PublishMode . SelfContained } ";
105
- await RunDotnetAsync ( _workingDirectory , IsDesktop ? publishArgs : publishArgs . Append ( publishSingleFile ) . Append ( selfContained ) . ToArray ( ) ) ;
106
+ var publishArgs = ( IsDesktop ? publishArgsBase . Append ( autoGenerateBindingRedirects ) : publishArgsBase . Append ( publishSingleFile ) . Append ( selfContained ) ) . ToArray ( ) ;
107
+ await RunDotnetAsync ( _workingDirectory , publishArgs ) ;
106
108
107
109
var executableFileName = RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ? "TestApp.exe" : "TestApp" ;
108
110
var executableFile = new FileInfo ( Path . Combine ( outputDirectory . FullName , executableFileName ) ) ;
You can’t perform that action at this time.
0 commit comments