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)
9393
9494 File . WriteAllText ( fodyWeaversXml . FullName , publishMode == PublishMode . SingleFile && IsDesktop ? "<Weavers><Costura/></Weavers>" : "<Weavers/>" ) ;
9595
96- var publishArgs = new [ ] {
96+ var publishArgsBase = new [ ] {
9797 "publish" ,
9898 "--no-restore" ,
9999 "--configuration" , "Release" ,
100100 "--output" , outputDirectory . FullName ,
101101 $ "-p:TargetFramework={ TargetFramework } "
102102 } ;
103+ var autoGenerateBindingRedirects = $ "-p:AutoGenerateBindingRedirects={ publishMode is PublishMode . Standard } ";
103104 var publishSingleFile = $ "-p:PublishSingleFile={ publishMode is PublishMode . SingleFile or PublishMode . SelfContained } ";
104105 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 ) ;
106108
107109 var executableFileName = RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ? "TestApp.exe" : "TestApp" ;
108110 var executableFile = new FileInfo ( Path . Combine ( outputDirectory . FullName , executableFileName ) ) ;
You can’t perform that action at this time.
0 commit comments