Measurity / ModTemplateValheim

Valheim template for quickly writing mods using BepInEx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assembly Publicizer - unknown software exception (0xe0434352)

geocine opened this issue · comments

I am getting this error after fixing issues #3 and #2

UnknownSoftwareException

This is the state of my Build/bin folder

BuildBin

@Measurity Even though it is showing this error the publicized_assembly directory is successfully created on the Valheim game directory C:\Program Files (x86)\Steam\steamapps\common\Valheim\valheim_Data\Managed. However it is not copied to BuildTool\bin\generated_files , so I just copied that manually. Now after doing that I also had to comment out the publicizerTask

diff --git a/BuildTool/Program.cs b/BuildTool/Program.cs
index 025e89d..62cb6c6 100644
--- a/BuildTool/Program.cs
+++ b/BuildTool/Program.cs
@@ -32,9 +32,11 @@ namespace BuildTool
             if (SteamAppId <= 0) throw new Exception("SteamAppId environment variable must be set and be valid");
 
             var game = await Task.Factory.StartNew(() => EnsureSteamGame(SteamAppId)).ConfigureAwait(false);
-            var publicizerTask = EnsurePublicizerAsync()
-                .ContinueWith(t => Task.Factory.StartNew(() => EnsurePublicizedAssemblies(game, t.Result)));
-            await Task.WhenAll(EnsureBepInExAsync(game.InstallDir), publicizerTask, EnsureUnityDoorstopAsync(game))
+            //var publicizerTask = EnsurePublicizerAsync()
+            //    .ContinueWith(t => Task.Factory.StartNew(() => EnsurePublicizedAssemblies(game, t.Result)));
+            //await Task.WhenAll(EnsureBepInExAsync(game.InstallDir), publicizerTask, EnsureUnityDoorstopAsync(game))
+            //    .ConfigureAwait(false);
+            await Task.WhenAll(EnsureBepInExAsync(game.InstallDir), EnsureUnityDoorstopAsync(game))
                 .ConfigureAwait(false);
             await Task.Factory.StartNew(() => EnsureUnstrippedMonoAssemblies(game));
         }

Also at this stage, the solution file is sluggish and slow so I have to comment this out

diff --git a/ModTemplateValheim/ModTemplateValheim.csproj b/ModTemplateValheim/ModTemplateValheim.csproj
index 6d93d6a..3b3c40f 100644
--- a/ModTemplateValheim/ModTemplateValheim.csproj
+++ b/ModTemplateValheim/ModTemplateValheim.csproj
@@ -62,7 +62,7 @@
     
     <!-- Prepare game for modding -->
     <Target Name="BeforeResolveReferences">
-        <Exec LogStandardErrorAsError="true" Command="$(BuildDir)BuildTool.exe" EnvironmentVariables="SteamAppId=892970" />
+        <!-- <Exec LogStandardErrorAsError="true" Command="$(BuildDir)BuildTool.exe" EnvironmentVariables="SteamAppId=892970" /> -->
     </Target>
     <!-- Include generated build properties -->
     <Import Project="$(BuildGenDir)game.props" Condition="Exists('$(BuildGenDir)game.props')" />

This may need to be debugged with CDB to check the underlying issue

commented

Might opt to redo what publicizer does locally instead of downloading the binary which would reduce overhead of calling the exe as well.

This is not an issue anymore since the Assembly Publicizer is now refactored to be used directly