Skip to content

A Swiss Army knife for developers.

Fixed MonacoEditor CSPROJ

Etienne Baudouxb572a59c620f
diff --git a/src/app/dev/DevToys.Core/Mef/MefComposer.cs b/src/app/dev/DevToys.Core/Mef/MefComposer.cs
index 4e719feaf..ce10945e8 100644
--- a/src/app/dev/DevToys.Core/Mef/MefComposer.cs
+++ b/src/app/dev/DevToys.Core/Mef/MefComposer.cs
@@ -68,17 +68,17 @@ public sealed class MefComposer : IDisposable
// Dynamically load assemblies coming from the Plugin repository folder and
// try to discover MEF extensions in them.
- //foreach (string pluginFolder in GetPotentialPluginFolders())
- //{
- // try
- // {
- // catalog.Catalogs.Add(new RecursiveDirectoryCatalog(pluginFolder));
- // }
- // catch (Exception ex)
- // {
- // // TODO: Log this. We maybe failed to load a plugin.
- // }
- //}
+ foreach (string pluginFolder in GetPotentialPluginFolders())
+ {
+ try
+ {
+ catalog.Catalogs.Add(new RecursiveDirectoryCatalog(pluginFolder));
+ }
+ catch (Exception ex)
+ {
+ // TODO: Log this. We maybe failed to load a plugin.
+ }
+ }
// Compose MEF.
var container = new CompositionContainer(catalog);
@@ -99,11 +99,11 @@ public sealed class MefComposer : IDisposable
return ExportProvider;
}
- //private static IEnumerable<string> GetPotentialPluginFolders()
- //{
- // // TODO: Maybe plugins should be placed in the app's LocalStorage instead?
- // string appFolder = Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!;
- // string pluginFolder = Path.Combine(appFolder, "Plugins");
- // return Directory.EnumerateDirectories(pluginFolder, "*", SearchOption.TopDirectoryOnly);
- //}
+ private static IEnumerable<string> GetPotentialPluginFolders()
+ {
+ // TODO: Maybe plugins should be placed in the app's LocalStorage instead?
+ string appFolder = Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!;
+ string pluginFolder = Path.Combine(appFolder, "Plugins");
+ return Directory.EnumerateDirectories(pluginFolder, "*", SearchOption.TopDirectoryOnly);
+ }
}
diff --git a/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj b/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj
index 4040747f0..586989ca3 100644
--- a/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj
+++ b/src/app/dev/DevToys.MonacoEditor/DevToys.MonacoEditor.csproj
@@ -71,9 +71,6 @@
<Compile Update="**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
- <None Remove="ts-helpermethods\**\*.js" />
- <Content Remove="ts-helpermethods\**\*.js" />
- <TypeScriptCompile Remove="ts-helpermethods\ts-helpermethods-UWP\**\*.js" />
<Content Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
@@ -112,9 +109,6 @@
<Content Include="CodeEditor\CodeEditor.Windows.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <None Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.js" />
- <Content Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.js" />
- <TypeScriptCompile Remove="ts-helpermethods\ts-helpermethods-Wasm\**\*.*" />
<Content Include="ts-helpermethods\ts-helpermethods-UWP\tsconfig.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
@@ -157,9 +151,6 @@
<Compile Update="**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
- <None Remove="ts-helpermethods\**\*.js" />
- <Content Remove="ts-helpermethods\**\*.js" />
- <TypeScriptCompile Remove="ts-helpermethods\ts-helpermethods-UWP\**\*.js" />
<Content Include="ts-helpermethods\ts-helpermethods-Wasm\tsconfig.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>