Git Product home page Git Product logo

Comments (13)

theolivenbaum avatar theolivenbaum commented on August 25, 2024 1

Hi @IceReaper

Managed to reproduce the problem here on a Linux machine - will test a fix for it now.
Meanwhile, you can set a flag on your project file (SkipEmbeddingResources = true) to get it compiling (just remove it once the fix is done):

<Project Sdk="h5.Target/0.0.11500">
    <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
        <LangVersion>7.2</LangVersion>
        <SkipEmbeddingResources>true</SkipEmbeddingResources>         <------- this line
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="h5" Version="0.0.11453" />
        <PackageReference Include="h5.core" Version="0.0.11860" />
        <PackageReference Include="h5.Newtonsoft.Json" Version="0.0.11861" />
        <PackageReference Include="Tesserae" Version="0.0.13054" />
    </ItemGroup>
</Project>

from h5.

IceReaper avatar IceReaper commented on August 25, 2024

Another day, another problem: My machine has rebooted meanwhile, and above error is gone now. So it might be related to leftover .net5 stuff in the os. The compilation itself however still fails with this error:

Build started 10/20/2020 10:20:05 AM.
Logging verbosity is set to: Normal.     1>Project "/home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj" on node 1 (build target(s)).
     1>_CheckForH5:
         h5 check-if-online
         [info] [10:20:06] Found compilation server
       _ComputePackageReferencePublish:
         Running _ComputePackageReferencePublish for Test
       _HandlePackageFileConflicts:
         Running _HandlePackageFileConflicts
       _ComputeReferenceAssemblies:
         Running _ComputeReferenceAssemblies
       _ComputeUserRuntimeAssemblies:
         Running _ComputeUserRuntimeAssemblies
       GenerateBuildDependencyFile:
         Running GenerateBuildDependencyFile
         No output assembly found, will build.
       _GenerateRuntimeConfigurationFilesInputCache:
         Running _GenerateRuntimeConfigurationFilesInputCache
       GenerateBuildRuntimeConfigurationFiles:
         Running GenerateBuildRuntimeConfigurationFiles
         Writing project runtime config file /home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/Test.runtimeconfig.json
       CopyFilesToOutputDirectory:
         Test -> 
       _H5Build:
         Skipping updating the h5 compiler. You can always install/update it by calling dotnet tool update --global h5-compiler
         Deleting previous assembly: /home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/Test.dll
         H5 compilation begins now... 
         h5 --project "/home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj" --configuration "Debug" --assembly-version "1.0.0.0"
         
         
         
              5555555555555555555555555555555555555555
               5555555555555555555hhhhhhhhhhhhhhhh5555
               555     55555555555hh             h5555 
               555     55555555555hh             h555  
               555     55555555555hh     hhhhhhhhh555  
                55     55555555555hh     hhhhhhhhh555  
                555     5555555555hh     hhhhhhhh5555  
                555              5hh            h5555  
                555              5hh            h555   
                 555    5555     5hhhhhhhh      h555   
                 555    5555     5hhhhhhhh      h555   
                 555     555     5hhhhhhhh     h5555   
                 555     555     5hh           h555    
                 5555555 555     5hh        hhhh555    
                  5555555555555555hhhhhhhhhhhhhh555    
                  5555555555555555hhhhhhh5555555555    
                        55555555555555555555           
                          5555555555555555            
         
         
         [info] [10:20:06] Executing h5 compiler with arguments: '--project /home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj --configuration Debug --assembly-version 1.0.0.0'
         [info] [10:20:06] Found compilation server, sending compilation request
         
         
         [info] [10:20:07]  Setting working directory to '/home/andre/RiderProjects/Tetys/csharp/Test'
         [info] [10:20:07]  [B] H5 Compilation
         [info] [10:20:07]  Ready to build /home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj
         [info] [10:20:07]  [B] Translating assembly
         [info] [10:20:07]  Building assembly on path /home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/Test.dll
         [info] [10:20:07]  [B] Building assembly 'Test' for location '/home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj'
         [info] [10:20:07]  NuGet: Importing package h5.Core version 0.0.8126
         [info] [10:20:07]  NuGet: Importing package h5 version 0.0.8032
         [info] [10:20:07]  NuGet: Copying lib file '/home/andre/.nuget/packages/h5.core/0.0.8126/lib/netstandard2.0/H5.Core.dll' to '/home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/H5.Core.dll'
         [info] [10:20:07]  NuGet: Copying lib file '/home/andre/.nuget/packages/h5/0.0.8032/lib/netstandard2.0/H5.dll' to '/home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/H5.dll'
         [info] [10:20:07]  Loading references from assembly /home/andre/.nuget/packages/h5.core/0.0.8126/lib/netstandard2.0/H5.Core.dll
         [info] [10:20:07]  Loading references from assembly /home/andre/.nuget/packages/h5/0.0.8032/lib/netstandard2.0/H5.dll
         [info] [10:20:07]  [B] Compiling /home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/Test.dll with Roslyn
         [info] [10:20:07]  [E] Compiling /home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/Test.dll with Roslyn in 0.0356 seconds
         [info] [10:20:07]  [E] Building assembly 'Test' for location '/home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj' in 0.0460 seconds
         [info] [10:20:07]  [B] Inspecting references
         [info] [10:20:07]  [E] Inspecting references in 0.0823 seconds
         [info] [10:20:07]  Running compiler version 0.0.12179:
         [info] [10:20:07]  [B] Rewritting code
         [info] [10:20:07]  [E] Rewritting code in 0.0066 seconds
         [info] [10:20:07]  [B] Building syntax tree
         [info] [10:20:07]  [E] Building syntax tree in 0.0021 seconds
         [info] [10:20:07]  [B] Loading assembly definitions
         [info] [10:20:09]  [E] Loading assembly definitions in 1.3700 seconds at 1 oper/s, total of 2 operations
         [info] [10:20:09]  [B] Inspecting types
         [info] [10:20:09]  [E] Inspecting types in 0.0009 seconds
         [info] [10:20:09]  [B] Creating Emitter
         [info] [10:20:09]  [E] Sorting types by name in 0.0000 seconds
         [info] [10:20:09]  [E] Creating Emitter in 0.1498 seconds
         [info] [10:20:09]  [B] Emitting JavaScript code
         [info] [10:20:10]  [B] Emitting types to javascript
         [info] [10:20:10]  [B] Emitting types reflection metadata to javascript
         [info] [10:20:10]  [E] Emitting types reflection metadata to javascript in 0.0010 seconds
         [info] [10:20:10]  [E] Emitting types to javascript in 0.0871 seconds
         [info] [10:20:10]  [E] Emitting JavaScript code in 0.7711 seconds
         [info] [10:20:10]  [E] Translating assembly in 2.4300 seconds
         [info] [10:20:10]  [B] Post-processing output on '/home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/h5/' for project '/home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj'
         [info] [10:20:10]  [B] Extracting core scripts
         [info] [10:20:10]  [B] Extracting resources
         [info] [10:20:10]  [E] Extracting resources in 0.0197 seconds
         [info] [10:20:10]  Skipping extracting Locales
         [info] [10:20:10]  [E] Extracting core scripts in 0.0197 seconds
         [info] [10:20:11]  [B] Saving results to output folder '/home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/h5/'
         [info] [10:20:11]  [E] Saving results to output folder '/home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/h5/' in 0.0060 seconds
         [info] [10:20:11]  [B] Injecting resources from project '/home/andre/RiderProjects/Tetys/csharp/Test' into output '/home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/h5/'
         [info] [10:20:11]  [E] Injecting resources from project '/home/andre/RiderProjects/Tetys/csharp/Test' into output '/home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/h5/' in 0.0002 seconds
         [info] [10:20:11]  [E] Post-processing output on '/home/andre/RiderProjects/Tetys/csharp/Test/bin/Debug/netstandard2.0/h5/' for project '/home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj' in 1.5000 seconds
         [info] [10:20:11]  [E] H5 Compilation in 4.1400 seconds
         [info] [10:20:11]  
         
              __ _  _  _  _ 
             |_ |_)|_)/ \|_)
             |__| \| \\_/| \
         
         
         [fail] [10:20:11]  
     1>H5 : error H5003: This operation is not supported for a relative URI.
         [fail] [10:20:11]  
         Stack Trace:    at System.Uri.get_LocalPath()
            at H5.Translator.Translator.PrepareAndExtractResources(String outputPath, String projectPath)+MoveNext()
            at H5.Translator.Translator.PrepareResourcesForEmbedding(IEnumerable`1 resourcesToEmbed)
            at H5.Translator.Translator.InjectResources(String outputPath, String projectPath)
            at H5.Translator.TranslatorProcessor.PostProcess()
            at H5.Compiler.CompilationProcessor.Compile(CompilationRequest compilationRequest, UID128 compilationUID, CancellationToken cancellationToken)
     1>/home/andre/.nuget/packages/h5.target/0.0.11500/Sdk/Sdk.targets(462,9): error MSB3073: The command "h5 --project "/home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj" --configuration "Debug" --assembly-version "1.0.0.0"" exited with code 1.
     1>Done Building Project "/home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj" (build target(s)) -- FAILED.

Build FAILED.

       "/home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj" (build target) (1) ->
       (_H5Build target) -> 
         H5 : error H5003: This operation is not supported for a relative URI.
         /home/andre/.nuget/packages/h5.target/0.0.11500/Sdk/Sdk.targets(462,9): error MSB3073: The command "h5 --project "/home/andre/RiderProjects/Tetys/csharp/Test/Test.csproj" --configuration "Debug" --assembly-version "1.0.0.0"" exited with code 1.

    0 Warning(s)
    2 Error(s)

Time Elapsed 00:00:06.46

from h5.

theolivenbaum avatar theolivenbaum commented on August 25, 2024

from h5.

IceReaper avatar IceReaper commented on August 25, 2024

h5.json

{
  "html": {
    "disabled": false
  }
}

Program.cs

namespace Test
{
	using H5.Core;

	public class Program
	{
		public static void Main(string[] args)
		{
			dom.document.body.innerText = "Hello World!";
		}
	}
}

Test.csproj

<Project Sdk="h5.Target/0.0.11500">
    <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="h5" Version="0.0.8032" />
        <PackageReference Include="h5.Core" Version="0.0.8126" />
    </ItemGroup>
</Project>

from h5.

theolivenbaum avatar theolivenbaum commented on August 25, 2024

from h5.

IceReaper avatar IceReaper commented on August 25, 2024

Yes, Ubuntu 20.04.

from h5.

theolivenbaum avatar theolivenbaum commented on August 25, 2024

Hi @IceReaper - can you try one thing before I go into the code, just update the packages in your project to the latest:

<PackageReference Include="h5" Version="0.0.11453" />
<PackageReference Include="h5.core" Version="0.0.11860" />

I'll update the template project here too with the latest versions - need to automate this on the devops build...

from h5.

theolivenbaum avatar theolivenbaum commented on August 25, 2024

Here is the actual fully updated template: https://github.com/theolivenbaum/h5/blob/master/Template/templates/MyProject.csproj

from h5.

IceReaper avatar IceReaper commented on August 25, 2024

Im having the exact same error when using the newer packages :(

from h5.

theolivenbaum avatar theolivenbaum commented on August 25, 2024

Ok thanks for checking. I'll try to reproduce here and let you know what I find

from h5.

IceReaper avatar IceReaper commented on August 25, 2024

Yup, that prop made it work. Thank you very much :)
Ill leave this issue open however, till the problem itself is resolved.

from h5.

theolivenbaum avatar theolivenbaum commented on August 25, 2024

@IceReaper can you test the latest version and see if it fixed this?
dotnet tool update --global h5-compiler --version 0.0.13348

from h5.

IceReaper avatar IceReaper commented on August 25, 2024

I can confirm this is fixed.

from h5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.