Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Try to run a program in VS Code with dotnet it don't work it say directions not found

$
0
0

This is the error I get whenever I try to run my C# code:

dotnet run --project ProjectName.csproj

Unhandled exception. System.IO.FileNotFoundException: The resource avares://ProjectName/Assets/avalonia-logo.ico could not be found.

at Avalonia.Platform.StandardAssetLoader.OpenAndGetAssembly(Uri uri, Uri baseUri)
at Avalonia.Platform.StandardAssetLoader.Open(Uri uri, Uri baseUri)
at Avalonia.Markup.Xaml.Converters.IconTypeConverter.CreateIconFromPath(ITypeDescriptorContext context, String s)
at Avalonia.Markup.Xaml.Converters.IconTypeConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at ProjectName.Views.MainWindow.!XamlIlPopulate(IServiceProvider , MainWindow ) in /home/usr/Dokumente/program/ProjectName/Views/MainWindow.axaml:line 4
at Project Program.Views.MainWindow.!XamlIlPopulateTrampoline(MainWindow )
at Project Program.Views.MainWindow.InitializeComponent(Boolean loadXaml) in /home/usr/Dokumente/program/ProjectName/Avalonia.Generators/Avalonia.Generators.NameGenerator.AvaloniaNameSourceGenerator/project program.Views.MainWindow.g.cs:line 22
at Project Program.Views.MainWindow..ctor() in /home/usr/Dokumente/program/ProjectName/Views/MainWindow.axaml.cs:line 9
at Project Program.App.OnFrameworkInitializationCompleted() in /home/usr/Dokumente/program/ProjectName/App.axaml.cs:line 20
at Avalonia.AppBuilder.SetupUnsafe()
at Avalonia.AppBuilder.Setup()
at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime)
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder)
at Project_Program.Program.Main(String[] args) in /home/usr/Dokumente/program/ProjectName/Program.cs:line 13

Direction are all correct I checked everything.

I use Arch Linux for everything

Checked .csproj / MainWindow.axaml / App.axaml / everywhere the correct location is used.

<Application xmlns="https://github.com/avaloniaui"             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"             xmlns:fluent="clr-namespace:Avalonia.Themes.Fluent;assembly=Avalonia.Themes.Fluent"             x:Class="Program_Name.App"><Application.Styles><fluent:FluentTheme /></Application.Styles></Application>
<Window xmlns="https://github.com/avaloniaui"        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        x:Class="Projekt Name.Views.MainWindow"        Icon="avares://Project_Name/Assets/avalonia-logo.ico"><StackPanel></StackPanel></Window>
<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><OutputType>Exe</OutputType><TargetFramework>net6.0</TargetFramework><AssemblyName>Project_Name</AssemblyName> </PropertyGroup><ItemGroup><PackageReference Include="Avalonia" Version="11.0.11" /><PackageReference Include="Avalonia.Desktop" Version="11.0.11" /><PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.11" /><PackageReference Include="OpenCvSharp4" Version="4.10.0.20240616" /><PackageReference Include="MetadataExtractor" Version="2.2.0" /><PackageReference Include="Tesseract" Version="4.1.1" /><PackageReference Include="ReactiveUI" Version="18.3.1" /><PackageReference Include="Avalonia.ReactiveUI" Version="11.0.11" /></ItemGroup><ItemGroup><None Update="Assets/avalonia-logo.ico"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></None></ItemGroup><PropertyGroup><RestoreSources>      https://api.nuget.org/v3/index.json;</RestoreSources></PropertyGroup></Project>

Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>