Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.

Check for output type exe #459

Merged
merged 3 commits into from
May 8, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Check for output type exe
  • Loading branch information
jkotalik committed May 8, 2020
commit 0c733b10042a38422d28d8d14a8053f07a472446
11 changes: 9 additions & 2 deletions src/Microsoft.Tye.Core/ConfigModel/ConfigFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.Tye.Serialization;
Expand Down Expand Up @@ -68,7 +69,7 @@ private static ConfigApplication FromSolution(FileInfo file)
// We want a *fast* heuristic that excludes unit test projects and class libraries without
// having to load all of the projects.
var launchSettings = Path.Combine(projectFile.DirectoryName, "Properties", "launchSettings.json");
if (File.Exists(launchSettings))
if (File.Exists(launchSettings) || ContainsOutputTypeExe(projectFile))
{
var service = new ConfigService()
{
Expand All @@ -77,12 +78,18 @@ private static ConfigApplication FromSolution(FileInfo file)
};

application.Services.Add(service);
}
}
}

return application;
}

private static bool ContainsOutputTypeExe(FileInfo projectFile)
{
var content = File.ReadAllText(projectFile.FullName);
return content.Contains("<OutputType>exe</OutputType>");
}

private static ConfigApplication FromYaml(FileInfo file)
{
using var parser = new YamlParser(file);
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy