Made some fixes to binding redirects
- Don't generate an empty config file with no redirects. - Fix swapped publicKeyToken and culture #462
This commit is contained in:
parent
d09137f8d5
commit
7d2277d930
2 changed files with 23 additions and 8 deletions
|
@ -496,6 +496,7 @@ namespace Microsoft.DotNet.Tools.Compiler
|
|||
{
|
||||
CopyExport(outputPath, export);
|
||||
}
|
||||
|
||||
GenerateBindingRedirects(runtimeContext, outputPath, exporter);
|
||||
}
|
||||
else
|
||||
|
@ -508,10 +509,16 @@ namespace Microsoft.DotNet.Tools.Compiler
|
|||
{
|
||||
var generator = new BindingRedirectGenerator();
|
||||
var config = generator.Generate(exporter.GetAllExports());
|
||||
var path = Path.Combine(outputPath, runtimeContext.ProjectFile.Name + ".exe.config");
|
||||
using (var stream = File.Create(path))
|
||||
|
||||
if (config != null)
|
||||
{
|
||||
config.Save(stream);
|
||||
// TODO: Handle existing App.config file transformation
|
||||
// We have something to generate
|
||||
var path = Path.Combine(outputPath, runtimeContext.ProjectFile.Name + ".exe.config");
|
||||
using (var stream = File.Create(path))
|
||||
{
|
||||
config.Save(stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue