AvaloniaUI / XamlPlayground

Avalonia Xaml Playground
https://play.avaloniaui.net/
MIT License
58 stars 17 forks source link

How to build project from source? #2

Closed hummy123 closed 2 years ago

hummy123 commented 2 years ago

Hi there. I hope all is well.

I would like to contribute to this project to add some quality-of-life features (opening and saving external .a/xaml files, changing size of text in editor, eventually forking AvaloniaEdit to interact with the Avalonia language server available in the VS Code extension for code completion only), but I am just trying to build the project from source right now and running into errors.

I cloned this repository, as well as the AvaloniaEdit and AvaloniaBehaviors repositories which I placed into the modules folder.

I then entered dotnet run in the XamlPlayground.NetCore folder, but am shown the following errors at the top in yellow:

➜  XamlPlayground.NetCore dotnet run
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground.NetCore/XamlPlayground.NetCore.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Scripting 3.4.0 requires Microsoft.CodeAnalysis.Common (= 3.4.0) but version Microsoft.CodeAnalysis.Common 4.1.0-3.final was resolved.
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground/XamlPlayground.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Scripting 3.4.0 requires Microsoft.CodeAnalysis.Common (= 3.4.0) but version Microsoft.CodeAnalysis.Common 4.1.0-3.final was resolved. [/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground.NetCore/XamlPlayground.NetCore.csproj]
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground.NetCore/XamlPlayground.NetCore.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Scripting 3.4.0 requires Microsoft.CodeAnalysis.CSharp (= 3.4.0) but version Microsoft.CodeAnalysis.CSharp 4.1.0-3.final was resolved.
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground/XamlPlayground.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Scripting 3.4.0 requires Microsoft.CodeAnalysis.CSharp (= 3.4.0) but version Microsoft.CodeAnalysis.CSharp 4.1.0-3.final was resolved. [/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground.NetCore/XamlPlayground.NetCore.csproj]
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground.NetCore/XamlPlayground.NetCore.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.Scripting.Common 3.4.0 requires Microsoft.CodeAnalysis.Common (= 3.4.0) but version Microsoft.CodeAnalysis.Common 4.1.0-3.final was resolved.
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground/XamlPlayground.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.Scripting.Common 3.4.0 requires Microsoft.CodeAnalysis.Common (= 3.4.0) but version Microsoft.CodeAnalysis.Common 4.1.0-3.final was resolved. [/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground.NetCore/XamlPlayground.NetCore.csproj]
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground.NetCore/XamlPlayground.NetCore.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Scripting 3.4.0 requires Microsoft.CodeAnalysis.Common (= 3.4.0) but version Microsoft.CodeAnalysis.Common 4.1.0-3.final was resolved.
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground.NetCore/XamlPlayground.NetCore.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Scripting 3.4.0 requires Microsoft.CodeAnalysis.CSharp (= 3.4.0) but version Microsoft.CodeAnalysis.CSharp 4.1.0-3.final was resolved.
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground.NetCore/XamlPlayground.NetCore.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.Scripting.Common 3.4.0 requires Microsoft.CodeAnalysis.Common (= 3.4.0) but version Microsoft.CodeAnalysis.Common 4.1.0-3.final was resolved.
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground/XamlPlayground.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Scripting 3.4.0 requires Microsoft.CodeAnalysis.Common (= 3.4.0) but version Microsoft.CodeAnalysis.Common 4.1.0-3.final was resolved.
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground/XamlPlayground.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Scripting 3.4.0 requires Microsoft.CodeAnalysis.CSharp (= 3.4.0) but version Microsoft.CodeAnalysis.CSharp 4.1.0-3.final was resolved.
/home/humza/Downloads/XamlPlayground-main/src/XamlPlayground/XamlPlayground.csproj : warning NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.Scripting.Common 3.4.0 requires Microsoft.CodeAnalysis.Common (= 3.4.0) but version Microsoft.CodeAnalysis.Common 4.1.0-3.final was resolved.
/home/humza/.nuget/packages/microsoft.build.tasks.git/1.0.0/build/Microsoft.Build.Tasks.Git.targets(24,5): warning : Unable to locate repository with working directory that contains directory '/home/humza/Downloads/XamlPlayground-main/modules/AvaloniaBehaviors/src/Avalonia.Xaml.Interactivity'. [/home/humza/Downloads/XamlPlayground-main/modules/AvaloniaBehaviors/src/Avalonia.Xaml.Interactivity/Avalonia.Xaml.Interactivity.csproj]
/home/humza/.nuget/packages/microsoft.build.tasks.git/1.0.0/build/Microsoft.Build.Tasks.Git.targets(47,5): warning : Unable to locate repository with working directory that contains directory '/home/humza/Downloads/XamlPlayground-main/modules/AvaloniaBehaviors/src/Avalonia.Xaml.Interactivity'. [/home/humza/Downloads/XamlPlayground-main/modules/AvaloniaBehaviors/src/Avalonia.Xaml.Interactivity/Avalonia.Xaml.Interactivity.csproj]
/home/humza/.nuget/packages/microsoft.sourcelink.common/1.0.0/build/Microsoft.SourceLink.Common.targets(52,5): warning : Source control information is not available - the generated source link is empty. [/home/humza/Downloads/XamlPlayground-main/modules/AvaloniaBehaviors/src/Avalonia.Xaml.Interactivity/Avalonia.Xaml.Interactivity.csproj]
/home/humza/.nuget/packages/microsoft.build.tasks.git/1.0.0/build/Microsoft.Build.Tasks.Git.targets(24,5): warning : Unable to locate repository with working directory that contains directory '/home/humza/Downloads/XamlPlayground-main/modules/AvaloniaBehaviors/src/Avalonia.Xaml.Interactions'. [/home/humza/Downloads/XamlPlayground-main/modules/AvaloniaBehaviors/src/Avalonia.Xaml.Interactions/Avalonia.Xaml.Interactions.csproj]
/home/humza/.nuget/packages/microsoft.build.tasks.git/1.0.0/build/Microsoft.Build.Tasks.Git.targets(47,5): warning : Unable to locate repository with working directory that contains directory '/home/humza/Downloads/XamlPlayground-main/modules/AvaloniaBehaviors/src/Avalonia.Xaml.Interactions'. [/home/humza/Downloads/XamlPlayground-main/modules/AvaloniaBehaviors/src/Avalonia.Xaml.Interactions/Avalonia.Xaml.Interactions.csproj]
/home/humza/.nuget/packages/microsoft.sourcelink.common/1.0.0/build/Microsoft.SourceLink.Common.targets(52,5): warning : Source control information is not available - the generated source link is empty. [/home/humza/Downloads/XamlPlayground-main/modules/AvaloniaBehaviors/src/Avalonia.Xaml.Interactions/Avalonia.Xaml.Interactions.csproj]

And these errors below in white:

Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'Avalonia.Styling, Version=0.10.12.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b'. The system cannot find the file specified.

File name: 'Avalonia.Styling, Version=0.10.12.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b'
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Uri uri, Uri baseUri) in /_/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs:line 57
   at Avalonia.Markup.Xaml.Styling.StyleInclude.get_Loaded() in /_/src/Markup/Avalonia.Markup.Xaml/Styling/StyleInclude.cs:line 54
   at Avalonia.Markup.Xaml.Styling.StyleInclude.Avalonia.Controls.IResourceProvider.AddOwner(IResourceHost owner) in /_/src/Markup/Avalonia.Markup.Xaml/Styling/StyleInclude.cs:line 98
   at Avalonia.Styling.Styles.InternalAdd(IList items, IResourceHost owner, StyleCache& cache) in /_/src/Avalonia.Base/Styling/Styles.cs:line 257
   at Avalonia.Styling.Styles.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Base/Styling/Styles.cs:line 303
   at Avalonia.Collections.AvaloniaList`1.NotifyAdd(T item, Int32 index) in /_/src/Avalonia.Base/Collections/AvaloniaList.cs:line 700
   at Avalonia.Collections.AvaloniaList`1.Add(T item) in /_/src/Avalonia.Base/Collections/AvaloniaList.cs:line 205
   at Avalonia.Styling.Styles.Add(IStyle item) in /_/src/Avalonia.Base/Styling/Styles.cs:line 173
   at XamlPlayground.App.!XamlIlPopulate(IServiceProvider , App ) in /home/humza/Downloads/XamlPlayground-main/src/XamlPlayground/App.axaml:line 11
   at XamlPlayground.App.!XamlIlPopulateTrampoline(App )
   at XamlPlayground.App.Initialize() in /home/humza/Downloads/XamlPlayground-main/src/XamlPlayground/App.axaml.cs:line 13
   at Avalonia.Controls.AppBuilderBase`1.Setup() in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 287
   at Avalonia.Controls.AppBuilderBase`1.SetupWithLifetime(IApplicationLifetime lifetime) in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 148
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 208
   at XamlPlayground.NetCore.Program.Main(String[] args) in /home/humza/Downloads/XamlPlayground-main/src/XamlPlayground.NetCore/Program.cs:line 13

I would appreciate any hep with this if possible. Thank you.

wieslawsoltes commented 2 years ago
git submodule update --init --recursive