Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.CodeSharing.Common.Default.props Not Found in Gitpod #798

Open
SerratedSharp opened this issue Nov 6, 2023 · 4 comments
Open

Comments

@SerratedSharp
Copy link

Opened in gitpod using link on this page(https://platform.uno/docs/articles/external/uno.wasm.bootstrap/doc/contributing.html) and built sample using provided command. This is pointing to latest main, at the time commit 75b5b2445453378b0c1aa8ffc619e3485ae965d8. I also tried switching to the /stable/7.0 and /stable/8.0 stable branches after the below.

Is there additional setup that would be required to get sample running in gitpod or should it work out of the box?

Commands:

 gitpod@unoplatform-unowasmboot-keq64wcnn49:/workspace/Uno.Wasm.Bootstrap$ cd src/Uno.Wasm.Sample
gitpod@unoplatform-unowasmboot-keq64wcnn49:/workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample$ msbuild /r /bl

Build error:

Build FAILED.

"/workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample/Uno.Wasm.Sample.shproj" (default target) (1:2) ->
  /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample/Uno.Wasm.Sample.shproj(8,3): error MSB4019: The imported project "/usr/lib/mono/xbuild/Microsoft/VisualStudio/v16.0/CodeSharing/Microsoft.CodeSharing.Common.Default.props" was not found. Confirm that the expression in the Import declaration "/usr/lib/mono/xbuild/Microsoft/VisualStudio/v16.0/CodeSharing/Microsoft.CodeSharing.Common.Default.props" is correct, and that the file exists on disk.

    0 Warning(s)
    1 Error(s)

image

Full terminal output:

 HISTFILE=/workspace/.gitpod/cmd-1 history -r; {
export NUGET_PACKAGES=/workspace/.nuget
}
ILE=/workspace/.gitpod/cmd-1 history -r; {:/workspace/Uno.Wasm.Bootstrap$  HISTFI
> export NUGET_PACKAGES=/workspace/.nuget
> }
gitpod@unoplatform-unowasmboot-keq64wcnn49:/workspace/Uno.Wasm.Bootstrap$ cd src/Uno.Wasm.Sample
gitpod@unoplatform-unowasmboot-keq64wcnn49:/workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample$ msbuild /r /bl
Microsoft (R) Build Engine version 16.6.0 for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

/usr/lib/mono/msbuild/15.0/bin/MSBuild.dll /bl /r ./Uno.Wasm.Sample.shproj
Build started 11/06/2023 05:08:13.
Project "/workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample/Uno.Wasm.Sample.shproj" on node 1 (default targets).
/workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample/Uno.Wasm.Sample.shproj(8,3): error MSB4019: The imported project "/usr/lib/mono/xbuild/Microsoft/VisualStudio/v16.0/CodeSharing/Microsoft.CodeSharing.Common.Default.props" was not found. Confirm that the expression in the Import declaration "/usr/lib/mono/xbuild/Microsoft/VisualStudio/v16.0/CodeSharing/Microsoft.CodeSharing.Common.Default.props" is correct, and that the file exists on disk.
Done Building Project "/workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample/Uno.Wasm.Sample.shproj" (default targets) -- FAILED.
Deferred Messages
  
  Detailed Build Summary
  ======================
      
  
  ============================== Build Hierarchy (IDs represent configurations) =====================================================
  Id                  : Exclusive Time   Total Time   Path (Targets)
  -----------------------------------------------------------------------------------------------------------------------------------
  0                   : 0.261s           0.261s       /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample/Uno.Wasm.Sample.shproj (Restore) 
  
  ============================== Node Utilization (IDs represent configurations) ====================================================
  Timestamp:            1        Duration   Cumulative
  -----------------------------------------------------------------------------------------------------------------------------------
  638348440936891420:   0        0.264s     0.264s .....
  -----------------------------------------------------------------------------------------------------------------------------------
  Utilization:          100.0    Average Utilization: 100.0
  
  Detailed Build Summary
  ======================
      
  
  ============================== Build Hierarchy (IDs represent configurations) =====================================================
  Id                  : Exclusive Time   Total Time   Path (Targets)
  -----------------------------------------------------------------------------------------------------------------------------------
  1                   : 0.012s           0.012s       /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample/Uno.Wasm.Sample.shproj () 
  
  ============================== Node Utilization (IDs represent configurations) ====================================================
  Timestamp:            1        Duration   Cumulative
  -----------------------------------------------------------------------------------------------------------------------------------
  638348440936891420:   0        0.264s     0.264s .....
  638348440939650310:   1        0.012s     0.288s 
  -----------------------------------------------------------------------------------------------------------------------------------
  Utilization:          96.0     Average Utilization: 96.0

Build FAILED.

"/workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample/Uno.Wasm.Sample.shproj" (default target) (1:2) ->
  /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample/Uno.Wasm.Sample.shproj(8,3): error MSB4019: The imported project "/usr/lib/mono/xbuild/Microsoft/VisualStudio/v16.0/CodeSharing/Microsoft.CodeSharing.Common.Default.props" was not found. Confirm that the expression in the Import declaration "/usr/lib/mono/xbuild/Microsoft/VisualStudio/v16.0/CodeSharing/Microsoft.CodeSharing.Common.Default.props" is correct, and that the file exists on disk.

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.36
@SerratedSharp SerratedSharp changed the title Microsoft.CodeSharing.Common.Default.props Not Found in Gotpod Microsoft.CodeSharing.Common.Default.props Not Found in Gitpod Nov 6, 2023
@jeromelaban
Copy link
Member

jeromelaban commented Nov 7, 2023

Thanks for the report! Indeed, msbuild cannot be used with the latest sources, it has to be dotnet build. You should be able to alter the commands to use dotnet build.

@SerratedSharp
Copy link
Author

SerratedSharp commented Nov 9, 2023

Thanks for the report! Indeed, msbuild cannot be used with the latest sources, it has to be dotnet build. You should be able to alter the commands to use dotnet build.

Tried dotnet build Uno.Wasm.SampleNet7.csproj that with errors below. Are there newer images that should be used? I see the linked ones are labeled 3.0 in the yml: image: unoplatform/wasm-build:3.0, and the .NET SDK being used below is 3.1. I see some discussion on gitpod with similar errors as below but maybe that's red herring: gitpod-io/gitpod#8901 (comment)

Does a newer base image need to be used? Is there somewhere that references a base microsoft dot net SDK image that should be updated to something like mcr.microsoft.com/dotnet/sdk:8.0 ?


gitpod@unoplatform-unowasmboot-mi5zxjxxer7:/workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.SampleNet7$ dotnet build Uno.Wasm.SampleNet7.csproj

Welcome to .NET Core 3.1!
---------------------
SDK Version: 3.1.401

Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Find out what's new: https://aka.ms/dotnet-whats-new
Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
Write your first app: https://aka.ms/first-net-core-app
--------------------------------------------------------------------------------------
Microsoft (R) Build Engine version 16.7.0-preview-20360-03+188921e2f for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Restored /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Packager/Uno.Wasm.Packager.csproj (in 3.75 sec).
  Restored /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.AotProfiler/Uno.Wasm.AotProfiler.csproj (in 3.75 sec).
  Restored /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Tuner/Uno.Wasm.Tuner.csproj (in 3.75 sec).
  Restored /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Sample.Library/Uno.Wasm.Sample.Library.csproj (in 3.75 sec).
  Restored /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.LogProfiler/Uno.Wasm.LogProfiler.csproj (in 3.75 sec).
  Restored /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.MetadataUpdater/Uno.Wasm.MetadataUpdater.csproj (in 3.75 sec).
  Restored /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.SampleNet7/Uno.Wasm.SampleNet7.csproj (in 4.88 sec).
  Restored /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Bootstrap/Uno.Wasm.Bootstrap.csproj (in 5.25 sec).
  Restored /workspace/Uno.Wasm.Bootstrap/src/Uno.Wasm.Bootstrap.Cli/Uno.Wasm.Bootstrap.Cli.csproj (in 5.83 sec).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:06.79
MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
Microsoft.Build.BackEnd.NodeFailedToLaunchException: No such file or directory
 ---> System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.LaunchNode(String msbuildLocation, String commandLineArgs)
   --- End of inner exception stack trace ---
   at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.LaunchNode(String msbuildLocation, String commandLineArgs)
   at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.GetNode(String msbuildLocation, String commandLineArgs, Int32 nodeId, INodePacketFactory factory, Int64 hostHandshake, Int64 clientHandshake, NodeContextTerminateDelegate terminateNode)
   at Microsoft.Build.BackEnd.NodeProviderOutOfProc.CreateNode(Int32 nodeId, INodePacketFactory factory, NodeConfiguration configuration)
   at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration)
   at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity)
   at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable`1 responses)
   at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker)
   at Microsoft.Build.Execution.BuildManager.ProcessPacket(Int32 node, INodePacket packet)
   at Microsoft.Build.Execution.BuildManager.<>c__DisplayClass70_0.<Microsoft.Build.BackEnd.INodePacketHandler.PacketReceived>b__0()
   at Microsoft.Build.Execution.BuildManager.ProcessWorkQueue(Action action)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.Build.Execution.BuildManager.EndBuild()
   at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary`2 globalProperties, Dictionary`2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, TextWriter targetsWriter, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, Boolean isolateProjects, Boolean graphBuild, Boolean lowPriority, String[] inputResultsCaches, String outputResultsCache)

MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
Microsoft.Build.BackEnd.NodeFailedToLaunchException: No such file or directory
 ---> System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.LaunchNode(String msbuildLocation, String commandLineArgs)
   --- End of inner exception stack trace ---
   at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary`2 globalProperties, Dictionary`2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, TextWriter targetsWriter, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, Boolean isolateProjects, Boolean graphBuild, Boolean lowPriority, String[] inputResultsCaches, String outputResultsCache)
   at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
Unhandled exception. Microsoft.Build.BackEnd.NodeFailedToLaunchException: No such file or directory
 ---> System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.LaunchNode(String msbuildLocation, String commandLineArgs)
   --- End of inner exception stack trace ---
   at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary`2 globalProperties, Dictionary`2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, TextWriter targetsWriter, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, Boolean isolateProjects, Boolean graphBuild, Boolean lowPriority, String[] inputResultsCaches, String outputResultsCache)
   at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
   at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args)

@jeromelaban
Copy link
Member

A newer base image would be interesting, but it may not have all the required dependencies, so the Dockerfile will need to be adjusted a bit. It needs to be running net 8.0.100 now, not 3.1 which seems to be the version in your log above.

@SerratedSharp
Copy link
Author

SerratedSharp commented Dec 21, 2023

What environment/IDE do Uno devs typically use for building bootstrap from source?

Also, is there a yml somewhere that defines the base image unoplatform/wasm-build:3.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants