C
C#9mo ago
MrScautHD

How can i save `Textures, Shaders...` in my nuget packet?

Hello, i try to save my textures and shaders in my nuget packet but it wont work that i what i tried:
<ItemGroup>
<Content Include="content/**/*" Pack="true">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="content/**/*" Pack="true">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
15 Replies
MrScautHD
MrScautHDOP9mo ago
nope the folder "content" in my appliction is empty how can i open this file? Or do you mean in the net8.0 folder that get generated?
MrScautHD
MrScautHDOP9mo ago
No description
MrScautHD
MrScautHDOP9mo ago
yep it is in there But why is it not loading in the project that uses this nuget packet if im reference the project instead using the nuget packet it loads the files fine yea
MrScautHD
MrScautHDOP9mo ago
No description
MrScautHD
MrScautHDOP9mo ago
what? oh no
MrScautHD
MrScautHDOP9mo ago
No description
MrScautHD
MrScautHDOP9mo ago
ah yea
MrScautHD
MrScautHDOP9mo ago
No description
MrScautHD
MrScautHDOP9mo ago
my nuget icon do not work anymore
MrScautHD
MrScautHDOP9mo ago
No description
MrScautHD
MrScautHDOP9mo ago
but i fixed it
MrScautHD
MrScautHDOP9mo ago
No description
MrScautHD
MrScautHDOP9mo ago
yea so how can i fix it now? the content folder i had that before i tested it with that and this didnt worked thats why i made a packagePath
MrScautHD
MrScautHDOP9mo ago
No description
MrScautHD
MrScautHDOP9mo ago
so replace the PreserveNewest ?
<ItemGroup>
<Content Include="content/**/*" Pack="true">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="content/**/*" Pack="true">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
or should i add it I add it because then the project that referance to it do not anymore work oh and leave it to true or set it to PreserveNewest oh and can i leave the package path then? whats about this? thx it didnt worked i tested it It copies not to the package And it looks like PackageCopyToOutput not exists
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>Sparkle</AssemblyName>
<RootNamespace>Sparkle</RootNamespace>
<Title>Sparkle</Title>
<Authors>MrScautHD</Authors>
<Description>A fast, Cross-platform .NET 8 C# 12 game engine.</Description>
<PackageProjectUrl>https://sparkle-engine.com/</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/MrScautHD/Sparkle/blob/main/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/MrScautHD/Sparkle</RepositoryUrl>
<PackageTags>OpenGL, Angle, Game, Engine, Renderer, Graphics, C#12, Net8, dotnet, Modern, Sparkle, 2D, 3D, Raylib, Fast, Physics, XNA, Cross-platform, Audio</PackageTags>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Version>3.0.0</Version>
<PackageIcon>content\images\icon.png</PackageIcon>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Jitter2" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="OpenTK.Graphics" Version="5.0.0-pre.10" />
<PackageReference Include="Raylib-cs" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<Content Include="content/**/*" Pack="true" PackagePath="content">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>Sparkle</AssemblyName>
<RootNamespace>Sparkle</RootNamespace>
<Title>Sparkle</Title>
<Authors>MrScautHD</Authors>
<Description>A fast, Cross-platform .NET 8 C# 12 game engine.</Description>
<PackageProjectUrl>https://sparkle-engine.com/</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/MrScautHD/Sparkle/blob/main/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/MrScautHD/Sparkle</RepositoryUrl>
<PackageTags>OpenGL, Angle, Game, Engine, Renderer, Graphics, C#12, Net8, dotnet, Modern, Sparkle, 2D, 3D, Raylib, Fast, Physics, XNA, Cross-platform, Audio</PackageTags>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Version>3.0.0</Version>
<PackageIcon>content\images\icon.png</PackageIcon>
<LangVersion>12</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Jitter2" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="OpenTK.Graphics" Version="5.0.0-pre.10" />
<PackageReference Include="Raylib-cs" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<Content Include="content/**/*" Pack="true" PackagePath="content">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
</ItemGroup>
</Project>
Oh yea with packagepath i dont have it i wanna try It laiter still does not work oh wait it did thx!! thx again! and is it normal to have contentfiles and content? in the nuget packet
Want results from more Discord servers?
Add your server